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

Collapse All | Expand All

(-)/usr/portage/sys-devel/flex/flex-2.5.4a-r5.ebuild.orig (-1 / +51 lines)
Lines 2-8 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-devel/flex/flex-2.5.4a-r5.ebuild,v 1.32 2005/01/21 00:07:04 vapier Exp $
3
# $Header: /var/cvsroot/gentoo-x86/sys-devel/flex/flex-2.5.4a-r5.ebuild,v 1.32 2005/01/21 00:07:04 vapier Exp $
4
4
5
inherit eutils flag-o-matic toolchain-funcs
5
inherit eutils flag-o-matic toolchain-funcs multilib
6
6
7
DESCRIPTION="GNU lexical analyser generator"
7
DESCRIPTION="GNU lexical analyser generator"
8
HOMEPAGE="http://lex.sourceforge.net/"
8
HOMEPAGE="http://lex.sourceforge.net/"
Lines 15-20 Link Here
15
15
16
RDEPEND="virtual/libc"
16
RDEPEND="virtual/libc"
17
17
18
DEPEND="!app-emulation/emul-linux-x86-baselibs"
19
18
S="${WORKDIR}/${P/a/}"
20
S="${WORKDIR}/${P/a/}"
19
21
20
src_unpack() {
22
src_unpack() {
Lines 26-34 Link Here
26
	epatch ${FILESDIR}/flex-2.5.4a-gcc3.patch
28
	epatch ${FILESDIR}/flex-2.5.4a-gcc3.patch
27
	epatch ${FILESDIR}/flex-2.5.4a-gcc31.patch
29
	epatch ${FILESDIR}/flex-2.5.4a-gcc31.patch
28
	epatch ${FILESDIR}/flex-2.5.4a-skel.patch
30
	epatch ${FILESDIR}/flex-2.5.4a-skel.patch
31
32
	if use amd64 && has_multilib_profile; then
33
		cp -ar ${S} ${S}-x86
34
		mv ${S} ${S}-amd64
35
	fi
29
}
36
}
30
37
31
src_compile() {
38
src_compile() {
39
	if use amd64 && has_multilib_profile; then
40
		local OPWD=$PWD
41
		local OS=${S}
42
		local OCFLAGS=${CFLAGS}
43
		S=${OS}-x86
44
		cd ${S}
45
		CFLAGS="${OCFLAGS} -m32"
46
		src_compile-multilib
47
		CFLAGS="${OCFLAGS}"
48
		S=${OS}-amd64
49
		cd ${S}
50
		src_compile-multilib
51
		cd ${OPWD}
52
		S=${OS}
53
		unset OPWD
54
		unset OS
55
		unset OCFLAGS
56
	else
57
		src_compile-multilib
58
	fi
59
}
60
61
src_compile-multilib() {
32
	export CC="$(tc-getCC)"
62
	export CC="$(tc-getCC)"
33
	./configure --prefix=/usr --host=${CHOST} || die "configure failed"
63
	./configure --prefix=/usr --host=${CHOST} || die "configure failed"
34
	use static && append-ldflags -static
64
	use static && append-ldflags -static
Lines 40-45 Link Here
40
}
70
}
41
71
42
src_install() {
72
src_install() {
73
	if use amd64 && has_multilib_profile; then
74
		local OPWD=$PWD
75
		local OS=${S}
76
		S=${OS}-x86
77
		cd ${S}
78
		src_install-multilib
79
		mv ${D}/usr/lib{,32}
80
		S=${OS}-amd64
81
		cd ${S}
82
		src_install-multilib
83
		cd ${OPWD}
84
		S=${OS}
85
		unset OPWD
86
		unset OS
87
	else
88
		src_install-multilib
89
	fi
90
}
91
92
src_install-multilib() {
43
	make -j1 prefix=${D}/usr \
93
	make -j1 prefix=${D}/usr \
44
		mandir=${D}/usr/share/man/man1 \
94
		mandir=${D}/usr/share/man/man1 \
45
		install || die "make install failed"
95
		install || die "make install failed"

Return to bug 83811