summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-01-11 08:29:12 +0000
committerSam James <sam@gentoo.org>2023-01-11 08:31:33 +0000
commitc38091828cc53772a483b9affca5daa39baf050e (patch)
treec1d775b67dd2e5eb605b696ac9de7f7bcb207a25 /sys-libs/timezone-data
parentsci-libs/NNPACK: drop changes to optimization option (diff)
downloadgentoo-c38091828cc53772a483b9affca5daa39baf050e.tar.gz
gentoo-c38091828cc53772a483b9affca5daa39baf050e.tar.bz2
gentoo-c38091828cc53772a483b9affca5daa39baf050e.zip
sys-libs/timezone-data: drop 2022f, 2022f-r1
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-libs/timezone-data')
-rw-r--r--sys-libs/timezone-data/Manifest2
-rw-r--r--sys-libs/timezone-data/files/timezone-data-2022f-musl.patch181
-rw-r--r--sys-libs/timezone-data/timezone-data-2022f-r1.ebuild201
-rw-r--r--sys-libs/timezone-data/timezone-data-2022f.ebuild197
4 files changed, 0 insertions, 581 deletions
diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
index f77fe1d38129..0d6b81efbc65 100644
--- a/sys-libs/timezone-data/Manifest
+++ b/sys-libs/timezone-data/Manifest
@@ -1,4 +1,2 @@
-DIST tzcode2022f.tar.gz 284816 BLAKE2B 3bfcc25323edbdd41aadcbb5c8b0d9179a809a87b22afc9dda88a53c6daab742778956af7aa30722429d34601fb2ad3c4222c48497e0a429926cd05b79b9acfb SHA512 3e2ef91b972f1872e3e8da9eae9d1c4638bfdb32600f164484edd7147be45a116db80443cd5ae61b5c34f8b841e4362f4beefd957633f6cc9b7def543ed6752b
DIST tzcode2022g.tar.gz 287901 BLAKE2B b67bb2020913c57cc6bc68d231c53ba645b95305256065e2645bce3b0d71adfaea865ed9bf40f1ec3b4a73aad7e6c48f5ecd0895de6e2d69bed6113d6b579e26 SHA512 5188edd8d05238a88da734cf78fadfb57640d4db3e7a0a9dddd70e3071e16b6eebc2e2ab17109b7dafafae68abfbc857df481cfdc3ffe63f7eb1569ea0b5997a
-DIST tzdata2022f.tar.gz 436352 BLAKE2B 8081972005ac84034957bb85013b373df67937c3f811e33c44fad7ecee0f504b946766fdb1f525d0512b9a8d8e727ee3d8d44640ff55bed3fcd1f3fb3c464c17 SHA512 72d05d05be999075cdf57b896c0f4238b1b862d4d0ed92cc611736592a4ada14d47bd7f0fc8be39e7938a7f5940a903c8af41e87859482bcfab787d889d429f6
DIST tzdata2022g.tar.gz 439731 BLAKE2B 582b79cc2317d27f3883042cbca25801397d9e2808ad8d3a340017d635372ef20316ce646a25a43b0ea5d4024841b54925ecc4510613295c39c28647989645cb SHA512 7f79394295e00e3a24ebdbf9af3bc454a65f432a93b517e7e96c7f9db9949f6f5fdae9892a9d3789ff44ae0eb1bfe4744d36976b4624659af951d26414f94e65
diff --git a/sys-libs/timezone-data/files/timezone-data-2022f-musl.patch b/sys-libs/timezone-data/files/timezone-data-2022f-musl.patch
deleted file mode 100644
index 3bbb1ea2a772..000000000000
--- a/sys-libs/timezone-data/files/timezone-data-2022f-musl.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-https://github.com/eggert/tz/commit/a91830b783db3bb481930c67914d3c16b821f717
-https://github.com/eggert/tz/commit/dbe87fe421f76a3d1ac31082868ce60dfcbdefc4
-https://github.com/eggert/tz/commit/b037132599996358fe4774912b7405db0f5b0ee1
-https://github.com/eggert/tz/commit/317cc2c05a0acd02597e9db2b97af078630c1dde
-https://github.com/eggert/tz/commit/f4808ee8fa61b0df82337e8f0fa02ca3db598cb8
-
-From a91830b783db3bb481930c67914d3c16b821f717 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Fri, 28 Oct 2022 22:55:10 -0700
-Subject: [PATCH] Fix tzalloc bug on platforms lacking tm_zone
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Problem reported by Đoàn Trần Công Danh in:
-https://mm.icann.org/pipermail/tz/2022-October/032153.html
-* zdump.c (tzalloc) [!USE_LOCALTIME_RZ && HAVE_SETENV]:
-Return a nonnull pointer.
---- a/zdump.c
-+++ b/zdump.c
-@@ -234,7 +234,7 @@ tzalloc(char const *val)
- exit(EXIT_FAILURE);
- }
- tzset();
-- return NULL;
-+ return &progname; /* Any valid non-null char ** will do. */
- # else
- enum { TZeqlen = 3 };
- static char const TZeq[TZeqlen] = "TZ=";
-
-From dbe87fe421f76a3d1ac31082868ce60dfcbdefc4 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Fri, 28 Oct 2022 23:22:26 -0700
-Subject: [PATCH] Port struct tm guessing to musl
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Prompted by report from Đoàn Trần Công Danh in:
-https://mm.icann.org/pipermail/tz/2022-October/032153.html
-* private.h (TM_GMTOFF, TM_ZONE): By default, assume they
-work on musl, which #defines __tm_zone.
---- a/private.h
-+++ b/private.h
-@@ -613,6 +613,7 @@ time_t posix2time(time_t);
- /* Infer TM_ZONE on systems where this information is known, but suppress
- guessing if NO_TM_ZONE is defined. Similarly for TM_GMTOFF. */
- #if (defined __GLIBC__ \
-+ || defined __tm_zone /* musl */ \
- || defined __FreeBSD__ || defined __NetBSD__ || defined __OpenBSD__ \
- || (defined __APPLE__ && defined __MACH__))
- # if !defined TM_GMTOFF && !defined NO_TM_GMTOFF
-
-From b037132599996358fe4774912b7405db0f5b0ee1 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Fri, 28 Oct 2022 23:52:59 -0700
-Subject: [PATCH] =?UTF-8?q?Don=E2=80=99t=20assume=20nonempty=20argv?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Don’t dump core if argv[0] is NULL, which is allowed on
-GNU/Linux if the invoker is sufficiently perverse.
-* zdump.c (progname): Now char const *, so that it can be given
-the address of a string constant.
-(tzalloc): Use optarg, not progname, since progname’s type is no
-longer correct.
-* zdump.c, zic.c (main): Initialize progname to non-null.
---- a/zdump.c
-+++ b/zdump.c
-@@ -84,7 +84,7 @@ static time_t const absolute_max_time =
- ? (((time_t) 1 << atime_shift) - 1 + ((time_t) 1 << atime_shift))
- : -1);
- static int longest;
--static char * progname;
-+static char const *progname;
- static bool warned;
- static bool errout;
-
-@@ -234,7 +234,7 @@ tzalloc(char const *val)
- exit(EXIT_FAILURE);
- }
- tzset();
-- return &progname; /* Any valid non-null char ** will do. */
-+ return &optarg; /* Any valid non-null char ** will do. */
- # else
- enum { TZeqlen = 3 };
- static char const TZeq[TZeqlen] = "TZ=";
-@@ -463,7 +463,7 @@ main(int argc, char *argv[])
- # endif /* defined TEXTDOMAINDIR */
- textdomain(TZ_DOMAIN);
- #endif /* HAVE_GETTEXT */
-- progname = argv[0];
-+ progname = argv[0] ? argv[0] : "zdump";
- for (i = 1; i < argc; ++i)
- if (strcmp(argv[i], "--version") == 0) {
- printf("zdump %s%s\n", PKGVERSION, TZVERSION);
---- a/zic.c
-+++ b/zic.c
-@@ -943,7 +943,7 @@ main(int argc, char **argv)
- textdomain(TZ_DOMAIN);
- #endif /* HAVE_GETTEXT */
- main_argv = argv;
-- progname = argv[0];
-+ progname = argv[0] ? argv[0] : "zic";
- if (TYPE_BIT(zic_t) < 64) {
- fprintf(stderr, "%s: %s\n", progname,
- _("wild compilation-time specification of zic_t"));
-
-From 317cc2c05a0acd02597e9db2b97af078630c1dde Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Mon, 31 Oct 2022 12:41:48 -0700
-Subject: [PATCH] Port better to old Linux kernels
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Problem reported by Igor Ivanov in:
-https://mm.icann.org/pipermail/tz/2022-October/032192.html
-* zic.c (get_rand_u64): Don’t use clock_gettime; it’s too much of
-a configuration hassle.
----
- zic.c | 15 +++------------
- 2 files changed, 5 insertions(+), 15 deletions(-)
-
-diff --git a/zic.c b/zic.c
-index a85f2a4c..14393a3d 100644
---- a/zic.c
-+++ b/zic.c
-@@ -1210,21 +1210,12 @@ get_rand_u64(void)
- #endif
-
- /* getrandom didn't work, so fall back on portable code that is
-- not the best because the seed doesn't necessarily have enough bits,
-- the seed isn't cryptographically random on platforms lacking
-- getrandom, and 'rand' might not be cryptographically secure. */
-+ not the best because the seed isn't cryptographically random and
-+ 'rand' might not be cryptographically secure. */
- {
- static bool initialized;
- if (!initialized) {
-- unsigned seed;
--#ifdef CLOCK_REALTIME
-- struct timespec now;
-- clock_gettime (CLOCK_REALTIME, &now);
-- seed = now.tv_sec ^ now.tv_nsec;
--#else
-- seed = time(NULL);
--#endif
-- srand(seed);
-+ srand(time(NULL));
- initialized = true;
- }
- }
-
-
-From f4808ee8fa61b0df82337e8f0fa02ca3db598cb8 Mon Sep 17 00:00:00 2001
-From: Paul Eggert <eggert@cs.ucla.edu>
-Date: Fri, 4 Nov 2022 19:57:00 -0700
-Subject: [PATCH] Fix unlikely conversion bug in zic
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-* zic.c (puttzcode): Arg is zic_t, not int_fast32_t. This fixes a
-portability bug on platforms where int_fast32_t is a 32-bit ones’
-complement or signed-magnitude integer, and where the argument is
--2**31 before conversion to int_fast32_t. Although I don’t know
-of any such platforms, the C standard allows them.
---- a/zic.c
-+++ b/zic.c
-@@ -2216,7 +2216,7 @@ convert64(uint_fast64_t val, char *buf)
- }
-
- static void
--puttzcode(const int_fast32_t val, FILE *const fp)
-+puttzcode(zic_t val, FILE *fp)
- {
- char buf[4];
-
-
diff --git a/sys-libs/timezone-data/timezone-data-2022f-r1.ebuild b/sys-libs/timezone-data/timezone-data-2022f-r1.ebuild
deleted file mode 100644
index 9c512ba4f1cb..000000000000
--- a/sys-libs/timezone-data/timezone-data-2022f-r1.ebuild
+++ /dev/null
@@ -1,201 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs flag-o-matic
-
-MY_CODE_VER=${PV}
-MY_DATA_VER=${PV}
-DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
-HOMEPAGE="https://www.iana.org/time-zones"
-SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${MY_DATA_VER}.tar.gz
- https://www.iana.org/time-zones/repository/releases/tzcode${MY_CODE_VER}.tar.gz"
-
-LICENSE="BSD public-domain"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="nls leaps-timezone zic-slim"
-
-DEPEND="nls? ( virtual/libintl )"
-RDEPEND="
- ${DEPEND}
- !sys-libs/glibc[vanilla(+)]
-"
-
-PATCHES=(
- "${FILESDIR}"/${P}-musl.patch
-)
-
-src_unpack() {
- mkdir "${S}" && cd "${S}" || die
- default
-}
-
-src_prepare() {
- default
-
- # check_web contacts validator.w3.org
- sed -i -e 's/check_tables check_web/check_tables/g' \
- Makefile || die "Failed to disable check_web"
-
- if tc-is-cross-compiler ; then
- cp -pR "${S}" "${S}"-native || die
- fi
-}
-
-src_configure() {
- tc-export CC
-
- # bug #471102
- append-lfs-flags
-
- if use elibc_Darwin ; then
- # bug #138251
- append-cppflags -DSTD_INSPIRED
- fi
-
- append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
-
- # Upstream default is 'slim', but it breaks quite a few programs
- # that parse /etc/localtime directly: bug #747538.
- append-cppflags -DZIC_BLOAT_DEFAULT='\"'$(usex zic-slim slim fat)'\"'
-
- LDLIBS=""
- if use nls ; then
- # See if an external libintl is available. bug #154181, bug #578424
- local c="${T}/test"
- echo 'main(){}' > "${c}.c" || die
- if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
- LDLIBS+=" -lintl"
- fi
- fi
-}
-
-_emake() {
- emake \
- REDO=$(usex leaps-timezone posix_right posix_only) \
- TOPDIR="${EPREFIX}" \
- ZICDIR='$(TOPDIR)/usr/bin' \
- "$@"
-}
-
-src_compile() {
- _emake \
- AR="$(tc-getAR)" \
- cc="$(tc-getCC)" \
- RANLIB="$(tc-getRANLIB)" \
- CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- LDLIBS="${LDLIBS}"
-
- if tc-is-cross-compiler ; then
- _emake -C "${S}"-native \
- AR="$(tc-getBUILD_AR)" \
- cc="$(tc-getBUILD_CC)" \
- RANLIB="$(tc-getBUILD_RANLIB)" \
- CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \
- LDFLAGS="${BUILD_LDFLAGS}" \
- LDLIBS="${LDLIBS}" \
- zic
- fi
-}
-
-src_test() {
- # VALIDATE_ENV is used for extended/web based tests. Punt on them.
- emake check VALIDATE_ENV=true
-}
-
-src_install() {
- local zic=""
- tc-is-cross-compiler && zic="zic=${S}-native/zic"
- _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit"
- rm -rf "${D}/nukeit" "${ED}/etc" || die
-
- insinto /usr/share/zoneinfo
- doins "${S}"/leap-seconds.list
-
- # Delete man pages installed by man-pages package.
- rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die
- dodoc CONTRIBUTING README NEWS *.html
-}
-
-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
-}
-
-configure_tz_data() {
- # Make sure the /etc/localtime file does not get stale, bug #127899
- local tz src="${EROOT}/etc/timezone" etc_lt="${EROOT}/etc/localtime"
-
- # If it's a symlink, assume the user knows what they're doing and
- # they're managing it themselves, bug #511474
- if [[ -L "${etc_lt}" ]] ; then
- einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
- return 0
- fi
-
- if ! tz=$(get_TIMEZONE) ; then
- einfo "Assuming your empty ${src} file is what you want; skipping update."
- return 0
- fi
-
- if [[ "${tz}" == "FOOKABLOIE" ]] ; then
- einfo "You do not have a timezone set in ${src}; skipping update."
- return 0
- fi
-
- local tzpath="${EROOT}/usr/share/zoneinfo/${tz}"
-
- if [[ ! -e ${tzpath} ]]; then
- ewarn "The timezone specified in ${src} is not valid!"
- return 1
- fi
-
- if [[ -f ${etc_lt} ]]; then
- # If a regular file already exists, copy over it.
- ewarn "Found a regular file at ${etc_lt}."
- ewarn "Some software may expect a symlink instead."
- ewarn "You may convert it to a symlink by removing the file and running:"
- ewarn " emerge --config sys-libs/timezone-data"
- einfo "Copying ${tzpath} to ${etc_lt}."
- cp -f "${tzpath}" "${etc_lt}"
- else
- # Otherwise, create a symlink and remove the timezone file.
- tzpath="../usr/share/zoneinfo/${tz}"
- einfo "Linking ${tzpath} at ${etc_lt}."
- if ln -snf "${tzpath}" "${etc_lt}"; then
- einfo "Removing ${src}."
- rm -f "${src}"
- fi
- fi
-}
-
-pkg_config() {
- configure_tz_data
-}
-
-pkg_postinst() {
- configure_tz_data
-}
diff --git a/sys-libs/timezone-data/timezone-data-2022f.ebuild b/sys-libs/timezone-data/timezone-data-2022f.ebuild
deleted file mode 100644
index 6d369322df92..000000000000
--- a/sys-libs/timezone-data/timezone-data-2022f.ebuild
+++ /dev/null
@@ -1,197 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit toolchain-funcs flag-o-matic
-
-MY_CODE_VER=${PV}
-MY_DATA_VER=${PV}
-DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
-HOMEPAGE="https://www.iana.org/time-zones"
-SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${MY_DATA_VER}.tar.gz
- https://www.iana.org/time-zones/repository/releases/tzcode${MY_CODE_VER}.tar.gz"
-
-LICENSE="BSD public-domain"
-SLOT="0"
-KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~loong ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
-IUSE="nls leaps-timezone zic-slim"
-
-DEPEND="nls? ( virtual/libintl )"
-RDEPEND="
- ${DEPEND}
- !sys-libs/glibc[vanilla(+)]
-"
-
-src_unpack() {
- mkdir "${S}" && cd "${S}" || die
- default
-}
-
-src_prepare() {
- default
-
- # check_web contacts validator.w3.org
- sed -i -e 's/check_tables check_web/check_tables/g' \
- Makefile || die "Failed to disable check_web"
-
- if tc-is-cross-compiler ; then
- cp -pR "${S}" "${S}"-native || die
- fi
-}
-
-src_configure() {
- tc-export CC
-
- # bug #471102
- append-lfs-flags
-
- if use elibc_Darwin ; then
- # bug #138251
- append-cppflags -DSTD_INSPIRED
- fi
-
- append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
-
- # Upstream default is 'slim', but it breaks quite a few programs
- # that parse /etc/localtime directly: bug #747538.
- append-cppflags -DZIC_BLOAT_DEFAULT='\"'$(usex zic-slim slim fat)'\"'
-
- LDLIBS=""
- if use nls ; then
- # See if an external libintl is available. bug #154181, bug #578424
- local c="${T}/test"
- echo 'main(){}' > "${c}.c" || die
- if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
- LDLIBS+=" -lintl"
- fi
- fi
-}
-
-_emake() {
- emake \
- REDO=$(usex leaps-timezone posix_right posix_only) \
- TOPDIR="${EPREFIX}" \
- ZICDIR='$(TOPDIR)/usr/bin' \
- "$@"
-}
-
-src_compile() {
- _emake \
- AR="$(tc-getAR)" \
- cc="$(tc-getCC)" \
- RANLIB="$(tc-getRANLIB)" \
- CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \
- LDFLAGS="${LDFLAGS}" \
- LDLIBS="${LDLIBS}"
-
- if tc-is-cross-compiler ; then
- _emake -C "${S}"-native \
- AR="$(tc-getBUILD_AR)" \
- cc="$(tc-getBUILD_CC)" \
- RANLIB="$(tc-getBUILD_RANLIB)" \
- CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \
- LDFLAGS="${BUILD_LDFLAGS}" \
- LDLIBS="${LDLIBS}" \
- zic
- fi
-}
-
-src_test() {
- # VALIDATE_ENV is used for extended/web based tests. Punt on them.
- emake check VALIDATE_ENV=true
-}
-
-src_install() {
- local zic=""
- tc-is-cross-compiler && zic="zic=${S}-native/zic"
- _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit"
- rm -rf "${D}/nukeit" "${ED}/etc" || die
-
- insinto /usr/share/zoneinfo
- doins "${S}"/leap-seconds.list
-
- # Delete man pages installed by man-pages package.
- rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die
- dodoc CONTRIBUTING README NEWS *.html
-}
-
-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
-}
-
-configure_tz_data() {
- # Make sure the /etc/localtime file does not get stale, bug #127899
- local tz src="${EROOT}/etc/timezone" etc_lt="${EROOT}/etc/localtime"
-
- # If it's a symlink, assume the user knows what they're doing and
- # they're managing it themselves, bug #511474
- if [[ -L "${etc_lt}" ]] ; then
- einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
- return 0
- fi
-
- if ! tz=$(get_TIMEZONE) ; then
- einfo "Assuming your empty ${src} file is what you want; skipping update."
- return 0
- fi
-
- if [[ "${tz}" == "FOOKABLOIE" ]] ; then
- einfo "You do not have a timezone set in ${src}; skipping update."
- return 0
- fi
-
- local tzpath="${EROOT}/usr/share/zoneinfo/${tz}"
-
- if [[ ! -e ${tzpath} ]]; then
- ewarn "The timezone specified in ${src} is not valid!"
- return 1
- fi
-
- if [[ -f ${etc_lt} ]]; then
- # If a regular file already exists, copy over it.
- ewarn "Found a regular file at ${etc_lt}."
- ewarn "Some software may expect a symlink instead."
- ewarn "You may convert it to a symlink by removing the file and running:"
- ewarn " emerge --config sys-libs/timezone-data"
- einfo "Copying ${tzpath} to ${etc_lt}."
- cp -f "${tzpath}" "${etc_lt}"
- else
- # Otherwise, create a symlink and remove the timezone file.
- tzpath="../usr/share/zoneinfo/${tz}"
- einfo "Linking ${tzpath} at ${etc_lt}."
- if ln -snf "${tzpath}" "${etc_lt}"; then
- einfo "Removing ${src}."
- rm -f "${src}"
- fi
- fi
-}
-
-pkg_config() {
- configure_tz_data
-}
-
-pkg_postinst() {
- configure_tz_data
-}