diff options
author | Dave Woodfall <dave@slackbuilds.org> | 2022-05-29 14:06:28 +0100 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-06-04 10:37:06 +0700 |
commit | 3b616999df46d47e247739bb06e445f22c490914 (patch) | |
tree | 77e0eb407675a4c779256ee8cdb0f9580f3497fa | |
parent | 098d4577ede5e8af5c8cc3423a1823e9057807b0 (diff) |
system/wine: Updated for version 7.0.
Signed-off-by: Dave Woodfall <dave@slackbuilds.org>
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/wine/README | 15 | ||||
-rw-r--r-- | system/wine/wine.SlackBuild | 193 |
2 files changed, 103 insertions, 105 deletions
diff --git a/system/wine/README b/system/wine/README index 9a5b67ce5d00..588294475c9c 100644 --- a/system/wine/README +++ b/system/wine/README @@ -6,17 +6,14 @@ cutting-edge then you may want to check out wine-staging. OPTIONS -With no options this SlackBuild will build a 32 bit package, -for which you need to have either have multilib installed, or -building in a 32 OS, or in a 32 bit chroot. +This SlackBuild will try to autodetect whether to build for 32 or 64 +bits or both. WINE64 and WINE32 can be used to enable/disable each +ARCH: -To enable 64 bit support use: + WINE64=no ./wine.SlackBuild + WINE32=no ./wine.SlackBuild - WIN64=yes ./wine.SlackBuild - -To disable win32 support, use: - - WIN32=no ./wine.SlackBuild +The executable for 64 bit wine is named wine64. To disable OpenGL support, use: diff --git a/system/wine/wine.SlackBuild b/system/wine/wine.SlackBuild index d6d1aca52876..da033dbbb317 100644 --- a/system/wine/wine.SlackBuild +++ b/system/wine/wine.SlackBuild @@ -27,9 +27,22 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=wine VERSION=${VERSION:-7.0} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ -z "$ARCH" ]; then + case "$(uname -m)" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$(uname -m) ;; + esac +fi + # If the variable PRINT_PACKAGE_NAME is set, then this script will report what # the name of the created package would be, and then exit. This information # could be useful to other scripts. @@ -38,31 +51,23 @@ if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then exit 0 fi -TMP=${TMP:-/tmp/SBo} -PKG=$TMP/package-$PRGNAM -OUTPUT=${OUTPUT:-/tmp} -WIN32=${WIN32:-yes} -WIN64=${WIN64:-no} - # If your video card does not support hardware accelerated OpenGL, # then run the script like: OPENGL=NO ./wine.SlackBuild if [ "${OPENGL:-yes}" = "yes" ]; then - do_opengl="with" + do_opengl="with" else - do_opengl="without" + do_opengl="without" fi -if [ -z "$ARCH" ]; then - case "$(uname -m)" in - i?86) ARCH=i586 ;; - arm*) ARCH=arm ;; - *) ARCH=$(uname -m) ;; - esac -fi +WINETMP="$( mktemp -d $TMP/wine-test-XXXXXX )" +echo "int main(void) {; return(0); }" > "$WINETMP/test.c" +gcc -m32 "$WINETMP/test.c" -o /dev/null >/dev/null 2>&1 && WINE32=${WINE32:-yes} +gcc -m64 "$WINETMP/test.c" -o /dev/null >/dev/null 2>&1 && WINE64=${WINE64:-yes} +rm -rf "$WINETMP" -if [ "$WIN32" = "no" ] && [ "$WIN64" = "no" ]; then - echo "Both 64 and 32 bit builds disabled. Nothing to do." - exit 1 +if [ "${WINE32:-no}${WINE64:-no}" = "nono" ]; then + echo "Both 64 and 32 bit builds disabled. Nothing to do." + exit 1 fi # These should work for anything not specified below @@ -70,20 +75,20 @@ 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) - SLKCFLAGS="-O2 -fPIC" - LIBDIRSUFFIX="64" - ;; + 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) + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" + ;; esac set -e @@ -96,82 +101,78 @@ tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ - \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ - -o -perm 511 \) -exec chmod 755 {} \; -o \ - \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ - -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; # Fix for flex patch -p1 --verbose < $CWD/0001-winhlp32-Workaround-a-bug-in-Flex.patch -if [ "$WIN64" = "yes" ]; then - wine64="--with-wine64=../wine64" - mkdir wine64 - cd wine64 - - LDFLAGS="-L/usr/lib64 -ldl" \ - CFLAGS="$SLKCFLAGS" \ - CXXFLAGS="$SLKCFLAGS" \ - ../configure \ - --prefix=/usr \ - --libdir=/usr/lib64 \ - --localstatedir=/var \ - --sysconfdir=/etc \ - --mandir=/usr/man \ - --enable-win64 \ - --with-x \ - --with-gnutls \ - --${do_opengl}-opengl \ - --program-prefix= \ - --program-suffix= \ - --disable-tests \ - --build=$BUILD_ARCH - - make depend - make - make install DESTDIR=$PKG - cd .. +if [ "${WINE64:-no}" = "yes" ]; then + wine64="--with-wine64=../wine64" + mkdir wine64 + cd wine64 + + LDFLAGS="-L/usr/lib64 -ldl" \ + CFLAGS="$SLKCFLAGS" \ + CXXFLAGS="$SLKCFLAGS" \ + ../configure \ + --prefix=/usr \ + --libdir=/usr/lib64 \ + --localstatedir=/var \ + --sysconfdir=/etc \ + --mandir=/usr/man \ + --enable-win64 \ + --with-x \ + --with-gnutls \ + --${do_opengl}-opengl \ + --program-prefix= \ + --program-suffix= \ + --disable-tests \ + --build=$BUILD_ARCH + + make depend + make + make install DESTDIR=$PKG + cd .. fi - -if [ "$WIN32" = "yes" ]; 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 - make install DESTDIR=$PKG - cd .. +if [ "${WINE32:-no}" = "yes" ]; 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=testpre32 \ + --program-suffix=testsuf32 \ + --disable-tests \ + --build=$BUILD_ARCH + + make depend + make + 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 + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true find $PKG/usr/man -type f -exec gzip -9 {} \; for i in $( find $PKG/usr/man -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done -VERSION=$( printf %s $VERSION | tr - _ ) - mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cp -a ANNOUNCE AUTHORS COPYING.LIB LICENSE* README VERSION \ $PKG/usr/doc/$PRGNAM-$VERSION |