summaryrefslogtreecommitdiff
path: root/user/wine
diff options
context:
space:
mode:
Diffstat (limited to 'user/wine')
-rw-r--r--user/wine/APKBUILD101
-rw-r--r--user/wine/headers.patch24
-rw-r--r--user/wine/no-pie.patch11
-rw-r--r--user/wine/printer.patch13
-rw-r--r--user/wine/rpath.patch11
-rw-r--r--user/wine/winhlp32-flex.patch9
6 files changed, 82 insertions, 87 deletions
diff --git a/user/wine/APKBUILD b/user/wine/APKBUILD
index ea9384603..ee5f01e7f 100644
--- a/user/wine/APKBUILD
+++ b/user/wine/APKBUILD
@@ -4,41 +4,44 @@
# Contributor: Martell Malone <martell@marinelayer.io>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=wine
-pkgver=4.0.1
+pkgver=8.1
pkgrel=0
-pkgdesc="A compatibility layer for running Windows programs"
-url="http://www.winehq.com"
+pkgdesc="Compatibility layer for running Windows programs"
+url="https://www.winehq.org/"
arch="pmmx x86 x86_64"
-license="LGPL-2.0|"
-# As of 2.0.3 most of the tests fails
+license="LGPL-2.0+"
options="!check"
-subpackages="$pkgname-libs $pkgname-dev $pkgname-doc"
+case $CARCH in
+pmmx|x86) options="$options textrels"
+esac
+depends=""
depends_dev="$pkgname perl"
-makedepends="fontconfig-dev openldap-dev libxslt-dev libxxf86dga-dev
- libxcursor-dev libxrandr-dev libxdamage-dev mesa-dev flex-dev bison
- libpng-dev libjpeg-turbo-dev freetype-dev ncurses-dev libressl-dev
- libxcomposite-dev libxrender-dev libxinerama-dev zlib-dev
- cups-dev alsa-lib-dev libxml2-dev dbus-dev libxi-dev
- gnutls-dev tiff-dev v4l-utils-dev udisks2-dev autoconf automake
- openal-soft-dev pulseaudio-dev sane-dev eudev-dev mpg123-dev
- "
-source="http://dl.winehq.org/$pkgname/source/${pkgver%.[1-9]}/$pkgname-$pkgver.tar.xz
- no-pie.patch
- winhlp32-flex.patch
+makedepends="fontconfig-dev freetype-dev ncurses-dev openldap-dev openssl-dev
+ libxcomposite-dev libxcursor-dev libxext-dev libxfixes-dev libxi-dev
+ libxinerama-dev libxrandr-dev libxrender-dev libxxf86dga-dev mesa-dev
+ alsa-lib-dev cups-dev dbus-dev eudev-dev gnutls-dev openal-soft-dev
+ pulseaudio-dev sane-dev udisks2-dev unixodbc-dev v4l-utils-dev
+ gstreamer-dev krb5-dev libgphoto2-dev libusb-dev bison flex
+ autoconf automake libtool gst-plugins-base-dev"
+subpackages="$pkgname-dev $pkgname-doc"
+case "${pkgver}" in
+ *.0*) _pkgver=${pkgver%%.*}.0; ;;
+ *) _pkgver=${pkgver%%.*}.x; ;;
+esac
+source="https://dl.winehq.org/$pkgname/source/${_pkgver}/$pkgname-$pkgver.tar.xz
+ headers.patch
+ printer.patch
+ rpath.patch
"
prepare() {
- cd "$builddir"
-
default_prepare
aclocal && autoheader && autoreconf
}
build() {
- cd "$builddir"
-
case "$CARCH" in
- x86_64) _win64=--enable-win64;;
+ x86_64) _win64=--enable-win64; _ldrsuffix=64;;
esac
./configure \
--build=$CBUILD \
@@ -48,88 +51,52 @@ build() {
--sysconfdir=/etc \
--localstatedir=/var \
--with-cups \
- --with-curses \
--with-dbus \
--with-fontconfig \
--with-freetype \
- --with-jpeg \
- --with-mpg123 \
--with-openal \
--with-opengl \
- --with-png \
--with-pulse \
--with-sane \
--with-udev \
- --with-va \
--with-x \
--with-xcomposite \
--with-xinerama \
- --with-xslt \
$_win64
+ make LDFLAGS="$LDFLAGS -no-pie" \
+ tools/widl/widl tools/winebuild/winebuild tools/winegcc/winegcc tools/wrc/wrc \
+ loader/wine${_ldrsuffix} loader/wine${_ldrsuffix}-preloader server/wineserver
make
}
check() {
- cd "$builddir"
make test
}
package() {
- local file
- cd "$builddir"
make -j1 DESTDIR="$pkgdir" install
- case "$CARCH" in
- x86_64) _wine="wine64";;
- *) _wine="wine";;
- esac
-
install -Dm755 tools/wineapploader \
"$pkgdir"/usr/bin/wineapploader
for file in msiexec notepad regedit regsvr32 wineboot \
- winecfg wineconsole winefile winemine winepath
- do
+ winecfg wineconsole winefile winemine winepath; do
rm "$pkgdir"/usr/bin/$file
ln -sf /usr/bin/wineapploader "$pkgdir"/usr/bin/$file
done
}
dev() {
- local file
default_dev
install -d "$subpkgdir"/usr/bin
for file in widl wmc wrc winebuild winedump function_grep.pl \
- winedbg winemaker winegcc winecpp wineg++
- do
+ winedbg winemaker winegcc winecpp wineg++; do
mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin/
done
-
- install -d "$subpkgdir"/usr/lib/wine
- mv "$pkgdir"/usr/lib/wine/*.def "$subpkgdir"/usr/lib/wine/
-}
-
-doc() {
- default_doc
- rm -fr "$subpkgdir"/usr/share/man/*.UTF-8
-}
-
-libs() {
- local file ext
- default_libs
-
- install -d "$subpkgdir"/usr/lib/wine/fakedlls
- for ext in dll16 drv16 exe16 acm dll drv ds ocx sys tlb vxd; do
- for file in $(find "$pkgdir/usr/lib/wine/fakedlls" -name "*.$ext"); do
- mv "$pkgdir"/usr/lib/wine/fakedlls/${file##*/} \
- "$subpkgdir"/usr/lib/wine/fakedlls/
- mv "$pkgdir"/usr/lib/wine/${file##*/}.so \
- "$subpkgdir"/usr/lib/wine/
- done
- done
}
-sha512sums="dd240525e389f841123a569fd2f9b8da698b7707bc0de408dfd60ae73c5e24d522abb42b76571c840df52c686fdeae56e0a9c69db2cd31f04cdb345feeacf1dc wine-4.0.1.tar.xz
-a96b1e248447912ba522067b67fc920063f355f326eaf3fec760c79a1c6e46019fbdcfa8b95b9d389959a7e3d3ab794f9aaf78913ad6a73be32b5d34ca8a2267 no-pie.patch
-522a94a31fc459e80ea7dd05f7aee64f6ae666ec05236d06614acde118d5c60002e0f253ae75edb5f02164f22937ca89578504b690d1a5611bd60f703c8f0c00 winhlp32-flex.patch"
+sha512sums="3f0477c26f293cf928acbdae2ffb98740ac227a605ec90f3ab3d35c0dbca2037529ff4e4de0b69cc975579ad14dc2fb8b52e050cfd99cffcc627418cf8cb4346 wine-8.1.tar.xz
+04b4035ad7db762bf965bce095457be9e96292a799c4443c9b93fd572e49371a4bfe297bc3cf720c1e1f7338585767309ec9d84e83db64109883c1782cef40ba headers.patch
+26c72d45329eaf6f0f361edf08a2984ecc99d892bff3d0932928514db5882bebd5744627aa3a63f0715fc308e12364879356d5e94b334d7c6dc9ea3ff854e423 printer.patch
+ade85bee3df634bfb69ae6a27f262708c68c0f9b7be894b44c17fdf14ce5fe8093b1ce2eb7ecca2ca245d9f9b7a1e62ff061449e44acb277c1f03a44449d5191 rpath.patch"
diff --git a/user/wine/headers.patch b/user/wine/headers.patch
new file mode 100644
index 000000000..73ca8c7db
--- /dev/null
+++ b/user/wine/headers.patch
@@ -0,0 +1,24 @@
+These are needed for musl/POSIX.
+
+--- a/dlls/winebus.sys/bus_udev.c 2021-10-23 15:38:33.225064731 +0200
++++ b/dlls/winebus.sys/bus_udev.c 2021-10-23 15:39:06.662064765 +0200
+@@ -29,7 +29,8 @@
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <stdint.h>
+-#include <sys/types.h>
++#include <sys/types.h>
++#include <limits.h>
+ #include <dirent.h>
+ #ifdef HAVE_UNISTD_H
+ # include <unistd.h>
+--- a/server/security.h 2022-01-29 08:23:43.759508270 +0100
++++ b/server/security.h 2022-01-29 08:24:07.976443565 +0100
+@@ -22,6 +22,7 @@
+ #define __WINE_SERVER_SECURITY_H
+
+ #include <sys/types.h>
++#include <unistd.h>
+
+ extern const struct luid SeIncreaseQuotaPrivilege;
+ extern const struct luid SeSecurityPrivilege;
diff --git a/user/wine/no-pie.patch b/user/wine/no-pie.patch
deleted file mode 100644
index 2874e0af8..000000000
--- a/user/wine/no-pie.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- wine-4.0.1/configure.ac
-+++ wine-4.0.1/configure.ac
-@@ -955,7 +955,7 @@
-
- WINE_TRY_CFLAGS([-fPIC -Wl,--export-dynamic],
- [WINELOADER_LDFLAGS="-Wl,--export-dynamic"])
-- WINEPRELOADER_LDFLAGS="-static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000"
-+ WINEPRELOADER_LDFLAGS="-static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000 -no-pie"
-
- WINE_TRY_CFLAGS([-fPIC -Wl,--rpath,\$ORIGIN/../lib],
- [LDRPATH_INSTALL="-Wl,--rpath,\\\$\$ORIGIN/\`\$(MAKEDEP) -R \${bindir} \${libdir}\`"
diff --git a/user/wine/printer.patch b/user/wine/printer.patch
new file mode 100644
index 000000000..6ccfab003
--- /dev/null
+++ b/user/wine/printer.patch
@@ -0,0 +1,13 @@
+ dlls/winspool.drv/info.c | 1 +
+ 1 file changed, 1 insertion(+)
+--- a/dlls/winspool.drv/info.c
++++ a/dlls/winspool.drv/info.c
+@@ -1136,6 +1136,7 @@ void WINSPOOL_LoadSystemPrinters(void)
+ WCHAR PrinterName[256];
+
+ /* FIXME: The init code should be moved to spoolsv.exe */
++ SetLastError(0);
+ init_mutex = CreateMutexW( NULL, TRUE, L"__WINE_WINSPOOL_MUTEX__" );
+ if (!init_mutex)
+ {
+--
diff --git a/user/wine/rpath.patch b/user/wine/rpath.patch
new file mode 100644
index 000000000..9f65cf034
--- /dev/null
+++ b/user/wine/rpath.patch
@@ -0,0 +1,11 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -859,6 +859,9 @@ case $host_os in
+ AC_SUBST(LIBWINE_SHAREDLIB,"libwine.so.$libwine_version")
+ AC_SUBST(LIBWINE_DEPENDS,"wine.map")
+ TOP_INSTALL_LIB="$TOP_INSTALL_LIB libs/wine/libwine.so.$libwine_version libs/wine/libwine.so.$libwine_soversion"
++
++ # do this at the end because it needs double dollar for makefile
++ WINE_TRY_CFLAGS([-Wl,-rpath,\\\$ORIGIN],[UNIXLDFLAGS="$UNIXLDFLAGS '-Wl,-rpath,\$\$ORIGIN'"])
+ ;;
+ esac
diff --git a/user/wine/winhlp32-flex.patch b/user/wine/winhlp32-flex.patch
deleted file mode 100644
index daeb790c2..000000000
--- a/user/wine/winhlp32-flex.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- a/programs/winhlp32/Makefile.in
-+++ b/programs/winhlp32/Makefile.in
-@@ -1,5 +1,5 @@
- MODULE = winhlp32.exe
--APPMODE = -mwindows
-+APPMODE = -mwindows -lfl
- IMPORTS = user32 gdi32
- DELAYIMPORTS = shell32 comctl32 comdlg32
-