Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/timezone-data: timezone-data-2014g.ebuild ChangeLog
Date: Tue, 02 Sep 2014 13:53:11
Message-Id: 20140902135307.DD12B486E@oystercatcher.gentoo.org
1 vapier 14/09/02 13:53:07
2
3 Modified: ChangeLog
4 Added: timezone-data-2014g.ebuild
5 Log:
6 Version bump.
7
8 (Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
9
10 Revision Changes Path
11 1.310 sys-libs/timezone-data/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/timezone-data/ChangeLog?rev=1.310&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/timezone-data/ChangeLog?rev=1.310&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/timezone-data/ChangeLog?r1=1.309&r2=1.310
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/ChangeLog,v
20 retrieving revision 1.309
21 retrieving revision 1.310
22 diff -u -r1.309 -r1.310
23 --- ChangeLog 2 Sep 2014 13:52:47 -0000 1.309
24 +++ ChangeLog 2 Sep 2014 13:53:07 -0000 1.310
25 @@ -1,6 +1,12 @@
26 # ChangeLog for sys-libs/timezone-data
27 # Copyright 1999-2014 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/ChangeLog,v 1.309 2014/09/02 13:52:47 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/ChangeLog,v 1.310 2014/09/02 13:53:07 vapier Exp $
30 +
31 +*timezone-data-2014g (02 Sep 2014)
32 +
33 + 02 Sep 2014; Mike Frysinger <vapier@g.o>
34 + +files/timezone-data-2014g-makefile.patch, +timezone-data-2014g.ebuild:
35 + Version bump.
36
37 02 Sep 2014; Mike Frysinger <vapier@g.o> timezone-data-2014f.ebuild:
38 Stabilize for all.
39
40
41
42 1.1 sys-libs/timezone-data/timezone-data-2014g.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/timezone-data/timezone-data-2014g.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/timezone-data/timezone-data-2014g.ebuild?rev=1.1&content-type=text/plain
46
47 Index: timezone-data-2014g.ebuild
48 ===================================================================
49 # Copyright 1999-2014 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2014g.ebuild,v 1.1 2014/09/02 13:53:07 vapier Exp $
52
53 EAPI="4"
54
55 inherit eutils toolchain-funcs flag-o-matic
56
57 code_ver=${PV}
58 data_ver=${PV}
59 DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
60 HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm"
61 SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
62 http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz"
63
64 LICENSE="BSD public-domain"
65 SLOT="0"
66 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"
67 IUSE="nls right_timezone elibc_FreeBSD elibc_glibc"
68
69 RDEPEND="!<sys-libs/glibc-2.3.5"
70
71 S=${WORKDIR}
72
73 pkg_setup() {
74 # Deal with the case where older timezone-data installed a
75 # dir here, but newer one installs symlinks. Portage will
76 # barf when you try to transition file types.
77 if cd "${EROOT}"/usr/share/zoneinfo 2>/dev/null ; then
78 # In case of a failed upgrade, clean up the symlinks #506570
79 if [ -L .gentoo-upgrade ] ; then
80 rm -rf posix .gentoo-upgrade
81 fi
82 if [ -d posix ] ; then
83 rm -rf .gentoo-upgrade #487192
84 mv posix .gentoo-upgrade || die
85 ln -s .gentoo-upgrade posix || die
86 fi
87 fi
88 }
89
90 src_prepare() {
91 epatch "${FILESDIR}"/${PN}-2014g-makefile.patch
92 tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
93 }
94
95 _emake() {
96 emake \
97 TOPDIR="${EPREFIX}/usr" \
98 REDO=$(usex right_timezone posix_right posix_only) \
99 "$@"
100 }
101
102 src_compile() {
103 local LDLIBS
104 tc-export CC
105 if use elibc_FreeBSD || use elibc_Darwin ; then
106 append-cppflags -DSTD_INSPIRED #138251
107 fi
108 export NLS=$(usex nls 1 0)
109 if use nls && ! use elibc_glibc ; then
110 LDLIBS+=" -lintl" #154181
111 fi
112 # TOPDIR is used in some utils when compiling.
113 _emake \
114 AR="$(tc-getAR)" \
115 CC="$(tc-getCC)" \
116 RANLIB="$(tc-getRANLIB)" \
117 CFLAGS="${CPPFLAGS} ${CFLAGS} -std=gnu99" \
118 LDFLAGS="${LDFLAGS}" \
119 LDLIBS="${LDLIBS}"
120 if tc-is-cross-compiler ; then
121 _emake -C "${S}"-native \
122 CC="$(tc-getBUILD_CC)" \
123 CFLAGS="${BUILD_CFLAGS}" \
124 LDFLAGS="${BUILD_LDFLAGS}" \
125 LDLIBS="${LDLIBS}" \
126 zic
127 fi
128 }
129
130 src_install() {
131 local zic=""
132 tc-is-cross-compiler && zic="zic=${S}-native/zic"
133 _emake install ${zic} DESTDIR="${D}"
134 dodoc CONTRIBUTING README NEWS Theory
135 dohtml *.htm
136
137 # install the symlink by hand to not break existing timezones
138 if ! use right_timezone && [[ ! -e ${ED}/usr/share/zoneinfo/posix ]] ; then
139 dosym . /usr/share/zoneinfo/posix
140 fi
141 }
142
143 get_TIMEZONE() {
144 local tz src="${EROOT}etc/timezone"
145 if [[ -e ${src} ]] ; then
146 tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
147 else
148 tz="FOOKABLOIE"
149 fi
150 [[ -z ${tz} ]] && return 1 || echo "${tz}"
151 }
152
153 pkg_preinst() {
154 local tz=$(get_TIMEZONE)
155 if ! use right_timezone && [[ ${tz} == right/* ]] ; then
156 eerror "Your timezone is set to '${tz}' but you have USE=-right_timezone."
157 die "Please fix your USE or timezone"
158 fi
159 }
160
161 pkg_config() {
162 # make sure the /etc/localtime file does not get stale #127899
163 local tz src="${EROOT}etc/timezone" etc_lt="${EROOT}etc/localtime"
164
165 tz=$(get_TIMEZONE) || return 0
166 if [[ ${tz} == "FOOKABLOIE" ]] ; then
167 elog "You do not have TIMEZONE set in ${src}."
168
169 if [[ ! -e ${etc_lt} ]] ; then
170 # if /etc/localtime is a symlink somewhere, assume they
171 # know what they're doing and they're managing it themselves
172 if [[ ! -L ${etc_lt} ]] ; then
173 cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
174 elog "Setting ${etc_lt} to Factory."
175 else
176 elog "Assuming your ${etc_lt} symlink is what you want; skipping update."
177 fi
178 else
179 elog "Skipping auto-update of ${etc_lt}."
180 fi
181 return 0
182 fi
183
184 if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
185 elog "You have an invalid TIMEZONE setting in ${src}"
186 elog "Your ${etc_lt} has been reset to Factory; enjoy!"
187 tz="Factory"
188 fi
189 einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
190 [[ -L ${etc_lt} ]] && rm -f "${etc_lt}"
191 cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
192 }
193
194 pkg_postinst() {
195 rm -rf "${EROOT}"/usr/share/zoneinfo/.gentoo-upgrade &
196 pkg_config
197 wait
198 }