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

Collapse All | Expand All

(-)qemu-0.6.2.20050309.ebuild (-11 / +29 lines)
Lines 7-18 Link Here
7
DESCRIPTION="Multi-platform & multi-targets cpu emulator and dynamic translator"
7
DESCRIPTION="Multi-platform & multi-targets cpu emulator and dynamic translator"
8
HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"
8
HOMEPAGE="http://fabrice.bellard.free.fr/qemu/"
9
SRC_URI="http://dev.gentoo.org/~lu_zero/distfiles/${P}.tar.bz2
9
SRC_URI="http://dev.gentoo.org/~lu_zero/distfiles/${P}.tar.bz2
10
         kqemu? ( http://fabrice.bellard.free.fr/qemu/kqemu-${PV%.*}-1.tar.gz ) "
10
         kqemu? ( http://fabrice.bellard.free.fr/qemu/kqemu-${PV%.*}-1.tar.gz )
11
         qvm86? ( qvm86-20050405.tar.bz2 )"
11
12
12
LICENSE="GPL-2 LGPL-2.1 KQEMU"
13
LICENSE="GPL-2 LGPL-2.1 KQEMU"
13
SLOT="0"
14
SLOT="0"
14
KEYWORDS="~x86 ~ppc -alpha -sparc ~amd64"
15
KEYWORDS="~x86 ~ppc -alpha -sparc ~amd64"
15
IUSE="softmmu sdl kqemu" # nptl qemu-fast nptlonly"
16
IUSE="softmmu sdl kqemu qvm86 debug" # nptl qemu-fast nptlonly"
16
RESTRICT="nostrip"
17
RESTRICT="nostrip"
17
18
18
DEPEND="virtual/libc
19
DEPEND="virtual/libc
Lines 22-28 Link Here
22
23
23
S="${WORKDIR}/${PN}"
24
S="${WORKDIR}/${PN}"
24
25
25
MODULE_NAMES="kqemu(misc:${S}/kqemu)"
26
MODULE_NAMES=""
27
use kqemu && MODULE_NAMES=$MODULE_NAMES" kqemu(misc:${S}/kqemu)"
28
use qvm86 && MODULE_NAMES=$MODULE_NAMES" qvm86(misc:${S}/qvm86)"
26
29
27
set_target_list() {
30
set_target_list() {
28
	TARGET_LIST="arm-user armeb-user i386-user ppc-user sparc-user"
31
	TARGET_LIST="arm-user armeb-user i386-user ppc-user sparc-user"
Lines 32-38 Link Here
32
}
35
}
33
36
34
pkg_setup() {
37
pkg_setup() {
35
	use kqemu && linux-mod_pkg_setup
38
	( use kqemu || use qvm86 ) && linux-mod_pkg_setup
36
}
39
}
37
40
38
#RUNTIME_PATH="/emul/gnemul/"
41
#RUNTIME_PATH="/emul/gnemul/"
Lines 51-59 Link Here
51
	cd ${S}/kqemu
54
	cd ${S}/kqemu
52
	epatch ${FILESDIR}/kqemu-sysfs.patch
55
	epatch ${FILESDIR}/kqemu-sysfs.patch
53
	)
56
	)
57
	if use qvm86; then
58
		mv ${WORKDIR}/qvm86 ${S}
59
		cd ${S}
60
		epatch qvm86/patch.qvm86
61
	fi
54
	cd ${S}
62
	cd ${S}
55
	# Alter target makefiles to accept CFLAGS set via flag-o.
63
	# Alter target makefiles to accept CFLAGS set via flag-o.
56
	sed -i 's/^CFLAGS=/CFLAGS+=/' Makefile Makefile.target
64
	sed -i 's/^CFLAGS=-Wall -O2 -g/CFLAGS+=-Wall/' Makefile Makefile.target
57
	# Ensure mprotect restrictions are relaxed for emulator binaries
65
	# Ensure mprotect restrictions are relaxed for emulator binaries
58
	[[ -x /sbin/paxctl ]] && \
66
	[[ -x /sbin/paxctl ]] && \
59
		sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \
67
		sed -i 's/^VL_LDFLAGS=$/VL_LDFLAGS=-Wl,-z,execheap/' \
Lines 63-72 Link Here
63
}
71
}
64
72
65
src_compile() {
73
src_compile() {
66
	# Force disable ANY cflag.
74
	# sse is currently broken
67
	unset CFLAGS
75
	strip-flags	
76
	replace-cpu-flags pentium3 pentium4 i586
77
	if use debug; then 
78
		append-flags -g
79
	fi
80
68
	myconf=""
81
	myconf=""
69
	use kqemu || myconf="${myconf} --disable-kqemu"
82
	use kqemu || use qvm86 || myconf="${myconf} --disable-kqemu"
70
	set_target_list
83
	set_target_list
71
#		--interp-prefix=${RUNTIME_PATH}/qemu-%M
84
#		--interp-prefix=${RUNTIME_PATH}/qemu-%M
72
	./configure \
85
	./configure \
Lines 89-100 Link Here
89
	
102
	
90
	chmod -x ${D}/usr/share/man/*/*
103
	chmod -x ${D}/usr/share/man/*/*
91
	
104
	
92
	if use kqemu; then
105
	if use kqemu || use qvm86; then
93
		linux-mod_src_install
106
		linux-mod_src_install
94
107
	fi
108
	if use kqemu; then
95
		# Module doc
109
		# Module doc
96
		dodoc ${S}/kqemu/README
110
		dodoc ${S}/kqemu/README
97
98
	fi
111
	fi
99
}
112
}
100
113
Lines 117-120 Link Here
117
		einfo "make sure you have the /dev/kqemu device generated"
130
		einfo "make sure you have the /dev/kqemu device generated"
118
		einfo "and the kernel module loaded before running qemu"
131
		einfo "and the kernel module loaded before running qemu"
119
	fi
132
	fi
133
	if use qvm86; then
134
		linux-mod_pkg_postinst
135
		einfo "make sure you have the /dev/qvm86 device generated"
136
		einfo "and the kernel module loaded before running qemu"
137
	fi
120
}
138
}

Return to bug 82885