aboutsummaryrefslogtreecommitdiffstats
path: root/community/wine/APKBUILD
blob: 2579982c47dcdc153cf6da05f565a4d6d31379a0 (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
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
# Contributor: Pedro Filipe <xpecex@outlook.com>
# 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=4.0.3
_pkgver=${pkgver/_/-}
pkgrel=0
pkgdesc="A compatibility layer for running Windows programs"
url="https://www.winehq.org"
arch="x86 x86_64"
license="LGPL-2.0-or-later"
options="!check" # As of 2.0.3 most of the tests fails
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
depends_dev="$pkgname perl"
makedepends="alsa-lib-dev autoconf automake bison cups-dev dbus-dev flex-dev
	fontconfig-dev freetype-dev gnutls-dev lcms-dev libjpeg-turbo-dev libpng-dev
	libxcomposite-dev libxcursor-dev libxdamage-dev libxi-dev libxinerama-dev
	libxml2-dev libxrandr-dev libxrender-dev libxslt-dev libxxf86dga-dev mesa-dev
	ncurses-dev openldap-dev openssl-dev tiff-dev udisks2-dev v4l-utils-dev zlib-dev
	vulkan-loader-dev vkd3d-dev
	"
checkdepends="xvfb-run"
source="https://dl.winehq.org/wine/source/${pkgver%.[1-9]}/wine-$_pkgver.tar.xz
	no-pie.patch
	wine-dlclose-bug41703.patch
	winhlp32-flex.patch
	"

prepare() {
	default_prepare
	aclocal && autoheader && autoreconf
}

build() {
	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 \
		--with-vkd3d \
		--with-vulkan \
		$_win64
	make
}

check() {
	xvfb-run make test
}

package() {
	make -j1 DESTDIR="$pkgdir" install

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

	install -Dm755 tools/wineapploader \
		"$pkgdir"/usr/bin/wineapploader

	local file
	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() {
	default_dev

	install -d "$subpkgdir"/usr/bin

	local file
	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() {
	default_libs

	install -d "$subpkgdir"/usr/lib/wine/fakedlls

	local file ext
	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="a8fde0bcf600eaec56c3ce58c9aa992386784c85cf1c93aa84d50aff4c842b12a6b099c23391d3ad9a0059f3dc9069c0f8e00fad293305ba8a33afc70bf26e14  wine-4.0.3.tar.xz
e4dc94f9438c50b6bbd210edf2b9145c61fdf53da239de3fffcdb42d290c4333fc28ca06c7c7ae7c09ca643ed86c86d4de3c40b9f15809ce5e1c0d608321e87c  no-pie.patch
6c8cde76d32cd7ba1c22bc4f2ce41dc354218f58a35aaa6717b594124994a97df84fc69fd6c02fea118ec03ed6e93bf13f05d14a0d8bf3291955664ba27cb51f  wine-dlclose-bug41703.patch
522a94a31fc459e80ea7dd05f7aee64f6ae666ec05236d06614acde118d5c60002e0f253ae75edb5f02164f22937ca89578504b690d1a5611bd60f703c8f0c00  winhlp32-flex.patch"