sys-libs/timezone-data: version bump to 2017a
authorDirkjan Ochtman <djc@gentoo.org>
Sat, 4 Mar 2017 09:21:17 +0000 (10:21 +0100)
committerDirkjan Ochtman <djc@gentoo.org>
Sat, 4 Mar 2017 09:21:31 +0000 (10:21 +0100)
Package-Manager: Portage-2.3.3, Repoman-2.3.1

sys-libs/timezone-data/Manifest
sys-libs/timezone-data/timezone-data-2017a.ebuild [new file with mode: 0644]

index e1d93c6e19c33bf98334420678c5095b96c3227d..1b7aac36eb0acd602423b105d856184aea08650d 100644 (file)
@@ -1,6 +1,8 @@
 DIST tzcode2016h.tar.gz 206155 SHA256 30e62f0b86a78fb020d378b950930da023ca31b1a58f08d8fb2066627c4d6566 SHA512 109204356f8105b50d1e563c9a33f140a4af7ea38bfb720756f1fce863a346387d3897dfbd506da94fadcd10f35dc50d6475c6dfc047764dd308e21ee6291c18 WHIRLPOOL da19b98d621ed94eb69da7c63d1a42621834a71740887bd653c2ee8bfe22f7eecd878065b90ab4dc8573e6d33d1e9694e2504834d4aeabec2516f111abb1f01f
 DIST tzcode2016i.tar.gz 207879 SHA256 411e8adcb6288b17d6c2624fde65e7d82654ca69b813ae121504ff66f0cfba7b SHA512 93be791491a76f9d489f4bce8b392b2af6bdfb9a21f7efb7c6948da5c27db9782f7a725dd53d755e9488de000a4af5b75de650e7dac8c01ef8fbbd2719f9cd07 WHIRLPOOL c036bd004d58c9ecde4e8bff9b30f3b5c4f38a1c5c9762ad4b8d20023fce6f5e48c4c49141327562c55ceb777745829f39c72832e3da811ed99615a3e4d1cf06
 DIST tzcode2016j.tar.gz 208734 SHA256 b9effc4fb4051df4a356cbe5857bf99e2fa32e00d8340f2e8a4d58f0c9ccb0b7 SHA512 cac19dded22ff80cd784641ac239358c28cce535ac1eb60b52b7e51c6e9e5fe5f795ea0252daf32c949dddb9c5b24d7e4456d7869aa2725d49c5af58b564822a WHIRLPOOL a96bd68eb7712696549065677d51fc5ef0110df2714691e0518ea3f03b6ec11cf679239dc0e00385900fd11dee570d818f897990c303ead85838bf0d4b648ef1
+DIST tzcode2017a.tar.gz 210671 SHA256 02f2c6b58b99edd0d47f0cad34075b359fd1a4dab71850f493b0404ded3b38ac SHA512 36d744debd5263b6be39b3a9a146b7db1876f216a4bfc62b46631745861a9c03eda3220f213def86c724d3a11c41398c65c2e5d013ff2c1900e7bfc5e7844025 WHIRLPOOL ff618c6bfbd35c8d02a3c2c50e61aa872ce13be87e3b5de8e58e7110b174249530bcd63bd83ccf1f70834bfbf8b2cb5e96176554601611f0e10e54fe8c023b20
 DIST tzdata2016h.tar.gz 318714 SHA256 da1b74fc2dec2ce8b64948dafb0bfc2f923c830d421a7ae4d016226135697a64 SHA512 8d4eeaebe39392ca9163d03601d1178597b3f0092419d1f54ebd34944110a0b10cb22d4ab8bacfb48bce3f6f7175177105e204f1b4edeadc38ad4ac2d6ded835 WHIRLPOOL 809132bf9dbe611e5f202e44ca2c5d1827e0bb76e462cbc6404bbaef823e1e3083aaa85964ea4f46b72f85fd77f83dbf94855f5d12f15b8d9fc8b58c14783c5e
 DIST tzdata2016i.tar.gz 320352 SHA256 b6966ec982ef64fe48cebec437096b4f57f4287519ed32dde59c86d3a1853845 SHA512 801059f43c91798cf69fb2ae77c1ffab8d06987325081511d573febde19ae423e7432c2b65c7c256077bbdb1b359e010302955786e18f2697bb263c4e0f1cc91 WHIRLPOOL 213800ff2a59baaf42df9ca1b41ded531f866905ed5f926155cd181057a363e7e6a6943becea30b09a18fbeded44ea9c1d166262858a8914049f90519b3d4263
 DIST tzdata2016j.tar.gz 321185 SHA256 f5ee4e0f115f6c2faee1c4b16193a97338cbd1b503f2cea6c5a768c82ff39dc8 SHA512 ce0b9958b764479fac7df6b5ba0933fc4c6d815ebccc2537c75c4be105691cd58054704eebfb50ca755d7d48504480d4925ce8836eb499ae4798e3d5503d7e0e WHIRLPOOL 08a9d5235f026ecb39262823b17ff843ab3fb3ea17f889601a30c517da998965a89256d9e02162a030e66274dce68991d00b46d0cc267d7080c68355e1b98841
+DIST tzdata2017a.tar.gz 323983 SHA256 df3a5c4d0a2cf0cde0b3f35796ccf6c9acfd598b8e70f8dece5404cd7626bbd6 SHA512 fe57930711998a0755749a2bf1b32fdbc9e6ee249762017beea52eae7e521236396300fe2d79298fd81eb6d73fb7567884c35995ed248be06188329d937e3873 WHIRLPOOL 88cf93fcea09edfc568c00df4cc20e97f9327ab9ad07125475c2f9b81b6d95f8da8a7922305880466d61b1eb897f85bba82ac7e7ee1268cfb96d4ccbcab62a3a
diff --git a/sys-libs/timezone-data/timezone-data-2017a.ebuild b/sys-libs/timezone-data/timezone-data-2017a.ebuild
new file mode 100644 (file)
index 0000000..837768d
--- /dev/null
@@ -0,0 +1,156 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+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 ~amd64-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}-2016g-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
+}