Subject: [alpine-aports] [PATCH v2] testing/wine-staging: upgrade to 2.0

From: Valery Kartel <[email-masked]>
Date: Thu, 26 Jan 2017 21:31:55 +0200

fix maintainer
add replaces= against community/wine

fixes and improvements in apkbuild
---
v1 -> v2:
- del musl-fix.patch
- add winhlp32-flex.patch
---
 testing/wine-staging/APKBUILD            | 111 ++++++++++++++++++-------------
 testing/wine-staging/musl-fix.patch      |  21 ------
 testing/wine-staging/winhlp32-flex.patch |   9 +++
 3 files changed, 74 insertions(+), 67 deletions(-)
 delete mode 100644 testing/wine-staging/musl-fix.patch
 create mode 100644 testing/wine-staging/winhlp32-flex.patch

diff --git a/testing/wine-staging/APKBUILD b/testing/wine-staging/APKBUILD
index ec3adc8732..fc32cb8e0e 100644
--- a/testing/wine-staging/APKBUILD
+++ b/testing/wine-staging/APKBUILD
@@ -1,49 +1,48 @@
-# Mantainer: Jens Staal <[email-masked]>
+# Maintainer: Jens Staal <[email-masked]>
 # Contributor: Valery Kartel <[email-masked]>
 # Contributor: Sören Tempel <[email-masked]>
 # Contributor: Łukasz Jendrysik <[email-masked]>
 # Contributor: Natanael Copa <[email-masked]>
 pkgname=wine-staging
-pkgver=1.9.23
+pkgver=2.0
 _pkgver=${pkgver/_/-}
-pkgrel=1
-pkgdesc="A compatibility layer for running Windows programs"
+pkgrel=0
+pkgdesc="A compatibility layer for running Windows programs :: Staging"
 url="http://wine-staging.com"
 arch="x86_64"
 license="LGPL2+"
+replaces="wine"
 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 bison
+	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 paxmark"
-source="https://github.com/wine-compholio/wine-patched/archive/staging-$pkgver.tar.gz
-	https://github.com/sarnex/wine-d3d9-patches/archive/wine-d3d9-$pkgver.tar.gz
-	musl-fix.patch
-	nopie.patch"
+	gnutls-dev tiff-dev v4l-utils-dev udisks2-dev autoconf automake
+	"
+source="https://github.com/wine-compholio/wine-patched/archive/staging-$_pkgver.tar.gz
+	https://github.com/sarnex/wine-d3d9-patches/archive/wine-d3d9-$_pkgver.tar.gz
+	nopie.patch
+	winhlp32-flex.patch
+	"
+builddir="$srcdir/wine-patched-staging-$_pkgver"
 
-provides="wine=$pkgver wine-libs=$pkgver wine-dev=$pkgdir wine-doc=$pkgdir"
-
-_builddir="$srcdir"/wine-patched-staging-$_pkgver
 prepare() {
-	cd "$_builddir" 
+	cd "$builddir"
+
 	patch -p1 -i "$srcdir"/wine-d3d9-patches-wine-d3d9-$_pkgver/staging-helper.patch
-	patch -p1 -i "$srcdir"/wine-d3d9-patchas-wine-d3d9-$_pkgver/wine-d3d9.patch
-	for i in $(ls $srcdir/*.patch); do
-		case $i in
-		*.patch) msg $i; patch -p1 -i $i || return 1;;
-		esac
-	done
+	patch -p1 -i "$srcdir"/wine-d3d9-patches-wine-d3d9-$_pkgver/wine-d3d9.patch
+
+	default_prepare || return 1
 	aclocal && autoheader && autoreconf || return 1
 }
 
 build() {
-	cd "$_builddir"
+	cd "$builddir"
 
 	case "$CARCH" in
-	x86_64) _win64=--enable-win64
+		x86_64) _win64=--enable-win64;;
 	esac
 	./configure \
 		--build=$CBUILD \
@@ -62,58 +61,78 @@ build() {
 }
 
 package() {
-	cd "$_builddir"
+	local file
+	cd "$builddir"
 	make -j1 DESTDIR="$pkgdir" install || return 1
 
 	case "$CARCH" in
-	x86_64) _wine="wine64";;
-	*) _wine="wine";;
+		x86_64) _wine="wine64";;
+		*) _wine="wine";;
 	esac
 
 	paxmark -psmre "$pkgdir"/usr/bin/$_wine-preloader \
 		"$pkgdir"/usr/bin/$_wine
-}
 
-# no idea how to handle sub-packages and provides(). Temporary solution.
+	install -Dm755 tools/wineapploader \
+		"$pkgdir"/usr/bin/wineapploader || return 1
+
+	for file in msiexec notepad regedit regsvr32 wineboot \
+		winecfg wineconsole winefile winemine winepath msidb
+	do
+		rm "$pkgdir"/usr/bin/$file || return 1
+		ln -sf /usr/bin/wineapploader "$pkgdir"/usr/bin/$file
+	done
+}
 
 dev() {
-	default_dev
+	local file
+	default_dev || return 1
+	replaces="wine-dev"
+
 	install -d "$subpkgdir"/usr/bin
-	for file in widl wmc wrc winebuild winedump function_grep.pl winedbg winemaker winegcc winecpp wineg++; do
+	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
+	default_doc || return 1
+	replaces="wine-doc"
+
 	rm -rf "$pkgdir"/usr/share/man
 	rm -fr "$subpkgdir"/usr/share/man/*.UTF-8
 }
 
 libs() {
-	default_libs
+	local ext file
+	default_libs || return 1
+	replaces="wine-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 -exec basename {} \;`; do
-			mv "$pkgdir"/usr/lib/wine/fakedlls/$file \
+		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 \
+			mv "$pkgdir"/usr/lib/wine/${file##*/}.so \
 				"$subpkgdir"/usr/lib/wine/
 		done
 	done
 }
 
-md5sums="672b957aa8c4e0cb87dc232fc30889fb  staging-1.9.23.tar.gz
-d1ee58fce21cfa769fb0cee5d3b3dc78  wine-d3d9-1.9.23.tar.gz
-80c4e60c14a055b070e87338f22c6a0f  musl-fix.patch
-282865724e8d91958fa4e909a92c1035  nopie.patch"
-sha256sums="f4e6fe2046511f27b92c6ea8ddf382fe88cd22f63258a4e1097ae13cb8f6d518  staging-1.9.23.tar.gz
-3d2f5b6ef1b7b7f09934ac3c0beafe23b9062177e77623f233d53dda29215b19  wine-d3d9-1.9.23.tar.gz
-28059ac713a3636657267b9238ac9ca28416d7a3d6dbac142ed68dcbf460d88b  musl-fix.patch
-3449932791966342470286127a5b51f2035efc66a33bcfd6afdf0c5c1db17b67  nopie.patch"
-sha512sums="59769318ded2fb5643c3b16c067e23f97a6a893d2e9d579362cac9fb35fdfe3489d4d91f013a9a6eb23596b9f4798e7d5d9d86637b5aa21695a292a5560ff09c  staging-1.9.23.tar.gz
-52fee3f3ba48a5347f5153fa667c9257e725983fe70d1ef3d212acaa4d301441c60e35473aeb343bb16e3e4e8b15c4303e5fbbf74df9989c658b01511de2af6e  wine-d3d9-1.9.23.tar.gz
-6cbbaa561db4ea2048e1c5db3b66dddea554d8e2aa120e8615403a4891f1bd08fcd8c273ccb3fc6a824dac2fb53165237a1f4111d86cfee1de4a18fa7262ea39  musl-fix.patch
-f4c3ffc86ceb14c865282574f837c2114cdfa38df64327f17c2d5913cb85726d883e4a136ce38297612cda6dd47f9bdf80aff770368b8b846a642337f52a68bf  nopie.patch"
+md5sums="7e0b9311ce890dc82465a1d42259a170  staging-2.0.tar.gz
+0e78189cd9c89cd29589b4b044be45b5  wine-d3d9-2.0.tar.gz
+282865724e8d91958fa4e909a92c1035  nopie.patch
+be202ea06fbdcbcd2d5365b9c160825b  winhlp32-flex.patch"
+sha256sums="910959406843d4fec1f8498f0fab0add1571559661ccdb10260e1082f17f9513  staging-2.0.tar.gz
+7bfac23706723c6d51a7a95e416e47fb2678cd4d0945b990f74eba2b059e6206  wine-d3d9-2.0.tar.gz
+3449932791966342470286127a5b51f2035efc66a33bcfd6afdf0c5c1db17b67  nopie.patch
+56c49b299052b58b54c7bf5bc8d85a02333d80315dd9b90af3c2229574f73699  winhlp32-flex.patch"
+sha512sums="0d10756d94f3f02d7cf59e41e05ba3308105ae2924e20f6f3c4f903d570ac335065b1180a13f9af0c6bcca3c5ddf4564b7708cb6dde9f5bd474c6222e00d1eb8  staging-2.0.tar.gz
+a9e2d1c9f2784128e4c53a8dc923070a5057b5ff3d83c2b536a2d2df0bc8433ac92b8ab1c3cdf34158c0e7bfe497ddb5974605fbc1736a92307639d59450c7a1  wine-d3d9-2.0.tar.gz
+f4c3ffc86ceb14c865282574f837c2114cdfa38df64327f17c2d5913cb85726d883e4a136ce38297612cda6dd47f9bdf80aff770368b8b846a642337f52a68bf  nopie.patch
+522a94a31fc459e80ea7dd05f7aee64f6ae666ec05236d06614acde118d5c60002e0f253ae75edb5f02164f22937ca89578504b690d1a5611bd60f703c8f0c00  winhlp32-flex.patch"
diff --git a/testing/wine-staging/musl-fix.patch b/testing/wine-staging/musl-fix.patch
deleted file mode 100644
index 0176c7921f..0000000000
--- a/testing/wine-staging/musl-fix.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- wine-1.7.8.orig/server/file.h
-+++ wine-1.7.8/server/file.h
-@@ -21,6 +21,7 @@
- #ifndef __WINE_SERVER_FILE_H
- #define __WINE_SERVER_FILE_H
- 
-+#include <fcntl.h>
- #include "object.h"
- 
- struct fd;
---- ./dlls/ws2_32/socket.c.orig
-+++ ./dlls/ws2_32/socket.c
-@@ -100,7 +100,7 @@
- 
- #ifdef HAVE_NETIPX_IPX_H
- # include <netipx/ipx.h>
--#elif defined(HAVE_LINUX_IPX_H)
-+#elif defined(HAVE_LINUX_IPX_H) && defined(__GLIBC__)
- # ifdef HAVE_ASM_TYPES_H
- #  include <asm/types.h>
- # endif
diff --git a/testing/wine-staging/winhlp32-flex.patch b/testing/wine-staging/winhlp32-flex.patch
new file mode 100644
index 0000000000..daeb790c2e
--- /dev/null
+++ b/testing/wine-staging/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
+ 
-- 
2.11.0

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---