/[gentoo-x86]/sys-libs/timezone-data/timezone-data-2012c.ebuild
Gentoo

Contents of /sys-libs/timezone-data/timezone-data-2012c.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Thu Sep 26 12:24:24 2013 UTC (6 months, 3 weeks ago) by djc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +1 -1 lines
FILE REMOVED
Remove old versions.

(Portage version: 2.2.6/cvs/Linux x86_64, signed Manifest commit with key 30380381)

1 # Copyright 1999-2012 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2012c.ebuild,v 1.4 2012/05/16 21:58:46 vapier Exp $
4
5 inherit eutils toolchain-funcs flag-o-matic
6
7 code_ver=${PV%c}b
8 data_ver=${PV}
9 DESCRIPTION="Timezone data (/usr/share/zoneinfo) and utilities (tzselect/zic/zdump)"
10 HOMEPAGE="http://www.iana.org/time-zones http://www.twinsun.com/tz/tz-link.htm"
11 SRC_URI="http://www.iana.org/time-zones/repository/releases/tzdata${data_ver}.tar.gz
12 http://www.iana.org/time-zones/repository/releases/tzcode${code_ver}.tar.gz
13 ftp://munnari.oz.au/pub/tzdata${data_ver}.tar.gz
14 ftp://munnari.oz.au/pub/tzcode${code_ver}.tar.gz"
15
16 LICENSE="BSD public-domain"
17 SLOT="0"
18 KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
19 IUSE="nls elibc_FreeBSD elibc_glibc"
20
21 RDEPEND="!<sys-libs/glibc-2.3.5"
22
23 S=${WORKDIR}
24
25 src_unpack() {
26 unpack ${A}
27 epatch "${FILESDIR}"/${PN}-2008h-makefile.patch
28 tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
29 }
30
31 src_compile() {
32 local LDLIBS
33 tc-export CC
34 use elibc_FreeBSD && append-flags -DSTD_INSPIRED #138251
35 if use nls ; then
36 use elibc_glibc || LDLIBS="${LDLIBS} -lintl" #154181
37 export NLS=1
38 else
39 export NLS=0
40 fi
41 # Makefile uses LBLIBS for the libs (which defaults to LDFLAGS)
42 # But it also uses LFLAGS where it expects the real LDFLAGS
43 emake \
44 LDLIBS="${LDLIBS}" \
45 || die "emake failed"
46 if tc-is-cross-compiler ; then
47 emake -C "${S}"-native \
48 CC=$(tc-getBUILD_CC) \
49 CFLAGS="${BUILD_CFLAGS}" \
50 LDFLAGS="${BUILD_LDFLAGS}" \
51 LDLIBS="${LDLIBS}" \
52 zic || die
53 fi
54 }
55
56 src_install() {
57 local zic=""
58 tc-is-cross-compiler && zic="zic=${S}-native/zic"
59 emake install ${zic} DESTDIR="${D}" || die
60 rm -rf "${D}"/usr/share/zoneinfo-leaps
61 dodoc README Theory
62 dohtml *.htm
63 }
64
65 pkg_config() {
66 # make sure the /etc/localtime file does not get stale #127899
67 local tz src etc_lt="${ROOT}etc/localtime"
68
69 if has_version '<sys-apps/baselayout-2' ; then
70 src="${ROOT}etc/conf.d/clock"
71 tz=$(unset TIMEZONE ; source "${src}" ; echo ${TIMEZONE-FOOKABLOIE})
72 else
73 src="${ROOT}etc/timezone"
74 if [[ -e ${src} ]] ; then
75 tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
76 else
77 tz="FOOKABLOIE"
78 fi
79 fi
80 [[ -z ${tz} ]] && return 0
81
82 if [[ ${tz} == "FOOKABLOIE" ]] ; then
83 elog "You do not have TIMEZONE set in ${src}."
84
85 if [[ ! -e ${etc_lt} ]] ; then
86 # if /etc/localtime is a symlink somewhere, assume they
87 # know what they're doing and they're managing it themselves
88 if [[ ! -L ${etc_lt} ]] ; then
89 cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
90 elog "Setting ${etc_lt} to Factory."
91 else
92 elog "Assuming your ${etc_lt} symlink is what you want; skipping update."
93 fi
94 else
95 elog "Skipping auto-update of ${etc_lt}."
96 fi
97 return 0
98 fi
99
100 if [[ ! -e ${ROOT}/usr/share/zoneinfo/${tz} ]] ; then
101 elog "You have an invalid TIMEZONE setting in ${src}"
102 elog "Your ${etc_lt} has been reset to Factory; enjoy!"
103 tz="Factory"
104 fi
105 einfo "Updating ${etc_lt} with ${ROOT}usr/share/zoneinfo/${tz}"
106 [[ -L ${etc_lt} ]] && rm -f "${etc_lt}"
107 cp -f "${ROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
108 }
109
110 pkg_postinst() {
111 pkg_config
112 }

  ViewVC Help
Powered by ViewVC 1.1.20