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

Collapse All | Expand All

(-)/usr/portage/dev-libs/dietlibc/dietlibc-0.33_pre20130103.ebuild (-9 / +45 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/dev-libs/dietlibc/dietlibc-0.33_pre20130103.ebuild,v 1.1 2013/01/03 20:15:02 pacho Exp $
3
# $Header: $
4
4
5
EAPI=5
5
EAPI=5
6
inherit eutils flag-o-matic toolchain-funcs
6
inherit eutils flag-o-matic toolchain-funcs
Lines 19-25 RDEPEND="" Link Here
19
19
20
DIETHOME=/usr/diet
20
DIETHOME=/usr/diet
21
21
22
IUSE_LIBC_TARGET="alpha arm armeb i386 ia64 mips mipsel parisc parisc64 ppc ppc64 s390 s390x sparc sparc64 x86_64"
23
24
for t in ${IUSE_LIBC_TARGET} ; do
25
	IUSE="${IUSE} target_${t}"
26
done
27
22
src_prepare() {
28
src_prepare() {
29
	epatch "${FILESDIR}/${P}-BJA-nostrip.diff"
30
}
31
32
diet_flags() {
33
	# Reset CFLAGS
34
	CFLAGS=""
35
23
	# Replace sparc64 related C[XX]FLAGS (see bug #45716)
36
	# Replace sparc64 related C[XX]FLAGS (see bug #45716)
24
	use sparc && replace-sparc64-flags
37
	use sparc && replace-sparc64-flags
25
38
Lines 34-56 src_prepare() { Link Here
34
	# only use -nopie on archs that support it
47
	# only use -nopie on archs that support it
35
	gcc-specs-pie && append-flags -nopie
48
	gcc-specs-pie && append-flags -nopie
36
49
37
	sed -i -e 's:strip::' Makefile || die
38
	append-flags -Wa,--noexecstack
50
	append-flags -Wa,--noexecstack
39
}
51
}
40
52
41
src_compile() {
53
src_compile() {
42
	emake prefix="${EPREFIX}"${DIETHOME} \
54
	for t in ${IUSE_LIBC_TARGET} ; do
43
		CC="$(tc-getCC)" \
55
		use target_$t $USE || continue
44
		CFLAGS="${CFLAGS}" \
56
45
		STRIP=":"
57
		tC="CROSS_$t"
58
		if [ -z "${!tC}" ] ; then
59
			ewarn "CROSS_$t not defined, can't build"
60
			sleep 15
61
			continue
62
		fi
63
64
		CHOST="$t"
65
		diet_flags
66
67
		einfo "Building libc $t"
68
		emake prefix="${EPREFIX}${DIETHOME}" \
69
			MYARCH="${t}" \
70
			CROSS="${!tC}" \
71
			CFLAGS="${CFLAGS}"
72
	done
46
}
73
}
47
74
48
src_install() {
75
src_install() {
49
	emake prefix="${EPREFIX}"${DIETHOME} \
76
	emake prefix="${EPREFIX}${DIETHOME}" \
50
		DESTDIR="${D}" \
77
		DESTDIR="${ED}" \
51
		install-bin \
52
		install-headers
78
		install-headers
53
79
80
	for t in ${IUSE_LIBC_TARGET} ; do
81
		use target_$t $USE || continue
82
83
		einfo "Installing libc $t"
84
		emake prefix="${EPREFIX}${DIETHOME}" \
85
			MYARCH="${t}" \
86
			DESTDIR="${ED}" \
87
			install-bin
88
	done
89
54
	dobin "${ED}"${DIETHOME}/bin/*
90
	dobin "${ED}"${DIETHOME}/bin/*
55
	doman "${ED}"${DIETHOME}/man/*/*
91
	doman "${ED}"${DIETHOME}/man/*/*
56
	rm -r "${ED}"${DIETHOME}/{man,bin} || die
92
	rm -r "${ED}"${DIETHOME}/{man,bin} || die

Return to bug 378711