From 8aef445b4fd99fb19f3075d08d7754e225ab1e52 Mon Sep 17 00:00:00 2001 From: James Geboski Date: Mon, 13 Aug 2012 07:51:40 -0500 Subject: 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 --- network/mumble/mumble.SlackBuild | 44 ++++++++++++++++++++++++++++++++++------ 1 file changed, 38 insertions(+), 6 deletions(-) (limited to 'network/mumble/mumble.SlackBuild') diff --git a/network/mumble/mumble.SlackBuild b/network/mumble/mumble.SlackBuild index fe0961ee0a..1bf4528457 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 -- cgit v1.2.3