summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/timezone-data/Manifest2
-rw-r--r--sys-libs/timezone-data/timezone-data-2016e.ebuild157
2 files changed, 159 insertions, 0 deletions
diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
index f9865ef55839..ba5273277f47 100644
--- a/sys-libs/timezone-data/Manifest
+++ b/sys-libs/timezone-data/Manifest
@@ -1,6 +1,8 @@
DIST tzcode2016a.tar.gz 184047 SHA256 11ae66d59b844e8c6c81914c9dd73b666627bd7792855ba9de195eee4520c28d SHA512 33a1078ba16aef19048aa97ce1816fc5368061bfe40eddc0e7e246ca57c4a535eaf2f03847128e971a6d959f34ea77224bf33fd53dc6a0c006450dde35222223 WHIRLPOOL 794e57430145de46068ae84eb1ccc6714aade9f4f728aab288e78c5f9890e76f10fb0af01e8237bc496169ed2ffc6f6b02de9f1522b0ab2330cbc3acf533f7e9
DIST tzcode2016c.tar.gz 192354 SHA256 344b1bd486935bca2b7baa47db3b99b32211c45f31ec0d1ead8bacd103c5a416 SHA512 813309b46e4214cbe7d22b9951bad15536f5d394d2f651b60ae66c14dd8c232d51991ad80f7f02c324f896e680c7efb0321a9e4799c96735f1a82e258a87dff7 WHIRLPOOL 97ceaf75521beea703ab9477dbd4eb12c167559b6f94626f28deefdc01cb58b2b516fddd0db9907399b3fdfbe132d054eb42abc5610065546ef49bda1b4b8188
DIST tzcode2016d.tar.gz 192870 SHA256 a8f33d6f87aef7e109e4769fc7f6e63637d52d07ddf6440a1a50df3d9a34e0ca SHA512 c6f6259a78fadaab293be0a4123c226d1a327588639cfa8dadb5a74bd58552892a0c87cfd3a33888f886f51aff34465c89505f0892e6bcbe24247a9160e7328c WHIRLPOOL 968e1e4d635853d81e3bb522543ca7c216f9110a0d20de612c0b1220fac926325e7b6f2a6381830ecb43e633ba29d66c08ec2c890cd8685793c4d66378022b82
+DIST tzcode2016e.tar.gz 194647 SHA256 57d8c4fcd5e8a90657d0e298eac5effb1a642119c92308db68d13a4612fa459e SHA512 dcaf615ada96920e60ffb336253f53541861153decc156d41661f43e0bfb128c6c231b0b776bbe3f2176549346275fc5a879074f4977d5141228e58cb33a41c6 WHIRLPOOL e9397b1d4236062a95a46ed463378a295a1959593611536416aeeb8c72c98131cf059d065439f59ae2b40722129b1c2ede7d14dc131ed431042620e54133148d
DIST tzdata2016a.tar.gz 302817 SHA256 5efa6b324e64ef921ef700ac3273a51895f672684a30e342f68e47871c6a8cd1 SHA512 9aa5f61a73afa5070dfb1d1982945d268ea8215663d0cd594216500aff14797ea5591ccfd488dc2280902fa1820bf782623624912b669873728431258fe10ec1 WHIRLPOOL 0ed0d93dfff5ee708132ddad8c2f3f4b3e71ed323876847e83c515ca03bfa098863e4aab8abd20a4397e20953b7dc73e042e184ecdbbba5d74430f3714c453ec
DIST tzdata2016c.tar.gz 308625 SHA256 8700d981e6f2007ac037dabb5d2b12f390e8629bbc30e564bc21cf0c069a2d48 SHA512 03eab77c8b3176da1dd17d1d9062b151036b01d224f1e4b60f34a2db6899150431f34f4d9f39652648aae3a55326fd6f85d6deefe3f27b36eaed9ef39ed3f53c WHIRLPOOL 5d347c99312962ca5205eb6892febe72c0ab0dcb0a9c6d047dc3c81cdfa787014aa7b06713494cbf4d5d7a52859df04ae5e7b6789c5fe3dce0f8aa3d91af7886
DIST tzdata2016d.tar.gz 312481 SHA256 d9554dfba0efd76053582bd89e8c7036ef12eee14fdd506675b08a5b59f0a1b4 SHA512 f1beb1793c4c7d18f2dadaf4a928b1476f66b400bda0c87b06155c0dd1c4b4a26bb2f37dc17a3676a2bbe9c1e71a5d8b27a171c797a86464b0bc0d13abfb2f99 WHIRLPOOL c6933da933c10bb518fffb5b135bc0d5a717cc955cc75fe36e97e2df08bf07663e493786640def956055cab28e3ea3edfc0b71fa2303788fcafb82312380b060
+DIST tzdata2016e.tar.gz 313684 SHA256 ba00f899f18dc4048d7fa21f5e1fdef434496084eedc06f6caa15e5ecdb6bd81 SHA512 dace0f6fc87a73879ca3a1b143d7dcf9c50803e23e6b8c91f83711704e28129af776676c547c42f14dee7f1e8e285ce25296e53a52d11f4c8f155b5f80f4beb3 WHIRLPOOL 69f5e70ae836c71c84c3bb1653887b15e2d408fe0927397a8f16f81b13ce1a23e1ad881084eb36b7785b3f129299830d03a5d2722029fdb8eed305c851661b7d
diff --git a/sys-libs/timezone-data/timezone-data-2016e.ebuild b/sys-libs/timezone-data/timezone-data-2016e.ebuild
new file mode 100644
index 000000000000..570028da0c63
--- /dev/null
+++ b/sys-libs/timezone-data/timezone-data-2016e.ebuild
@@ -0,0 +1,157 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+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"
+
+DEPEND="nls? ( virtual/libintl )"
+RDEPEND="${DEPEND}
+ !sys-libs/glibc[vanilla(+)]"
+
+S=${WORKDIR}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-2016c-makefile.patch
+ tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
+}
+
+src_configure() {
+ tc-export CC
+
+ append-lfs-flags #471102
+
+ if use elibc_FreeBSD || use elibc_Darwin ; then
+ append-cppflags -DSTD_INSPIRED #138251
+ fi
+
+ append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
+ LDLIBS=""
+ if use nls ; then
+ # See if an external libintl is available. #154181 #578424
+ local c="${T}/test"
+ echo 'main(){}' > "${c}.c"
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
+ LDLIBS+=" -lintl"
+ fi
+ fi
+}
+
+_emake() {
+ emake \
+ TOPDIR="${EPREFIX}/usr" \
+ REDO=$(usex leaps_timezone posix_right posix_only) \
+ "$@"
+}
+
+src_compile() {
+ # 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"
+
+ # If it's a symlink, assume the user knows what they're doing and
+ # they're managing it themselves. #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 ${etc_lt} file is what you want; skipping update."
+ return 0
+ fi
+ if [[ ${tz} == "FOOKABLOIE" ]] ; then
+ elog "You do not have TIMEZONE set in ${src}."
+
+ if [[ ! -e ${etc_lt} ]] ; then
+ cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
+ elog "Setting ${etc_lt} to Factory."
+ 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
+ einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
+ cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
+}
+
+pkg_postinst() {
+ pkg_config
+}