alsa-lib: convert ot new package format

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2013-07-17 16:32:17 +02:00
parent d53501b3bc
commit c56b565182
7 changed files with 77 additions and 101 deletions

View File

@ -1,54 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
# alsa-lib fails building with LTO support
strip_lto
#CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=32 -fPIC -DPIC"
CFLAGS="$CFLAGS -fPIC -DPIC"
cd $PKG_BUILD
./configure --host=$TARGET_NAME \
--build=$HOST_NAME \
--prefix=/usr \
--sysconfdir=/etc \
--with-plugindir=/usr/lib/alsa \
--localstatedir=/var \
--disable-static \
--enable-shared \
--disable-python \
--disable-dependency-tracking \
sed -i 's/.*PKGLIBDIR.*/#define PKGLIBDIR ""/' include/config.h
$MAKE
$MAKE -C include DESTDIR=$SYSROOT_PREFIX install-data
$MAKE -C src DESTDIR=$SYSROOT_PREFIX install-exec
$MAKE -C utils DESTDIR=$SYSROOT_PREFIX install-pkgconfigDATA
mkdir -p $SYSROOT_PREFIX/usr/share/aclocal
cp utils/alsa.m4 $SYSROOT_PREFIX/usr/share/aclocal

View File

@ -1,42 +0,0 @@
#!/bin/sh
################################################################################
# This file is part of OpenELEC - http://www.openelec.tv
# Copyright (C) 2009-2012 Stephan Raue (stephan@openelec.tv)
#
# This Program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This Program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with OpenELEC.tv; see the file COPYING. If not, write to
# the Free Software Foundation, 51 Franklin Street, Suite 500, Boston, MA 02110, USA.
# http://www.gnu.org/copyleft/gpl.html
################################################################################
. config/options $1
add_group audio 63
mkdir -p $INSTALL/usr/lib
cp -PR $PKG_BUILD/src/.libs/libasound.so* $INSTALL/usr/lib
mkdir -p $INSTALL/usr/lib/alsa
cp -PR $PKG_BUILD/modules/mixer/simple/.libs/*.so $INSTALL/usr/lib/alsa
mkdir -p $INSTALL/usr/share/alsa
# sed 's%~/\.asoundrc%/storage/\.config/asound.conf%' \
# $PKG_BUILD/src/conf/alsa.conf > $INSTALL/usr/share/alsa/alsa.conf
cp -P $PKG_BUILD/src/conf/alsa.conf $INSTALL/usr/share/alsa
cp -P $PKG_BUILD/src/conf/smixer.conf $INSTALL/usr/share/alsa
cp -P $PKG_BUILD/src/conf/*.alisp $INSTALL/usr/share/alsa
cp -PR $PKG_BUILD/src/conf/cards $INSTALL/usr/share/alsa/
cp -PR $PKG_BUILD/src/conf/pcm $INSTALL/usr/share/alsa/
rm -f $INSTALL/usr/share/alsa/cards/Makefile*
rm -f $INSTALL/usr/share/alsa/pcm/Makefile*

View File

@ -0,0 +1,23 @@
#############################
# ALSA drivers load options #
#############################
# Prevent abnormal drivers from grabbing index 0
options snd-bt87x index=-2
options cx88-alsa index=-2
options saa7134-alsa index=-2
options snd-atiixp-modem index=-2
options snd-intel8x0m index=-2
options snd-via82xx-modem index=-2
options snd-usb-audio index=-2
options snd-usb-usx2y index=-2
options snd-usb-caiaq index=-2
options snd-cmipci mpu_port=0x330 fm_port=0x388
# Some Toshiba laptops might require this
# options snd-hda-intel model=toshiba
options snd-hda-intel model=auto
# fix some Audio Problems with HDMI on ION based Hardware
# see: http://xbmc.org/forum/showthread.php?t=69479
alias snd-card-0 snd-hda-codec-nvhdmi

View File

@ -0,0 +1,16 @@
# INTEL HBR WORKAROUND FOR DTS-MA & Dolby TrueHD PLAYBACK
# Uncomment the following lines to disable any S/PDIF out to deliver
# bitstreamed audio on Intel builds. This is a rough workaround for
# users that have both S/PDIF and HDMI audio outputs on their motherboard
# or motherboard+discrete graphics combo.
# EVEN IF YOU ARE NOT USING THE S/PDIF OUTPUT
# but still have one, you will need to uncomment the lines below !
# after uncommenting these lines, you must reboot for these settings to take effect
# blacklist snd_hda_codec_realtek
# blacklist snd_hda_codec_sigmatel
# blacklist snd_hda_codec_cirrus

View File

@ -19,18 +19,51 @@
################################################################################
PKG_NAME="alsa-lib"
PKG_VERSION="1.0.27.2"
PKG_VERSION="1.0.26"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="http://www.alsa-project.org/"
PKG_URL="ftp://ftp.alsa-project.org/pub/lib/$PKG_NAME-$PKG_VERSION.tar.bz2"
PKG_DEPENDS=""
PKG_BUILD_DEPENDS="toolchain"
PKG_DEPENDS="alsa-utils"
PKG_BUILD_DEPENDS_TARGET="toolchain"
PKG_PRIORITY="optional"
PKG_SECTION="audio"
PKG_SHORTDESC="alsa-lib: Advanced Linux Sound Architecture library"
PKG_LONGDESC="ALSA (Advanced Linux Sound Architecture) is the next generation Linux Sound API. It provides much finer (->better) access to the sound hardware, has a unbeatable mixer API and supports stuff like multi channel hardware, digital outs and ins, uninterleaved sound data access, and an oss emulation layer (for the old applications). It is the prefered API for professional sound apps under Linux."
PKG_IS_ADDON="no"
PKG_IS_ADDON="no"
PKG_AUTORECONF="yes"
if [ "$PULSEAUDIO_SUPPORT" = yes ]; then
PKG_DEPENDS="$PKG_DEPENDS alsa-plugins"
fi
# package specific configure options
PKG_CONFIGURE_OPTS_TARGET="--with-plugindir=/usr/lib/alsa \
--disable-python \
--disable-dependency-tracking"
pre_configure_target() {
CFLAGS="$CFLAGS -fPIC -DPIC"
# alsa-lib fails building with LTO support
strip_lto
}
post_configure_target() {
sed -i 's/.*PKGLIBDIR.*/#define PKGLIBDIR ""/' include/config.h
}
post_makeinstall_target() {
rm -rf $INSTALL/usr/bin
mkdir -p $INSTALL/etc/modprobe.d
cp -PR $PKG_DIR/config/alsa-base.conf $INSTALL/etc/modprobe.d
mkdir -p $INSTALL/usr/config
cp -PR $PKG_DIR/config/modprobe.d $INSTALL/usr/config
}
post_install_target() {
add_group audio 63
}

View File

@ -84,7 +84,7 @@ fi
if [ "$ALSA_SUPPORT" = yes ]; then
PKG_BUILD_DEPENDS="$PKG_BUILD_DEPENDS alsa-lib"
PKG_DEPENDS="$PKG_DEPENDS alsa alsa-lib"
PKG_DEPENDS="$PKG_DEPENDS alsa-lib"
fi
if [ "$PULSEAUDIO_SUPPORT" = yes ]; then