aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Pfeifer <gerald@FreeBSD.org>2026-03-08 08:32:56 +0000
committerGerald Pfeifer <gerald@FreeBSD.org>2026-03-08 08:32:56 +0000
commit942473af4d96831fca7a793b54afad9f4f3aaa36 (patch)
tree6d3357ebf556e1b5725d4b1cc6f688ed3fc98f4e
parentb7bb9edee49b0ae8fc1202e4baed638b32087093 (diff)
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>
-rw-r--r--emulators/wine/Makefile2
-rw-r--r--emulators/wine/files/pkg32.sh27
-rw-r--r--emulators/wine/files/wine-wow64.sh8
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