Gentoo Archives: gentoo-commits

From: Dirkjan Ochtman <djc@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/timezone-data/
Date: Thu, 03 Nov 2016 11:23:23
Message-Id: 1478172188.9ed42dd7bd7a1f662fd9af318ccad28ef3520540.djc@gentoo
1 commit: 9ed42dd7bd7a1f662fd9af318ccad28ef3520540
2 Author: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
3 AuthorDate: Thu Nov 3 11:22:47 2016 +0000
4 Commit: Dirkjan Ochtman <djc <AT> gentoo <DOT> org>
5 CommitDate: Thu Nov 3 11:23:08 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9ed42dd7
7
8 sys-libs/timezone-data: version bump to 2016i
9
10 Package-Manager: portage-2.3.0
11
12 sys-libs/timezone-data/Manifest | 2 +
13 sys-libs/timezone-data/timezone-data-2016i.ebuild | 157 ++++++++++++++++++++++
14 2 files changed, 159 insertions(+)
15
16 diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
17 index d3d0e77..b14a89b 100644
18 --- a/sys-libs/timezone-data/Manifest
19 +++ b/sys-libs/timezone-data/Manifest
20 @@ -2,7 +2,9 @@ DIST tzcode2016e.tar.gz 194647 SHA256 57d8c4fcd5e8a90657d0e298eac5effb1a642119c9
21 DIST tzcode2016f.tar.gz 194905 SHA256 72325f384490a310eeb2ea0fab7e6f011a5be19adab2ff9d83bf9d1993b066ed SHA512 97d084f4b0a688fef097dca256083ca9948393848d77c8ee637bdd26f859150cce7d2b26fc1165a3b44b28cc1c9075e10192332261ed68990b4b21a85438b023 WHIRLPOOL fa5b1dcc3c666fda497e715be1c3eb21cd69b080c0b703f6a45883caf05ddd7e06b7aee9a632c62a33b6f1b563b634b5491a24b72d5bd1f5116214f19822823c
22 DIST tzcode2016g.tar.gz 203362 SHA256 1ff90b47ad7986140a513b5287b1851c40f80fd44fd636db5cc5b46d06f9fa2b SHA512 280f9bd9ee6eacc5cf82004dc5efd4e1d245e68a576c6d8172ebae0247d0777ac8987aed33609106eb1d596229979452023b593d1a4a58be9bc0932c376a3533 WHIRLPOOL a016e8dd0abbb5f6015a675df029537f63e9f5329460420954d08c296430ee7a6c3aedd1ee4daad5a401f90a187b26a458cb7280951955fa2ae3bd2792cfeb25
23 DIST tzcode2016h.tar.gz 206155 SHA256 30e62f0b86a78fb020d378b950930da023ca31b1a58f08d8fb2066627c4d6566 SHA512 109204356f8105b50d1e563c9a33f140a4af7ea38bfb720756f1fce863a346387d3897dfbd506da94fadcd10f35dc50d6475c6dfc047764dd308e21ee6291c18 WHIRLPOOL da19b98d621ed94eb69da7c63d1a42621834a71740887bd653c2ee8bfe22f7eecd878065b90ab4dc8573e6d33d1e9694e2504834d4aeabec2516f111abb1f01f
24 +DIST tzcode2016i.tar.gz 207879 SHA256 411e8adcb6288b17d6c2624fde65e7d82654ca69b813ae121504ff66f0cfba7b SHA512 93be791491a76f9d489f4bce8b392b2af6bdfb9a21f7efb7c6948da5c27db9782f7a725dd53d755e9488de000a4af5b75de650e7dac8c01ef8fbbd2719f9cd07 WHIRLPOOL c036bd004d58c9ecde4e8bff9b30f3b5c4f38a1c5c9762ad4b8d20023fce6f5e48c4c49141327562c55ceb777745829f39c72832e3da811ed99615a3e4d1cf06
25 DIST tzdata2016e.tar.gz 313684 SHA256 ba00f899f18dc4048d7fa21f5e1fdef434496084eedc06f6caa15e5ecdb6bd81 SHA512 dace0f6fc87a73879ca3a1b143d7dcf9c50803e23e6b8c91f83711704e28129af776676c547c42f14dee7f1e8e285ce25296e53a52d11f4c8f155b5f80f4beb3 WHIRLPOOL 69f5e70ae836c71c84c3bb1653887b15e2d408fe0927397a8f16f81b13ce1a23e1ad881084eb36b7785b3f129299830d03a5d2722029fdb8eed305c851661b7d
26 DIST tzdata2016f.tar.gz 313286 SHA256 ed8c951008d12f1db55a11e96fc055718c6571233327d9de16a7f8475e2502b0 SHA512 0472f9516b6c3d83c0a5d0953a5535f4c48d9b9171e125f528188dac512f3556bc1805b7029c4f467a122cbce1beb4e804dd4ae63b259952de3bb217f8e8941d WHIRLPOOL 229b1c1b1bfb1fc8c0bcf33dccf546cd0a0b230161919249372dbe5a4d4d82a1b2bd42e5d3722b62ce8fe31479632bf0ae712aac876901d6acb95959b163f951
27 DIST tzdata2016g.tar.gz 316669 SHA256 3c7137b2bc47323b0de47b77786bacf81ed503d4b2c693ff8ada2fbd1281ebd1 SHA512 7b414c1af80faed335a59f40a18931265b71f8dacc3a5f3bd93e8ea0e3d6416a6839dfb88c64b04df3c728c4fb44105503ddb6e87f317dbff29e43c491c2fb3d WHIRLPOOL ab0b84ad7c31bc266ee8021785997751e202eccc62cbe6e5b11f21ba5c4252c7b5912c205616c1590fda1452c51e191ff45f89ecf91495045ee2cbf539310060
28 DIST tzdata2016h.tar.gz 318714 SHA256 da1b74fc2dec2ce8b64948dafb0bfc2f923c830d421a7ae4d016226135697a64 SHA512 8d4eeaebe39392ca9163d03601d1178597b3f0092419d1f54ebd34944110a0b10cb22d4ab8bacfb48bce3f6f7175177105e204f1b4edeadc38ad4ac2d6ded835 WHIRLPOOL 809132bf9dbe611e5f202e44ca2c5d1827e0bb76e462cbc6404bbaef823e1e3083aaa85964ea4f46b72f85fd77f83dbf94855f5d12f15b8d9fc8b58c14783c5e
29 +DIST tzdata2016i.tar.gz 320352 SHA256 b6966ec982ef64fe48cebec437096b4f57f4287519ed32dde59c86d3a1853845 SHA512 801059f43c91798cf69fb2ae77c1ffab8d06987325081511d573febde19ae423e7432c2b65c7c256077bbdb1b359e010302955786e18f2697bb263c4e0f1cc91 WHIRLPOOL 213800ff2a59baaf42df9ca1b41ded531f866905ed5f926155cd181057a363e7e6a6943becea30b09a18fbeded44ea9c1d166262858a8914049f90519b3d4263
30
31 diff --git a/sys-libs/timezone-data/timezone-data-2016i.ebuild b/sys-libs/timezone-data/timezone-data-2016i.ebuild
32 new file mode 100644
33 index 00000000..c22100e
34 --- /dev/null
35 +++ b/sys-libs/timezone-data/timezone-data-2016i.ebuild
36 @@ -0,0 +1,157 @@
37 +# Copyright 1999-2016 Gentoo Foundation
38 +# Distributed under the terms of the GNU General Public License v2
39 +# $Id$
40 +
41 +EAPI="5"
42 +
43 +inherit eutils toolchain-funcs flag-o-matic
44 +
45 +code_ver=${PV}
46 +data_ver=${PV}
47 +DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
48 +HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm"
49 +SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
50 + http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
51 +
52 +LICENSE="BSD public-domain"
53 +SLOT="0"
54 +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"
55 +IUSE="nls leaps_timezone elibc_FreeBSD"
56 +
57 +DEPEND="nls? ( virtual/libintl )"
58 +RDEPEND="${DEPEND}
59 + !sys-libs/glibc[vanilla(+)]"
60 +
61 +S=${WORKDIR}
62 +
63 +src_prepare() {
64 + epatch "${FILESDIR}"/${PN}-2016g-makefile.patch
65 + tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
66 +}
67 +
68 +src_configure() {
69 + tc-export CC
70 +
71 + append-lfs-flags #471102
72 +
73 + if use elibc_FreeBSD || use elibc_Darwin ; then
74 + append-cppflags -DSTD_INSPIRED #138251
75 + fi
76 +
77 + append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
78 + LDLIBS=""
79 + if use nls ; then
80 + # See if an external libintl is available. #154181 #578424
81 + local c="${T}/test"
82 + echo 'main(){}' > "${c}.c"
83 + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
84 + LDLIBS+=" -lintl"
85 + fi
86 + fi
87 +}
88 +
89 +_emake() {
90 + emake \
91 + TOPDIR="${EPREFIX}/usr" \
92 + REDO=$(usex leaps_timezone posix_right posix_only) \
93 + "$@"
94 +}
95 +
96 +src_compile() {
97 + # TOPDIR is used in some utils when compiling.
98 + _emake \
99 + AR="$(tc-getAR)" \
100 + CC="$(tc-getCC)" \
101 + RANLIB="$(tc-getRANLIB)" \
102 + CFLAGS="${CFLAGS} -std=gnu99" \
103 + LDFLAGS="${LDFLAGS}" \
104 + LDLIBS="${LDLIBS}"
105 + if tc-is-cross-compiler ; then
106 + _emake -C "${S}"-native \
107 + CC="$(tc-getBUILD_CC)" \
108 + CFLAGS="${BUILD_CFLAGS}" \
109 + CPPFLAGS="${BUILD_CPPFLAGS}" \
110 + LDFLAGS="${BUILD_LDFLAGS}" \
111 + LDLIBS="${LDLIBS}" \
112 + zic
113 + fi
114 +}
115 +
116 +src_install() {
117 + local zic=""
118 + tc-is-cross-compiler && zic="zic=${S}-native/zic"
119 + _emake install ${zic} DESTDIR="${D}"
120 + dodoc CONTRIBUTING README NEWS Theory
121 + dohtml *.htm
122 +}
123 +
124 +get_TIMEZONE() {
125 + local tz src="${EROOT}etc/timezone"
126 + if [[ -e ${src} ]] ; then
127 + tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
128 + else
129 + tz="FOOKABLOIE"
130 + fi
131 + [[ -z ${tz} ]] && return 1 || echo "${tz}"
132 +}
133 +
134 +pkg_preinst() {
135 + local tz=$(get_TIMEZONE)
136 + if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then
137 + eerror "The right & posix subdirs are no longer installed as subdirs -- they have been"
138 + eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the"
139 + eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not"
140 + eerror "be using right/xxx for the system timezone as it breaks programs."
141 + die "Please fix your timezone setting"
142 + fi
143 +
144 + # Trim the symlink by hand to avoid portage's automatic protection checks.
145 + rm -f "${EROOT}"/usr/share/zoneinfo/posix
146 +
147 + if has_version "<=${CATEGORY}/${PN}-2015c" ; then
148 + elog "Support for accessing posix/ and right/ directly has been dropped to match"
149 + elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx."
150 + elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post"
151 + elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html"
152 + fi
153 +}
154 +
155 +pkg_config() {
156 + # make sure the /etc/localtime file does not get stale #127899
157 + local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime"
158 +
159 + # If it's a symlink, assume the user knows what they're doing and
160 + # they're managing it themselves. #511474
161 + if [[ -L ${etc_lt} ]] ; then
162 + einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
163 + return 0
164 + fi
165 +
166 + if ! tz=$(get_TIMEZONE) ; then
167 + einfo "Assuming your empty ${etc_lt} file is what you want; skipping update."
168 + return 0
169 + fi
170 + if [[ ${tz} == "FOOKABLOIE" ]] ; then
171 + elog "You do not have TIMEZONE set in ${src}."
172 +
173 + if [[ ! -e ${etc_lt} ]] ; then
174 + cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
175 + elog "Setting ${etc_lt} to Factory."
176 + else
177 + elog "Skipping auto-update of ${etc_lt}."
178 + fi
179 + return 0
180 + fi
181 +
182 + if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
183 + elog "You have an invalid TIMEZONE setting in ${src}"
184 + elog "Your ${etc_lt} has been reset to Factory; enjoy!"
185 + tz="Factory"
186 + fi
187 + einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
188 + cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
189 +}
190 +
191 +pkg_postinst() {
192 + pkg_config
193 +}