Fotios Valasiadis 7168d3875e wine: update to 9.0
Changes in this commit besides upgrade to 9.0:

1. The link to the source code temporarily changed since
for release 9.0 they did not follow the 9.x/<release>.tar.gz
convention and instead released it directly under 9.0/.
I expect them to move back to 9.x though sooner or later
when 9.1 is to be released. We can change it back at that time.

2. libwine, previously marked deprecated was removed,
I as a result also remove the respective package.

3. Additional notes include the new WoW64 functionality
which no longer requires a separate wine 32bit install
to run 32bit windows software, it's all to be managed
by the 64bit installation, really cool, but still somewhat
experimental with some drawbacks, not anything extremely
annoying though, can be enabled with a command line flag.
Since musl does not have multilib, enabling it just for it
for now, but keeping glibc the same since it's still experimental.

Also it's now possible to run x86 windows apps on ARM AARCH64!
Once again you need to supply a command line flag to enable it.
Bright future since it now means aarch64 void linux can ship
wine to arm installs too.

Full notes: https://gitlab.winehq.org/wine/wine/-/releases/wine-9.0

Signed-off-by: Fotios Valasiadis <fvalasiad@gmail.com>
2024-01-20 09:57:13 +01:00

168 lines
5.1 KiB
Bash

# Template file for 'wine'
pkgname=wine
version=9.0
revision=1
_pkgver=${version/r/-r}
create_wrksrc=yes
build_wrksrc=wine-${_pkgver}
build_style=gnu-configure
configure_args="--bindir=/usr/libexec/wine $(vopt_with xshm)"
short_desc="Run Microsoft Windows applications"
maintainer="Helmut Pozimski <helmut@pozimski.eu>"
license="LGPL-2.1-or-later"
homepage="http://www.winehq.org/"
distfiles="https://dl.winehq.org/wine/source/${_pkgver}/wine-${_pkgver}.tar.xz
https://github.com/wine-staging/wine-staging/archive/v${_pkgver}.tar.gz"
checksum="7cfd090a5395f5b76d95bb5defac8a312c8de4c070c1163b8b58da38330ca6ee
e3b4af34214a5c962056fc1b360d1f6fc0d33d97cd3ee6d3f9d8758c2cb7f58c"
# NOTE: wine depends on specific versions of wine-mono and wine-gecko,
# check for updates to these packages when updating wine
build_options="mingw staging xshm"
build_options_default="mingw xshm"
desc_option_mingw="Use the MinGW cross compiler to build WinPE DLLs"
desc_option_staging="Apply the wine-staging patchset"
desc_option_xshm="Enable support for the X Shared Memory Extension"
lib32mode=full
archs="i686* x86_64*"
patch_args="-Np1 --directory=${build_wrksrc}"
_nopie=no
if [ "$XBPS_TARGET_MACHINE" = i686-musl ]; then
# build system adds -fno-PIC for 32bit builds, which,
# coupled with our default pie toolchain, leads to textrels
# in the final binary; musl doesn't support those
_nopie=yes
fi
hostmakedepends="pkg-config flex gettext
$(vopt_if mingw "cross-${XBPS_TARGET_MACHINE%-musl}-w64-mingw32")
$(vopt_if staging 'autoconf')"
makedepends="gettext-devel ncurses-devel glu-devel libSM-devel
libXext-devel libX11-devel libXpm-devel libXinerama-devel
libXcomposite-devel libXmu-devel libXxf86vm-devel
libXcursor-devel libXrandr-devel libXdamage-devel libXi-devel
alsa-lib-devel libgphoto2-devel glib-devel
freetype-devel pulseaudio-devel giflib-devel
v4l-utils-devel fontconfig-devel gnutls-devel dbus-devel sane-devel
libpcap-devel cups-devel ocl-icd-devel vulkan-loader gst-plugins-base1-devel
SDL2-devel"
depends="libXi libXinerama libXcomposite libXcursor libOSMesa
desktop-file-utils hicolor-icon-theme liberation-fonts-ttf
gnutls SDL2 wine-common>=${version}_${revision}"
lib32depends="libXi-32bit>=0 libXinerama-32bit>=0 libXcomposite-32bit>=0
libXcursor-32bit>=0 libOSMesa-32bit>=0 desktop-file-utils>=0 hicolor-icon-theme>=0
liberation-fonts-ttf>=0 gnutls-32bit>=0 SDL2-32bit>=0
wine-common>=${version}_${revision}"
replaces="libwine>=0"
# This testsuite might hang indefinitely
make_check=extended
if [ "$XBPS_TARGET_WORDSIZE" != 32 ]; then
configure_args+=" --enable-win64 --libdir=/usr/lib"
_wine_suffix="64"
_wineserver_suffix=${_wine_suffix}
else
_wineserver_suffix="32"
CFLAGS=" -D_LARGE_FILE_SOURCE=1 -D_FILE_OFFSET_BITS=64"
fi
if [ "$XBPS_LIBC" = "glibc" ]; then
hostmakedepends+=" prelink"
fi
if [ "XBPS_TARGET_LIBC" = "musl" ]; then
configure_args+=" --enable-archs=i386,x86_64"
makedepends+=" cross-i686-w64-mingw32"
fi
_wine_libexec="/usr/libexec/wine"
nopie_files="${_wine_libexec}/wine${_wine_suffix}"
if [ "${_nopie}" = yes ]; then
nopie_files+=" ${_wine_libexec}/wineserver${_wineserver_suffix}"
fi
post_patch() {
if [ "${build_option_staging}" ]; then
"../wine-staging-${_pkgver}/staging/patchinstall.py" --all
fi
}
pre_build() {
if [ "${_nopie}" = yes ]; then
make ${makejobs} LDFLAGS="$LDFLAGS -no-pie" \
tools/{widl/widl,winebuild/winebuild,winegcc/winegcc,wrc/wrc} \
loader/wine server/wineserver
fi
}
do_check() {
msg_warn "This testsuite might hang indefinitely\n"
make check
}
post_install() {
# Font aliasing settings for Win32 applications
install -d ${DESTDIR}/etc/fonts/conf.{avail,d}
install -m644 ${FILESDIR}/30-win32-aliases.conf ${DESTDIR}/etc/fonts/conf.avail
ln -s ../conf.avail/30-win32-aliases.conf ${DESTDIR}/etc/fonts/conf.d/30-win32-aliases.conf
mv ${DESTDIR}${_wine_libexec}/wineserver ${DESTDIR}${_wine_libexec}/wineserver${_wineserver_suffix}
vbin ${FILESDIR}/wine
vbin ${FILESDIR}/wineserver
for file in msiexec regedit regsvr32 wineboot winecfg winepath winemine winefile \
winedbg wineconsole notepad msidb widl winebuild winecpp winedump wineg++ \
winegcc winemaker wmc wrc function_grep.pl
do
mv ${DESTDIR}/usr/libexec/wine/${file} ${DESTDIR}/usr/bin/
done
case $XBPS_TARGET_MACHINE in
x86_64*)
ln -s ${_wine_libexec}/wine64 ${DESTDIR}/usr/bin/wine64
;;
esac
# install man page for wine executable
for f in loader/wine*.man; do
vman "$f" "${f//man/1}"
done
}
wine-devel_package() {
short_desc+=" - development files"
replaces="wine-unstable-devel>=0"
pkg_install() {
vmove usr/include
}
}
wine-common_package() {
short_desc+=" - common files"
binfmts="/usr/bin/wine --magic MZ"
pkg_install() {
vmove usr/share
vmove etc/fonts
for file in wine wineserver msiexec regedit regsvr32 wineboot winecfg winepath winemine winefile winedbg wineconsole notepad msidb
do
vmove usr/bin/${file}
done
}
}
wine-tools_package() {
depends="wine-${version}_${revision}"
short_desc+=" - development tools"
if [ "${_nopie}" = yes ]; then
nopie=yes
fi
pkg_install() {
for file in widl winebuild winecpp winedump wineg++ winegcc winemaker wmc wrc function_grep.pl
do
vmove usr/bin/${file}
done
}
}