--- old/xulrunner-1.9.2-r1.ebuild 2010-01-29 17:00:31.000000000 +0200 +++ new/xulrunner-1.9.2-r1.ebuild 2010-01-31 18:04:07.069278639 +0200 @@ -20,7 +20,7 @@ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" SLOT="1.9" LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )" -IUSE="+alsa debug libnotify wifi" +IUSE="+alsa debug libnotify oss wifi" RDEPEND="java? ( >=virtual/jre-1.4 ) >=dev-lang/python-2.3[threads] @@ -44,6 +44,14 @@ S="${WORKDIR}/mozilla-${MAJ_PV}" pkg_setup() { + if use alsa && use oss ; then + ewarn + elog "You have enabled both the \"alsa\" as well as the \"oss\" USE flags. It" + elog "is not possible to build mozilla-firefox or xulrunner with support for" + elog "both. ALSA will be used in this case. If you want OSS support, unset the" + elog "\"alsa\" USE flag and leave only \"oss\" set." + fi + java-pkg-opt-2_pkg_setup } @@ -76,6 +84,18 @@ "${S}"/build/unix/run-mozilla.sh || die "sed failed!" fi + # 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 @@ -137,8 +157,10 @@ 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 + if use alsa || use oss ; then + mozconfig_annotate '' --enable-ogg + mozconfig_annotate '' --enable-wave + fi # Debug if use debug ; then