From de1e7619b22f66981f170d786451d215dff69194 Mon Sep 17 00:00:00 2001 From: "Edinaldo P. Silva" Date: Mon, 17 Sep 2018 23:33:21 +0100 Subject: system/wine-staging: Updated for version 3.16. Signed-off-by: David Spencer --- system/wine-staging/wine-staging.SlackBuild | 150 +++++++++++++++++++++------- 1 file changed, 116 insertions(+), 34 deletions(-) (limited to 'system/wine-staging/wine-staging.SlackBuild') diff --git a/system/wine-staging/wine-staging.SlackBuild b/system/wine-staging/wine-staging.SlackBuild index e35bb496c8..668e6efc63 100644 --- a/system/wine-staging/wine-staging.SlackBuild +++ b/system/wine-staging/wine-staging.SlackBuild @@ -30,7 +30,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=wine-staging -VERSION=${VERSION:-3.15} +VERSION=${VERSION:-3.16} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} @@ -49,29 +49,53 @@ OUTPUT=${OUTPUT:-/tmp} # If your video card does not support hardware accelerated OpenGL, # run the script like: OPENGL=NO ./wine.SlackBuild -OPENGL=${OPENGL:-YES} - -if [ "$ARCH" = "i586" ]; then - SLKCFLAGS="-O2 -march=i586 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "i686" ]; then - SLKCFLAGS="-O2 -march=i686 -mtune=i686" - LIBDIRSUFFIX="" -elif [ "$ARCH" = "x86_64" ]; then - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="" +if [ "${OPENGL:-YES}" = "YES" ]; then + do_opengl="with" else - SLKCFLAGS="-O2" - LIBDIRSUFFIX="" + do_opengl="without" fi +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$(uname -m) ;; + esac +fi + +if [ -n "$NOWIN32" ] && [ -z "$WIN64" ]; then + echo "Both 64 and 32 bit builds disabled. Nothing to do." + exit 1 +fi + +# These should work for anything not specified below +BUILD_ARCH=$ARCH"-slackware-linux" +SLKCFLAGS="-O2" + +case "$ARCH" in + arm) + BUILD_ARCH=$ARCH"-slackware-linux-gnueabi" + ;; + i?86) + # -Os was -O2, fix for: + # https://bugs.winehq.org/show_bug.cgi?id=42406 + # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78911 + # https://bugs.gentoo.org/613128 + SLKCFLAGS="-Os -march=$ARCH -mtune=i686" + ;; + x86_64) + [ -n "$WIN64" ] && WIN64="--enable-win64" + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + ;; +esac + set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $PRGNAM-$VERSION -rm -rf wine-$VERSION +rm -rf $PRGNAM-$VERSION wine-$VERSION tar xvf $CWD/wine-$VERSION.tar.xz tar xvf $CWD/$PRGNAM-$VERSION.tar.gz @@ -93,29 +117,87 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# from Arch Linux PKGBUILD. +# Fix for flex. +patch -p1 --verbose < $CWD/0001-winhlp32-Workaround-a-bug-in-Flex.patch + +# freetype harmony fix. patch -Np1 < $CWD/harmony-fix.diff + +# fix path of opencl headers. sed 's|OpenCL/opencl.h|CL/opencl.h|g' -i configure* -# If OPENGL=YES above, then enable opengl; otherwise, disable it. -if [ "$OPENGL" = "YES" ]; then - do_opengl="with" - else - do_opengl="without" +# Steam crossover hack for store/web functionality. +# https://bugs.winehq.org/show_bug.cgi?id=39403 +patch -Np1 < $CWD/steam.patch + +# Remove -fPIC for i?86 or the build will hang. +if [ "$ARCH" == "i?86" ]; then + patch -p1 --verbose < $CWD/x86_remove_fpic.patch fi -./configure \ - --prefix=/usr \ - --mandir=/usr/man \ - --docdir=/usr/doc/$PRGNAM-$VERSION \ - --with-gnutls=yes \ - --${do_opengl}-opengl \ - --build=$ARCH-slackware-linux - -NUMJOBS=${NUMJOBS:-"-s -j6 -l7"} -make $NUMJOBS || exit 1 -#make -make install DESTDIR=$PKG +if [ -n "$WIN64" ]; then + wine64="--with-wine64=../wine64" + mkdir wine64 + cd wine64 + + LDFLAGS="-L/usr/lib64 -ldl" \ + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ../configure \ + --enable-win64 \ + --prefix=/usr \ + --libdir=/usr/lib64 \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --mandir=/usr/man \ + --with-x \ + --with-gnutls \ + --${do_opengl}-opengl \ + --program-prefix= \ + --program-suffix= \ + --disable-tests \ + --build=$BUILD_ARCH + + make depend + make + #NUMJOBS=${NUMJOBS:-"-s -j6 -l7"} + #make $NUMJOBS || exit 1 + make install DESTDIR=$PKG + cd .. +fi + + +if [ -z "$NOWIN32" ]; then + mkdir wine32 + cd wine32 + + export PKG_CONFIG_PATH="/usr/lib/pkgconfig:$PKG_CONFIG_PATH" + + LDFLAGS="-L/usr/lib -ldl" \ + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ../configure \ + $wine64 \ + --prefix=/usr \ + --libdir=/usr/lib \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --mandir=/usr/man \ + --with-x \ + --with-gnutls \ + --${do_opengl}-opengl \ + --program-prefix= \ + --program-suffix= \ + --disable-tests \ + --build=$BUILD_ARCH + + make depend + make + #NUMJOBS=${NUMJOBS:-"-s -j6 -l7"} + #make $NUMJOBS || exit 1 + make install DESTDIR=$PKG + 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