summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2018-03-11 20:30:30 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-03-11 20:30:30 -0500
commitfd061d5e17abb4c06e7a5e99c60b5013cc0a84de (patch)
tree9b1ded528fd43f2ab2a32b7f3e4159a77608bd98
parentfbe788af631dda3912a35927451f03e54db84e42 (diff)
downloadpackages-fd061d5e17abb4c06e7a5e99c60b5013cc0a84de.tar.gz
packages-fd061d5e17abb4c06e7a5e99c60b5013cc0a84de.tar.bz2
packages-fd061d5e17abb4c06e7a5e99c60b5013cc0a84de.tar.xz
packages-fd061d5e17abb4c06e7a5e99c60b5013cc0a84de.zip
system/wine: new package, based on Alpine
-rw-r--r--system/wine/APKBUILD139
-rw-r--r--system/wine/no-pie.patch14
-rw-r--r--system/wine/nopie.patch10
-rw-r--r--system/wine/winhlp32-flex.patch9
4 files changed, 172 insertions, 0 deletions
diff --git a/system/wine/APKBUILD b/system/wine/APKBUILD
new file mode 100644
index 000000000..b1aaad45b
--- /dev/null
+++ b/system/wine/APKBUILD
@@ -0,0 +1,139 @@
+# Contributor: Valery Kartel <valery.kartel@gmail.com>
+# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
+# Contributor: Łukasz Jendrysik <scadu@yandex.com>
+# Contributor: Martell Malone <martell@marinelayer.io>
+# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
+pkgname=wine
+pkgver=3.0
+_pkgver=${pkgver/_/-}
+pkgrel=0
+pkgdesc="A compatibility layer for running Windows programs"
+url="http://www.winehq.com"
+arch="pmmx x86 x86_64"
+license="LGPL-2.0-or-later"
+# As of 2.0.3 most of the tests fails
+options="!check"
+subpackages="$pkgname-libs $pkgname-dev $pkgname-doc"
+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 lcms-dev libxml2-dev paxmark dbus-dev libxi-dev
+ gnutls-dev tiff-dev v4l-utils-dev udisks2-dev autoconf automake
+ openal-soft-dev pulseaudio-dev sane-dev eudev-dev
+ "
+source="http://dl.winehq.org/$pkgname/source/${pkgver%.[1-9]}/$pkgname-$_pkgver.tar.xz
+ no-pie.patch
+ winhlp32-flex.patch
+ "
+builddir="$srcdir/$pkgname-$_pkgver"
+
+prepare() {
+ cd "$builddir"
+
+ default_prepare
+ aclocal && autoheader && autoreconf
+}
+
+build() {
+ cd "$builddir"
+
+ case "$CARCH" in
+ x86_64) _win64=--enable-win64;;
+ esac
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --libdir=/usr/lib \
+ --sysconfdir=/etc \
+ --localstatedir=/var \
+ --with-cups \
+ --with-curses \
+ --with-dbus \
+ --with-fontconfig \
+ --with-freetype \
+ --with-jpeg \
+ --with-openal \
+ --with-opengl \
+ --with-png \
+ --with-pulse \
+ --with-sane \
+ --with-udev \
+ --with-va \
+ --with-x \
+ --with-xcomposite \
+ --with-xinerama \
+ --with-xslt \
+ $_win64
+ 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
+
+ paxmark -psmre "$pkgdir"/usr/bin/$_wine-preloader \
+ "$pkgdir"/usr/bin/$_wine
+
+ install -Dm755 tools/wineapploader \
+ "$pkgdir"/usr/bin/wineapploader
+
+ 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
+ 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
+ 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="a51f41b66f4805e09b223528eff6670e94b9c0c0c947be647507baf9d8d9afe7c3fdc88684c2c8d3573b4739d9a086ab929a744a8594d3c8f6ceb52070f43f0a wine-3.0.tar.xz
+d853875f7d659617bdfba364704abd75b760d12977f1f13acc73acb3c8fefec0549677fb79a4f8955e073d64078b3071d63d97262522e22b7832a66d3d820a9c no-pie.patch
+522a94a31fc459e80ea7dd05f7aee64f6ae666ec05236d06614acde118d5c60002e0f253ae75edb5f02164f22937ca89578504b690d1a5611bd60f703c8f0c00 winhlp32-flex.patch"
diff --git a/system/wine/no-pie.patch b/system/wine/no-pie.patch
new file mode 100644
index 000000000..5fb5d87b6
--- /dev/null
+++ b/system/wine/no-pie.patch
@@ -0,0 +1,14 @@
+diff --git a/loader/Makefile.in b/loader/Makefile.in
+index 8190037..437d4d9 100644
+--- a/loader/Makefile.in
++++ b/loader/Makefile.in
+@@ -26,7 +26,7 @@ wine64_DEPS = $(WINELOADER_DEPENDS)
+ wine64_LDFLAGS = $(LDEXECFLAGS) -lwine $(PTHREAD_LIBS)
+
+ wine_preloader_OBJS = preloader.o
+-wine_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000
++wine_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000 -no-pie
+
+ wine64_preloader_OBJS = preloader.o
+-wine64_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000
++wine64_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000 -no-pie
diff --git a/system/wine/nopie.patch b/system/wine/nopie.patch
new file mode 100644
index 000000000..54eb141be
--- /dev/null
+++ b/system/wine/nopie.patch
@@ -0,0 +1,10 @@
+diff --git a/loader/Makefile.in b/loader/Makefile.in
+index 8190037..b4f2902 100644
+--- a/loader/Makefile.in
++++ b/loader/Makefile.in
+@@ -29,4 +29,4 @@ wine_preloader_OBJS = preloader.o
+ wine_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000
+
+ wine64_preloader_OBJS = preloader.o
+-wine64_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000
++wine64_preloader_LDFLAGS = -static -nostartfiles -nodefaultlibs -Wl,-Ttext=0x7c400000 -no-pie
diff --git a/system/wine/winhlp32-flex.patch b/system/wine/winhlp32-flex.patch
new file mode 100644
index 000000000..daeb790c2
--- /dev/null
+++ b/system/wine/winhlp32-flex.patch
@@ -0,0 +1,9 @@
+--- 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
+