l/libffado: Updated for Slackware-13.0.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent bf7467c23b
commit 54189bbace
  1. 34
      l/libffado/fix-gcc-4.3-changes.diff
  2. 39
      l/libffado/libffado.SlackBuild

@ -0,0 +1,34 @@
diff -Naur libffado-2.0-rc2.orig/src/bebob/bebob_dl_mgr.cpp libffado-2.0-rc2/src/bebob/bebob_dl_mgr.cpp
--- libffado-2.0-rc2.orig/src/bebob/bebob_dl_mgr.cpp 2009-05-17 15:42:38.000000000 +0200
+++ libffado-2.0-rc2/src/bebob/bebob_dl_mgr.cpp 2009-09-10 01:11:47.101020529 +0200
@@ -35,6 +35,7 @@
#include <cstdio>
#include <cstring>
+#include <memory>
namespace BeBoB {
enum {
diff -Naur libffado-2.0-rc2.orig/src/ffadodevice.h libffado-2.0-rc2/src/ffadodevice.h
--- libffado-2.0-rc2.orig/src/ffadodevice.h 2008-11-23 12:25:32.000000000 +0100
+++ libffado-2.0-rc2/src/ffadodevice.h 2009-09-10 01:11:00.910021119 +0200
@@ -34,6 +34,7 @@
#include <vector>
#include <string>
+#include <memory>
class DeviceManager;
class ConfigRom;
diff -Naur libffado-2.0-rc2.orig/src/libutil/serialize_expat.cpp libffado-2.0-rc2/src/libutil/serialize_expat.cpp
--- libffado-2.0-rc2.orig/src/libutil/serialize_expat.cpp 2008-05-10 17:39:39.000000000 +0200
+++ libffado-2.0-rc2/src/libutil/serialize_expat.cpp 2009-09-10 01:14:02.831170718 +0200
@@ -25,6 +25,8 @@
#include "serialize.h"
+#include <cstdlib>
+
using namespace std;

@ -24,10 +24,8 @@
#
# Latest libffado sourcecode is available at: <http://www.ffado.org/>.
#
# Depends: d/scons, gnome/libxml++, l/libiec61883
# Optional: l/pyqt
#
# Note: PyQt is only needed at runtime by the GUI mixer ffado-mixer.
# Depends: d/scons, l/libiec61883
# Optional: gnome/libxml++
# Source package infos
NAMESRC=${NAMESRC:-libffado}
@ -36,16 +34,15 @@ ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://www.ffado.org/files/$ARCHIVE}
# Build infos
NAMETGZ=${NAMETGZ:-libffado}
NAMEPKG=${NAMEPKG:-libffado}
PKGVERSION=${PKGVERSION:-2.0rc2}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-i486}
JOBS=${JOBS:-1}
BUILD=${BUILD:-3GGD}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMETGZ}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
@ -61,12 +58,14 @@ if [ ! -d $TMP ]; then
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
@ -81,25 +80,29 @@ fi
sha1sum -c $ARCHIVE.sha1
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
# Extract
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
# Fix missing headers due to breaking changes in gcc 4.3
# <http://gcc.gnu.org/gcc-4.3/porting_to.html>
patch -p 1 < $CWD/fix-gcc-4.3-changes.diff
# Compile
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
scons PREFIX=/usr ENABLE_OPTIMIZATIONS=yes
scons PREFIX=/usr \
LIBDIR=/usr/lib$LIBDIRSUFFIX \
ENABLE_OPTIMIZATIONS=yes \
SERIALIZE_USE_EXPAT=yes
scons install DESTDIR=$PKG
# Strip binaries
find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
find $PKG | xargs file | grep "ELF \(32\|64\)-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
# If only ffado-mixer-qt3 has been built, rename it to ffado-mixer
if [ ! -f $PKG/usr/bin/ffado-mixer ]; then
mv $PKG/usr/bin/ffado-mixer-qt3 $PKG/usr/bin/ffado-mixer
fi
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
install -m 644 \
@ -122,7 +125,7 @@ cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$PKGVERSION-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$PKGVERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"

Loading…
Cancel
Save