Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 08 Mar 2026 08:36:12 +0000
From:      Gerald Pfeifer <gerald@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: 942473af4d96 - main - emulators/wine: Add --old option to pkg32.sh for FreeBSD 15
Message-ID:  <69ad34fc.2790a.40d591bd@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by gerald:

URL: https://cgit.FreeBSD.org/ports/commit/?id=942473af4d96831fca7a793b54afad9f4f3aaa36

commit 942473af4d96831fca7a793b54afad9f4f3aaa36
Author:     Gerald Pfeifer <gerald@FreeBSD.org>
AuthorDate: 2026-03-08 08:32:56 +0000
Commit:     Gerald Pfeifer <gerald@FreeBSD.org>
CommitDate: 2026-03-08 08:32:56 +0000

    emulators/wine: Add --old option to pkg32.sh for FreeBSD 15
    
    WoW on FreeBSD is a hack, alas the best option we've got right now.
    With FreeBSD 15 dropping 32-bit packages, allow for those from
    FreeBSD 14 to be used.
    
    PR:             293073, 291328
    Suggested by:   Alexander Vereeken <Alexander88207@protonmail.com>
---
 emulators/wine/Makefile            |  2 +-
 emulators/wine/files/pkg32.sh      | 27 ++++++++++++++++++++++++---
 emulators/wine/files/wine-wow64.sh |  8 +++++++-
 3 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/emulators/wine/Makefile b/emulators/wine/Makefile
index 9a06507e3b38..e5e76f39782b 100644
--- a/emulators/wine/Makefile
+++ b/emulators/wine/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	wine
 DISTVERSION=	11.0
-PORTREVISION=	1
+PORTREVISION=	2
 PORTEPOCH=	1
 CATEGORIES=	emulators
 MASTER_SITES=	https://dl.winehq.org/wine/source/11.0/
diff --git a/emulators/wine/files/pkg32.sh b/emulators/wine/files/pkg32.sh
index 04595f6c104c..41fed66b1045 100644
--- a/emulators/wine/files/pkg32.sh
+++ b/emulators/wine/files/pkg32.sh
@@ -18,6 +18,27 @@ if [ ! -d "$I386_ROOT/usr/share/keys/pkg" ]; then
   ln -s /usr/share/keys/pkg "$I386_ROOT/usr/share/keys/pkg"
 fi
 
-# Show what we're going to do, then do it.
-echo pkg -o ABI_FILE=$ABI_FILE -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@"
-exec pkg -o ABI_FILE=$ABI_FILE -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@"
+run_pkg32()
+{
+    # Show what we're going to do, then do it.
+    echo pkg -o ABI_FILE=$ABI_FILE -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
+    pkg -o ABI_FILE=$ABI_FILE -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
+}
+
+run_pkg32_old()
+{
+    shift
+
+    # Show what we're going to do, then do it.
+    echo pkg -o ABI="FreeBSD:14:i386" -o OSVERSION=1403000 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
+    pkg -o ABI="FreeBSD:14:i386" -o OSVERSION=1403000 -o INSTALL_AS_USER=true -o RUN_SCRIPTS=false --rootdir "$I386_ROOT" "$@";
+}
+
+if [ $# -gt 0 ]; then
+    case $1 in
+    --old) run_pkg32_old "$@" ;;
+    *) run_pkg32 "$@" ;;
+    esac
+else
+    run_pkg32 "$@"
+fi
diff --git a/emulators/wine/files/wine-wow64.sh b/emulators/wine/files/wine-wow64.sh
index 9d3b99d8c6b2..2e0c9e1d1f4c 100644
--- a/emulators/wine/files/wine-wow64.sh
+++ b/emulators/wine/files/wine-wow64.sh
@@ -9,7 +9,12 @@ I386_ROOT="${WINE_i386_ROOT:-$HOME/.i386-wine-pkg}"
 if [ ! -f "$I386_ROOT/$PREFIX/bin/wine" ]
 then
   printf "%s doesn't exist!\n\n" "$I386_ROOT/$PREFIX/bin/wine"
-  printf "Try installing 32-bit Wine with\n\t%s\n" "$PREFIX/share/wine/pkg32.sh install wine mesa-dri"
+  printf "Try installing 32-bit Wine with\n\t%s\n\n" "$PREFIX/share/wine/pkg32.sh install wine mesa-dri"
+
+  printf "On FreeBSD 15, use wine64.bin if 32-bit support is not needed.\n"
+  printf "If 32-bit is needed, either use the repository from FreeBSD 14 with this command:\n\t%s\n" "$PREFIX/share/wine/pkg32.sh --old install -r FreeBSD-ports wine mesa-dri"
+  printf "or use Poudriere to build your own packages.\n"
+
   ABI=$(pkg config ABI | sed s/amd64/i386/)
   FREEBSD_VERSION_MAJOR=`uname -r | sed "s/\..*//"`
   cat <<- HERE
@@ -32,6 +37,7 @@ if [ "$WINE32_VERSION" != "$WINE64_VERSION" ]
 then
   printf "wine [%s] and wine64 [%s] versions do not match!\n\n" "$WINE32_VERSION" "$WINE64_VERSION"
   printf "Try updating 32-bit wine with\n\t%s\n" "$PREFIX/share/wine/pkg32.sh upgrade"
+  printf "If you are on FreeBSD 15, you can use the old repository\n\t%s\n" "$PREFIX/share/wine/pkg32.sh --old upgrade -r FreeBSD-ports"
   exit 1
 fi
 


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69ad34fc.2790a.40d591bd>