Skip to content

Commit

Permalink
emulators/wine-devel: Update to Wine 6.20
Browse files Browse the repository at this point in the history
This includes the following changes:
 - MSXml, XAudio, DInput and a few other modules converted to PE.
 - A few system libraries are bundled with the source to support PE builds.
 - HID joystick is now the only supported joystick backend in DirectInput.
 - Better support for MSVCRT builds in Winelib.
 - Various bug fixes.

Also, using our patches within this Port (for now):
 - procfs no longer needs to be mounted on /proc, we use sysctl() instead.
 - The Staging patchset will apply even if $PORTSDIR is a Git repository.

The latter requires lang/gawk as an additional EXTRACT_DEPENDS.

(The now bundled system libraries will trigger some follow-up changes,
but for now we're okay.)

Approved by:	maintainer (= author)
  • Loading branch information
DamjanJovanovic authored and Gerald Pfeifer committed Nov 1, 2021
1 parent e6a5c3b commit e041ced
Show file tree
Hide file tree
Showing 6 changed files with 420 additions and 11 deletions.
7 changes: 4 additions & 3 deletions emulators/wine-devel/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# Created by: Gerald Pfeifer <gerald@FreeBSD.org>

PORTNAME= wine
DISTVERSION= 6.19
PORTREVISION= 3
DISTVERSION= 6.20
PORTEPOCH= 1
CATEGORIES= emulators
MASTER_SITES= SF/${PORTNAME}/Source \
Expand Down Expand Up @@ -109,7 +108,8 @@ STAGING_DIST= v${DISTVERSION}.tar.gz
STAGING_DISTFILES= ${STAGING_DIST}:staging
STAGING_EXTRACT_DEPENDS= bash:shells/bash \
git:devel/git \
autoconf>0:devel/autoconf
autoconf>0:devel/autoconf \
gawk:lang/gawk
STAGING_LIB_DEPENDS= libtxc_dxtn.so:graphics/s2tc

V4L_CONFIGURE_WITH= v4l2
Expand Down Expand Up @@ -160,6 +160,7 @@ PLIST_SUB+= WINE32="" WINE64="@comment " WINEARCH="i386"

post-extract-STAGING-on: fix-shebang
cd ${WRKSRC} && ${TAR} xf ${DISTDIR}/${STAGING_DIST} --strip-components 1
cd ${WRKSRC} && ${PATCH} -p0 < ${PATCHDIR}/extra-gitapply
cd ${WRKSRC} && bash ./patches/patchinstall.sh --backend=patch DESTDIR=${WRKSRC} --all

pre-build:
Expand Down
10 changes: 5 additions & 5 deletions emulators/wine-devel/distinfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
TIMESTAMP = 1633927265
SHA256 (wine-6.19.tar.xz) = 4182e2d9627704cc376f46fc3109580ea9077796f44f5ee83e08e3e96bf0ab66
SIZE (wine-6.19.tar.xz) = 24894356
SHA256 (v6.19.tar.gz) = 47158842c938f68d9097965135321892515bb7f133c88be469c91f845f942ac3
SIZE (v6.19.tar.gz) = 9690585
TIMESTAMP = 1634993849
SHA256 (wine-6.20.tar.xz) = 4028237e9c7bfdd56d7604af19783ff812f645f29c27de742a688e4535528471
SIZE (wine-6.20.tar.xz) = 26921644
SHA256 (v6.20.tar.gz) = 360fd304a0f4c12e3aa149dde0bc3ac7a2c8787740e1f228bd13158f855166ea
SIZE (v6.20.tar.gz) = 9643278
66 changes: 66 additions & 0 deletions emulators/wine-devel/files/extra-gitapply
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
--- patches/gitapply.sh 2021-10-23 11:20:53.385792000 +0200
+++ patches/gitapply.sh 2021-10-23 11:21:40.952836000 +0200
@@ -22,6 +22,13 @@
nogit=0
tmpfile=""

+patch="patch"
+sha1sum="sha1sum"
+if [ `uname -s` = "FreeBSD" ]; then
+ patch="gpatch"
+ sha1sum="sha1"
+fi
+
# Show usage information about gitapply script
usage()
{
@@ -57,7 +64,7 @@
gitsha1()
{
if [ -f "$1" ]; then
- echo -en "blob $(du -b "$1" | cut -f1)\x00" | cat - "$1" | sha1sum | cut -d' ' -f1
+ echo -en "blob $(wc -c < "$1" | xargs | cut -d' ' -f1)\x00" | cat - "$1" | $sha1sum | cut -d' ' -f1
else
echo "0000000000000000000000000000000000000000"
fi
@@ -66,7 +73,7 @@
# Determine size of a file (or zero, if it doesn't exist)
filesize()
{
- local size=$(du -b "$1" | cut -f1)
+ local size=$(wc -c < "$1" | xargs | cut -d' ' -f1)
if [ -z "$size" ]; then
size="0"
fi
@@ -114,13 +121,6 @@
exit 1
fi

-# Detect BSD - we check this first to error out as early as possible
-if gzip -V 2>&1 | grep -q "BSD"; then
- echo "This script is not compatible with *BSD utilities. Please install git," >&2
- echo "which provides the same functionality and will be used instead." >&2
- exit 1
-fi
-
# Check if GNU Awk is available
if ! command -v gawk >/dev/null 2>&1; then
if ! awk -V 2>/dev/null | grep -q "GNU Awk"; then
@@ -135,7 +135,7 @@
fi

# Check for missing depdencies
-for dependency in gawk cut dd du grep gzip hexdump patch sha1sum; do
+for dependency in gawk cut dd grep gzip hexdump $patch $sha1sum; do
if ! command -v "$dependency" >/dev/null 2>&1; then
echo "Missing dependency: $dependency - please install this program and try again." >&2
exit 1
@@ -358,7 +358,7 @@

# Apply textual patch
tmpoffset=$((lastoffset - 1))
- if ! sed -n "$offset,$tmpoffset p" "$tmpfile" | patch -p1 -s -f; then
+ if ! sed -n "$offset,$tmpoffset p" "$tmpfile" | $patch -p1 -s -f; then
abort "Textual patch did not apply, aborting."
fi

36 changes: 36 additions & 0 deletions emulators/wine-devel/files/patch-dlls-winebus-6.20
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
commit 57db53024a79aa5ce3c691d94b5f167a34ef0530
Author: Damjan Jovanovic <damjan.jov@gmail.com>
Date: Sat Oct 23 10:54:48 2021 +0200

winebus.sys: get inotify working on FreeBSD

FreeBSD requires linking to the inotify library, and
including limits.h.

Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>

diff --git dlls/winebus.sys/Makefile.in dlls/winebus.sys/Makefile.in
index 6fc6fc5a632..d9ea33d267d 100644
--- dlls/winebus.sys/Makefile.in
+++ dlls/winebus.sys/Makefile.in
@@ -1,7 +1,7 @@
MODULE = winebus.sys
UNIXLIB = winebus.so
IMPORTS = ntoskrnl hidparse
-EXTRALIBS = $(IOKIT_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS)
+EXTRALIBS = $(IOKIT_LIBS) $(UDEV_LIBS) $(PTHREAD_LIBS) $(INOTIFY_LIBS)
EXTRAINCL = $(UDEV_CFLAGS) $(SDL2_CFLAGS)

EXTRADLLFLAGS = -Wl,--subsystem,native
diff --git dlls/winebus.sys/bus_udev.c dlls/winebus.sys/bus_udev.c
index 8889b6a3e1f..4c00fe6ad39 100644
--- dlls/winebus.sys/bus_udev.c
+++ dlls/winebus.sys/bus_udev.c
@@ -52,6 +52,7 @@
#ifdef HAVE_SYS_INOTIFY_H
# include <sys/inotify.h>
#endif
+#include <limits.h>

#ifdef HAVE_LINUX_INPUT_H
# include <linux/input.h>
Loading

0 comments on commit e041ced

Please sign in to comment.