inherit eutils flag-o-matic toolchain-funcs cvs ECVS_SERVER="cvs.savannah.nongnu.org:/sources/qemu" ECVS_MODULE="qemu" ECVS_CO_OPTS="-D $PV" ECVS_UP_OPTS="$ECVS_CO_OPTS -dP" S="$WORKDIR/$ECVS_MODULE" DESCRIPTION="Multi-platform & multi-targets cpu emulator and dynamic translator" HOMEPAGE="http://fabrice.bellard.free.fr/qemu/" SRC_URI="" LICENSE="GPL-2 LGPL-2.1 KQEMU" SLOT="0" KEYWORDS="amd64 x86" IUSE="kqemu sdl fmod alsa" RESTRICT="nostrip" DEPEND="virtual/libc sdl? ( media-libs/libsdl ) fmod? ( media-libs/fmod ) alsa? ( media-libs/alsa-lib ) kqemu? ( app-emulation/kqemu ) app-text/texi2html" RDEPEND="sdl? ( media-libs/libsdl )" set_target_list() { TARGET_LIST="i386-softmmu ppc-softmmu sparc-softmmu x86_64-softmmu mips-softmmu arm-softmmu" export TARGET_LIST } pkg_setup() { if [ "$(gcc-major-version)" == "4" ]; then ewarn "Qemu could not build with GCC 4" fi } src_compile() { #Let the application set its cflags unset CFLAGS # Switch off hardened tech filter-flags -fpie -fstack-protector myconf="--disable-gcc-check" if ! use sdl ; then myconf="$myconf --disable-gfx-check" fi set_target_list ./configure \ --prefix=/usr \ --target-list="${TARGET_LIST}" \ --enable-slirp \ --kernel-path=${KV_DIR} \ $(use_enable kqemu) \ $(use_enable alsa) \ $(use_enable fmod) \ ${myconf} \ $(use_enable sdl)\ || die "could not configure" emake || die "make failed" } src_install() { make install \ prefix=${D}/usr \ bindir=${D}/usr/bin \ datadir=${D}/usr/share/qemu \ docdir=${D}/usr/share/doc/${P} \ mandir=${D}/usr/share/man || die chmod -x ${D}/usr/share/man/*/* } pkg_postinst() { einfo "You will need the Universal TUN/TAP driver compiled into" einfo "kernel or as a module to use the virtual network device." }