Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 433738 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/portage/sys-libs/timezone-data/timezone-data-2013c.ebuild (-16 / +20 lines)
Lines 1-6 Link Here
1
# Copyright 1999-2013 Gentoo Foundation
1
# Copyright 1999-2013 Gentoo Foundation
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2013c.ebuild,v 1.2 2013/08/25 00:36:22 vapier Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2013c.ebuild,v 1.1 2013/04/20 17:18:55 vapier Exp $
4
5
EAPI=3
4
6
5
inherit eutils toolchain-funcs flag-o-matic
7
inherit eutils toolchain-funcs flag-o-matic
6
8
Lines 15-29 Link Here
15
17
16
LICENSE="BSD public-domain"
18
LICENSE="BSD public-domain"
17
SLOT="0"
19
SLOT="0"
18
KEYWORDS="alpha amd64 arm hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~sparc-fbsd ~x86-fbsd"
20
KEYWORDS="~alpha ~amd64 ~arm ~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"
19
IUSE="nls elibc_FreeBSD elibc_glibc"
21
IUSE="nls elibc_FreeBSD elibc_glibc"
20
22
21
RDEPEND="!<sys-libs/glibc-2.3.5"
23
RDEPEND="!<sys-libs/glibc-2.3.5"
22
24
23
S=${WORKDIR}
25
S=${WORKDIR}
24
26
25
src_unpack() {
27
src_prepare() {
26
	unpack ${A}
27
	epatch "${FILESDIR}"/${PN}-2013a-makefile.patch
28
	epatch "${FILESDIR}"/${PN}-2013a-makefile.patch
28
	tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
29
	tc-is-cross-compiler && cp -pR "${S}" "${S}"-native
29
}
30
}
Lines 31-45 Link Here
31
src_compile() {
32
src_compile() {
32
	local LDLIBS
33
	local LDLIBS
33
	tc-export CC
34
	tc-export CC
34
	use elibc_FreeBSD && append-flags -DSTD_INSPIRED #138251
35
	if use elibc_FreeBSD || use elibc_Darwin ; then
36
		append-flags -DSTD_INSPIRED #138251
37
	fi
35
	export NLS=$(usex nls 1 0)
38
	export NLS=$(usex nls 1 0)
36
	if use nls && ! use elibc_glibc ; then
39
	if use nls && ! use elibc_glibc ; then
37
		LDLIBS+=" -lintl" #154181
40
		LDLIBS+=" -lintl" #154181
38
	fi
41
	fi
39
	emake \
42
	emake \
43
		DESTDIR="${EPREFIX}" \
40
		CFLAGS="${CPPFLAGS} ${CFLAGS} -std=gnu99" \
44
		CFLAGS="${CPPFLAGS} ${CFLAGS} -std=gnu99" \
41
		LDFLAGS="${LDFLAGS}" \
45
		LDFLAGS="${LDFLAGS}" \
42
		LDLIBS="${LDLIBS}" \
46
		LDLIBS="${LDLIBS}"
43
		|| die "emake failed"
47
		|| die "emake failed"
44
	if tc-is-cross-compiler ; then
48
	if tc-is-cross-compiler ; then
45
		emake -C "${S}"-native \
49
		emake -C "${S}"-native \
Lines 54-74 Link Here
54
src_install() {
58
src_install() {
55
	local zic=""
59
	local zic=""
56
	tc-is-cross-compiler && zic="zic=${S}-native/zic"
60
	tc-is-cross-compiler && zic="zic=${S}-native/zic"
57
	emake install ${zic} DESTDIR="${D}" || die
61
	emake install ${zic} DESTDIR="${D}${EPREFIX}" || die
58
	rm -rf "${D}"/usr/share/zoneinfo-leaps
62
	rm -rf "${ED}"/usr/share/zoneinfo-leaps
59
	dodoc README Theory
63
	dodoc README Theory
60
	dohtml *.htm
64
	dohtml *.htm
61
}
65
}
62
66
63
pkg_config() {
67
pkg_config() {
64
	# make sure the /etc/localtime file does not get stale #127899
68
	# make sure the /etc/localtime file does not get stale #127899
65
	local tz src etc_lt="${ROOT}etc/localtime"
69
	local tz src etc_lt="${EROOT}etc/localtime"
66
70
67
	if has_version '<sys-apps/baselayout-2' ; then
71
	if has_version '<sys-apps/baselayout-2' ; then
68
		src="${ROOT}etc/conf.d/clock"
72
		src="${EROOT}etc/conf.d/clock"
69
		tz=$(unset TIMEZONE ; source "${src}" ; echo ${TIMEZONE-FOOKABLOIE})
73
		tz=$(unset TIMEZONE ; source "${src}" ; echo ${TIMEZONE-FOOKABLOIE})
70
	else
74
	else
71
		src="${ROOT}etc/timezone"
75
		src="${EROOT}etc/timezone"
72
		if [[ -e ${src} ]] ; then
76
		if [[ -e ${src} ]] ; then
73
			tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
77
			tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
74
		else
78
		else
Lines 84-90 Link Here
84
			# if /etc/localtime is a symlink somewhere, assume they
88
			# if /etc/localtime is a symlink somewhere, assume they
85
			# know what they're doing and they're managing it themselves
89
			# know what they're doing and they're managing it themselves
86
			if [[ ! -L ${etc_lt} ]] ; then
90
			if [[ ! -L ${etc_lt} ]] ; then
87
				cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
91
				cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
88
				elog "Setting ${etc_lt} to Factory."
92
				elog "Setting ${etc_lt} to Factory."
89
			else
93
			else
90
				elog "Assuming your ${etc_lt} symlink is what you want; skipping update."
94
				elog "Assuming your ${etc_lt} symlink is what you want; skipping update."
Lines 95-108 Link Here
95
		return 0
99
		return 0
96
	fi
100
	fi
97
101
98
	if [[ ! -e ${ROOT}/usr/share/zoneinfo/${tz} ]] ; then
102
	if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
99
		elog "You have an invalid TIMEZONE setting in ${src}"
103
		elog "You have an invalid TIMEZONE setting in ${EPREFIX}${src}"
100
		elog "Your ${etc_lt} has been reset to Factory; enjoy!"
104
		elog "Your ${etc_lt} has been reset to Factory; enjoy!"
101
		tz="Factory"
105
		tz="Factory"
102
	fi
106
	fi
103
	einfo "Updating ${etc_lt} with ${ROOT}usr/share/zoneinfo/${tz}"
107
	einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
104
	[[ -L ${etc_lt} ]] && rm -f "${etc_lt}"
108
	[[ -L ${etc_lt} ]] && rm -f "${etc_lt}"
105
	cp -f "${ROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
109
	cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
106
}
110
}
107
111
108
pkg_postinst() {
112
pkg_postinst() {

Return to bug 433738