]> gitweb.fluxo.info Git - slackbuilds.git/commitdiff
libfreebob updating libfreebob to 1.0.11
authorrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Tue, 16 Dec 2008 17:32:13 +0000 (17:32 +0000)
committerrhatto <rhatto@370017ae-e619-0410-ac65-c121f96126d4>
Tue, 16 Dec 2008 17:32:13 +0000 (17:32 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/slackbuilds@2019 370017ae-e619-0410-ac65-c121f96126d4

sys/libs/libfreebob/libfreebob-1.0.11.diff [new file with mode: 0644]
sys/libs/libfreebob/libfreebob.SlackBuild

diff --git a/sys/libs/libfreebob/libfreebob-1.0.11.diff b/sys/libs/libfreebob/libfreebob-1.0.11.diff
new file mode 100644 (file)
index 0000000..c74718e
--- /dev/null
@@ -0,0 +1,12 @@
+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 16:15:07.000000000 -0200
++++ libfreebob-1.0.11/tests/test-volume.cpp    2008-12-16 15:33:36.000000000 -0200
+@@ -109,7 +109,7 @@
+         exit(0);
+     }
+-    int errno = 0;
++    errno = 0;
+     char* tail;
+     int node_id = strtol( argv[1], &tail, 0 );
+     int fb_id   = strtol( argv[2], &tail, 0 );
index d007e8359901670a02645b9ee95be030a334388c..b2b8206729d949fc44eea053f3b0733bc6a75b87 100755 (executable)
@@ -16,7 +16,7 @@
 #
 # slackbuild for libfreebob, by Rudson R. Alves
 # requires: cxxlibs gcc glibc-solibs alsa-lib libavc1394 libiec61883 libraw1394 libxml2 
-# tested: libfreebob-1.0.7
+# tested: libfreebob-1.0.11
 #
 
 # Look for slackbuildrc
@@ -31,7 +31,7 @@ CWD="$(pwd)"
 SRC_NAME="libfreebob"
 PKG_NAME="libfreebob"
 ARCH=${ARCH:=i486}
-SRC_VERSION=${VERSION:=1.0.7}
+SRC_VERSION=${VERSION:=1.0.11}
 PKG_VERSION="$(echo "$SRC_VERSION" | tr '[[:blank:]-]' '_')"
 BUILD=${BUILD:=2rra}
 SRC_DIR=${SRC_DIR:=$CWD}/$PKG_NAME
@@ -90,6 +90,38 @@ tar --no-same-owner --no-same-permissions -xvf "$SRC_DIR/$SRC" || exit $ERROR_TA
 PKG_SRC="$PWD/`ls -l | awk '/^d/ { print $NF }'`"
 cd "$PKG_SRC"
 
+# Patch source
+patches="
+         $PKG_NAME.diff $PKG_NAME-$PKG_VERSION.diff
+         $PKG_NAME-$PKG_VERSION-$ARCH.diff $PKG_NAME-$ARCH.diff"
+for patch in $patches; do
+  if [ -f "$CWD/$patch" ]; then
+    patch -Np1 < "$CWD/$patch" || exit $ERROR_PATCH
+  elif [ -f "$CWD/patches/$patch" ]; then
+    patch -Np1 < "$CWD/patches/$patch" || exit $ERROR_PATCH
+  elif [ -f "$CWD/$patch.gz" ]; then
+    gzip -dc "$CWD/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+  elif [ -f "$CWD/patches/$patch.gz" ]; then
+    gzip -dc "$CWD/patches/$patch.gz" | patch -Np1 || exit $ERROR_PATCH
+  fi
+done
+
+if echo [[PATCH URLS]] | grep -q -v "PATCH URLS"; then
+  for patch_url in [[PATCH URLS]]; do
+    patch="`basename $patch_url`"
+    if [ ! -s "$SRC_DIR/$patch" ]; then
+      wget "$patch_url" -O "$SRC_DIR/$patch" || exit $ERROR_WGET
+    fi
+    if [ "`basename $patch .gz`" != "$patch" ]; then
+      gzip -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+    elif [ "`basename $patch .bz2`" != "$patch" ]; then
+      bzip2 -dc $SRC_DIR/$patch | patch -Np1 || exit $ERROR_PATCH
+    else
+      patch -Np1 < "$SRC_DIR/$patch" || exit $ERROR_PATCH
+    fi
+  done
+fi
+
 # Configure
 CFLAGS="$SLKCFLAGS" \
   CXXFLAGS="$SLKCFLAGS" \