1 |
commit: 73586d64a05790d71595f83c6f1b20292af15e20 |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Sep 25 01:14:48 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 25 01:14:53 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73586d64 |
7 |
|
8 |
sys-libs/timezone-data: add 2022d |
9 |
|
10 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
11 |
|
12 |
sys-libs/timezone-data/Manifest | 2 + |
13 |
sys-libs/timezone-data/timezone-data-2022d.ebuild | 202 ++++++++++++++++++++++ |
14 |
2 files changed, 204 insertions(+) |
15 |
|
16 |
diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest |
17 |
index 3fb362f00a02..c0fc3a91af16 100644 |
18 |
--- a/sys-libs/timezone-data/Manifest |
19 |
+++ b/sys-libs/timezone-data/Manifest |
20 |
@@ -1,2 +1,4 @@ |
21 |
DIST tzcode2022c.tar.gz 280190 BLAKE2B 4c66b84da8b1e535b92f8be8f0a1fa32f3b050f3e7676370e3094b5098e7670455e506160f364c61cfba1a919b769da8864a5347f240107c750c723fcc5caa2f SHA512 3373fa16a12007415c3dc3a75c4a0d61d6ae54968eeecedcdf4bcfd7f554020a15c4687dde107b90462b75d848eebe1e200c33322ebe0d3f1ad11bc769cade06 |
22 |
+DIST tzcode2022d.tar.gz 280432 BLAKE2B eaae4bb669f247f757a9e7394a7cd6bc5a457611cc6da44a08f697b4d2a34be2d9f7a65310767278ab1b8ed1454a1e36bb4f8d5d818f00f07475d5f955b1986d SHA512 54491ef8dbab7c41754eb3f2990b8ccb2a10960098c7d78d94375d7f1362540f0d71ba77a46bcaf95f419f8d01a23bdf940cdc9c7906c23ad6c40cd1c788b1c2 |
23 |
DIST tzdata2022c.tar.gz 432721 BLAKE2B 087a0e728c6052f91142ef11ad2092e573de99d787ed1e8ff62476b870ff2e3d222a19df01ad624cf06e543aa7e40df89dcd888b9e5fd12f8b5af90bdffc9ac9 SHA512 e2ae92abac6d87ce4ab4ba9012e868e1791b842e083293489debc0c671b9cf135b5b70426dacb6dbebbf6eba24463205225ae45bb7df891a086b25475f85ee0b |
24 |
+DIST tzdata2022d.tar.gz 433425 BLAKE2B 8339904a8d6ff8cfbd3e3180ebdce826ace0ba06e95a14d4cb99e423e3c7aef44eb6d5d6e35164b3cd69830d0136eb43d2a835c9b54d5f5fb40e5a0b437a33c9 SHA512 f0d9f1dc6b7613598a861a3860f249e5beff75d8c4bb12bae21018ee617044cf25065dff08f81b0e6ed2c43602f2166dd6407a989a369a004e068260f2eece30 |
25 |
|
26 |
diff --git a/sys-libs/timezone-data/timezone-data-2022d.ebuild b/sys-libs/timezone-data/timezone-data-2022d.ebuild |
27 |
new file mode 100644 |
28 |
index 000000000000..e7e80dff58c7 |
29 |
--- /dev/null |
30 |
+++ b/sys-libs/timezone-data/timezone-data-2022d.ebuild |
31 |
@@ -0,0 +1,202 @@ |
32 |
+# Copyright 1999-2022 Gentoo Authors |
33 |
+# Distributed under the terms of the GNU General Public License v2 |
34 |
+ |
35 |
+EAPI=8 |
36 |
+ |
37 |
+inherit toolchain-funcs flag-o-matic |
38 |
+ |
39 |
+MY_CODE_VER=${PV} |
40 |
+MY_DATA_VER=${PV} |
41 |
+DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)" |
42 |
+HOMEPAGE="https://www.iana.org/time-zones" |
43 |
+SRC_URI="https://www.iana.org/time-zones/repository/releases/tzdata${MY_DATA_VER}.tar.gz |
44 |
+ https://www.iana.org/time-zones/repository/releases/tzcode${MY_CODE_VER}.tar.gz" |
45 |
+ |
46 |
+LICENSE="BSD public-domain" |
47 |
+SLOT="0" |
48 |
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" |
49 |
+IUSE="nls leaps-timezone zic-slim" |
50 |
+ |
51 |
+DEPEND="nls? ( virtual/libintl )" |
52 |
+RDEPEND=" |
53 |
+ ${DEPEND} |
54 |
+ !sys-libs/glibc[vanilla(+)] |
55 |
+" |
56 |
+ |
57 |
+src_unpack() { |
58 |
+ mkdir -p "${S}" && cd "${S}" || die |
59 |
+ default |
60 |
+} |
61 |
+ |
62 |
+src_prepare() { |
63 |
+ default |
64 |
+ |
65 |
+ # check_web contacts validator.w3.org |
66 |
+ sed -i -e 's/check_tables check_web/check_tables/g' \ |
67 |
+ Makefile || die "Failed to disable check_web" |
68 |
+ |
69 |
+ tc-is-cross-compiler && cp -pR "${S}" "${S}"-native |
70 |
+} |
71 |
+ |
72 |
+src_configure() { |
73 |
+ tc-export CC |
74 |
+ |
75 |
+ # bug #471102 |
76 |
+ append-lfs-flags |
77 |
+ |
78 |
+ if use elibc_Darwin ; then |
79 |
+ # bug #138251 |
80 |
+ append-cppflags -DSTD_INSPIRED |
81 |
+ fi |
82 |
+ |
83 |
+ append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"' |
84 |
+ |
85 |
+ # Upstream default is 'slim', but it breaks quite a few programs |
86 |
+ # that parse /etc/localtime directly: bug #747538. |
87 |
+ append-cppflags -DZIC_BLOAT_DEFAULT='\"'$(usex zic-slim slim fat)'\"' |
88 |
+ |
89 |
+ LDLIBS="" |
90 |
+ if use nls ; then |
91 |
+ # See if an external libintl is available. bug #154181, bug #578424 |
92 |
+ local c="${T}/test" |
93 |
+ echo 'main(){}' > "${c}.c" || die |
94 |
+ if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then |
95 |
+ LDLIBS+=" -lintl" |
96 |
+ fi |
97 |
+ fi |
98 |
+} |
99 |
+ |
100 |
+_emake() { |
101 |
+ emake \ |
102 |
+ REDO=$(usex leaps-timezone posix_right posix_only) \ |
103 |
+ TOPDIR="${EPREFIX}" \ |
104 |
+ ZICDIR='$(TOPDIR)/usr/bin' \ |
105 |
+ "$@" |
106 |
+} |
107 |
+ |
108 |
+src_compile() { |
109 |
+ _emake \ |
110 |
+ AR="$(tc-getAR)" \ |
111 |
+ cc="$(tc-getCC)" \ |
112 |
+ RANLIB="$(tc-getRANLIB)" \ |
113 |
+ CFLAGS="${CFLAGS} -std=gnu99 ${CPPFLAGS}" \ |
114 |
+ LDFLAGS="${LDFLAGS}" \ |
115 |
+ LDLIBS="${LDLIBS}" |
116 |
+ |
117 |
+ if tc-is-cross-compiler ; then |
118 |
+ _emake -C "${S}"-native \ |
119 |
+ AR="$(tc-getBUILD_AR)" \ |
120 |
+ cc="$(tc-getBUILD_CC)" \ |
121 |
+ RANLIB="$(tc-getBUILD_RANLIB)" \ |
122 |
+ CFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}" \ |
123 |
+ LDFLAGS="${BUILD_LDFLAGS}" \ |
124 |
+ LDLIBS="${LDLIBS}" \ |
125 |
+ zic |
126 |
+ fi |
127 |
+} |
128 |
+ |
129 |
+src_test() { |
130 |
+ # VALIDATE_ENV is used for extended/web based tests. Punt on them. |
131 |
+ emake check VALIDATE_ENV=true |
132 |
+} |
133 |
+ |
134 |
+src_install() { |
135 |
+ local zic="" |
136 |
+ tc-is-cross-compiler && zic="zic=${S}-native/zic" |
137 |
+ _emake install ${zic} DESTDIR="${D}" LIBDIR="/nukeit" |
138 |
+ rm -rf "${D}/nukeit" "${ED}/etc" || die |
139 |
+ |
140 |
+ insinto /usr/share/zoneinfo |
141 |
+ doins "${S}"/leap-seconds.list |
142 |
+ |
143 |
+ # Delete man pages installed by man-pages package. |
144 |
+ rm "${ED}"/usr/share/man/man5/tzfile.5* "${ED}"/usr/share/man/man8/{tzselect,zdump,zic}.8 || die |
145 |
+ dodoc CONTRIBUTING README NEWS *.html |
146 |
+} |
147 |
+ |
148 |
+get_TIMEZONE() { |
149 |
+ local tz src="${EROOT}/etc/timezone" |
150 |
+ if [[ -e ${src} ]] ; then |
151 |
+ tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}") |
152 |
+ else |
153 |
+ tz="FOOKABLOIE" |
154 |
+ fi |
155 |
+ |
156 |
+ [[ -z ${tz} ]] && return 1 || echo "${tz}" |
157 |
+} |
158 |
+ |
159 |
+pkg_preinst() { |
160 |
+ local tz=$(get_TIMEZONE) |
161 |
+ if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then |
162 |
+ eerror "The right & posix subdirs are no longer installed as subdirs -- they have been" |
163 |
+ eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the" |
164 |
+ eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not" |
165 |
+ eerror "be using right/xxx for the system timezone as it breaks programs." |
166 |
+ die "Please fix your timezone setting" |
167 |
+ fi |
168 |
+ |
169 |
+ # Trim the symlink by hand to avoid portage's automatic protection checks. |
170 |
+ rm -f "${EROOT}"/usr/share/zoneinfo/posix |
171 |
+ |
172 |
+ if has_version "<=${CATEGORY}/${PN}-2015c" ; then |
173 |
+ elog "Support for accessing posix/ and right/ directly has been dropped to match" |
174 |
+ elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx." |
175 |
+ elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post" |
176 |
+ elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html" |
177 |
+ fi |
178 |
+} |
179 |
+ |
180 |
+configure_tz_data() { |
181 |
+ # Make sure the /etc/localtime file does not get stale, bug #127899 |
182 |
+ local tz src="${EROOT}/etc/timezone" etc_lt="${EROOT}/etc/localtime" |
183 |
+ |
184 |
+ # If it's a symlink, assume the user knows what they're doing and |
185 |
+ # they're managing it themselves, bug #511474 |
186 |
+ if [[ -L "${etc_lt}" ]] ; then |
187 |
+ einfo "Assuming your ${etc_lt} symlink is what you want; skipping update." |
188 |
+ return 0 |
189 |
+ fi |
190 |
+ |
191 |
+ if ! tz=$(get_TIMEZONE) ; then |
192 |
+ einfo "Assuming your empty ${src} file is what you want; skipping update." |
193 |
+ return 0 |
194 |
+ fi |
195 |
+ |
196 |
+ if [[ "${tz}" == "FOOKABLOIE" ]] ; then |
197 |
+ einfo "You do not have a timezone set in ${src}; skipping update." |
198 |
+ return 0 |
199 |
+ fi |
200 |
+ |
201 |
+ local tzpath="${EROOT}/usr/share/zoneinfo/${tz}" |
202 |
+ |
203 |
+ if [[ ! -e ${tzpath} ]]; then |
204 |
+ ewarn "The timezone specified in ${src} is not valid." |
205 |
+ return 1 |
206 |
+ fi |
207 |
+ |
208 |
+ if [[ -f ${etc_lt} ]]; then |
209 |
+ # If a regular file already exists, copy over it. |
210 |
+ ewarn "Found a regular file at ${etc_lt}." |
211 |
+ ewarn "Some software may expect a symlink instead." |
212 |
+ ewarn "You may convert it to a symlink by removing the file and running:" |
213 |
+ ewarn " emerge --config sys-libs/timezone-data" |
214 |
+ einfo "Copying ${tzpath} to ${etc_lt}." |
215 |
+ cp -f "${tzpath}" "${etc_lt}" |
216 |
+ else |
217 |
+ # Otherwise, create a symlink and remove the timezone file. |
218 |
+ tzpath="../usr/share/zoneinfo/${tz}" |
219 |
+ einfo "Linking ${tzpath} at ${etc_lt}." |
220 |
+ if ln -snf "${tzpath}" "${etc_lt}"; then |
221 |
+ einfo "Removing ${src}." |
222 |
+ rm -f "${src}" |
223 |
+ fi |
224 |
+ fi |
225 |
+} |
226 |
+ |
227 |
+pkg_config() { |
228 |
+ configure_tz_data |
229 |
+} |
230 |
+ |
231 |
+pkg_postinst() { |
232 |
+ configure_tz_data |
233 |
+} |