From d11d4e7a2cf547294e8c6eaeae9b8b7662c18dda Mon Sep 17 00:00:00 2001 From: Steven Voges Date: Sun, 14 Apr 2024 10:58:14 +0700 Subject: system/wine: re-added legacy multilib support. Signed-off-by: Willy Sudiarto Raharjo --- system/wine/README.MULTILIB | 31 +++++++++++++++++++++++++++++++ system/wine/wine.SlackBuild | 25 +++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 system/wine/README.MULTILIB (limited to 'system') diff --git a/system/wine/README.MULTILIB b/system/wine/README.MULTILIB new file mode 100644 index 0000000000..d14bd8b2ad --- /dev/null +++ b/system/wine/README.MULTILIB @@ -0,0 +1,31 @@ +The legacy method to build 32 bit wine on x86_64 will will require +a multilib installation. + +Please read up alienBOB's multilib readme and repo: + +https://docs.slackware.com/slackware:multilib +http://www.slackware.com/~alien/multilib/ + +A script that rsyncs with alienBOB's repo and installs the multilib +packages which can be found here: + +https://slackware.uk/~dive/scripts/alien-multilib-rsync.sh + +Be sure to read the short instructions at the top. If you use slackpkg +then you will also want to blacklist his packages in +/etc/slackpkg/blacklist: + +[0-9]+alien +[0-9]+compat32 + +If you have a combined 32 and 64 bit package you need to set the +environmental variable WINEPREFIX to point to the 64 bit wine directory +when running wine64, which should be different to the 32 bit directory +(~/.wine by default). + +Example: + +WINEPREFIX=~/.wine64 wine64 notepad + +To build wine using the legacy method, pass MULTILIB=yes to the build +script. diff --git a/system/wine/wine.SlackBuild b/system/wine/wine.SlackBuild index 8f2a826fc0..7cc898ef39 100644 --- a/system/wine/wine.SlackBuild +++ b/system/wine/wine.SlackBuild @@ -28,7 +28,8 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=wine VERSION=${VERSION:-9.0} -BUILD=${BUILD:-2} +ARCHS="i386,x86_64" +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -78,6 +79,26 @@ case "$ARCH" in ;; esac +MULTILIB=${MULTILIB@L} +if [[ "$ARCH" != "x86_64" && "$MULTILIB" = "yes" ]]; then + echo "Cannot build for multilib on non-64bit systems." + exit 1 +elif [[ "$ARCH" = "x86_64" && "$MULTILIB" = "yes" ]]; then + 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 && WINE32TEST=${WINE32TEST:-yes} + rm -rf "$WINETMP" + if [[ $WINE32TEST = "yes" ]]; then + ARCHS="x86_64" + WINE32="yes" + else + echo "MULTILIB was requested, however the multilib test has failed." + echo "Have the compat32 libraries been installed?" + echo "Please see README.MULTILIB" + exit 1 + fi +fi + set -e rm -rf $PKG @@ -115,7 +136,7 @@ if [ "$WINE64" = "yes" ]; then --sysconfdir=/etc \ --mandir=/usr/man \ --enable-win64 \ - --enable-archs="i386,x86_64" \ + --enable-archs=$ARCHS \ --with-x \ --with-gnutls \ --${do_opengl}-opengl \ -- cgit v1.2.3