From e11d2e8bfa1b7027be75d87528b2fc6a968ebe84 Mon Sep 17 00:00:00 2001 From: Jie Sun Date: Tue, 26 Apr 2011 11:25:04 -0700 Subject: [PATCH] update alsa package to newest to support UCM. these are original ebuilds file, all ebuild are currently masked. The plan is to enable this on ARM first. Change-Id: Ia23b731b90870d3d7712c302d71460a258a3c420 BUG=None TEST=Unmask the it in package.keywords and build on arm successfully. Review URL: http://codereview.chromium.org/6902042 --- .../alsa-lib/alsa-lib-1.0.24.1.ebuild | 98 +++++++++++++++++++ .../alsa-plugins/alsa-plugins-1.0.24.ebuild | 91 +++++++++++++++++ .../alsa-plugins-1.0.19-missing-avutil.patch | 11 +++ .../files/alsa-plugins-1.0.23-automagic.patch | 12 +++ .../alsa-headers/alsa-headers-1.0.24.ebuild | 46 +++++++++ .../files/alsa-headers-1.0.6a-user.patch | 14 +++ 6 files changed, 272 insertions(+) create mode 100644 sdk_container/src/third_party/portage-stable/media-libs/alsa-lib/alsa-lib-1.0.24.1.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/alsa-plugins-1.0.24.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/files/alsa-plugins-1.0.19-missing-avutil.patch create mode 100644 sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/files/alsa-plugins-1.0.23-automagic.patch create mode 100644 sdk_container/src/third_party/portage-stable/media-sound/alsa-headers/alsa-headers-1.0.24.ebuild create mode 100644 sdk_container/src/third_party/portage-stable/media-sound/alsa-headers/files/alsa-headers-1.0.6a-user.patch diff --git a/sdk_container/src/third_party/portage-stable/media-libs/alsa-lib/alsa-lib-1.0.24.1.ebuild b/sdk_container/src/third_party/portage-stable/media-libs/alsa-lib/alsa-lib-1.0.24.1.ebuild new file mode 100644 index 0000000000..9eefbbf1e0 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/media-libs/alsa-lib/alsa-lib-1.0.24.1.ebuild @@ -0,0 +1,98 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-libs/alsa-lib/alsa-lib-1.0.24.1.ebuild,v 1.3 2011/02/17 17:26:29 sping Exp $ + +EAPI=3 + +PYTHON_DEPEND="python? 2" + +inherit eutils libtool python multilib + +MY_P=${P/_rc/rc} +S=${WORKDIR}/${MY_P} + +DESCRIPTION="Advanced Linux Sound Architecture Library" +HOMEPAGE="http://www.alsa-project.org/" +SRC_URI="mirror://alsaproject/lib/${MY_P}.tar.bz2" + +LICENSE="LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux" +IUSE="doc debug alisp python static-libs" + +DEPEND=">=media-sound/alsa-headers-1.0.24 + doc? ( >=app-doc/doxygen-1.2.6 )" +RDEPEND="" + +IUSE_PCM_PLUGIN="copy linear route mulaw alaw adpcm rate plug multi shm file +null empty share meter mmap_emul hooks lfloat ladspa dmix dshare dsnoop asym iec958 +softvol extplug ioplug" + +for plugin in ${IUSE_PCM_PLUGIN}; do + IUSE="${IUSE} alsa_pcm_plugins_${plugin}" +done + +pkg_setup() { + if [ -z "${ALSA_PCM_PLUGINS}" ] ; then + ewarn "You haven't selected _any_ PCM plugins. Either you set it to something like the default" + ewarn "(which is being set in the profile UNLESS you unset them) or alsa based applications" + ewarn "are going to *misbehave* !" + epause 5 + fi + + if use python; then + python_set_active_version 2 + fi +} + +src_prepare() { + elibtoolize + epunt_cxx +} + +src_configure() { + local myconf + use elibc_uclibc && myconf="--without-versioned" + + econf \ + $(use_enable static-libs static) \ + --enable-shared \ + --disable-resmgr \ + --enable-rawmidi \ + --enable-seq \ + --enable-aload \ + $(use_with debug) \ + $(use_enable alisp) \ + $(use_enable python) \ + --with-pcm-plugins="${ALSA_PCM_PLUGINS}" \ + --disable-dependency-tracking \ + ${myconf} +} + +src_compile() { + emake || die + + if use doc; then + emake doc || die "failed to generate docs" + fgrep -Zrl "${S}" "${S}/doc/doxygen/html" | \ + xargs -0 sed -i -e "s:${S}::" + fi +} + +src_install() { + emake DESTDIR="${D}" install || die + + find "${ED}" -name '*.la' -exec rm -f {} + + find "${ED}"/usr/$(get_libdir)/alsa-lib -name '*.a' -exec rm -f {} + + + dodoc ChangeLog TODO || die + use doc && dohtml -r doc/doxygen/html/* +} + +pkg_postinst() { + elog "Please try in-kernel ALSA drivers instead of the alsa-driver ebuild." + elog "If alsa-driver works for you where a *recent* kernel does not, we want " + elog "to know about this. Our e-mail address is alsa-bugs@gentoo.org" + elog "However, if you notice no sound output or instability, please try to " + elog "upgrade your kernel to a newer version first." +} diff --git a/sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/alsa-plugins-1.0.24.ebuild b/sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/alsa-plugins-1.0.24.ebuild new file mode 100644 index 0000000000..9e17ac3f01 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/alsa-plugins-1.0.24.ebuild @@ -0,0 +1,91 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-plugins/alsa-plugins/alsa-plugins-1.0.24.ebuild,v 1.2 2011/04/10 20:21:10 scarabeus Exp $ + +EAPI=3 + +MY_P="${P/_/}" + +inherit autotools base flag-o-matic + +DESCRIPTION="ALSA extra plugins" +HOMEPAGE="http://www.alsa-project.org/" +SRC_URI="mirror://alsaproject/plugins/${MY_P}.tar.bz2" + +LICENSE="GPL-2 LGPL-2.1" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sh ~sparc ~x86" +IUSE="debug ffmpeg jack libsamplerate pulseaudio speex" + +RDEPEND=">=media-libs/alsa-lib-${PV}[alsa_pcm_plugins_ioplug] + ffmpeg? ( virtual/ffmpeg + media-libs/alsa-lib[alsa_pcm_plugins_rate,alsa_pcm_plugins_plug] ) + jack? ( >=media-sound/jack-audio-connection-kit-0.98 ) + libsamplerate? ( + media-libs/libsamplerate + media-libs/alsa-lib[alsa_pcm_plugins_rate,alsa_pcm_plugins_plug] ) + pulseaudio? ( media-sound/pulseaudio ) + speex? ( media-libs/speex + media-libs/alsa-lib[alsa_pcm_plugins_rate,alsa_pcm_plugins_plug] ) + !media-plugins/alsa-jack" + +DEPEND="${RDEPEND} + dev-util/pkgconfig" + +PATCHES=( + "${FILESDIR}/${PN}-1.0.19-missing-avutil.patch" + "${FILESDIR}/${PN}-1.0.23-automagic.patch" +) + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + base_src_prepare + + # For some reasons the polyp/pulse plugin does fail with alsaplayer with a + # failed assert. As the code works just fine with asserts disabled, for now + # disable them waiting for a better solution. + sed -i -e '/AM_CFLAGS/s:-Wall:-DNDEBUG -Wall:' \ + "${S}/pulse/Makefile.am" + + eautoreconf +} + +src_configure() { + use debug || append-flags -DNDEBUG + + local myspeex + + if use speex; then + myspeex=lib + else + myspeex=no + fi + + econf \ + --disable-dependency-tracking \ + $(use_enable ffmpeg avcodec) \ + $(use_enable jack) \ + $(use_enable libsamplerate samplerate) \ + $(use_enable pulseaudio) \ + --with-speex=${myspeex} +} + +src_install() { + emake DESTDIR="${D}" install + + cd "${S}/doc" + dodoc upmix.txt vdownmix.txt README-pcm-oss + use jack && dodoc README-jack + use libsamplerate && dodoc samplerate.txt + use ffmpeg && dodoc lavcrate.txt a52.txt + + if use pulseaudio; then + dodoc README-pulse + # install ALSA configuration files + # making PA to be used by alsa clients + insinto /usr/share/alsa + doins "${FILESDIR}"/pulse*.conf + fi + +} diff --git a/sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/files/alsa-plugins-1.0.19-missing-avutil.patch b/sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/files/alsa-plugins-1.0.19-missing-avutil.patch new file mode 100644 index 0000000000..12acbbca1d --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/files/alsa-plugins-1.0.19-missing-avutil.patch @@ -0,0 +1,11 @@ +--- configure.in_old 2009-01-26 21:46:07.000000000 +0100 ++++ configure.in 2009-01-26 21:47:25.000000000 +0100 +@@ -67,7 +67,7 @@ + AS_HELP_STRING([--disable-avcodec], [Don't build plugins depending on avcodec (a52)])) + + if test "x$enable_avcodec" != "xno"; then +- PKG_CHECK_MODULES(AVCODEC, [libavcodec], [HAVE_AVCODEC=yes], [HAVE_AVCODEC=no]) ++ PKG_CHECK_MODULES(AVCODEC, [libavcodec libavutil], [HAVE_AVCODEC=yes], [HAVE_AVCODEC=no]) + fi + + if test "x$HAVE_AVCODEC" = "xno"; then diff --git a/sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/files/alsa-plugins-1.0.23-automagic.patch b/sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/files/alsa-plugins-1.0.23-automagic.patch new file mode 100644 index 0000000000..8e62f20a14 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/media-plugins/alsa-plugins/files/alsa-plugins-1.0.23-automagic.patch @@ -0,0 +1,12 @@ +diff -uNr alsa-plugins-1.0.23.ORIg//Makefile.am alsa-plugins-1.0.23/Makefile.am +--- alsa-plugins-1.0.23.ORIg//Makefile.am 2010-04-16 23:38:58.546243512 +0100 ++++ alsa-plugins-1.0.23/Makefile.am 2010-04-16 23:39:20.049278487 +0100 +@@ -17,7 +17,7 @@ + if HAVE_PPH + SUBDIRS += pph + endif +-if HAVE_SPEEXDSP ++if USE_LIBSPEEX + SUBDIRS += speex + endif + diff --git a/sdk_container/src/third_party/portage-stable/media-sound/alsa-headers/alsa-headers-1.0.24.ebuild b/sdk_container/src/third_party/portage-stable/media-sound/alsa-headers/alsa-headers-1.0.24.ebuild new file mode 100644 index 0000000000..6d0b1c8bd2 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/media-sound/alsa-headers/alsa-headers-1.0.24.ebuild @@ -0,0 +1,46 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/media-sound/alsa-headers/alsa-headers-1.0.24.ebuild,v 1.1 2011/02/05 23:55:34 chainsaw Exp $ + +EAPI="3" + +inherit base + +MY_PN=${PN/headers/driver} +MY_P="${MY_PN}-${PV/_rc/rc}" +S="${WORKDIR}/${MY_P}" + +DESCRIPTION="Header files for Advanced Linux Sound Architecture kernel modules" +HOMEPAGE="http://www.alsa-project.org/" +SRC_URI="mirror://alsaproject/driver/${MY_P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sh ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos" +IUSE="" + +DEPEND="" +RDEPEND="" + +RESTRICT="binchecks strip" + +PATCHES=( + "${FILESDIR}/${PN}-1.0.6a-user.patch" +) + +# Remove the sound symlink workaround... +pkg_setup() { + if [[ -L ${EROOT}usr/include/sound ]]; then + rm "${EROOT}usr/include/sound" + fi +} + +src_configure() { :; } + +src_compile() { :; } + +src_install() { + cd "${S}/alsa-kernel/include" + insinto /usr/include/sound + doins *.h || die "include failed" +} diff --git a/sdk_container/src/third_party/portage-stable/media-sound/alsa-headers/files/alsa-headers-1.0.6a-user.patch b/sdk_container/src/third_party/portage-stable/media-sound/alsa-headers/files/alsa-headers-1.0.6a-user.patch new file mode 100644 index 0000000000..c1a4cf2394 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/media-sound/alsa-headers/files/alsa-headers-1.0.6a-user.patch @@ -0,0 +1,14 @@ +diff -Naur alsa-driver-1.0.6a.orig/alsa-kernel/include/asound.h alsa-driver-1.0.6a/alsa-kernel/include/asound.h +--- alsa-driver-1.0.6a.orig/alsa-kernel/include/asound.h 2004-08-03 11:55:55.000000000 -0700 ++++ alsa-driver-1.0.6a/alsa-kernel/include/asound.h 2004-08-25 11:05:21.445603678 -0700 +@@ -63,6 +63,10 @@ + #include + #endif + ++#ifndef __user ++#define __user ++#endif ++ + /* + * protocol version + */