summaryrefslogtreecommitdiff
path: root/source/n/bridge-utils
diff options
context:
space:
mode:
Diffstat (limited to 'source/n/bridge-utils')
-rw-r--r--source/n/bridge-utils/bridge-utils-1.5-linux_3.8.x.patch30
-rwxr-xr-xsource/n/bridge-utils/bridge-utils.SlackBuild46
-rw-r--r--source/n/bridge-utils/bridge-utils.isbridge.diff12
3 files changed, 57 insertions, 31 deletions
diff --git a/source/n/bridge-utils/bridge-utils-1.5-linux_3.8.x.patch b/source/n/bridge-utils/bridge-utils-1.5-linux_3.8.x.patch
new file mode 100644
index 00000000..0455a908
--- /dev/null
+++ b/source/n/bridge-utils/bridge-utils-1.5-linux_3.8.x.patch
@@ -0,0 +1,30 @@
+commit 5eebb7f9288b7881ffb929b1fd494fe3ac3be27d
+Author: Russell Senior <russell@personaltelco.net>
+Date: Wed Mar 6 12:49:42 2013 -0800
+
+ bridge-utils: Fix compile against linux-3.8.x
+
+ Linux 3.8 has a header, include/uapi/linux/if_bridge.h that uses a
+ struct in6_addr but doesn't define it. The trivial seeming fix of
+ including the header that does define it causes more problems. The
+ problem was discussed on mailing lists in January 2013. The final
+ suggestion I found was here:
+
+ http://www.redhat.com/archives/libvir-list/2013-January/msg01253.html
+
+ This is intended to implement that suggestion.
+
+ Signed-off-by: Russell Senior <russell@personaltelco.net>
+
+diff --git a/libbridge/libbridge.h b/libbridge/libbridge.h
+index 39964f2..dd14bae 100644
+--- a/libbridge/libbridge.h
++++ b/libbridge/libbridge.h
+@@ -20,6 +20,7 @@
+ #define _LIBBRIDGE_H
+
+ #include <sys/socket.h>
++#include <netinet/in.h>
+ #include <linux/if.h>
+ #include <linux/if_bridge.h>
+
diff --git a/source/n/bridge-utils/bridge-utils.SlackBuild b/source/n/bridge-utils/bridge-utils.SlackBuild
index eb31d6ef..4431da20 100755
--- a/source/n/bridge-utils/bridge-utils.SlackBuild
+++ b/source/n/bridge-utils/bridge-utils.SlackBuild
@@ -24,23 +24,25 @@ PKGNAM=bridge-utils
VERSION=${VERSION:-$(echo $PKGNAM-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
BUILD=${BUILD:-1}
-# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
- i?86) export ARCH=i486 ;;
- arm*) export ARCH=arm ;;
- # Unless $ARCH is already set, use uname -m for all other archs:
- *) export ARCH=$( uname -m ) ;;
+ i?86) ARCH=i586 ;;
+ arm*) ARCH=arm ;;
+ *) ARCH=$( uname -m ) ;;
esac
fi
NUMJOBS=${NUMJOBS:-" -j7 "}
-if [ "$ARCH" = "i486" ]; then
- SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+CWD=$(pwd)
+TMP=${TMP:-/tmp}
+PKG=$TMP/package-$PKGNAM
+
+if [ "$ARCH" = "i586" ]; then
+ SLKCFLAGS="-O2 -march=i586 -mtune=i686"
LIBDIRSUFFIX=""
-elif [ "$ARCH" = "s390" ]; then
- SLKCFLAGS="-O2"
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
@@ -50,20 +52,16 @@ else
LIBDIRSUFFIX=""
fi
-CWD=$(pwd)
-TMP=${TMP:-/tmp}
-PKG=$TMP/package-bridge-utils
+NUMJOBS=${NUMJOBS:-" -j7 "}
rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP
rm -rf bridge-utils-$VERSION
-tar xzf $CWD/bridge-utils-$VERSION.tar.gz || exit 1
+tar xf $CWD/bridge-utils-$VERSION.tar.xz || exit 1
cd bridge-utils-$VERSION || exit 1
-zcat $CWD/bridge-utils.isbridge.diff.gz | patch -p1 --verbose || exit 1
-
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@@ -71,17 +69,27 @@ find . \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
-# This is bad form, but what can you do...
-autoconf
+# Apply patches:
+zcat $CWD/bridge-utils-1.5-linux_3.8.x.patch.gz | patch -p1 --verbose || exit 1
-CFLAGS="$SLKCFLAGS" \
+# Configure:
+autoconf
./configure \
--prefix=/usr \
--libdir=/usr/lib${LIBDIRSUFFIX} \
- --mandir=/usr/man
+ --includedir=/usr/include \
+ --with-linux-headers=/usr/include \
+ --mandir=/usr/man || exit 1
+# Build:
make $NUMJOBS || make || exit 1
+
+# Install into package:
make install DESTDIR=$PKG || exit 1
+mkdir -p $PKG/usr/include
+install -m 644 libbridge/libbridge.h $PKG/usr/include
+mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}
+install -m 644 libbridge/libbridge.a $PKG/usr/lib${LIBDIRSUFFIX}
mkdir -p $PKG/sbin
mv $PKG/usr/sbin/brctl $PKG/sbin/brctl
diff --git a/source/n/bridge-utils/bridge-utils.isbridge.diff b/source/n/bridge-utils/bridge-utils.isbridge.diff
deleted file mode 100644
index b40e4879..00000000
--- a/source/n/bridge-utils/bridge-utils.isbridge.diff
+++ /dev/null
@@ -1,12 +0,0 @@
---- ./libbridge/libbridge_init.c.orig 2008-01-08 17:20:35.000000000 +0100
-+++ ./libbridge/libbridge_init.c 2008-10-23 06:59:58.000000000 +0200
-@@ -49,6 +49,9 @@
- char path[SYSFS_PATH_MAX];
- struct stat st;
-
-+ if(entry->d_name[0] == '.')
-+ return 0;
-+
- snprintf(path, SYSFS_PATH_MAX, SYSFS_CLASS_NET "%s/bridge", entry->d_name);
- return stat(path, &st) == 0 && S_ISDIR(st.st_mode);
- }