blob: c6af8a76b95661338d5015fa2b8753d66d71014c (
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
|
# 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>
# Contributor: Craig Andrews <candrews@integralblue.com>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=wine
pkgver=9.0
pkgrel=0
pkgdesc="Compatibility layer for running Windows programs"
url="https://www.winehq.org"
arch="x86 x86_64"
license="LGPL-2.0-or-later"
depends="
libxi
libxrandr
"
depends_dev="$pkgname perl"
makedepends="
alsa-lib-dev
autoconf
automake
bison
cups-dev
dbus-dev
flex-dev
fontconfig-dev
freetype-dev
gnutls-dev
gstreamer-dev
gst-plugins-base-dev
krb5-dev
libgphoto2-dev
libpcap-dev
libusb-dev
libxcomposite-dev
libxcursor-dev
libxi-dev
libxinerama-dev
libxkbcommon-dev
libxrandr-dev
libxrender-dev
mesa-dev
mingw-w64-gcc
ncurses-dev
opencl-dev
pcsc-lite-dev
pulseaudio-dev
sane-dev
sdl2-dev
udisks2-dev
v4l-utils-dev
vulkan-loader-dev
wayland-dev
"
subpackages="$pkgname-dev $pkgname-doc"
checkdepends="xvfb-run"
source="https://dl.winehq.org/wine/source/9.0/wine-$pkgver.tar.xz
rpath.patch
"
options="textrels !check" # As of 2.0.3 most of the tests fails
# ignore tracing something in a weird rpath just to silence a warning
# no effect
somask="ntdll.so win32u.so"
prepare() {
default_prepare
# fix opencl header detection
sed 's|OpenCL/opencl.h|CL/opencl.h|g' -i configure*
}
case "$CARCH" in
x86_64)
# also pull in 32-target, enabled with --enable-archs
makedepends="$makedepends i686-mingw-w64-gcc"
;;
esac
build() {
export CFLAGS="$CFLAGS -O2 -Wno-error=format-security"
export CXXFLAGS="$CXXFLAGS -O2 -Wno-error=format-security"
export CPPFLAGS="$CPPFLAGS -O2 -Wno-error=format-security"
# invalid to the msys linker
export LDFLAGS="${LDFLAGS/,-Wl,-z,pack-relative-relocs}"
case "$CARCH" in
x86_64)
local win64="--enable-win64"
local archs="--enable-archs=x86_64,i386"
;;
x86)
local no_pie="-no-pie"
;;
esac
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--libdir=/usr/lib \
--sysconfdir=/etc \
--localstatedir=/var \
--with-dbus \
--with-mingw \
--with-x \
--with-vulkan \
$win64 \
$archs
make LDFLAGS="$LDFLAGS $no_pie" tools/winedump/winedump
make
}
check() {
xvfb-run make test
}
package() {
make DESTDIR="$pkgdir" install
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 -v "$pkgdir"/usr/bin/$file
ln -sfv /usr/bin/wineapploader "$pkgdir"/usr/bin/$file
done
case "$CARCH" in
x86_64)
x86_64-w64-mingw32-strip --strip-unneeded "$pkgdir"/usr/lib/wine/x86_64-windows/*.dll
i686-w64-mingw32-strip --strip-unneeded "$pkgdir"/usr/lib/wine/i386-windows/*.dll
# add compat links, since with archs these rename back to non-64
ln -sfv wine "$pkgdir"/usr/bin/wine64
ln -sfv wine-preloader "$pkgdir"/usr/bin/wine64-preloader
;;
x86)
i686-w64-mingw32-strip --strip-unneeded "$pkgdir"/usr/lib/wine/i386-windows/*.dll
;;
esac
}
dev() {
default_dev
local file
for file in widl wmc wrc winebuild winedump function_grep.pl \
winedbg winemaker winegcc winecpp wineg++; do
amove usr/bin/$file
done
}
doc() {
default_doc
rm -fr "$subpkgdir"/usr/share/man/*.UTF-8
}
sha512sums="
838daf2c4581f83f8573b988036f517d57b84894b090a2a17433255d6d044dfa880e6724cdb83082a36c333df9d2083ab68ae53927622a620edd59f33462ada4 wine-9.0.tar.xz
9881abfd0e7e4589cd5724291f9ec06ccb9d88b842c69abb5ea7865b6c27c778a060e60a9776c3620a030555cf61b8cceded55db9f04d5e45d9c627306763bff rpath.patch
"
|