Mail archive
alpine-aports

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

From: Valery Kartel <valery.kartel_at_gmail.com>
Date: Wed, 25 Jan 2017 16:27:54 +0200

fix maintainer
add provides, replaces

fixes and improvements in apkbuild
nearly the same as in community/wine
---
 testing/wine-staging/APKBUILD | 91 ++++++++++++++++++++++++-------------------
 1 file changed, 51 insertions(+), 40 deletions(-)
diff --git a/testing/wine-staging/APKBUILD b/testing/wine-staging/APKBUILD
index ec3adc8732..d3efc94624 100644
--- a/testing/wine-staging/APKBUILD
+++ b/testing/wine-staging/APKBUILD
_at_@ -1,51 +1,45 @@
-# Mantainer: Jens Staal <staal1978_at_gmail.com>
+# Maintainer: Jens Staal <staal1978_at_gmail.com>
 # Contributor: Valery Kartel <valery.kartel_at_gmail.com>
 # Contributor: Sören Tempel <soeren+alpine_at_soeren-tempel.net>
 # Contributor: Łukasz Jendrysik <scadu_at_yandex.com>
 # Contributor: Natanael Copa <ncopa_at_alpinelinux.org>
 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+"
+provides="wine"
+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
+source="https://github.com/wine-compholio/wine-patched/archive/staging-$_pkgver.tar.gz
 	musl-fix.patch
 	nopie.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" 
-	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
+	cd "$builddir"
+
+	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 \
+	./configure LIBS=-lfl \
 		--build=$CBUILD \
 		--host=$CHOST \
 		--prefix=/usr \
_at_@ -58,62 +52,79 @@ build() {
 		--disable-tests \
 		$_win64 \
 		|| return 1
-	make || return 1
+	make -j1 || return 1
 }
 
 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
+md5sums="7e0b9311ce890dc82465a1d42259a170  staging-2.0.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
+sha256sums="910959406843d4fec1f8498f0fab0add1571559661ccdb10260e1082f17f9513  staging-2.0.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
+sha512sums="0d10756d94f3f02d7cf59e41e05ba3308105ae2924e20f6f3c4f903d570ac335065b1180a13f9af0c6bcca3c5ddf4564b7708cb6dde9f5bd474c6222e00d1eb8  staging-2.0.tar.gz
 6cbbaa561db4ea2048e1c5db3b66dddea554d8e2aa120e8615403a4891f1bd08fcd8c273ccb3fc6a824dac2fb53165237a1f4111d86cfee1de4a18fa7262ea39  musl-fix.patch
 f4c3ffc86ceb14c865282574f837c2114cdfa38df64327f17c2d5913cb85726d883e4a136ce38297612cda6dd47f9bdf80aff770368b8b846a642337f52a68bf  nopie.patch"
-- 
2.11.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Jan 25 2017 - 16:27:54 GMT