--- old/mozilla-firefox-3.6-r1.ebuild 2010-01-29 17:01:08.000000000 +0200 +++ new/mozilla-firefox-3.6-r1.ebuild 2010-01-31 18:03:53.430403570 +0200 @@ -25,7 +25,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" SLOT="0" LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" -IUSE="+alsa bindist java libnotify wifi" +IUSE="+alsa bindist java libnotify oss wifi" REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases" SRC_URI="${REL_URI}/${MY_PV}/source/firefox-${MY_PV}.source.tar.bz2 @@ -101,6 +101,14 @@ elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag" fi + if use alsa && use oss ; then + einfo + ewarn "You have enabled both the \"alsa\" as well as the \"oss\" USE flags. It" + ewarn "is not possible to build mozilla-firefox or xulrunner with support for" + ewarn "both. ALSA will be used in this case. If you want OSS support, unset the" + ewarn "\"alsa\" USE flag and leave only \"oss\" set." + fi + java-pkg-opt-2_pkg_setup } @@ -123,6 +131,18 @@ # Fix media build failure epatch "${FILESDIR}/xulrunner-1.9.2-noalsa-fixup.patch" + # Switch from ALSA to OSS + if use oss && ! use alsa; then + ebegin "Switching from ALSA to Open Sound System" + sed -i 's/sydney_audio_alsa/sydney_audio_oss/' \ + media/libsydneyaudio/src/Makefile.in || die "sed failed!" \ + && sed -i '/alsa\//d' config/system-headers || die "sed failed!" \ + && sed -i '/alsa\//d' \ + js/src/config/system-headers || die "sed failed!" \ + && sed -i '/LIB(asound/d' configure.in || die "sed failed!" + eend $? + fi + eautoreconf cd js/src @@ -183,15 +203,15 @@ mozconfig_use_enable libnotify mozconfig_use_enable java javaxpcom mozconfig_use_enable wifi necko-wifi - mozconfig_use_enable alsa ogg - mozconfig_use_enable alsa wave # Other ff-specific settings mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME} # Enable/Disable audio in firefox - mozconfig_use_enable alsa ogg - mozconfig_use_enable alsa wave + if use alsa || use oss ; then + mozconfig_annotate '' --enable-ogg + mozconfig_annotate '' --enable-wave + fi if ! use bindist ; then mozconfig_annotate '' --enable-official-branding