Gentoo Archives: gentoo-commits

From: "Andreas Hüttel" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/timezone-data/
Date: Mon, 02 Oct 2017 21:38:45
Message-Id: 1506980306.9c23c08ca4e746be1088ce3c8f03c10f71ee39e1.dilfridge@gentoo
1 commit: 9c23c08ca4e746be1088ce3c8f03c10f71ee39e1
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Mon Oct 2 21:38:09 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Mon Oct 2 21:38:26 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c23c08c
7
8 sys-libs/timezone-data: Remove old
9
10 Package-Manager: Portage-2.3.10, Repoman-2.3.3
11
12 sys-libs/timezone-data/Manifest | 6 -
13 sys-libs/timezone-data/timezone-data-2016h.ebuild | 156 ----------------------
14 sys-libs/timezone-data/timezone-data-2016i.ebuild | 156 ----------------------
15 sys-libs/timezone-data/timezone-data-2016j.ebuild | 156 ----------------------
16 4 files changed, 474 deletions(-)
17
18 diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
19 index 55b95fca526..c18c6128b5e 100644
20 --- a/sys-libs/timezone-data/Manifest
21 +++ b/sys-libs/timezone-data/Manifest
22 @@ -1,10 +1,4 @@
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 tzcode2016j.tar.gz 208734 SHA256 b9effc4fb4051df4a356cbe5857bf99e2fa32e00d8340f2e8a4d58f0c9ccb0b7 SHA512 cac19dded22ff80cd784641ac239358c28cce535ac1eb60b52b7e51c6e9e5fe5f795ea0252daf32c949dddb9c5b24d7e4456d7869aa2725d49c5af58b564822a WHIRLPOOL a96bd68eb7712696549065677d51fc5ef0110df2714691e0518ea3f03b6ec11cf679239dc0e00385900fd11dee570d818f897990c303ead85838bf0d4b648ef1
26 DIST tzcode2017a.tar.gz 210671 SHA256 02f2c6b58b99edd0d47f0cad34075b359fd1a4dab71850f493b0404ded3b38ac SHA512 36d744debd5263b6be39b3a9a146b7db1876f216a4bfc62b46631745861a9c03eda3220f213def86c724d3a11c41398c65c2e5d013ff2c1900e7bfc5e7844025 WHIRLPOOL ff618c6bfbd35c8d02a3c2c50e61aa872ce13be87e3b5de8e58e7110b174249530bcd63bd83ccf1f70834bfbf8b2cb5e96176554601611f0e10e54fe8c023b20
27 DIST tzcode2017b.tar.gz 210780 SHA256 4d1735bb54e22b8d7443d4d1f1a13d007ae11be79a35e51f8e8322fb8e292d40 SHA512 9a73af4b868506d1f6287a8285dea489e68f6828da19509114f9144e2a2019c7fd28f4fb98ea907030d11d011ce3a87d99dbe43bca218beddafff151f0d61df1 WHIRLPOOL f98be38b269494722859113de561fffd35aeda75a73c57429403606de5c6522f826c818142083d866ec0cf21cfa8427c021ccca45a4447864513af0cfec92c99
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 -DIST tzdata2016j.tar.gz 321185 SHA256 f5ee4e0f115f6c2faee1c4b16193a97338cbd1b503f2cea6c5a768c82ff39dc8 SHA512 ce0b9958b764479fac7df6b5ba0933fc4c6d815ebccc2537c75c4be105691cd58054704eebfb50ca755d7d48504480d4925ce8836eb499ae4798e3d5503d7e0e WHIRLPOOL 08a9d5235f026ecb39262823b17ff843ab3fb3ea17f889601a30c517da998965a89256d9e02162a030e66274dce68991d00b46d0cc267d7080c68355e1b98841
31 DIST tzdata2017a.tar.gz 323983 SHA256 df3a5c4d0a2cf0cde0b3f35796ccf6c9acfd598b8e70f8dece5404cd7626bbd6 SHA512 fe57930711998a0755749a2bf1b32fdbc9e6ee249762017beea52eae7e521236396300fe2d79298fd81eb6d73fb7567884c35995ed248be06188329d937e3873 WHIRLPOOL 88cf93fcea09edfc568c00df4cc20e97f9327ab9ad07125475c2f9b81b6d95f8da8a7922305880466d61b1eb897f85bba82ac7e7ee1268cfb96d4ccbcab62a3a
32 DIST tzdata2017b.tar.gz 324317 SHA256 f8242a522ea3496b0ce4ff4f2e75a049178da21001a08b8e666d8cbe07d18086 SHA512 3e090dba1f52e4c63b4930b28f4bf38b56aabd6728f23094cb5801d10f4e464f17231f17b75b8866714bf98199c166ea840de0787b75b2274aa419a4e14bbc4d WHIRLPOOL 3347ad15ceb763f7679ba3c5bf6bce055ed8d250f24e78b49cce665aa18919d27340716d3d952820c6287194be4014e8094fb615e9c08e73e1859fec080f831f
33
34 diff --git a/sys-libs/timezone-data/timezone-data-2016h.ebuild b/sys-libs/timezone-data/timezone-data-2016h.ebuild
35 deleted file mode 100644
36 index df145b8363d..00000000000
37 --- a/sys-libs/timezone-data/timezone-data-2016h.ebuild
38 +++ /dev/null
39 @@ -1,156 +0,0 @@
40 -# Copyright 1999-2017 Gentoo Foundation
41 -# Distributed under the terms of the GNU General Public License v2
42 -
43 -EAPI="5"
44 -
45 -inherit eutils toolchain-funcs flag-o-matic
46 -
47 -code_ver=${PV}
48 -data_ver=${PV}
49 -DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
50 -HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm"
51 -SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
52 - http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
53 -
54 -LICENSE="BSD public-domain"
55 -SLOT="0"
56 -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"
57 -IUSE="nls leaps_timezone elibc_FreeBSD"
58 -
59 -DEPEND="nls? ( virtual/libintl )"
60 -RDEPEND="${DEPEND}
61 - !sys-libs/glibc[vanilla(+)]"
62 -
63 -S=${WORKDIR}
64 -
65 -src_prepare() {
66 - epatch "${FILESDIR}"/${PN}-2016g-makefile.patch
67 - tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
68 -}
69 -
70 -src_configure() {
71 - tc-export CC
72 -
73 - append-lfs-flags #471102
74 -
75 - if use elibc_FreeBSD || use elibc_Darwin ; then
76 - append-cppflags -DSTD_INSPIRED #138251
77 - fi
78 -
79 - append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
80 - LDLIBS=""
81 - if use nls ; then
82 - # See if an external libintl is available. #154181 #578424
83 - local c="${T}/test"
84 - echo 'main(){}' > "${c}.c"
85 - if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
86 - LDLIBS+=" -lintl"
87 - fi
88 - fi
89 -}
90 -
91 -_emake() {
92 - emake \
93 - TOPDIR="${EPREFIX}/usr" \
94 - REDO=$(usex leaps_timezone posix_right posix_only) \
95 - "$@"
96 -}
97 -
98 -src_compile() {
99 - # TOPDIR is used in some utils when compiling.
100 - _emake \
101 - AR="$(tc-getAR)" \
102 - CC="$(tc-getCC)" \
103 - RANLIB="$(tc-getRANLIB)" \
104 - CFLAGS="${CFLAGS} -std=gnu99" \
105 - LDFLAGS="${LDFLAGS}" \
106 - LDLIBS="${LDLIBS}"
107 - if tc-is-cross-compiler ; then
108 - _emake -C "${S}"-native \
109 - CC="$(tc-getBUILD_CC)" \
110 - CFLAGS="${BUILD_CFLAGS}" \
111 - CPPFLAGS="${BUILD_CPPFLAGS}" \
112 - LDFLAGS="${BUILD_LDFLAGS}" \
113 - LDLIBS="${LDLIBS}" \
114 - zic
115 - fi
116 -}
117 -
118 -src_install() {
119 - local zic=""
120 - tc-is-cross-compiler && zic="zic=${S}-native/zic"
121 - _emake install ${zic} DESTDIR="${D}"
122 - dodoc CONTRIBUTING README NEWS Theory
123 - dohtml *.htm
124 -}
125 -
126 -get_TIMEZONE() {
127 - local tz src="${EROOT}etc/timezone"
128 - if [[ -e ${src} ]] ; then
129 - tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
130 - else
131 - tz="FOOKABLOIE"
132 - fi
133 - [[ -z ${tz} ]] && return 1 || echo "${tz}"
134 -}
135 -
136 -pkg_preinst() {
137 - local tz=$(get_TIMEZONE)
138 - if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then
139 - eerror "The right & posix subdirs are no longer installed as subdirs -- they have been"
140 - eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the"
141 - eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not"
142 - eerror "be using right/xxx for the system timezone as it breaks programs."
143 - die "Please fix your timezone setting"
144 - fi
145 -
146 - # Trim the symlink by hand to avoid portage's automatic protection checks.
147 - rm -f "${EROOT}"/usr/share/zoneinfo/posix
148 -
149 - if has_version "<=${CATEGORY}/${PN}-2015c" ; then
150 - elog "Support for accessing posix/ and right/ directly has been dropped to match"
151 - elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx."
152 - elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post"
153 - elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html"
154 - fi
155 -}
156 -
157 -pkg_config() {
158 - # make sure the /etc/localtime file does not get stale #127899
159 - local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime"
160 -
161 - # If it's a symlink, assume the user knows what they're doing and
162 - # they're managing it themselves. #511474
163 - if [[ -L ${etc_lt} ]] ; then
164 - einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
165 - return 0
166 - fi
167 -
168 - if ! tz=$(get_TIMEZONE) ; then
169 - einfo "Assuming your empty ${etc_lt} file is what you want; skipping update."
170 - return 0
171 - fi
172 - if [[ ${tz} == "FOOKABLOIE" ]] ; then
173 - elog "You do not have TIMEZONE set in ${src}."
174 -
175 - if [[ ! -e ${etc_lt} ]] ; then
176 - cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
177 - elog "Setting ${etc_lt} to Factory."
178 - else
179 - elog "Skipping auto-update of ${etc_lt}."
180 - fi
181 - return 0
182 - fi
183 -
184 - if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
185 - elog "You have an invalid TIMEZONE setting in ${src}"
186 - elog "Your ${etc_lt} has been reset to Factory; enjoy!"
187 - tz="Factory"
188 - fi
189 - einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
190 - cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
191 -}
192 -
193 -pkg_postinst() {
194 - pkg_config
195 -}
196
197 diff --git a/sys-libs/timezone-data/timezone-data-2016i.ebuild b/sys-libs/timezone-data/timezone-data-2016i.ebuild
198 deleted file mode 100644
199 index 837768d75cd..00000000000
200 --- a/sys-libs/timezone-data/timezone-data-2016i.ebuild
201 +++ /dev/null
202 @@ -1,156 +0,0 @@
203 -# Copyright 1999-2017 Gentoo Foundation
204 -# Distributed under the terms of the GNU General Public License v2
205 -
206 -EAPI="5"
207 -
208 -inherit eutils toolchain-funcs flag-o-matic
209 -
210 -code_ver=${PV}
211 -data_ver=${PV}
212 -DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
213 -HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm"
214 -SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
215 - http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
216 -
217 -LICENSE="BSD public-domain"
218 -SLOT="0"
219 -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"
220 -IUSE="nls leaps_timezone elibc_FreeBSD"
221 -
222 -DEPEND="nls? ( virtual/libintl )"
223 -RDEPEND="${DEPEND}
224 - !sys-libs/glibc[vanilla(+)]"
225 -
226 -S=${WORKDIR}
227 -
228 -src_prepare() {
229 - epatch "${FILESDIR}"/${PN}-2016g-makefile.patch
230 - tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
231 -}
232 -
233 -src_configure() {
234 - tc-export CC
235 -
236 - append-lfs-flags #471102
237 -
238 - if use elibc_FreeBSD || use elibc_Darwin ; then
239 - append-cppflags -DSTD_INSPIRED #138251
240 - fi
241 -
242 - append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
243 - LDLIBS=""
244 - if use nls ; then
245 - # See if an external libintl is available. #154181 #578424
246 - local c="${T}/test"
247 - echo 'main(){}' > "${c}.c"
248 - if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
249 - LDLIBS+=" -lintl"
250 - fi
251 - fi
252 -}
253 -
254 -_emake() {
255 - emake \
256 - TOPDIR="${EPREFIX}/usr" \
257 - REDO=$(usex leaps_timezone posix_right posix_only) \
258 - "$@"
259 -}
260 -
261 -src_compile() {
262 - # TOPDIR is used in some utils when compiling.
263 - _emake \
264 - AR="$(tc-getAR)" \
265 - CC="$(tc-getCC)" \
266 - RANLIB="$(tc-getRANLIB)" \
267 - CFLAGS="${CFLAGS} -std=gnu99" \
268 - LDFLAGS="${LDFLAGS}" \
269 - LDLIBS="${LDLIBS}"
270 - if tc-is-cross-compiler ; then
271 - _emake -C "${S}"-native \
272 - CC="$(tc-getBUILD_CC)" \
273 - CFLAGS="${BUILD_CFLAGS}" \
274 - CPPFLAGS="${BUILD_CPPFLAGS}" \
275 - LDFLAGS="${BUILD_LDFLAGS}" \
276 - LDLIBS="${LDLIBS}" \
277 - zic
278 - fi
279 -}
280 -
281 -src_install() {
282 - local zic=""
283 - tc-is-cross-compiler && zic="zic=${S}-native/zic"
284 - _emake install ${zic} DESTDIR="${D}"
285 - dodoc CONTRIBUTING README NEWS Theory
286 - dohtml *.htm
287 -}
288 -
289 -get_TIMEZONE() {
290 - local tz src="${EROOT}etc/timezone"
291 - if [[ -e ${src} ]] ; then
292 - tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
293 - else
294 - tz="FOOKABLOIE"
295 - fi
296 - [[ -z ${tz} ]] && return 1 || echo "${tz}"
297 -}
298 -
299 -pkg_preinst() {
300 - local tz=$(get_TIMEZONE)
301 - if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then
302 - eerror "The right & posix subdirs are no longer installed as subdirs -- they have been"
303 - eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the"
304 - eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not"
305 - eerror "be using right/xxx for the system timezone as it breaks programs."
306 - die "Please fix your timezone setting"
307 - fi
308 -
309 - # Trim the symlink by hand to avoid portage's automatic protection checks.
310 - rm -f "${EROOT}"/usr/share/zoneinfo/posix
311 -
312 - if has_version "<=${CATEGORY}/${PN}-2015c" ; then
313 - elog "Support for accessing posix/ and right/ directly has been dropped to match"
314 - elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx."
315 - elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post"
316 - elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html"
317 - fi
318 -}
319 -
320 -pkg_config() {
321 - # make sure the /etc/localtime file does not get stale #127899
322 - local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime"
323 -
324 - # If it's a symlink, assume the user knows what they're doing and
325 - # they're managing it themselves. #511474
326 - if [[ -L ${etc_lt} ]] ; then
327 - einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
328 - return 0
329 - fi
330 -
331 - if ! tz=$(get_TIMEZONE) ; then
332 - einfo "Assuming your empty ${etc_lt} file is what you want; skipping update."
333 - return 0
334 - fi
335 - if [[ ${tz} == "FOOKABLOIE" ]] ; then
336 - elog "You do not have TIMEZONE set in ${src}."
337 -
338 - if [[ ! -e ${etc_lt} ]] ; then
339 - cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
340 - elog "Setting ${etc_lt} to Factory."
341 - else
342 - elog "Skipping auto-update of ${etc_lt}."
343 - fi
344 - return 0
345 - fi
346 -
347 - if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
348 - elog "You have an invalid TIMEZONE setting in ${src}"
349 - elog "Your ${etc_lt} has been reset to Factory; enjoy!"
350 - tz="Factory"
351 - fi
352 - einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
353 - cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
354 -}
355 -
356 -pkg_postinst() {
357 - pkg_config
358 -}
359
360 diff --git a/sys-libs/timezone-data/timezone-data-2016j.ebuild b/sys-libs/timezone-data/timezone-data-2016j.ebuild
361 deleted file mode 100644
362 index 837768d75cd..00000000000
363 --- a/sys-libs/timezone-data/timezone-data-2016j.ebuild
364 +++ /dev/null
365 @@ -1,156 +0,0 @@
366 -# Copyright 1999-2017 Gentoo Foundation
367 -# Distributed under the terms of the GNU General Public License v2
368 -
369 -EAPI="5"
370 -
371 -inherit eutils toolchain-funcs flag-o-matic
372 -
373 -code_ver=${PV}
374 -data_ver=${PV}
375 -DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
376 -HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm"
377 -SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
378 - http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
379 -
380 -LICENSE="BSD public-domain"
381 -SLOT="0"
382 -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"
383 -IUSE="nls leaps_timezone elibc_FreeBSD"
384 -
385 -DEPEND="nls? ( virtual/libintl )"
386 -RDEPEND="${DEPEND}
387 - !sys-libs/glibc[vanilla(+)]"
388 -
389 -S=${WORKDIR}
390 -
391 -src_prepare() {
392 - epatch "${FILESDIR}"/${PN}-2016g-makefile.patch
393 - tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
394 -}
395 -
396 -src_configure() {
397 - tc-export CC
398 -
399 - append-lfs-flags #471102
400 -
401 - if use elibc_FreeBSD || use elibc_Darwin ; then
402 - append-cppflags -DSTD_INSPIRED #138251
403 - fi
404 -
405 - append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
406 - LDLIBS=""
407 - if use nls ; then
408 - # See if an external libintl is available. #154181 #578424
409 - local c="${T}/test"
410 - echo 'main(){}' > "${c}.c"
411 - if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
412 - LDLIBS+=" -lintl"
413 - fi
414 - fi
415 -}
416 -
417 -_emake() {
418 - emake \
419 - TOPDIR="${EPREFIX}/usr" \
420 - REDO=$(usex leaps_timezone posix_right posix_only) \
421 - "$@"
422 -}
423 -
424 -src_compile() {
425 - # TOPDIR is used in some utils when compiling.
426 - _emake \
427 - AR="$(tc-getAR)" \
428 - CC="$(tc-getCC)" \
429 - RANLIB="$(tc-getRANLIB)" \
430 - CFLAGS="${CFLAGS} -std=gnu99" \
431 - LDFLAGS="${LDFLAGS}" \
432 - LDLIBS="${LDLIBS}"
433 - if tc-is-cross-compiler ; then
434 - _emake -C "${S}"-native \
435 - CC="$(tc-getBUILD_CC)" \
436 - CFLAGS="${BUILD_CFLAGS}" \
437 - CPPFLAGS="${BUILD_CPPFLAGS}" \
438 - LDFLAGS="${BUILD_LDFLAGS}" \
439 - LDLIBS="${LDLIBS}" \
440 - zic
441 - fi
442 -}
443 -
444 -src_install() {
445 - local zic=""
446 - tc-is-cross-compiler && zic="zic=${S}-native/zic"
447 - _emake install ${zic} DESTDIR="${D}"
448 - dodoc CONTRIBUTING README NEWS Theory
449 - dohtml *.htm
450 -}
451 -
452 -get_TIMEZONE() {
453 - local tz src="${EROOT}etc/timezone"
454 - if [[ -e ${src} ]] ; then
455 - tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
456 - else
457 - tz="FOOKABLOIE"
458 - fi
459 - [[ -z ${tz} ]] && return 1 || echo "${tz}"
460 -}
461 -
462 -pkg_preinst() {
463 - local tz=$(get_TIMEZONE)
464 - if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then
465 - eerror "The right & posix subdirs are no longer installed as subdirs -- they have been"
466 - eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the"
467 - eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not"
468 - eerror "be using right/xxx for the system timezone as it breaks programs."
469 - die "Please fix your timezone setting"
470 - fi
471 -
472 - # Trim the symlink by hand to avoid portage's automatic protection checks.
473 - rm -f "${EROOT}"/usr/share/zoneinfo/posix
474 -
475 - if has_version "<=${CATEGORY}/${PN}-2015c" ; then
476 - elog "Support for accessing posix/ and right/ directly has been dropped to match"
477 - elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx."
478 - elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post"
479 - elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html"
480 - fi
481 -}
482 -
483 -pkg_config() {
484 - # make sure the /etc/localtime file does not get stale #127899
485 - local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime"
486 -
487 - # If it's a symlink, assume the user knows what they're doing and
488 - # they're managing it themselves. #511474
489 - if [[ -L ${etc_lt} ]] ; then
490 - einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
491 - return 0
492 - fi
493 -
494 - if ! tz=$(get_TIMEZONE) ; then
495 - einfo "Assuming your empty ${etc_lt} file is what you want; skipping update."
496 - return 0
497 - fi
498 - if [[ ${tz} == "FOOKABLOIE" ]] ; then
499 - elog "You do not have TIMEZONE set in ${src}."
500 -
501 - if [[ ! -e ${etc_lt} ]] ; then
502 - cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
503 - elog "Setting ${etc_lt} to Factory."
504 - else
505 - elog "Skipping auto-update of ${etc_lt}."
506 - fi
507 - return 0
508 - fi
509 -
510 - if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
511 - elog "You have an invalid TIMEZONE setting in ${src}"
512 - elog "Your ${etc_lt} has been reset to Factory; enjoy!"
513 - tz="Factory"
514 - fi
515 - einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
516 - cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
517 -}
518 -
519 -pkg_postinst() {
520 - pkg_config
521 -}