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-2013d.ebuild (-16 / +18 lines)
Lines 2-7 Link Here
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-2013d.ebuild,v 1.1 2013/08/25 00:37:01 vapier Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2013d.ebuild,v 1.1 2013/08/25 00:37:01 vapier Exp $
4
4
5
EAPI=3
6
5
inherit eutils toolchain-funcs flag-o-matic
7
inherit eutils toolchain-funcs flag-o-matic
6
8
7
code_ver=${PV}
9
code_ver=${PV}
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}-2013d-makefile.patch
28
	epatch "${FILESDIR}"/${PN}-2013d-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-37 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
Lines 39-74 Link Here
39
	emake \
42
	emake \
40
		CFLAGS="${CPPFLAGS} ${CFLAGS} -std=gnu99" \
43
		CFLAGS="${CPPFLAGS} ${CFLAGS} -std=gnu99" \
41
		LDFLAGS="${LDFLAGS}" \
44
		LDFLAGS="${LDFLAGS}" \
42
		LDLIBS="${LDLIBS}" \
45
		LDLIBS="${LDLIBS}"
43
		|| die "emake failed"
44
	if tc-is-cross-compiler ; then
46
	if tc-is-cross-compiler ; then
45
		emake -C "${S}"-native \
47
		emake -C "${S}"-native \
46
			CC=$(tc-getBUILD_CC) \
48
			CC=$(tc-getBUILD_CC) \
47
			CFLAGS="${BUILD_CFLAGS}" \
49
			CFLAGS="${BUILD_CFLAGS}" \
48
			LDFLAGS="${BUILD_LDFLAGS}" \
50
			LDFLAGS="${BUILD_LDFLAGS}" \
49
			LDLIBS="${LDLIBS}" \
51
			LDLIBS="${LDLIBS}" \
50
			zic || die
52
			zic
51
	fi
53
	fi
52
}
54
}
53
55
54
src_install() {
56
src_install() {
55
	local zic=""
57
	local zic=""
56
	tc-is-cross-compiler && zic="zic=${S}-native/zic"
58
	tc-is-cross-compiler && zic="zic=${S}-native/zic"
57
	emake install ${zic} DESTDIR="${D}" || die
59
	emake install ${zic} DESTDIR="${ED}"
58
	rm -rf "${D}"/usr/share/zoneinfo-leaps
60
	rm -rf "${ED}"/usr/share/zoneinfo-leaps
59
	dodoc README Theory
61
	dodoc README Theory
60
	dohtml *.htm
62
	dohtml *.htm
61
}
63
}
62
64
63
pkg_config() {
65
pkg_config() {
64
	# make sure the /etc/localtime file does not get stale #127899
66
	# make sure the /etc/localtime file does not get stale #127899
65
	local tz src etc_lt="${ROOT}etc/localtime"
67
	local tz src etc_lt="${EROOT}etc/localtime"
66
68
67
	if has_version '<sys-apps/baselayout-2' ; then
69
	if has_version '<sys-apps/baselayout-2' ; then
68
		src="${ROOT}etc/conf.d/clock"
70
		src="${EROOT}etc/conf.d/clock"
69
		tz=$(unset TIMEZONE ; source "${src}" ; echo ${TIMEZONE-FOOKABLOIE})
71
		tz=$(unset TIMEZONE ; source "${src}" ; echo ${TIMEZONE-FOOKABLOIE})
70
	else
72
	else
71
		src="${ROOT}etc/timezone"
73
		src="${EROOT}etc/timezone"
72
		if [[ -e ${src} ]] ; then
74
		if [[ -e ${src} ]] ; then
73
			tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
75
			tz=$(sed -e 's:#.*::' -e 's:[[:space:]]*::g' -e '/^$/d' "${src}")
74
		else
76
		else
Lines 84-90 Link Here
84
			# if /etc/localtime is a symlink somewhere, assume they
86
			# if /etc/localtime is a symlink somewhere, assume they
85
			# know what they're doing and they're managing it themselves
87
			# know what they're doing and they're managing it themselves
86
			if [[ ! -L ${etc_lt} ]] ; then
88
			if [[ ! -L ${etc_lt} ]] ; then
87
				cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
89
				cp -f "${EROOT}"/usr/share/zoneinfo/Factory "${etc_lt}"
88
				elog "Setting ${etc_lt} to Factory."
90
				elog "Setting ${etc_lt} to Factory."
89
			else
91
			else
90
				elog "Assuming your ${etc_lt} symlink is what you want; skipping update."
92
				elog "Assuming your ${etc_lt} symlink is what you want; skipping update."
Lines 95-108 Link Here
95
		return 0
97
		return 0
96
	fi
98
	fi
97
99
98
	if [[ ! -e ${ROOT}/usr/share/zoneinfo/${tz} ]] ; then
100
	if [[ ! -e ${EROOT}/usr/share/zoneinfo/${tz} ]] ; then
99
		elog "You have an invalid TIMEZONE setting in ${src}"
101
		elog "You have an invalid TIMEZONE setting in ${src}"
100
		elog "Your ${etc_lt} has been reset to Factory; enjoy!"
102
		elog "Your ${etc_lt} has been reset to Factory; enjoy!"
101
		tz="Factory"
103
		tz="Factory"
102
	fi
104
	fi
103
	einfo "Updating ${etc_lt} with ${ROOT}usr/share/zoneinfo/${tz}"
105
	einfo "Updating ${etc_lt} with ${EROOT}usr/share/zoneinfo/${tz}"
104
	[[ -L ${etc_lt} ]] && rm -f "${etc_lt}"
106
	[[ -L ${etc_lt} ]] && rm -f "${etc_lt}"
105
	cp -f "${ROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
107
	cp -f "${EROOT}"/usr/share/zoneinfo/"${tz}" "${etc_lt}"
106
}
108
}
107
109
108
pkg_postinst() {
110
pkg_postinst() {

Return to bug 433738