diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-04-14 16:19:37 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-04-14 16:19:37 +0000 |
commit | 3835d3dc40aa8ed954ed9f3b9517c2546bbdfc9c (patch) | |
tree | 16a54698553e5bab67f45778a1183959b241e446 /sys-libs/timezone-data | |
parent | fixing CVE-2015-1852 (diff) | |
download | historical-3835d3dc40aa8ed954ed9f3b9517c2546bbdfc9c.tar.gz historical-3835d3dc40aa8ed954ed9f3b9517c2546bbdfc9c.tar.bz2 historical-3835d3dc40aa8ed954ed9f3b9517c2546bbdfc9c.zip |
Shuffle filesystem layout to match upstream -- zoneinfo/posix/ and zoneinfo/right/ no longer exist; instead they're zoneinfo-posix and zoneinfo-leaps.
Package-Manager: portage-2.2.18/cvs/Linux x86_64
Manifest-Sign-Key: 0xD2E96200
Diffstat (limited to 'sys-libs/timezone-data')
-rw-r--r-- | sys-libs/timezone-data/ChangeLog | 11 | ||||
-rw-r--r-- | sys-libs/timezone-data/Manifest | 32 | ||||
-rw-r--r-- | sys-libs/timezone-data/files/timezone-data-2015c-makefile.patch | 86 | ||||
-rw-r--r-- | sys-libs/timezone-data/metadata.xml | 5 | ||||
-rw-r--r-- | sys-libs/timezone-data/timezone-data-2015c-r1.ebuild | 143 |
5 files changed, 261 insertions, 16 deletions
diff --git a/sys-libs/timezone-data/ChangeLog b/sys-libs/timezone-data/ChangeLog index fc1341e56f46..280ea896579e 100644 --- a/sys-libs/timezone-data/ChangeLog +++ b/sys-libs/timezone-data/ChangeLog @@ -1,6 +1,15 @@ # ChangeLog for sys-libs/timezone-data # Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/ChangeLog,v 1.325 2015/04/14 15:38:19 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/ChangeLog,v 1.326 2015/04/14 16:19:36 vapier Exp $ + +*timezone-data-2015c-r1 (14 Apr 2015) + + 14 Apr 2015; Mike Frysinger <vapier@gentoo.org> + +files/timezone-data-2015c-makefile.patch, +timezone-data-2015c-r1.ebuild, + metadata.xml: + Shuffle filesystem layout to match upstream -- zoneinfo/posix/ and + zoneinfo/right/ no longer exist; instead they're zoneinfo-posix and zoneinfo- + leaps. *timezone-data-2015c (14 Apr 2015) diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest index 63471a0df293..aa5d804fe32b 100644 --- a/sys-libs/timezone-data/Manifest +++ b/sys-libs/timezone-data/Manifest @@ -12,6 +12,7 @@ AUX timezone-data-2014f-makefile.patch 3750 SHA256 a8d2438e4cd132052acdb4fd17f99 AUX timezone-data-2014g-makefile.patch 3833 SHA256 71eb5fb7a78c6f08d72bd8c69ae06701c064c411708e05101b1fe324f1fafa05 SHA512 fa2edfc02fa0a482709edbcbe255a438973fd38c5ce12873ae366366b4e5d2eab2b79c6881ebaad018a4e1ff553eadbe3df226764e6cf8db128b864a51d32ecd WHIRLPOOL a16c58b755c490ca3c9df3052e4f7291aa91d04fe170f2b14f18d53217eea8adef92222b745682d00d40f59dfbfd08d7fc10d961953149861e96eb419f70f3cd AUX timezone-data-2014h-makefile.patch 3811 SHA256 815932985476d2ff349e7dbbe8f22d136ec753575eca65b676ab6425b0fde0c7 SHA512 0cd2312d526015420a3195658471d1e94da3b7743f8fd7725c968bbff1486f0178314a63eadab8b54fbafea8e149fcd5230efbc837258b6786423134d6a2ee31 WHIRLPOOL e3b34dddbd5cfd055bbf16ecd746c0512c5e210581025c32d0a6db2600d465f3a01cfb05c8183fb8dfa3438c73f2b3acc4d64ca35c327480e64a226ab754be27 AUX timezone-data-2015a-makefile.patch 3823 SHA256 bfa72cc46dd00524e2a0f3f89395838b6c0085725d4b0d72799aa0cfe30a01f5 SHA512 b03a3afcfb0ede401aca62ad9fad0bf1fbc61a1d73dc32b1e468ce2e35b96a681a14e22564bafe43301fdf651555357488bafd890aeb9d1eac7713d8da2be839 WHIRLPOOL 950778014c82f9ffc2b576043863a9a3179fa8b6e687524799c78e04b2e098b7171f330142e580867754842c9f53279fbba8f4c7180e1607d7450e9b1f23bf5d +AUX timezone-data-2015c-makefile.patch 2638 SHA256 1404c450d67ee867bc551973427f95383b47c7c40098be5c7a99b2f052dba446 SHA512 b0d290045aec46db288be1d0a1edbe8fa55086d401c430dd0c6117901a3b57cab6958e9a548d1a4905ac3489e49c788a39ff80e3dcc0fd087c9a2b627e5696ad WHIRLPOOL 296b0bd1f3e71e56c6862ed3cbfc55a7888f4ae14d584a38236e6a32a6af57189796dd63ffebf048cf79077be80b9d4482085029192891736ef085580bd63d5f DIST tzcode2012j.tar.gz 134654 SHA256 ee4361b3b4ae201a270857c84d0f063c2a2191b3e4cd7414ea4622bb8bae9a82 SHA512 a0182438fedb1d855b52c0734f52bfd4dd3707d65c6f347833d5a68aab132a68f2b77a0e182d7ecfe7c58185245d7181ab01da909c2fdc84b71150c3090382c2 WHIRLPOOL 430e7320976e184753364d034f16109713a350ec0828d864be2f30ce6d29dd403d8f9c25866f828c664f0324f57ad72197fd752ba343f316d80d7c11a1ebdee6 DIST tzcode2013i.tar.gz 173169 SHA256 63bba6790afc1cb2ea0af2b998a35fc237e247608140dbe4e08b4216a8c31358 SHA512 863d181339d8b44ae9876a02e436da33b723f81e592a0e0f51f1300a2dac277bc18ed422b8631e27032769620323c94c848f3abc926d8bc28074d3d4b4bb8a28 WHIRLPOOL 9de16a388ac7a1e7965b1aaed4461657a2f822a08fe6c8c5f025bdad6512b53ef0ea6960ef03bc372df3541f9c8588797cd1e2b2dcecb10afb9041965b3684a1 DIST tzcode2014i.tar.gz 181815 SHA256 62591075fb0d47459889b71bac3c8487f09b7417b81dfa541d750b4889e84783 SHA512 ed780815a1e209616c791997f14da56cb9311c6585b70c503b32a11e8ec15e0dc04c37bdeaa5a1a1378ada714935a2d931679d0aa4ab42808d185b600e5d0582 WHIRLPOOL ba5bdf8117b64eda76dc559dd211fa83ee0662792a93004fd696b3d8463da2046d91a0cb45b88656230ac935b528b5cd3e8ce9a460c5e27fdb0b4a19ddadb666 @@ -32,23 +33,24 @@ EBUILD timezone-data-2014i-r1.ebuild 4387 SHA256 9bd6c81988e70db63fa78b58bec3c78 EBUILD timezone-data-2014j.ebuild 4384 SHA256 a7a460664a6e03e31f90a591a9179603fa006bf1b1378756aca01552051b1969 SHA512 7f647e11b2d307f384192dd0fb0d372bf887c25dc62c615c05539fd8e9a9c95d6be944972f43e2d54c32015ad6a38c35c72758996c5e72d61af29d07cb03d6a9 WHIRLPOOL 991a16c94ec780eca86a8caf2786e811ac45a0aa2bab6aced341a9741f0d025f9892a4ea7cd5d392b823ead1e33ef79dd6d6a3613f894dfe82609a34e0c8329e EBUILD timezone-data-2015a.ebuild 4423 SHA256 729504430de5ebe2acb3fa2f2f0eb154a79692c66608d9b32b599278ef7396b0 SHA512 5821c227466c450148e6b8ab5f8736a906fc3861652a04fe22050f21c5db21578490e4e80614e0e228c861d350484e4eaed1d978fdfa94ef6ed4b709aa7fa39c WHIRLPOOL 40e758e98bd45cbfe82ba961fefecfde0e58f0de50d9f6f34ca14740b36ffe9d80f42fb961f435ac9085a3388ef32f1e9a9a167ec9211cfd64f98606935a8896 EBUILD timezone-data-2015b.ebuild 4423 SHA256 6567e8315d3df40f5de232ccc2ef0e6b368e42e171573d8f4d897269a5b91d30 SHA512 56406ab11a7cdba7097752d7ce6ade4e4ab8184259ca3a1a7151ad9b953033c9de9d95e54c46407277407fd0c3e5c29f6b6f7753c1fd4bb1f0dcf0a030f06508 WHIRLPOOL d10a32c66ac571592967202452efa749410b9349215bcbb148c2bb3f1c01ed4a302f2e1c2d5e0dd500ecff3bb64102e9226668a4e8a7ffb1edfa4f9dab08b990 +EBUILD timezone-data-2015c-r1.ebuild 4460 SHA256 5e406a42add9f6f9810defab78cc4bdbbe8692f32dd9823fde7cad6468b9a653 SHA512 a9d0c8f06a3302fb9311dc8bdc7f231d53e63b4d43540fc1d3b7e2409a5124651bbaf2952dcea09924cc081bc4a5dd9201dc0adf5e7ef903254b7d9ca77ee8b3 WHIRLPOOL e45299e857a65dbe2052c55341539a0872adfcb13b297cf27efbe747ff75c13665bec99ce1c853997763de6c6a882bd63c04aecf4934b92f6f5e1d631ee991e5 EBUILD timezone-data-2015c.ebuild 4436 SHA256 a4341d9980cc1646b19911b7aaf1c54081644b215fa1c39ff91825f60e2fd8ec SHA512 1e6b5a4f1ead5c80afe4d5d40e395c32c23ab2851b2e15bc4feddf2633d701026bdc4665d52a9ebee05116316cfc3898cc176d32867ac82b74893d3a07ef5469 WHIRLPOOL 4f1efc7073399ff9179a8b8d9771b52d22f17cc8410badd6cb390c9c685ded3f6a565db26f82d26c45f198398b973bb11ae4599f49dda786ccc7eeb954c82ea6 -MISC ChangeLog 44350 SHA256 7488a4c347398d7f64fe4a95b8f3ecda11152c165db9ea9fa2aba2b042a7412e SHA512 224c8c29a5e553fa4df258c13b8006d5f035f058d5fa9a64ccf61ca8c961aabbcb58d6906ecaa7008c7d9a816bb9a80ec9dea53e0ec2093c2bd8ff65a2cc43f9 WHIRLPOOL ca5fece2e224b1fdf1fb336f69d6eeaaa8e72adbebffb8afd4dc27fbe61d6c1caae104e94a67e3d8df17eef1bc98ec97f959a127142d14bbaea70da59b08d35b -MISC metadata.xml 472 SHA256 4ab35a5283c62aa867e05bcfdcaeb90e5ac191347a32735d37290885502a2511 SHA512 f91ce6146a369ddb6ee82c0d6e221ceb1fbe9beb073c2e37c27b07e0684c701328891a51f58ef9fefea6007e0111979af7034787b167735fb6d79c8462d9dfcc WHIRLPOOL ab3bbde9fbc205a887f591b7362034b01081c9a477dab314acfd92b4aa4b7e010532fdee7b2684504044fb3df2e8e8d09466d67765ec9feff3a2223ff7c54a1e +MISC ChangeLog 44691 SHA256 7c72a1c439f3a6495696ab9de6dd07278bb1fa23fde251e0e7d6056cc6bbd7e2 SHA512 02a12209409342fd3aa94d025152a067ea5b49474d1bfaea638e2eef96e532f53aaaa9bd5177d27535740fd83c5075d0ace7cf6f681a4cec3820375fa20cd59c WHIRLPOOL 2b2653750e585984a5b2ad7439992a3c6fb7bfd26cb8c0cec1a710bbdfa7ea3d2c0ed4d533234a3a289f36727ada8afc47f6a31a0a16dc1fee01bb402382a927 +MISC metadata.xml 734 SHA256 cef69f37f5b75d5251a18306ade42e9b6f3cb69f0bdb6c516daea613708c997e SHA512 6f3471d8ecf69c73a324bdc1c3fc4b7b71f75b3d539cfc1ca160f3a9950e7ed3d285027a6a21bb34bb3cb36ce48e396473d6d78bbc50ac841afd7314271aeaf1 WHIRLPOOL b2d600cb1a6539abac53c239fd122532c8790c8d6312efcb392abc0b53e227bc467936766aa7075909f61be1ab6acc78d5c277ad50dc0cfd68474d9b97ee4307 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQIcBAEBCAAGBQJVLTRsAAoJEPGu1DbS6WIAvP4QAJZcTn/VH4slVF3r0wQvt6jL -3O50BQXAW63NEeO87TBkBPZ10KD+1sLczfbVu5P8G457vMGDvmFvqrhMvZmrXk12 -abbB6ovQUWPAx2iWdDopQdQXWiEpO0d1BFRUfA1mI4VIp4NiVpJt9CVzTEBS+R9C -UOCm95UUDwh60luFf7OSDVQ7fAJi+obUwLv8KpKG5io/xYsIzXaa6afQdjE/nNLY -biFo0dTjtiIWnIzPcINBkJlZ42QpNu+sfKAUjsEh+FwdwSnMuBQt7Enh0VaPXKc/ -EFYlKGeDdGKbdMPCLyGrB1jaXNd2876uX0qzSi3OqKMsFY18bOl0iuKPRnIaSy0s -OcTG9u6yis5Ms9ZTtN8tsbrvqY4OkOwit0PFa3NtELI3Wd+mPK0DpkeRGyn4B8xO -O8b9iL27efpRLXEIf6qvKVDLwj055QEAS0IAZiXWuFmkHL7XlPhfX9DY6n2GLKDJ -S/ovwDau2XrJfsZicZ2EVknyQFPtiB69G5bWRj0w/Vh/r9Dnv3YuOEQUkyJlZbVk -g3c3dOYTOV+cAvxSjMmowgB2DrRw1iLzJpClILnqtFRk3uvyhNu7k1tFchCYrt0e -JodilQcoX2HA1+DK9Fh6aFNoSZSbx90sBHDNWVcxF/FXcAeNdvCMkTv+rXdUL3gi -SL/l9Am6JKNPLyz0DVLz -=VEcb +iQIcBAEBCAAGBQJVLT4YAAoJEPGu1DbS6WIAn7wP/3TTRh2qRprFo9BOACuUn2M6 +A3KSiXtL2WJb01PvkdSYRDy12fVqOb0PEuiqS8uTReOtQ8u0x1IwLWhrI5oMRYpD +xM2UVT0QpMMfw9ZfGsvz1+J8/dykNqyluu4mJ6rhw1UpLJkGU4HLojbQQc2h4xmi +Lhpe2tg2IAMLe0xJ2WKFRJ0wPL1+a296wQjHfStMcZFf4XQiPnpvszKyZ0MdYSRa +KmxBOW4v+iLQ7aSCxNYdg/tTv1Rwrjj4Siezg53RKX+8GtiApj5NK4msJ0zA6k6U +AzDXRCeArRfsiliyDoXkhwimJW8PwmrI4z3AdSKI+58hsmVMgiNajBvjYXMRv1ye +8nus0kg/hlKyvHd5+2jydZ+Yj9yq1WHt0OjMvI4jYHlSEM25c08q/KHrkxUEO0XG +63g9yFDw9/sYoB8xgMob3KRdMbV4P1MteYLLKJlsD5/10oXDbPWBN1Edsovoamqh +ZESOw+ZBvVptaa5PlR3YnW/knD9WwghyeR/4lqk1SNqwdC/u8+tTEWJlk1hAR6Hk +sRyuAUL6pEGbNWFKQXu0ZmQ2vjAF5Oy0LTVH4y8sED/GG7aZ8Auxo1VfP4zSsac+ +senoEFJSbhFwnMsF56CJdktKDIxefkrbsUXH2/KlHlbf1zdZN71nxLY/7xN9hHjo +HS70H3zxBSx9/TOHwM86 +=CGeL -----END PGP SIGNATURE----- diff --git a/sys-libs/timezone-data/files/timezone-data-2015c-makefile.patch b/sys-libs/timezone-data/files/timezone-data-2015c-makefile.patch new file mode 100644 index 000000000000..fef0f84f0878 --- /dev/null +++ b/sys-libs/timezone-data/files/timezone-data-2015c-makefile.patch @@ -0,0 +1,86 @@ + - Fix up default paths + - Support env CC + - Don't build/install libtz.a + - Don't install man-pages provided by sys-apps/man-pages + - Move zic, zdump to sbin and tzselect to bin ala glibc + - Do not run network based unittests + +--- a/Makefile ++++ b/Makefile +@@ -45,21 +45,21 @@ POSIXRULES= America/New_York + + # Everything gets put in subdirectories of. . . + +-TOPDIR= /usr/local ++TOPDIR= /usr + + # "Compiled" time zone information is placed in the "TZDIR" directory + # (and subdirectories). + # Use an absolute path name for TZDIR unless you're just testing the software. + + TZDIR_BASENAME= zoneinfo +-TZDIR= $(TOPDIR)/etc/$(TZDIR_BASENAME) ++TZDIR= $(TOPDIR)/share/$(TZDIR_BASENAME) + + # Types to try, as an alternative to time_t. int64_t should be first. + TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t + + # The "tzselect", "zic", and "zdump" commands get installed in. . . + +-ETCDIR= $(TOPDIR)/etc ++SBINDIR= $(TOPDIR)/sbin + + # If you "make INSTALL", the "date" command gets installed in. . . + +@@ -67,7 +67,7 @@ BINDIR= $(TOPDIR)/bin + + # Manual pages go in subdirectories of. . . + +-MANDIR= $(TOPDIR)/man ++MANDIR= $(TOPDIR)/share/man + + # Library functions are put in an archive in LIBDIR. + +@@ -298,8 +298,10 @@ GZIPFLAGS= -9n + + ############################################################################### + +-cc= cc +-CC= $(cc) -DTZDIR=\"$(TZDIR)\" ++CPPFLAGS+= -DTZDIR=\"$(TZDIR)\" ++ifeq ($(NLS),1) ++CPPFLAGS+= -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\" ++endif + + AR= ar + +@@ -352,17 +354,14 @@ ALL: all date + install: all $(DATA) $(REDO) $(MANS) + mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \ +- $(DESTDIR)$(LIBDIR) \ ++ $(DESTDIR)$(SBINDIR) $(DESTDIR)$(BINDIR) \ + $(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \ + $(DESTDIR)$(MANDIR)/man8 + $(ZIC) -y $(YEARISTYPE) \ + -d $(DESTDIR)$(TZDIR) -l $(LOCALTIME) -p $(POSIXRULES) + cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/. +- cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/. ++ cp zic zdump $(DESTDIR)$(SBINDIR)/. ++ cp tzselect $(DESTDIR)$(BINDIR)/. +- cp libtz.a $(DESTDIR)$(LIBDIR)/. +- $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a + cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/. +- cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/. +- cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/. + + INSTALL: ALL install date.1 + mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1 +@@ -440,7 +442,7 @@ tzselect: tzselect.ksh + chmod +x $@ + + check: check_character_set check_white_space check_links check_sorted \ +- check_tables check_web ++ check_tables + + check_character_set: $(ENCHILADA) + LC_ALL=en_US.utf8 && export LC_ALL && \ diff --git a/sys-libs/timezone-data/metadata.xml b/sys-libs/timezone-data/metadata.xml index 5ea94458ee74..541771197a2b 100644 --- a/sys-libs/timezone-data/metadata.xml +++ b/sys-libs/timezone-data/metadata.xml @@ -7,6 +7,11 @@ <name>Dirkjan Ochtman</name> </maintainer> <use> + <flag name='leaps_timezone'> + Install the set of "right" timezones; these timezones include leap seconds + when counting seconds since the epoch (while POSIX does not) as they are + based on the TAI (International Atomic Time) clock + </flag> <flag name='right_timezone'> Install the set of "right" timezones; these timezones include leap seconds when counting seconds since the epoch (while posix does not) diff --git a/sys-libs/timezone-data/timezone-data-2015c-r1.ebuild b/sys-libs/timezone-data/timezone-data-2015c-r1.ebuild new file mode 100644 index 000000000000..be1a4825a957 --- /dev/null +++ b/sys-libs/timezone-data/timezone-data-2015c-r1.ebuild @@ -0,0 +1,143 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2015c-r1.ebuild,v 1.1 2015/04/14 16:19:36 vapier Exp $ + +EAPI="4" + +inherit eutils toolchain-funcs flag-o-matic + +code_ver=${PV} +data_ver=${PV} +DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)" +HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm" +SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz + http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz" + +LICENSE="BSD public-domain" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="nls leaps_timezone elibc_FreeBSD elibc_glibc" + +RDEPEND="!sys-libs/glibc[vanilla(+)]" + +S=${WORKDIR} + +src_prepare() { + epatch "${FILESDIR}"/${PN}-2015c-makefile.patch + tc-is-cross-compiler && cp -pR "${S}" "${S}"-native +} + +_emake() { + emake \ + TOPDIR="${EPREFIX}/usr" \ + REDO=$(usex leaps_timezone posix_right posix_only) \ + "$@" +} + +src_compile() { + local LDLIBS + tc-export CC + if use elibc_FreeBSD || use elibc_Darwin ; then + append-cppflags -DSTD_INSPIRED #138251 + fi + export NLS=$(usex nls 1 0) + if use nls && ! use elibc_glibc ; then + LDLIBS+=" -lintl" #154181 + fi + # TOPDIR is used in some utils when compiling. + _emake \ + AR="$(tc-getAR)" \ + CC="$(tc-getCC)" \ + RANLIB="$(tc-getRANLIB)" \ + CFLAGS="${CFLAGS} -std=gnu99" \ + LDFLAGS="${LDFLAGS}" \ + LDLIBS="${LDLIBS}" + if tc-is-cross-compiler ; then + _emake -C "${S}"-native \ + CC="$(tc-getBUILD_CC)" \ + CFLAGS="${BUILD_CFLAGS}" \ + CPPFLAGS="${BUILD_CPPFLAGS}" \ + LDFLAGS="${BUILD_LDFLAGS}" \ + LDLIBS="${LDLIBS}" \ + zic + fi +} + +src_install() { + local zic="" + tc-is-cross-compiler && zic="zic=${S}-native/zic" + _emake install ${zic} DESTDIR="${D}" + dodoc CONTRIBUTING README NEWS Theory + dohtml *.htm +} + +get_TIMEZONE() { + local tz src="${EROOT}etc/timezone" + if [[ -e ${src} ]] ; then + tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") + else + tz="FOOKABLOIE" + fi + [[ -z ${tz} ]] && return 1 || echo "${tz}" +} + +pkg_preinst() { + local tz=$(get_TIMEZONE) + if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then + eerror "The right & posix subdirs are no longer installed as subdirs -- they have been" + eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the" + eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not" + eerror "be using right/xxx for the system timezone as it breaks programs." + die "Please fix your timezone setting" + fi + + # Trim the symlink by hand to avoid portage's automatic protection checks. + rm -f "${EROOT}"/usr/share/zoneinfo/posix + + if has_version "<=${CATEGORY}/${PN}-2015c" ; then + elog "Support for accessing posix/ and right/ directly has been dropped to match" + elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx." + elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post" + elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html" + fi +} + +pkg_config() { + # make sure the /etc/localtime file does not get stale #127899 + local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime" + + tz=$(get_TIMEZONE) || return 0 + if [[ ${tz} == "FOOKABLOIE" ]] ; then + elog "You do not have TIMEZONE set in ${src}." + + if [[ ! -e ${etc_lt} ]] ; then + # if /etc/localtime is a symlink somewhere, assume they + # know what they're doing and they're managing it themselves + if [[ ! -L ${etc_lt} ]] ; then + cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}" + elog "Setting ${etc_lt} to Factory." + else + elog "Assuming your ${etc_lt} symlink is what you want; skipping update." + fi + else + elog "Skipping auto-update of ${etc_lt}." + fi + return 0 + fi + + if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then + elog "You have an invalid TIMEZONE setting in ${src}" + elog "Your ${etc_lt} has been reset to Factory; enjoy!" + tz="Factory" + fi + if [[ -L ${etc_lt} ]]; then + einfo "Skipping symlinked ${etc_lt}" + else + einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}" + cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}" + fi +} + +pkg_postinst() { + pkg_config +} |