--- /usr/portage/app-emulation/qemu-softmmu/qemu-softmmu-0.8.2-r1.ebuild 2007-01-02 12:35:55.000000000 -0800 +++ qemu-softmmu-0.8.2-r2.ebuild 2007-01-17 01:50:40.000000000 -0800 @@ -40,9 +40,11 @@ pkg_setup() { if [ "$(gcc-major-version)" == "4" ]; then - eerror "qemu requires gcc-3 in order to build and work correctly" - eerror "please compile it with gcc-3" - die "gcc 4 cannot build qemu" + ewarn "qemu requires gcc-3 in order to build and work correctly" + ewarn "please compile it with gcc-3" + ewarn "trying to find it on your system..." + AUTODETECT_GCC3=yes + export AUTODETECT_GCC3 fi } @@ -52,6 +54,8 @@ cd "${S}" epatch "${FILESDIR}"/qemu-${PV}-linux-headers.patch epatch "${FILESDIR}"/qemu-${PV}-sparc-fp.patch + epatch "${FILESDIR}"/qemu-${PV}-detect-gcc3.patch + epatch "${FILESDIR}"/qemu-${PV}-detect-gentoo-gcc3.patch # Alter target makefiles to accept CFLAGS set via flag-o. sed -i 's/^\(C\|OP_C\|HELPER_C\)FLAGS=/\1FLAGS+=/' \ Makefile Makefile.target tests/Makefile @@ -72,22 +76,36 @@ set_target_list - myconf="--disable-gcc-check" if ! use sdl ; then myconf="$myconf --disable-gfx-check" fi - ./configure \ - --prefix=/usr \ - --target-list="${TARGET_LIST}" \ - --enable-slirp --enable-adlib \ - --cc=$(tc-getCC) \ - --host-cc=$(tc-getCC) \ - --kernel-path=${KV_DIR} \ - $(use_enable sdl)\ - $(use_enable kqemu) \ - $(use_enable alsa) \ - ${myconf} \ - || die "could not configure" + + if [ "${AUTODETECT_GCC3}" = "yes" ]; then + ./configure \ + --prefix=/usr \ + --target-list="${TARGET_LIST}" \ + --enable-slirp --enable-adlib \ + --kernel-path=${KV_DIR} \ + $(use_enable sdl) \ + $(use_enable kqemu) \ + $(use_enable alsa) \ + ${myconf} \ + || die "could not configure" + else { + myconf="--disable-gcc-check" + ./configure \ + --prefix=/usr \ + --target-list="${TARGET_LIST}" \ + --enable-slirp --enable-adlib \ + --cc=$(tc-getCC) \ + --host-cc=$(tc-getCC) \ + --kernel-path=${KV_DIR} \ + $(use_enable sdl)\ + $(use_enable kqemu) \ + $(use_enable alsa) \ + ${myconf} \ + || die "could not configure" + }; fi emake || die "make failed" }