aboutsummaryrefslogtreecommitdiff
path: root/network/mumble/mumble.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'network/mumble/mumble.SlackBuild')
-rw-r--r--network/mumble/mumble.SlackBuild44
1 files changed, 38 insertions, 6 deletions
diff --git a/network/mumble/mumble.SlackBuild b/network/mumble/mumble.SlackBuild
index fe0961ee0af1e..1bf4528457388 100644
--- a/network/mumble/mumble.SlackBuild
+++ b/network/mumble/mumble.SlackBuild
@@ -24,9 +24,13 @@
PRGNAM=mumble
VERSION=${VERSION:-1.2.3}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
+G15=${G15:-no}
+OVERLAY=${OVERLAY:-no}
+COMPAT32=${COMPAT32:-no}
+
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
i?86) ARCH=i486 ;;
@@ -54,9 +58,6 @@ else
LIBDIRSUFFIX=""
fi
-G15=${G15:-no}
-OVERLAY=${OVERLAY:-no}
-
BUILD_G15=""
BUILD_OVERLAY=""
@@ -96,15 +97,19 @@ patch -p1 < $CWD/patches/MainWindow-set-the-window-icon.patch
# to keep compatibility with other Mumble clients.
cd celt-0.7.0-build
qmake \
+ QMAKE_CFLAGS+="$SLKCFLAGS" \
+ QMAKE_CXXFLAGS+="$SLKCFLAGS" \
-recursive \
celt-0.7.0-build.pro
-
+
make release
cd -
qmake \
-recursive \
main.pro \
+ QMAKE_CFLAGS+="$SLKCFLAGS" \
+ QMAKE_CXXFLAGS+="$SLKCFLAGS" \
DEFINES*="PLUGIN_PATH=/usr/lib${LIBDIRSUFFIX}/mumble" \
CONFIG+=no-server \
CONFIG+=no-bundled-celt \
@@ -156,7 +161,8 @@ find release/plugins -type f -name *.so \
# If the overlay was built, let's install the library for it
if [ -e release/libmumble.so.$VERSION ]; then
install -m 755 release/libmumble.so.$VERSION $PKG/usr/lib${LIBDIRSUFFIX}
-
+ install -m 755 scripts/mumble-overlay $PKG/usr/bin
+
cd $PKG/usr/lib${LIBDIRSUFFIX}
ln -sf libmumble.so.$VERSION libmumble.so.1.2
ln -sf libmumble.so.$VERSION libmumble.so.1
@@ -164,6 +170,32 @@ if [ -e release/libmumble.so.$VERSION ]; then
cd -
fi
+# The mumble-overly script will look for a 32-bit libmumble on non-pure x86_64
+# systems. If the x86_64 based system has a multilib setup, the COMPAT32
+# variable can be set to 'yes' to build a 32-bit version of libmumble.
+if [ "$COMPAT32" = "yes" -a "$OVERLAY" = "yes" -a "$ARCH" = "x86_64" ]; then
+ cd overlay_gl
+ make clean
+
+ qmake \
+ QMAKE_CFLAGS="-m32 -O2 -march=i486 -mtune=i686" \
+ QMAKE_CXXFLAGS="-m32 -O2 -march=i486 -mtune=i686" \
+ QMAKE_LFLAGS="-m32" \
+ overlay_gl.pro
+
+ make release DESTDIR_ADD=-32
+ cd -
+
+ mkdir -p $PKG/usr/lib
+ install -m 755 release-32/libmumble.so.$VERSION $PKG/usr/lib
+
+ cd $PKG/usr/lib
+ ln -sf libmumble.so.$VERSION libmumble.so.1.2
+ ln -sf libmumble.so.$VERSION libmumble.so.1
+ ln -sf libmumble.so.$VERSION libmumble.so
+ cd -
+fi
+
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true