Browse Source

l/libfreebob: Updated for Slackware-13.0.

slackware-14.2
Damien Goutte-Gattat 13 years ago
parent
commit
e0075e352e
  1. 46
      l/libfreebob/fix-gcc-4.3-changes.diff
  2. 29
      l/libfreebob/libfreebob.SlackBuild

46
l/libfreebob/fix-gcc-4.3-changes.diff

@ -0,0 +1,46 @@
diff -Naur libfreebob-1.0.11.orig/src/libfreebobavc/avc_extended_plug_info.cpp libfreebob-1.0.11/src/libfreebobavc/avc_extended_plug_info.cpp
--- libfreebob-1.0.11.orig/src/libfreebobavc/avc_extended_plug_info.cpp 2007-10-15 20:15:08.000000000 +0200
+++ libfreebob-1.0.11/src/libfreebobavc/avc_extended_plug_info.cpp 2009-09-10 09:50:26.094668208 +0200
@@ -25,6 +25,7 @@
#include <cstdlib>
#include <netinet/in.h>
#include <iostream>
+#include <cstring>
using namespace std;
diff -Naur libfreebob-1.0.11.orig/src/libfreebobavc/avc_generic.cpp libfreebob-1.0.11/src/libfreebobavc/avc_generic.cpp
--- libfreebob-1.0.11.orig/src/libfreebobavc/avc_generic.cpp 2007-10-15 20:15:08.000000000 +0200
+++ libfreebob-1.0.11/src/libfreebobavc/avc_generic.cpp 2009-09-10 09:50:50.160178983 +0200
@@ -23,6 +23,7 @@
#include "ieee1394service.h"
#include <cstdlib>
+#include <cstring>
#include <netinet/in.h>
#define DEBUG_EXTRA_VERBOSE 2
diff -Naur libfreebob-1.0.11.orig/tests/test-extplugcmd.cpp libfreebob-1.0.11/tests/test-extplugcmd.cpp
--- libfreebob-1.0.11.orig/tests/test-extplugcmd.cpp 2007-10-15 20:15:07.000000000 +0200
+++ libfreebob-1.0.11/tests/test-extplugcmd.cpp 2009-09-10 09:51:34.882335998 +0200
@@ -25,6 +25,8 @@
#include <argp.h>
+#include <cstdlib>
+
using namespace std;
////////////////////////////////////////////////
diff -Naur libfreebob-1.0.11.orig/tests/test-volume.cpp libfreebob-1.0.11/tests/test-volume.cpp
--- libfreebob-1.0.11.orig/tests/test-volume.cpp 2007-10-15 20:15:07.000000000 +0200
+++ libfreebob-1.0.11/tests/test-volume.cpp 2009-09-10 09:51:49.299079291 +0200
@@ -22,6 +22,8 @@
#include "libfreebobavc/serialize.h"
#include "libfreebobavc/ieee1394service.h"
+#include <cstdlib>
+
const bool bVerbose = false;
short int

29
l/libfreebob/libfreebob.SlackBuild

@ -35,15 +35,16 @@ ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-http://ovh.dl.sourceforge.net/sourceforge/freebob/$ARCHIVE}
# Build infos
NAMETGZ=${NAMETGZ:-libfreebob}
BUILD=${BUILD:-1GGD}
NAMEPKG=${NAMEPKG:-libfreebob}
BUILD=${BUILD:-2GGD}
ARCH=${ARCH:-i486}
JOBS=${JOBS:-1}
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
@ -59,10 +60,15 @@ 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"
;;
@ -76,24 +82,27 @@ 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 \
./configure \
--prefix=/usr \
--libdir=/usr/lib$LIBDIRSUFFIX \
--disable-dependency-tracking \
--enable-optimize \
--disable-static
make -j $JOBS
make install DESTDIR=$PKG
# Strip binaries
find $PKG | xargs file | grep "ELF 32-bit LSB" | cut -d : -f 1 | \
xargs strip --strip-unneeded 2> /dev/null
make install-strip DESTDIR=$PKG
# Install the documentation
mkdir -p $PKG/usr/doc/$NAME
@ -110,7 +119,7 @@ cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMETGZ-$VERSION-$ARCH-$BUILD.tgz
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"

Loading…
Cancel
Save