Gentoo Archives: gentoo-commits

From: Thomas Deutschmann <whissi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/timezone-data/
Date: Sun, 28 Apr 2019 22:06:14
Message-Id: 1556489112.7d80fa3158471bbab437d34683b0f7ea9cb473a9.whissi@gentoo
1 commit: 7d80fa3158471bbab437d34683b0f7ea9cb473a9
2 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
3 AuthorDate: Sun Apr 28 21:59:40 2019 +0000
4 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
5 CommitDate: Sun Apr 28 22:05:12 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7d80fa31
7
8 sys-libs/timezone-data: bump to v2019a
9
10 Package-Manager: Portage-2.3.64, Repoman-2.3.12
11 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>
12
13 sys-libs/timezone-data/Manifest | 2 +
14 sys-libs/timezone-data/timezone-data-2019a.ebuild | 178 ++++++++++++++++++++++
15 2 files changed, 180 insertions(+)
16
17 diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
18 index 50bea910eb0..f29939567ec 100644
19 --- a/sys-libs/timezone-data/Manifest
20 +++ b/sys-libs/timezone-data/Manifest
21 @@ -1,2 +1,4 @@
22 DIST tzcode2018i.tar.gz 242962 BLAKE2B 682a23c324b6d8e1a0d63c6140c82ca3a24017c0972e7f915ecad5e0838f8f57743ffa2c5d9cc9744739a0e7d791ddb21947618cd11635767800ac99307c9548 SHA512 1a3d53043f20b8252f7598f547d78e7294d9e0cf1fcdd2159354d9769f824c8c8a03cef9cbb7fa579345fdb41372335117d2ef782ecd9c107dd0526e59492d9d
23 +DIST tzcode2019a.tar.gz 246449 BLAKE2B c54b72baf1c2471e96fa7f68693e047b71a80e0f2c116e14b42ac561c45c3e84bf7324a4fbc124b70ac5470e9a3b224e708a9864092f35070d7c592e65cbd7c9 SHA512 7cc76ce6be4a67c3e1b2222cb632d2de9dabb76899793a938f87a1d4bb20e462cabdae9e3b986aaabaa400795370510095d236dbad5aff4c192d0887f0ecedf5
24 DIST tzdata2018i.tar.gz 377009 BLAKE2B fa28fdac145756368d4760c418742efd558e63fd9900fc4649971b683b162df5e566c6214a79ec46b48fc65af488a7e0e95ddb6176a4f9adb5b39bc634426143 SHA512 6afcacb377842190648ed26f01abcf3db37aa2e7c63d8c509c29b4bc0078b7ff2d4e5375291b9f53498215b9e2f04936bc6145e2f651ae0be6d8166d8d336f6a
25 +DIST tzdata2019a.tar.gz 378961 BLAKE2B f8ab67f1fac34ab81fa9995cd70399728e6755303354e29e90ef8c3c513806c2849f5332d170f52f99554ba387ea2cf2667cf70be6b85b68e25061d93879e3cd SHA512 d8eb5b2b68abee08bd2b0d2134bce85b5c0aee85168e9697a607604ed5be7d1539ac60fda9b37e0c9c793ef6251978bc250563a0af59497fde775499964bb5aa
26
27 diff --git a/sys-libs/timezone-data/timezone-data-2019a.ebuild b/sys-libs/timezone-data/timezone-data-2019a.ebuild
28 new file mode 100644
29 index 00000000000..990fe3b06b8
30 --- /dev/null
31 +++ b/sys-libs/timezone-data/timezone-data-2019a.ebuild
32 @@ -0,0 +1,178 @@
33 +# Copyright 1999-2019 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI="6"
37 +
38 +inherit toolchain-funcs flag-o-matic
39 +
40 +code_ver=${PV}
41 +data_ver=${PV}
42 +DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
43 +HOMEPAGE="https://www.iana.org/time-zones"
44 +SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
45 + https://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
46 +
47 +LICENSE="BSD public-domain"
48 +SLOT="0"
49 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris"
50 +IUSE="nls leaps_timezone elibc_FreeBSD"
51 +
52 +DEPEND="nls? ( virtual/libintl )"
53 +RDEPEND="${DEPEND}
54 + !sys-libs/glibc[vanilla(+)]"
55 +
56 +S=${WORKDIR}
57 +
58 +src_prepare() {
59 + default
60 +
61 + # check_web contacts validator.w3.org
62 + sed -i -e 's/check_tables check_web/check_tables/g' \
63 + Makefile || die "Failed to disable check_web"
64 +
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 + REDO=$(usex leaps_timezone posix_right posix_only) \
92 + TZDATA_TEXT= \
93 + TOPDIR="${EPREFIX}" \
94 + ZICDIR='$(TOPDIR)/usr/bin' \
95 + "$@"
96 +}
97 +
98 +src_compile() {
99 + _emake \
100 + AR="$(tc-getAR)" \
101 + cc="$(tc-getCC)" \
102 + RANLIB="$(tc-getRANLIB)" \
103 + CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \
104 + LDFLAGS="${LDFLAGS}" \
105 + LDLIBS="${LDLIBS}"
106 + if tc-is-cross-compiler ; then
107 + _emake -C "${S}"-native \
108 + AR="$(tc-getBUILD_AR)" \
109 + cc="$(tc-getBUILD_CC)" \
110 + RANLIB="$(tc-getBUILD_RANLIB)" \
111 + CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \
112 + LDFLAGS="${BUILD_LDFLAGS}" \
113 + LDLIBS="${LDLIBS}" \
114 + zic
115 + fi
116 +}
117 +
118 +src_test() {
119 + # VALIDATE_ENV is used for extended/web based tests. Punt on them.
120 + emake -j1 check VALIDATE_ENV=true
121 +}
122 +
123 +src_install() {
124 + local zic=""
125 + tc-is-cross-compiler && zic="zic=${S}-native/zic"
126 + _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit"
127 + rm -rf "${D}/nukeit" "${ED}/etc" || die
128 +
129 + insinto /usr/share/zoneinfo
130 + doins "${S}"/leap-seconds.list
131 +
132 + # Delete man pages installed by man-pages package.
133 + rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die
134 + dodoc CONTRIBUTING README NEWS *.html
135 +}
136 +
137 +get_TIMEZONE() {
138 + local tz src="${EROOT}etc/timezone"
139 + if [[ -e ${src} ]] ; then
140 + tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
141 + else
142 + tz="FOOKABLOIE"
143 + fi
144 + [[ -z ${tz} ]] && return 1 || echo "${tz}"
145 +}
146 +
147 +pkg_preinst() {
148 + local tz=$(get_TIMEZONE)
149 + if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then
150 + eerror "The right & posix subdirs are no longer installed as subdirs -- they have been"
151 + eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the"
152 + eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not"
153 + eerror "be using right/xxx for the system timezone as it breaks programs."
154 + die "Please fix your timezone setting"
155 + fi
156 +
157 + # Trim the symlink by hand to avoid portage's automatic protection checks.
158 + rm -f "${EROOT}"/usr/share/zoneinfo/posix
159 +
160 + if has_version "<=${CATEGORY}/${PN}-2015c" ; then
161 + elog "Support for accessing posix/ and right/ directly has been dropped to match"
162 + elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx."
163 + elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post"
164 + elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html"
165 + fi
166 +}
167 +
168 +configure_tz_data() {
169 + # make sure the /etc/localtime file does not get stale #127899
170 + local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime"
171 +
172 + # If it's a symlink, assume the user knows what they're doing and
173 + # they're managing it themselves. #511474
174 + if [[ -L ${etc_lt} ]] ; then
175 + einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
176 + return 0
177 + fi
178 +
179 + if ! tz=$(get_TIMEZONE) ; then
180 + einfo "Assuming your empty ${etc_lt} file is what you want; skipping update."
181 + return 0
182 + fi
183 + if [[ ${tz} == "FOOKABLOIE" ]] ; then
184 + elog "You do not have TIMEZONE set in ${src}."
185 +
186 + if [[ ! -e ${etc_lt} ]] ; then
187 + cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
188 + elog "Setting ${etc_lt} to Factory."
189 + else
190 + elog "Skipping auto-update of ${etc_lt}."
191 + fi
192 + return 0
193 + fi
194 +
195 + if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
196 + elog "You have an invalid TIMEZONE setting in ${src}"
197 + elog "Your ${etc_lt} has been reset to Factory; enjoy!"
198 + tz="Factory"
199 + fi
200 + einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
201 + cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
202 +}
203 +
204 +pkg_config() {
205 + configure_tz_data
206 +}
207 +
208 +pkg_postinst() {
209 + configure_tz_data
210 +}