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