aboutsummaryrefslogtreecommitdiffstats
path: root/community/wine/APKBUILD
blob: acd29fdc4e893c5ad044ce588e0f56b9854aa0c7 (plain) (blame)
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
# Contributor: Valery Kartel <valery.kartel@gmail.com>
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Łukasz Jendrysik <scadu@yandex.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=wine
pkgver=2.0
_pkgver=${pkgver/_/-}
pkgrel=0
pkgdesc="A compatibility layer for running Windows programs"
url="http://www.winehq.com"
arch="x86_64"
license="LGPL2+"
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
	"
source="http://dl.winehq.org/$pkgname/source/2.0/$pkgname-$_pkgver.tar.bz2
	nopie.patch
	winhlp32-flex.patch
	"
builddir="$srcdir/$pkgname-$_pkgver"

prepare() {
	cd "$builddir"

	default_prepare || 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 \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--with-dbus \
		--with-x \
		$_win64 \
		|| return 1
	make || return 1
}

package() {
	local file
	cd "$builddir"
	make -j1 DESTDIR="$pkgdir" install || return 1

	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 || return 1

	for file in msiexec notepad regedit regsvr32 wineboot \
		winecfg wineconsole winefile winemine winepath
	do
		rm "$pkgdir"/usr/bin/$file || return 1
		ln -sf /usr/bin/wineapploader "$pkgdir"/usr/bin/$file
	done
}

dev() {
	local file
	default_dev || return 1

	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 || return 1
	rm -fr "$subpkgdir"/usr/share/man/*.UTF-8
}

libs() {
	local file ext
	default_libs || return 1

	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
}

md5sums="fde8a855080279f74fb2e9ccec926db7  wine-2.0.tar.bz2
282865724e8d91958fa4e909a92c1035  nopie.patch
be202ea06fbdcbcd2d5365b9c160825b  winhlp32-flex.patch"
sha256sums="9756f5a2129b6a83ba701e546173cbff86caa671b0af73eb8f72c03b20c066c6  wine-2.0.tar.bz2
3449932791966342470286127a5b51f2035efc66a33bcfd6afdf0c5c1db17b67  nopie.patch
56c49b299052b58b54c7bf5bc8d85a02333d80315dd9b90af3c2229574f73699  winhlp32-flex.patch"
sha512sums="b0a57ba8202d9fc396e5bfb7a7718d6bababbed8f3351e7fdc36afa37f35a871e04903757618f73427aeb71a52b2d323977d79e48f8b38d636f23fd404441186  wine-2.0.tar.bz2
f4c3ffc86ceb14c865282574f837c2114cdfa38df64327f17c2d5913cb85726d883e4a136ce38297612cda6dd47f9bdf80aff770368b8b846a642337f52a68bf  nopie.patch
522a94a31fc459e80ea7dd05f7aee64f6ae666ec05236d06614acde118d5c60002e0f253ae75edb5f02164f22937ca89578504b690d1a5611bd60f703c8f0c00  winhlp32-flex.patch"