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