Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-libs/timezone-data/files/, sys-libs/timezone-data/
Date: Tue, 02 Feb 2016 18:54:11
Message-Id: 1454439012.48e2162c293601b6bc55a7ceab07e7e6aa2d3c88.vapier@gentoo
1 commit: 48e2162c293601b6bc55a7ceab07e7e6aa2d3c88
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Tue Feb 2 18:49:48 2016 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Tue Feb 2 18:50:12 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=48e2162c
7
8 sys-libs/timezone: version bump to 2016a
9
10 sys-libs/timezone-data/Manifest | 2 +
11 .../files/timezone-data-2016a-makefile.patch | 84 ++++++++++++
12 sys-libs/timezone-data/timezone-data-2016a.ebuild | 143 +++++++++++++++++++++
13 3 files changed, 229 insertions(+)
14
15 diff --git a/sys-libs/timezone-data/Manifest b/sys-libs/timezone-data/Manifest
16 index e128561..73f57d8 100644
17 --- a/sys-libs/timezone-data/Manifest
18 +++ b/sys-libs/timezone-data/Manifest
19 @@ -1,4 +1,6 @@
20 DIST tzcode2015f.tar.gz 180742 SHA256 0c95e0a42bb61141f790f4f5f204b954d7654c894aa54a594a215d6f38de84ae SHA512 5cfbebde8a0be57e8388a7b6d35aeba99130a72c1a41f9bbd5d5864511a473aa5e9320ab21055b4383e64b3b9d7682c0d30377ce8407619987be672436014710 WHIRLPOOL c657f8d6a77cd96f6fed296bc905fd5690abe47f7cf25d99ea6802d61cee619c75e70ea006a77a0680d4c46ea43f8fb509bbb32b7ecc0323996e44b462e17845
21 DIST tzcode2015g.tar.gz 181695 SHA256 18e402ef24bfad2ded38643c9a7a9a580f940a729cb47d983052fc28ff0c7ec4 SHA512 44da833da3afdb82636a953785372bb4c765e61e40d700da40b46ab70007ebdbde4d480e10b87cbb36c45eaaffcaa6b9894375e2f553b7d16655dc167cd4a11f WHIRLPOOL 7c71471ba122865710ec6c71e443dab7db8fd6f43cf4348dd02438129d9c80dcfb3d6da3cdb3b04efeabcc5debba35a78d0b946b6b9e98caa5d7ddefbbe600e4
22 +DIST tzcode2016a.tar.gz 184047 SHA256 11ae66d59b844e8c6c81914c9dd73b666627bd7792855ba9de195eee4520c28d SHA512 33a1078ba16aef19048aa97ce1816fc5368061bfe40eddc0e7e246ca57c4a535eaf2f03847128e971a6d959f34ea77224bf33fd53dc6a0c006450dde35222223 WHIRLPOOL 794e57430145de46068ae84eb1ccc6714aade9f4f728aab288e78c5f9890e76f10fb0af01e8237bc496169ed2ffc6f6b02de9f1522b0ab2330cbc3acf533f7e9
23 DIST tzdata2015f.tar.gz 298815 SHA256 959f81b541e042ecb13c50097d264ae92ff03a57979c478dbcf24d5da242531d SHA512 d86e6c9e4c6d9cd5de30762723d7a90ac697feeb6dd1f04649f6a35e4e1dc638261c32066db4aeafa767ac339ccd100c38dde044ceadd61e95cb3d39c27f977e WHIRLPOOL 0b56e3ae620bed60d37abb195e8c4add8f5a00114422e91f2e533fce8c0091bdd681ff5c682e929e5af45202afde838fcc1ae14b7865f6f83a126c647e56d6a4
24 DIST tzdata2015g.tar.gz 300363 SHA256 b923cdbf078491696b17bc8d069c74bce73fabc5774629da2f410c9b31576161 SHA512 ad7de0e3e8753861d260f0fcbcbca327516a4dc826f7659370a7fb979e6154f1a26b23d2609acf6e1790c8c59da0b76c42f4a94bf361409c1460f6a8ffa6f879 WHIRLPOOL 3af55fc43133ef3c03b734d8db35feda760feb5ad3adf0e763337fcf4ad7057231f5a24ddf68fdac9ae4014d31675d6a51c29f14b987118daad7f691f7e3fe98
25 +DIST tzdata2016a.tar.gz 302817 SHA256 5efa6b324e64ef921ef700ac3273a51895f672684a30e342f68e47871c6a8cd1 SHA512 9aa5f61a73afa5070dfb1d1982945d268ea8215663d0cd594216500aff14797ea5591ccfd488dc2280902fa1820bf782623624912b669873728431258fe10ec1 WHIRLPOOL 0ed0d93dfff5ee708132ddad8c2f3f4b3e71ed323876847e83c515ca03bfa098863e4aab8abd20a4397e20953b7dc73e042e184ecdbbba5d74430f3714c453ec
26
27 diff --git a/sys-libs/timezone-data/files/timezone-data-2016a-makefile.patch b/sys-libs/timezone-data/files/timezone-data-2016a-makefile.patch
28 new file mode 100644
29 index 0000000..d1d296c
30 --- /dev/null
31 +++ b/sys-libs/timezone-data/files/timezone-data-2016a-makefile.patch
32 @@ -0,0 +1,84 @@
33 + - Fix up default paths
34 + - Support env CC
35 + - Don't build/install libtz.a
36 + - Don't install man-pages provided by sys-apps/man-pages
37 + - Move tzselect, zic, and zdump to bin
38 + - Do not run network based unittests
39 +
40 +--- a/Makefile
41 ++++ b/Makefile
42 +@@ -45,21 +45,21 @@ POSIXRULES= America/New_York
43 +
44 + # Everything gets put in subdirectories of. . .
45 +
46 +-TOPDIR= /usr/local
47 ++TOPDIR= /usr
48 +
49 + # "Compiled" time zone information is placed in the "TZDIR" directory
50 + # (and subdirectories).
51 + # Use an absolute path name for TZDIR unless you're just testing the software.
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 @@ BINDIR= $(TOPDIR)/bin
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 +@@ -298,8 +298,10 @@ GZIPFLAGS= -9n
77 +
78 + #MAKE= make
79 +
80 +-cc= cc
81 +-CC= $(cc) -DTZDIR=\"$(TZDIR)\"
82 ++CPPFLAGS+= -DTZDIR=\"$(TZDIR)\"
83 ++ifeq ($(NLS),1)
84 ++CPPFLAGS+= -DHAVE_GETTEXT=1 -DTZ_DOMAIN=\"libc\"
85 ++endif
86 +
87 + AR= ar
88 +
89 +@@ -352,16 +354,12 @@ ALL: all date
90 + install: all $(DATA) $(REDO) $(MANS)
91 + mkdir -p $(DESTDIR)$(ETCDIR) $(DESTDIR)$(TZDIR) \
92 +- $(DESTDIR)$(LIBDIR) \
93 ++ $(DESTDIR)$(BINDIR) \
94 + $(DESTDIR)$(MANDIR)/man3 $(DESTDIR)$(MANDIR)/man5 \
95 + $(DESTDIR)$(MANDIR)/man8
96 + $(ZIC_INSTALL) -l $(LOCALTIME) -p $(POSIXRULES)
97 + cp -f iso3166.tab $(ZONETABLES) $(DESTDIR)$(TZDIR)/.
98 +- cp tzselect zic zdump $(DESTDIR)$(ETCDIR)/.
99 ++ cp tzselect zic zdump $(DESTDIR)$(BINDIR)/.
100 +- cp libtz.a $(DESTDIR)$(LIBDIR)/.
101 +- $(RANLIB) $(DESTDIR)$(LIBDIR)/libtz.a
102 + cp -f newctime.3 newtzset.3 $(DESTDIR)$(MANDIR)/man3/.
103 +- cp -f tzfile.5 $(DESTDIR)$(MANDIR)/man5/.
104 +- cp -f tzselect.8 zdump.8 zic.8 $(DESTDIR)$(MANDIR)/man8/.
105 +
106 + INSTALL: ALL install date.1
107 + mkdir -p $(DESTDIR)$(BINDIR) $(DESTDIR)$(MANDIR)/man1
108 +@@ -440,7 +438,7 @@ tzselect: tzselect.ksh
109 + chmod +x $@
110 +
111 + check: check_character_set check_white_space check_links check_sorted \
112 +- check_tables check_web
113 ++ check_tables
114 +
115 + check_character_set: $(ENCHILADA)
116 + LC_ALL=en_US.utf8 && export LC_ALL && \
117
118 diff --git a/sys-libs/timezone-data/timezone-data-2016a.ebuild b/sys-libs/timezone-data/timezone-data-2016a.ebuild
119 new file mode 100644
120 index 0000000..9c7623b
121 --- /dev/null
122 +++ b/sys-libs/timezone-data/timezone-data-2016a.ebuild
123 @@ -0,0 +1,143 @@
124 +# Copyright 1999-2015 Gentoo Foundation
125 +# Distributed under the terms of the GNU General Public License v2
126 +# $Id$
127 +
128 +EAPI="4"
129 +
130 +inherit eutils toolchain-funcs flag-o-matic
131 +
132 +code_ver=${PV}
133 +data_ver=${PV}
134 +DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
135 +HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm"
136 +SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
137 + http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
138 +
139 +LICENSE="BSD public-domain"
140 +SLOT="0"
141 +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~ia64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
142 +IUSE="nls leaps_timezone elibc_FreeBSD elibc_glibc"
143 +
144 +RDEPEND="!sys-libs/glibc[vanilla(+)]"
145 +
146 +S=${WORKDIR}
147 +
148 +src_prepare() {
149 + epatch "${FILESDIR}"/${PN}-2016a-makefile.patch
150 + tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
151 +}
152 +
153 +_emake() {
154 + emake \
155 + TOPDIR="${EPREFIX}/usr" \
156 + REDO=$(usex leaps_timezone posix_right posix_only) \
157 + "$@"
158 +}
159 +
160 +src_compile() {
161 + local LDLIBS
162 + tc-export CC
163 + if use elibc_FreeBSD || use elibc_Darwin ; then
164 + append-cppflags -DSTD_INSPIRED #138251
165 + fi
166 + export NLS=$(usex nls 1 0)
167 + if use nls && ! use elibc_glibc ; then
168 + LDLIBS+=" -lintl" #154181
169 + fi
170 + # TOPDIR is used in some utils when compiling.
171 + _emake \
172 + AR="$(tc-getAR)" \
173 + CC="$(tc-getCC)" \
174 + RANLIB="$(tc-getRANLIB)" \
175 + CFLAGS="${CFLAGS} -std=gnu99" \
176 + LDFLAGS="${LDFLAGS}" \
177 + LDLIBS="${LDLIBS}"
178 + if tc-is-cross-compiler ; then
179 + _emake -C "${S}"-native \
180 + CC="$(tc-getBUILD_CC)" \
181 + CFLAGS="${BUILD_CFLAGS}" \
182 + CPPFLAGS="${BUILD_CPPFLAGS}" \
183 + LDFLAGS="${BUILD_LDFLAGS}" \
184 + LDLIBS="${LDLIBS}" \
185 + zic
186 + fi
187 +}
188 +
189 +src_install() {
190 + local zic=""
191 + tc-is-cross-compiler && zic="zic=${S}-native/zic"
192 + _emake install ${zic} DESTDIR="${D}"
193 + dodoc CONTRIBUTING README NEWS Theory
194 + dohtml *.htm
195 +}
196 +
197 +get_TIMEZONE() {
198 + local tz src="${EROOT}etc/timezone"
199 + if [[ -e ${src} ]] ; then
200 + tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
201 + else
202 + tz="FOOKABLOIE"
203 + fi
204 + [[ -z ${tz} ]] && return 1 || echo "${tz}"
205 +}
206 +
207 +pkg_preinst() {
208 + local tz=$(get_TIMEZONE)
209 + if [[ ${tz} == right/* || ${tz} == posix/* ]] ; then
210 + eerror "The right & posix subdirs are no longer installed as subdirs -- they have been"
211 + eerror "relocated to match upstream paths as sibling paths. Further, posix/xxx is the"
212 + eerror "same as xxx, so you should simply drop the posix/ prefix. You also should not"
213 + eerror "be using right/xxx for the system timezone as it breaks programs."
214 + die "Please fix your timezone setting"
215 + fi
216 +
217 + # Trim the symlink by hand to avoid portage's automatic protection checks.
218 + rm -f "${EROOT}"/usr/share/zoneinfo/posix
219 +
220 + if has_version "<=${CATEGORY}/${PN}-2015c" ; then
221 + elog "Support for accessing posix/ and right/ directly has been dropped to match"
222 + elog "upstream. There is no need to set TZ=posix/xxx as it is the same as TZ=xxx."
223 + elog "For TZ=right/, you can use TZ=../zoneinfo-leaps/xxx instead. See this post"
224 + elog "for details: https://mm.icann.org/pipermail/tz/2015-February/022024.html"
225 + fi
226 +}
227 +
228 +pkg_config() {
229 + # make sure the /etc/localtime file does not get stale #127899
230 + local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime"
231 +
232 + # If it's a symlink, assume the user knows what they're doing and
233 + # they're managing it themselves. #511474
234 + if [[ -L ${etc_lt} ]] ; then
235 + einfo "Assuming your ${etc_lt} symlink is what you want; skipping update."
236 + return 0
237 + fi
238 +
239 + if ! tz=$(get_TIMEZONE) ; then
240 + einfo "Assuming your empty ${etc_lt} file is what you want; skipping update."
241 + return 0
242 + fi
243 + if [[ ${tz} == "FOOKABLOIE" ]] ; then
244 + elog "You do not have TIMEZONE set in ${src}."
245 +
246 + if [[ ! -e ${etc_lt} ]] ; then
247 + cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
248 + elog "Setting ${etc_lt} to Factory."
249 + else
250 + elog "Skipping auto-update of ${etc_lt}."
251 + fi
252 + return 0
253 + fi
254 +
255 + if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
256 + elog "You have an invalid TIMEZONE setting in ${src}"
257 + elog "Your ${etc_lt} has been reset to Factory; enjoy!"
258 + tz="Factory"
259 + fi
260 + einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
261 + cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
262 +}
263 +
264 +pkg_postinst() {
265 + pkg_config
266 +}