aboutsummaryrefslogtreecommitdiff
path: root/network/mumble/mumble.SlackBuild
diff options
context:
space:
mode:
authorJames Geboski <jgeboski@gmail.com>2012-08-13 07:51:40 -0500
committerRobby Workman <rworkman@slackbuilds.org>2012-08-13 07:51:40 -0500
commit8aef445b4fd99fb19f3075d08d7754e225ab1e52 (patch)
treeb28d11ca9d8a5d812b16e14b613a9e989457d48d /network/mumble/mumble.SlackBuild
parent2ed9e80c54030b811cb2c43d5a14f59a9a0db880 (diff)
network/mumble: various build fixes and enhancements
- Fixed $SLKCFLAGS not being directly passed to qmake - Included 'mumble-overly' script; this allows for the use of the mumble overlay - Added COMPAT32 option for libmumble (preloaded overlay library) The COMPAT32 option does build a 32-bit libmumble via the -m32 CFLAG, and I'm fairly certain this is taboo for SBo. Obviously, -m32 requires a multilibbed system, and not all x86_64 systems have this setup. On x86_64 systems, mumble-overly will look for a 32-bit libmumble to use, and it helps keep compatibility. Many of the people using this are somewhat of "gamers", and use it on games that are not native to the system (non-free and 32-bit only, wine, etc). Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
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