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_pre20110403.ebuild (-7 / +42 lines)
Lines 26-31 Link Here
26
26
27
DIETHOME=/usr/diet
27
DIETHOME=/usr/diet
28
28
29
IUSE_LIBC_TARGET="alpha arm armeb i386 ia64 mips mipsel parisc parisc64 ppc ppc64 s390 s390x sparc sparc64 x86_64"
30
31
for t in ${IUSE_LIBC_TARGET} ; do
32
	IUSE="${IUSE} target_${t}"
33
done
34
29
pkg_setup() {
35
pkg_setup() {
30
	# Replace sparc64 related C[XX]FLAGS (see bug #45716)
36
	# Replace sparc64 related C[XX]FLAGS (see bug #45716)
31
	use sparc && replace-sparc64-flags
37
	use sparc && replace-sparc64-flags
Lines 36-41 Link Here
36
	# debug flags
42
	# debug flags
37
	use debug && append-flags -g
43
	use debug && append-flags -g
38
44
45
	dARCH=$(tc-ninja_magic_to_arch)
46
	case ${dARCH} in
47
		x86)	dARCH=i386		;;
48
		amd64)	dARCH=x86_64	;;
49
	esac
50
39
	# Makefile does not append CFLAGS
51
	# Makefile does not append CFLAGS
40
	append-flags -nostdinc -W -Wall -Wextra -Wchar-subscripts \
52
	append-flags -nostdinc -W -Wall -Wextra -Wchar-subscripts \
41
		-Wmissing-prototypes -Wmissing-declarations -Wno-switch \
53
		-Wmissing-prototypes -Wmissing-declarations -Wno-switch \
Lines 46-64 Link Here
46
}
58
}
47
59
48
src_compile() {
60
src_compile() {
49
	emake prefix=${DIETHOME} \
61
	for t in ${IUSE_LIBC_TARGET} ; do
50
		CC="$(tc-getCC)" \
62
		use target_$t $USE || continue
51
		CFLAGS="${CFLAGS}" \
63
52
		STRIP=":" \
64
		tC="CROSS_$t"
53
		|| die "make failed"
65
		if [ -z "${!tC}" ] ; then
66
			ewarn "CROSS_$t not defined, can't build"
67
			sleep 15
68
			continue
69
		fi
70
71
		einfo "Building libc $t"
72
		emake prefix=${DIETHOME} \
73
			MYARCH="${t}" \
74
			CROSS="${!tC}" \
75
			CFLAGS="${CFLAGS}" \
76
			STRIP=":" \
77
			|| die "make failed"
78
	done
54
}
79
}
55
80
56
src_install() {
81
src_install() {
57
	emake prefix=${DIETHOME} \
82
	emake prefix=${DIETHOME} \
58
		DESTDIR="${D}" \
83
		DESTDIR="${D}" \
59
		install-bin \
60
		install-headers \
84
		install-headers \
61
		|| die "make install failed"
85
		|| die "make install-headers failed"
86
87
	for t in ${IUSE_LIBC_TARGET} ; do
88
		use target_$t $USE || continue
89
90
		einfo "Installing libc $t"
91
		emake prefix=${DIETHOME} \
92
			MYARCH="${t}" \
93
			DESTDIR="${D}" \
94
			install-bin \
95
			|| die "make install-bin failed"
96
	done
62
97
63
	dobin "${D}"${DIETHOME}/bin/* || die "dobin failed"
98
	dobin "${D}"${DIETHOME}/bin/* || die "dobin failed"
64
	doman "${D}"${DIETHOME}/man/*/* || die "doman failed"
99
	doman "${D}"${DIETHOME}/man/*/* || die "doman failed"

Return to bug 378711