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/, sys-libs/timezone-data/files/
Date: Sun, 05 Nov 2017 00:15:16
Message-Id: 1509840902.edaa536d5359bd37c8055f5f21c6134b636373e7.dilfridge@gentoo
1 commit: edaa536d5359bd37c8055f5f21c6134b636373e7
2 Author: Andreas K. Hüttel <dilfridge <AT> gentoo <DOT> org>
3 AuthorDate: Sun Nov 5 00:14:42 2017 +0000
4 Commit: Andreas Hüttel <dilfridge <AT> gentoo <DOT> org>
5 CommitDate: Sun Nov 5 00:15:02 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=edaa536d
7
8 sys-libs/timezone-data: Version bump
9
10 To be stabled in a few days if nothing bad happens.
11
12 Bug: https://bugs.gentoo.org/636464
13 Package-Manager: Portage-2.3.13, Repoman-2.3.4
14
15 sys-libs/timezone-data/Manifest | 2 +
16 .../files/timezone-data-2017c-makefile.patch | 77 ++++++++++
17 sys-libs/timezone-data/timezone-data-2017c.ebuild | 161 +++++++++++++++++++++
18 3 files changed, 240 insertions(+)
19
20 diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
21 index c18c6128b5e..97792c1f989 100644
22 --- a/sys-libs/timezone-data/Manifest
23 +++ b/sys-libs/timezone-data/Manifest
24 @@ -1,4 +1,6 @@
25 DIST tzcode2017a.tar.gz 210671 SHA256 02f2c6b58b99edd0d47f0cad34075b359fd1a4dab71850f493b0404ded3b38ac SHA512 36d744debd5263b6be39b3a9a146b7db1876f216a4bfc62b46631745861a9c03eda3220f213def86c724d3a11c41398c65c2e5d013ff2c1900e7bfc5e7844025 WHIRLPOOL ff618c6bfbd35c8d02a3c2c50e61aa872ce13be87e3b5de8e58e7110b174249530bcd63bd83ccf1f70834bfbf8b2cb5e96176554601611f0e10e54fe8c023b20
26 DIST tzcode2017b.tar.gz 210780 SHA256 4d1735bb54e22b8d7443d4d1f1a13d007ae11be79a35e51f8e8322fb8e292d40 SHA512 9a73af4b868506d1f6287a8285dea489e68f6828da19509114f9144e2a2019c7fd28f4fb98ea907030d11d011ce3a87d99dbe43bca218beddafff151f0d61df1 WHIRLPOOL f98be38b269494722859113de561fffd35aeda75a73c57429403606de5c6522f826c818142083d866ec0cf21cfa8427c021ccca45a4447864513af0cfec92c99
27 +DIST tzcode2017c.tar.gz 219346 SHA256 81e8b4bc23e60906640c266bbff3789661e22f0fa29fe61b96ec7c2816c079b7 SHA512 0d8c3e07b0de9015a137602450468ceb6358312a50eeda2a860882367107b8ba9ef275880b292570a671b9910afc54e6209e1e642387d246bc9c08c4ff660ffb WHIRLPOOL 0b41fb71bc4c2ed7a0e87ea4a75341b49a64dfea7100bc038d0ed8b1f14d2fd7d8bf6dbb625b30c65a4f9cac61f8f92ba0a1c320d0561b918ec5b98db15f76d5
28 DIST tzdata2017a.tar.gz 323983 SHA256 df3a5c4d0a2cf0cde0b3f35796ccf6c9acfd598b8e70f8dece5404cd7626bbd6 SHA512 fe57930711998a0755749a2bf1b32fdbc9e6ee249762017beea52eae7e521236396300fe2d79298fd81eb6d73fb7567884c35995ed248be06188329d937e3873 WHIRLPOOL 88cf93fcea09edfc568c00df4cc20e97f9327ab9ad07125475c2f9b81b6d95f8da8a7922305880466d61b1eb897f85bba82ac7e7ee1268cfb96d4ccbcab62a3a
29 DIST tzdata2017b.tar.gz 324317 SHA256 f8242a522ea3496b0ce4ff4f2e75a049178da21001a08b8e666d8cbe07d18086 SHA512 3e090dba1f52e4c63b4930b28f4bf38b56aabd6728f23094cb5801d10f4e464f17231f17b75b8866714bf98199c166ea840de0787b75b2274aa419a4e14bbc4d WHIRLPOOL 3347ad15ceb763f7679ba3c5bf6bce055ed8d250f24e78b49cce665aa18919d27340716d3d952820c6287194be4014e8094fb615e9c08e73e1859fec080f831f
30 +DIST tzdata2017c.tar.gz 335571 SHA256 d6543f92a929826318e2f44ff3a7611ce5f565a43e10250b42599d0ba4cbd90b SHA512 feb5c544e617b30c73a397e5a1c51f9847d0fddf1dfa0f9ace2e6f686786f09b666937b2048e07075c84593fc584bd5a25d639fce70eca9735267df28621ab4c WHIRLPOOL 9258564a850b60af65f374b63988f940d71f55f5f969ec669062bea1e69439e2344aee01c98fa01309ec0daf043ed5135dd83f8e78fa567ff8b488b0315a3638
31
32 diff --git a/sys-libs/timezone-data/files/timezone-data-2017c-makefile.patch b/sys-libs/timezone-data/files/timezone-data-2017c-makefile.patch
33 new file mode 100644
34 index 00000000000..18e1303c7da
35 --- /dev/null
36 +++ b/sys-libs/timezone-data/files/timezone-data-2017c-makefile.patch
37 @@ -0,0 +1,77 @@
38 +diff -ruN timezone-data-2017c.orig/Makefile timezone-data-2017c/Makefile
39 +--- timezone-data-2017c.orig/Makefile 2017-10-02 02:23:52.000000000 +0200
40 ++++ timezone-data-2017c/Makefile 2017-11-05 01:03:06.514561762 +0100
41 +@@ -44,7 +44,7 @@
42 +
43 + # Everything gets put in subdirectories of. . .
44 +
45 +-TOPDIR= /usr/local
46 ++TOPDIR= /usr
47 +
48 + # "Compiled" time zone information is placed in the "TZDIR" directory
49 + # (and subdirectories).
50 +@@ -52,14 +52,14 @@
51 + # TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty.
52 +
53 + TZDIR_BASENAME= zoneinfo
54 +-TZDIR= $(TOPDIR)/etc/$(TZDIR_BASENAME)
55 ++TZDIR= $(TOPDIR)/share/$(TZDIR_BASENAME)
56 +
57 + # Types to try, as an alternative to time_t. int64_t should be first.
58 + TIME_T_ALTERNATIVES= int64_t int32_t uint32_t uint64_t
59 +
60 + # The "tzselect", "zic", and "zdump" commands get installed in. . .
61 +
62 +-ETCDIR= $(TOPDIR)/etc
63 ++SBINDIR= $(TOPDIR)/sbin
64 +
65 + # If you "make INSTALL", the "date" command gets installed in. . .
66 +
67 +@@ -67,7 +67,7 @@
68 +
69 + # Manual pages go in subdirectories of. . .
70 +
71 +-MANDIR= $(TOPDIR)/man
72 ++MANDIR= $(TOPDIR)/share/man
73 +
74 + # Library functions are put in an archive in LIBDIR.
75 +
76 +@@ -395,8 +395,7 @@
77 +
78 + #MAKE= make
79 +
80 +-cc= cc
81 +-CC= $(cc) -DTZDIR=\"$(TZDIR)\"
82 ++CPPFLAGS+= -DTZDIR=\"$(TZDIR)\"
83 +
84 + AR= ar
85 +
86 +@@ -474,17 +473,13 @@
87 +
88 + install: all $(DATA) $(REDO) $(MANS)
89 + mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
90 +- $(DESTDIR)$(LIBDIR) \
91 ++ $(DESTDIR)$(BINDIR) \
92 + $(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
93 + $(DESTDIR)$(MANDIR)/man8
94 + $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
95 + cp -f $(TABDATA) $(DESTDIR)$(TZDIR)/.
96 +- cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
97 +- cp libtz.a $(DESTDIR)$(LIBDIR)/.
98 +- $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
99 ++ cp tzselect zic zdump $(DESTDIR)$(BINDIR)/.
100 + cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
101 +- cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
102 +- cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
103 +
104 + INSTALL: ALL install date.1
105 + mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
106 +@@ -621,7 +616,7 @@
107 +
108 + check: check_character_set check_white_space check_links \
109 + check_name_lengths check_sorted \
110 +- check_tables check_web check_zishrink check_tzs
111 ++ check_tables check_zishrink
112 +
113 + check_character_set: $(ENCHILADA)
114 + test ! '$(UTF8_LOCALE)' || \
115
116 diff --git a/sys-libs/timezone-data/timezone-data-2017c.ebuild b/sys-libs/timezone-data/timezone-data-2017c.ebuild
117 new file mode 100644
118 index 00000000000..245207fcf5d
119 --- /dev/null
120 +++ b/sys-libs/timezone-data/timezone-data-2017c.ebuild
121 @@ -0,0 +1,161 @@
122 +# Copyright 1999-2017 Gentoo Foundation
123 +# Distributed under the terms of the GNU General Public License v2
124 +
125 +EAPI=6
126 +
127 +inherit toolchain-funcs flag-o-matic
128 +
129 +code_ver=${PV}
130 +data_ver=${PV}
131 +DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
132 +HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm"
133 +SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
134 + http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
135 +
136 +LICENSE="BSD public-domain"
137 +SLOT="0"
138 +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 ~x64-solaris"
139 +IUSE="nls leaps_timezone elibc_FreeBSD"
140 +
141 +DEPEND="nls? ( virtual/libintl )"
142 +RDEPEND="${DEPEND}
143 + !sys-libs/glibc[vanilla(+)]"
144 +
145 +S=${WORKDIR}
146 +
147 +src_prepare() {
148 + eapply "${FILESDIR}"/${PN}-2017c-makefile.patch
149 + default
150 + tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
151 +}
152 +
153 +src_configure() {
154 + tc-export CC
155 +
156 + append-lfs-flags #471102
157 +
158 + if use elibc_FreeBSD || use elibc_Darwin ; then
159 + append-cppflags -DSTD_INSPIRED #138251
160 + fi
161 +
162 + append-cppflags -DHAVE_GETTEXT=$(usex nls 1 0) -DTZ_DOMAIN='\"libc\"'
163 + LDLIBS=""
164 + if use nls ; then
165 + # See if an external libintl is available. #154181 #578424
166 + local c="${T}/test"
167 + echo 'main(){}' > "${c}.c"
168 + if $(tc-getCC) ${CPPFLAGS} ${CFLAGS} ${LDFLAGS} "${c}.c" -o "${c}" -lintl 2>/dev/null ; then
169 + LDLIBS+=" -lintl"
170 + fi
171 + fi
172 +}
173 +
174 +_emake() {
175 + emake \
176 + TOPDIR="${EPREFIX}/usr" \
177 + REDO=$(usex leaps_timezone posix_right posix_only) \
178 + "$@"
179 +}
180 +
181 +src_compile() {
182 + # TOPDIR is used in some utils when compiling.
183 + _emake \
184 + AR="$(tc-getAR)" \
185 + CC="$(tc-getCC)" \
186 + RANLIB="$(tc-getRANLIB)" \
187 + CFLAGS="${CFLAGS} -std=gnu99" \
188 + LDFLAGS="${LDFLAGS}" \
189 + LDLIBS="${LDLIBS}"
190 + if tc-is-cross-compiler ; then
191 + _emake -C "${S}"-native \
192 + CC="$(tc-getBUILD_CC)" \
193 + CFLAGS="${BUILD_CFLAGS}" \
194 + CPPFLAGS="${BUILD_CPPFLAGS}" \
195 + LDFLAGS="${BUILD_LDFLAGS}" \
196 + LDLIBS="${LDLIBS}" \
197 + zic
198 + fi
199 +}
200 +
201 +src_install() {
202 + local zic=""
203 + tc-is-cross-compiler && zic="zic=${S}-native/zic"
204 + _emake install ${zic} DESTDIR="${D}"
205 + dodoc CONTRIBUTING README NEWS
206 + dodoc *.htm
207 +}
208 +
209 +get_TIMEZONE() {
210 + local tz src="${EROOT}etc/timezone"
211 + if [[ -e ${src} ]] ; then
212 + tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
213 + else
214 + tz="FOOKABLOIE"
215 + fi
216 + [[ -z ${tz} ]] && return 1 || echo "${tz}"
217 +}
218 +
219 +pkg_preinst() {
220 + local tz=$(get_TIMEZONE)
221 + if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then
222 + eerror "The right & posix subdirs are no longer installed as subdirs -- they have been"
223 + eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the"
224 + eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not"
225 + eerror "be using right/xxx for the system timezone as it breaks programs."
226 + die "Please fix your timezone setting"
227 + fi
228 +
229 + # Trim the symlink by hand to avoid portage's automatic protection checks.
230 + rm -f "${EROOT}"/usr/share/zoneinfo/posix
231 +
232 + if has_version "<=${CATEGORY}/${PN}-2015c" ; then
233 + elog "Support for accessing posix/ and right/ directly has been dropped to match"
234 + elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx."
235 + elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post"
236 + elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html"
237 + fi
238 +}
239 +
240 +configure_tz_data() {
241 + # make sure the /etc/localtime file does not get stale #127899
242 + local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime"
243 +
244 + # If it's a symlink, assume the user knows what they're doing and
245 + # they're managing it themselves. #511474
246 + if [[ -L ${etc_lt} ]] ; then
247 + einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
248 + return 0
249 + fi
250 +
251 + if ! tz=$(get_TIMEZONE) ; then
252 + einfo "Assuming your empty ${etc_lt} file is what you want; skipping update."
253 + return 0
254 + fi
255 + if [[ ${tz} == "FOOKABLOIE" ]] ; then
256 + elog "You do not have TIMEZONE set in ${src}."
257 +
258 + if [[ ! -e ${etc_lt} ]] ; then
259 + cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
260 + elog "Setting ${etc_lt} to Factory."
261 + else
262 + elog "Skipping auto-update of ${etc_lt}."
263 + fi
264 + return 0
265 + fi
266 +
267 + if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
268 + elog "You have an invalid TIMEZONE setting in ${src}"
269 + elog "Your ${etc_lt} has been reset to Factory; enjoy!"
270 + tz="Factory"
271 + fi
272 + einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
273 + cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
274 +}
275 +
276 +pkg_config() {
277 + configure_tz_data
278 +}
279 +
280 +pkg_postinst() {
281 + configure_tz_data
282 +}