Skip to content

Commit

Permalink
emulators/wine: Update to Wine 8.0.2
Browse files Browse the repository at this point in the history
Move from the Wine 7.0 to the Wine 8.0 release series, specifically
8.0.2 as the second minor release with additional bug fixes.

This represents a year of upstream development effort and over 8,600
individual changes. The main achievement is the completion of the
conversion to PE format:

 - All modules can be built in PE format. This is an important milestone
   on the road to supporting various features such as copy protection,
   32-bit applications on 64-bit hosts, Windows debuggers, x86
   applications on ARM, etc.
 - A special syscall dispatcher is used for PE -> Unix transitions to
   avoid the overhead of a full NT system call. This minimizes the
   performance impact of the new architecture.

Also WoW64 has seen significant work:

 - WoW64 thunks are implemented for essentially all Unix libraries,
   enabling a 32-bit PE module to call a 64-bit Unix library. Once
   the remaining direct PE/Unix calls have been removed, this allows
   running 32-bit Windows applications without any 32-bit Unix library.
 - When the 32-bit Wine loader isn't found, 32-bit applications are
   started in the new experimental "Windows-like" WoW64 mode (where
   32-bit code runs inside a 64-bit host process). This mode can be
   enabled by building with the '--enable-archs' configure option.
   This is still under development and not yet recommended for general
   use. Applications started in this mode print the warning "starting
   in experimental wow64 mode".

That said, i386 builds on FreeBSD are currently broken, hence our
flavor of WoW64 is not available for the time being.

Other areas of major changes include:

 - The "Light" theme is enabled in the default configuration, which
   provides a more modern look.
 - Graphics drivers, effects and other improvements in Direct2D,
   many optimizations and features around Direct3D.
 - MPEG-1 audio decoder filter for layers 1, 2, and 3.
 - Media Foundation, controller hotplug support, force feedback effect
   support, and further improvements for input devices.
 - Many changes around Unicode support.
 - The ApiSetSchema database is implemented, replacing all the api-ms-*
   forwarding modules. This reduces disk and address space usage (and
   our packaging list).
 - DOS file attributes are persistent, and stored on disk using the
   filesystem's extended attributes, in a format compatible with Samba.
 - JScript related improvements.
 - Various improvements to builtin applications, development tools,
   and the build system.

The bundled Faudio, LCMS2, libjpeg, libmpg123, libpng, libtiff,
libxml2, libxslt, and zlib libraries have been updated. The vkd3d
and LDAP libraries are now bundled in the source tree.  The OpenAL
library is no longer used.

LLVM is now a heavy build dependency in addition to GCC.

Some whitespace changes in the Makefile to sync up with wine-devel
which diverged via some extra such changes. And loads, loads of
packaging list changes.

Extensive release notes are at https://www.winehq.org/announce/8.0 .

PR:		272710
  • Loading branch information
Gerald Pfeifer authored and Gerald Pfeifer committed Sep 4, 2023
1 parent 10ef92d commit bc9917d
Show file tree
Hide file tree
Showing 4 changed files with 367 additions and 1,357 deletions.
55 changes: 29 additions & 26 deletions emulators/wine/Makefile
@@ -1,9 +1,8 @@
PORTNAME= wine
DISTVERSION= 7.0.2
PORTREVISION= 6
DISTVERSION= 8.0.2
PORTEPOCH= 1
CATEGORIES= emulators
MASTER_SITES= https://dl.winehq.org/wine/source/7.0/
MASTER_SITES= https://dl.winehq.org/wine/source/8.0/

MAINTAINER= gerald@FreeBSD.org
COMMENT= Microsoft Windows compatibility environment
Expand All @@ -14,8 +13,9 @@ LICENSE_COMB= dual
LICENSE_FILE= ${WRKSRC}/LICENSE

ONLY_FOR_ARCHS= amd64 i386
BROKEN_i386= fails to build: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271201\#c6

BUILD_DEPENDS= ${LOCALBASE}/bin/flex:textproc/flex
BUILD_DEPENDS= ${LOCALBASE}/bin/flex:textproc/flex llvm${_LLVM_VERSION}>=0:devel/llvm${_LLVM_VERSION}

USES= bison cpe desktop-file-utils gmake localbase \
pkgconfig sdl shebangfix tar:xz
Expand All @@ -39,7 +39,7 @@ CONFIGURE_ARGS+=--verbose \
--without-gstreamer \
--without-inotify \
--without-krb5 \
--without-mingw \
--with-mingw CROSSCC="clang" CROSSCFLAGS="-isystem ${FILESDIR}/clang" \
--without-netapi \
--without-opencl \
--without-osmesa \
Expand All @@ -59,12 +59,15 @@ USE_LDCONFIG= ${WINELIBDIR} ${WINELIBDIR}/wine
SHEBANG_FILES= tools/make_requests tools/winemaker/winemaker \
tools/winedump/function_grep.pl

BINARY_ALIAS+= clang=${LOCALBASE}/bin/clang${_LLVM_VERSION} \
lld-link=${LOCALBASE}/bin/lld-link${_LLVM_VERSION}

SUB_FILES= pkg-message

PORTDATA= wine.inf

OPTIONS_DEFINE= CUPS DOCS DOSBOX GNUTLS LDAP OPENAL V4L WINEMAKER X11 GECKO MONO
OPTIONS_DEFAULT=ALSA GNUTLS OPENAL X11
OPTIONS_DEFINE= CUPS DOCS DOSBOX GNUTLS V4L WINEMAKER X11 GECKO MONO
OPTIONS_DEFAULT=ALSA GNUTLS X11
OPTIONS_RADIO= AUDIO
OPTIONS_RADIO_AUDIO= ALSA OSS
OPTIONS_SUB= yes
Expand All @@ -74,7 +77,7 @@ WINEMAKER_DESC= Fully support winemaker (requires Perl)
GECKO_DESC= Bundle Gecko MSI package for Wine
MONO_DESC= Bundle Mono MSI package for Wine

PORTSCOUT= limit:^7\.0
PORTSCOUT= limit:^8\.0

ALSA_CONFIGURE_ON= --with-alsa --without-oss
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
Expand All @@ -90,14 +93,8 @@ GECKO_RUN_DEPENDS= wine-gecko>0:emulators/wine-gecko
GNUTLS_CONFIGURE_WITH= gnutls
GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls

LDAP_CONFIGURE_WITH= ldap
LDAP_USES= ldap

MONO_RUN_DEPENDS= wine-mono>0:emulators/wine-mono

OPENAL_CONFIGURE_WITH= openal
OPENAL_USES= openal

OSS_CONFIGURE_ON= --without-alsa --with-oss

V4L_CONFIGURE_WITH= v4l2
Expand All @@ -106,16 +103,21 @@ V4L_LIB_DEPENDS= libv4l2.so:multimedia/libv4l

WINEMAKER_RUN_DEPENDS= p5-XML-LibXML>0:textproc/p5-XML-LibXML

X11_CONFIGURE_WITH= x fontconfig freetype opengl vkd3d xinerama xinput2 xrandr xrender
X11_CONFIGURE_WITH= x fontconfig freetype opengl xinerama xinput2 xrandr xrender
X11_USES= gl xorg
X11_USE= GL=glu XORG=x11,xext,xcomposite,xcursor,xi,xinerama,xrandr,xrender
X11_LIB_DEPENDS= libfontconfig.so:x11-fonts/fontconfig \
libfreetype.so:print/freetype2 \
libvulkan.so:graphics/vulkan-loader \
libvkd3d.so:graphics/vkd3d
libvulkan.so:graphics/vulkan-loader

.include <bsd.port.pre.mk>

.if (${LLVM_DEFAULT} == 10 || ${LLVM_DEFAULT} == 11)
_LLVM_VERSION= 12
.else
_LLVM_VERSION= ${LLVM_DEFAULT}
.endif

.if ${ARCH} == amd64
# Wine is composed of three parts:
# - wine (aka this port on FreeBSD/i386) is the 32-bit component
Expand Down Expand Up @@ -143,17 +145,18 @@ pre-build:

post-install:
.if ${ARCH} == i386
${MV} ${STAGEDIR}${PREFIX}/bin/wineserver ${STAGEDIR}${PREFIX}/bin/wineserver32
${MV} ${STAGEDIR}${PREFIX}/bin/wine ${STAGEDIR}${PREFIX}/bin/wine.bin
-${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/bin/wine.bin
${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/bin/wine
${MV} ${STAGEDIR}${PREFIX}/bin/wineserver ${STAGEDIR}${PREFIX}/bin/wineserver32
${MV} ${STAGEDIR}${PREFIX}/bin/wine ${STAGEDIR}${PREFIX}/bin/wine.bin
-${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/bin/wine.bin
${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/bin/wine
.else
${MV} ${STAGEDIR}${PREFIX}/bin/wine64 ${STAGEDIR}${PREFIX}/bin/wine64.bin
-${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/bin/wine64.bin
${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/bin/wine64
${INSTALL_SCRIPT} ${FILESDIR}/wine-wow64.sh ${STAGEDIR}${PREFIX}/bin/wine
${INSTALL_SCRIPT} ${FILESDIR}/pkg32.sh ${STAGEDIR}${DATADIR}/pkg32.sh
${MV} ${STAGEDIR}${PREFIX}/bin/wine64 ${STAGEDIR}${PREFIX}/bin/wine64.bin
-${ELFCTL} -e +noaslr ${STAGEDIR}${PREFIX}/bin/wine64.bin
${INSTALL_SCRIPT} ${FILESDIR}/wine.sh ${STAGEDIR}${PREFIX}/bin/wine64
${INSTALL_SCRIPT} ${FILESDIR}/wine-wow64.sh ${STAGEDIR}${PREFIX}/bin/wine
${INSTALL_SCRIPT} ${FILESDIR}/pkg32.sh ${STAGEDIR}${DATADIR}/pkg32.sh
.endif

@${MKDIR} ${STAGEDIR}${DOCSDIR}
.for i in README ANNOUNCE AUTHORS
${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR}
Expand Down
6 changes: 3 additions & 3 deletions emulators/wine/distinfo
@@ -1,3 +1,3 @@
TIMESTAMP = 1679956898
SHA256 (wine-7.0.2.tar.xz) = e874b4a9c036f2f66b2f2c79012c7f1236afffe840aa0e7c002e7725e75961b9
SIZE (wine-7.0.2.tar.xz) = 27179980
TIMESTAMP = 1691940152
SHA256 (wine-8.0.2.tar.xz) = 6ec8fb6f2c72d576cb11f52b2f8d59af64404802154651d122b98466d91dc847
SIZE (wine-8.0.2.tar.xz) = 29060452
12 changes: 12 additions & 0 deletions emulators/wine/files/patch-configure
@@ -0,0 +1,12 @@
--- UTC
--- configure.orig 2023-02-02 21:17:09.000000000 +0000
+++ configure 2023-05-01 21:19:03.739461000 +0000
@@ -10696,7 +10696,7 @@
fi
llvm_extra_cflags="-target $llvm_target -fuse-ld=lld"
case $llvm_target in
- *windows) llvm_cflags="-Wl,-subsystem:console -Wl,-WX" ;;
+ *windows) llvm_cflags="-Wl,-subsystem:console" ;;
esac
{ as_ac_var=`printf "%s\n" "ac_cv_${wine_arch}_cflags_$llvm_extra_cflags $llvm_cflags" | $as_tr_sh`
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $llvm_extra_cflags $llvm_cflags" >&5

0 comments on commit bc9917d

Please sign in to comment.