summaryrefslogtreecommitdiffstats
path: root/main/wine/APKBUILD
blob: 68af75d576d16e7f5306fcfc7594777b505bcae2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=wine
pkgver=1.7.28
_ver=${pkgver/_/-}
pkgrel=1
pkgdesc="A compatibility layer for running Windows programs"
url="http://www.winehq.com"
arch="x86 x86_64"
license="LGPL2+"
subpackages="$pkgname-dev $pkgname-doc"
makedepends="fontconfig-dev openldap-dev libxslt-dev libxxf86dga-dev
	libxcursor-dev libxrandr-dev libxdamage-dev mesa-dev flex bison
	libpng-dev libjpeg-turbo-dev freetype-dev ncurses-dev openssl-dev
	libxcomposite-dev libxrender-dev libxinerama-dev zlib-dev
	cups-dev alsa-lib-dev lcms-dev libxml2-dev
	gstreamer0.10-dev gst-plugins-base0.10-dev paxctl dbus-dev libxi-dev
	gnutls-dev
	tiff-dev v4l-utils-dev udisks2-dev
	autoconf automake"
source="http://downloads.sourceforge.net/project/wine/Source/wine-$_ver.tar.bz2
	musl-fix.patch
	"

_builddir="$srcdir"/$pkgname-$_ver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
	sed -i '/^UPDATE_DESKTOP_DATABASE/s:=.*:=true:' tools/Makefile.in \
		|| return 1
	sed -i '/^MimeType/d' tools/wine.desktop || return 1
	aclocal && autoheader && autoreconf || return 1
}

build() {
	cd "$_builddir"

	case "$CARCH" in
	x86_64) _win64=--enable-win64;;
	esac

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--libdir=/usr/lib \
		--with-dbus \
		--with-x \
		$_win64 \
		|| return 1
	make
}

package() {
	cd "$_builddir"
	make -j1 \
		prefix="$pkgdir"/usr \
		libdir="$pkgdir"/usr/lib \
		dlldir="$pkgdir"/usr/lib/wine \
		install || return 1
	mkdir -p "$pkgdir"/etc/wine

	case "$CARCH" in
	x86_64) _wine="wine64";;
	*)_wine="wine";;
	esac

	paxctl -c -psmre "$pkgdir"/usr/bin/$_wine-preloader \
		"$pkgdir"/usr/bin/$_wine
}

md5sums="7443e04f368a63de80ec2738f5337abd  wine-1.7.28.tar.bz2
80c4e60c14a055b070e87338f22c6a0f  musl-fix.patch"
sha256sums="67c3f157b9e720971d1f7dc582e9f0b16879ef660b5ba284a77f8bdfc6fc2313  wine-1.7.28.tar.bz2
28059ac713a3636657267b9238ac9ca28416d7a3d6dbac142ed68dcbf460d88b  musl-fix.patch"
sha512sums="dffbfeb53d9503ec882941c9d01c4b795c6da6046a2eab5d1ccb4db68a07952cfdbb14600869981b050f45247548d459bd054a390af6baecb232dc0c075ec7ab  wine-1.7.28.tar.bz2
6cbbaa561db4ea2048e1c5db3b66dddea554d8e2aa120e8615403a4891f1bd08fcd8c273ccb3fc6a824dac2fb53165237a1f4111d86cfee1de4a18fa7262ea39  musl-fix.patch"