diff options
Diffstat (limited to 'community/wine/APKBUILD')
-rw-r--r-- | community/wine/APKBUILD | 159 |
1 files changed, 101 insertions, 58 deletions
diff --git a/community/wine/APKBUILD b/community/wine/APKBUILD index 2579982c47d..c6af8a76b95 100644 --- a/community/wine/APKBUILD +++ b/community/wine/APKBUILD @@ -3,40 +3,96 @@ # Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net> # Contributor: Łukasz Jendrysik <scadu@yandex.com> # Contributor: Martell Malone <martell@marinelayer.io> +# Contributor: Craig Andrews <candrews@integralblue.com> # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=wine -pkgver=4.0.3 -_pkgver=${pkgver/_/-} +pkgver=9.0 pkgrel=0 -pkgdesc="A compatibility layer for running Windows programs" +pkgdesc="Compatibility layer for running Windows programs" url="https://www.winehq.org" arch="x86 x86_64" license="LGPL-2.0-or-later" -options="!check" # As of 2.0.3 most of the tests fails -subpackages="$pkgname-dev $pkgname-doc $pkgname-libs" +depends=" + libxi + libxrandr + " depends_dev="$pkgname perl" -makedepends="alsa-lib-dev autoconf automake bison cups-dev dbus-dev flex-dev - fontconfig-dev freetype-dev gnutls-dev lcms-dev libjpeg-turbo-dev libpng-dev - libxcomposite-dev libxcursor-dev libxdamage-dev libxi-dev libxinerama-dev - libxml2-dev libxrandr-dev libxrender-dev libxslt-dev libxxf86dga-dev mesa-dev - ncurses-dev openldap-dev openssl-dev tiff-dev udisks2-dev v4l-utils-dev zlib-dev - vulkan-loader-dev vkd3d-dev +makedepends=" + alsa-lib-dev + autoconf + automake + bison + cups-dev + dbus-dev + flex-dev + fontconfig-dev + freetype-dev + gnutls-dev + gstreamer-dev + gst-plugins-base-dev + krb5-dev + libgphoto2-dev + libpcap-dev + libusb-dev + libxcomposite-dev + libxcursor-dev + libxi-dev + libxinerama-dev + libxkbcommon-dev + libxrandr-dev + libxrender-dev + mesa-dev + mingw-w64-gcc + ncurses-dev + opencl-dev + pcsc-lite-dev + pulseaudio-dev + sane-dev + sdl2-dev + udisks2-dev + v4l-utils-dev + vulkan-loader-dev + wayland-dev " +subpackages="$pkgname-dev $pkgname-doc" checkdepends="xvfb-run" -source="https://dl.winehq.org/wine/source/${pkgver%.[1-9]}/wine-$_pkgver.tar.xz - no-pie.patch - wine-dlclose-bug41703.patch - winhlp32-flex.patch +source="https://dl.winehq.org/wine/source/9.0/wine-$pkgver.tar.xz + rpath.patch " +options="textrels !check" # As of 2.0.3 most of the tests fails +# ignore tracing something in a weird rpath just to silence a warning +# no effect +somask="ntdll.so win32u.so" prepare() { default_prepare - aclocal && autoheader && autoreconf + # fix opencl header detection + sed 's|OpenCL/opencl.h|CL/opencl.h|g' -i configure* } +case "$CARCH" in +x86_64) + # also pull in 32-target, enabled with --enable-archs + makedepends="$makedepends i686-mingw-w64-gcc" + ;; +esac + build() { + export CFLAGS="$CFLAGS -O2 -Wno-error=format-security" + export CXXFLAGS="$CXXFLAGS -O2 -Wno-error=format-security" + export CPPFLAGS="$CPPFLAGS -O2 -Wno-error=format-security" + + # invalid to the msys linker + export LDFLAGS="${LDFLAGS/,-Wl,-z,pack-relative-relocs}" + case "$CARCH" in - x86_64) _win64=--enable-win64;; + x86_64) + local win64="--enable-win64" + local archs="--enable-archs=x86_64,i386" + ;; + x86) + local no_pie="-no-pie" + ;; esac ./configure \ --build=$CBUILD \ @@ -46,10 +102,12 @@ build() { --sysconfdir=/etc \ --localstatedir=/var \ --with-dbus \ + --with-mingw \ --with-x \ - --with-vkd3d \ --with-vulkan \ - $_win64 + $win64 \ + $archs + make LDFLAGS="$LDFLAGS $no_pie" tools/winedump/winedump make } @@ -58,63 +116,48 @@ check() { } package() { - make -j1 DESTDIR="$pkgdir" install - - case "$CARCH" in - x86_64) _wine="wine64";; - *) _wine="wine";; - esac + make DESTDIR="$pkgdir" install install -Dm755 tools/wineapploader \ "$pkgdir"/usr/bin/wineapploader local file for file in msiexec notepad regedit regsvr32 wineboot \ - winecfg wineconsole winefile winemine winepath - do - rm "$pkgdir"/usr/bin/$file - ln -sf /usr/bin/wineapploader "$pkgdir"/usr/bin/$file + winecfg wineconsole winefile winemine winepath; do + rm -v "$pkgdir"/usr/bin/$file + ln -sfv /usr/bin/wineapploader "$pkgdir"/usr/bin/$file done + + case "$CARCH" in + x86_64) + x86_64-w64-mingw32-strip --strip-unneeded "$pkgdir"/usr/lib/wine/x86_64-windows/*.dll + i686-w64-mingw32-strip --strip-unneeded "$pkgdir"/usr/lib/wine/i386-windows/*.dll + + # add compat links, since with archs these rename back to non-64 + ln -sfv wine "$pkgdir"/usr/bin/wine64 + ln -sfv wine-preloader "$pkgdir"/usr/bin/wine64-preloader + ;; + x86) + i686-w64-mingw32-strip --strip-unneeded "$pkgdir"/usr/lib/wine/i386-windows/*.dll + ;; + esac } dev() { default_dev - install -d "$subpkgdir"/usr/bin - local file for file in widl wmc wrc winebuild winedump function_grep.pl \ - winedbg winemaker winegcc winecpp wineg++ - do - mv "$pkgdir"/usr/bin/$file "$subpkgdir"/usr/bin/ + winedbg winemaker winegcc winecpp wineg++; do + amove usr/bin/$file 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() { - default_libs - - install -d "$subpkgdir"/usr/lib/wine/fakedlls - - local file ext - 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="a8fde0bcf600eaec56c3ce58c9aa992386784c85cf1c93aa84d50aff4c842b12a6b099c23391d3ad9a0059f3dc9069c0f8e00fad293305ba8a33afc70bf26e14 wine-4.0.3.tar.xz -e4dc94f9438c50b6bbd210edf2b9145c61fdf53da239de3fffcdb42d290c4333fc28ca06c7c7ae7c09ca643ed86c86d4de3c40b9f15809ce5e1c0d608321e87c no-pie.patch -6c8cde76d32cd7ba1c22bc4f2ce41dc354218f58a35aaa6717b594124994a97df84fc69fd6c02fea118ec03ed6e93bf13f05d14a0d8bf3291955664ba27cb51f wine-dlclose-bug41703.patch -522a94a31fc459e80ea7dd05f7aee64f6ae666ec05236d06614acde118d5c60002e0f253ae75edb5f02164f22937ca89578504b690d1a5611bd60f703c8f0c00 winhlp32-flex.patch" +sha512sums=" +838daf2c4581f83f8573b988036f517d57b84894b090a2a17433255d6d044dfa880e6724cdb83082a36c333df9d2083ab68ae53927622a620edd59f33462ada4 wine-9.0.tar.xz +9881abfd0e7e4589cd5724291f9ec06ccb9d88b842c69abb5ea7865b6c27c778a060e60a9776c3620a030555cf61b8cceded55db9f04d5e45d9c627306763bff rpath.patch +" |