summaryrefslogtreecommitdiff
path: root/skip/wine/wine.xibuild
blob: 20ce9f4f9a90f084583e1b2f6ece76e83fba26a7 (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
#!/bin/sh

NAME="wine"
DESC="A compatibility layer for running Windows programs"

MAKEDEPS=" alsa-lib autoconf automake bison cups dbus flex fontconfig freetype2 giflib gnutls gstreamer gst-plugins-base krb5 libgphoto2 libpcap libusb libxcomposite libxcursor libxdamage libxi libxinerama libxrandr libxrender mesa mingw-w64-gcc mpg123 ncurses openal-soft opencl sane sdl2 udisks2 v4l-utils vkd3d vulkan-loader"

PKG_VER=7.18
SOURCE="https://dl.winehq.org/wine/source/7.x/wine-$PKG_VER.tar.xz"

ADDITIONAL="
rpath.patch
"

prepare() {
	apply_patches
	# fix opencl header detection
	sed 's|OpenCL/opencl.h|CL/opencl.h|g' -i configure*
}

build() {
	./configure \
		--prefix=/usr \
		--libdir=/usr/lib \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--with-dbus \
		--without-ldap \
		--with-mingw \
		--with-x \
		--with-vulkan \
		--enable-win64
	make LDFLAGS="$LDFLAGS $_no_pie" tools/winedump/winedump
	make
}

check() {
	xvfb-run make test
}

package() {
	make DESTDIR="$PKG_DEST" install

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

	local file
	for file in msiexec notepad regedit regsvr32 wineboot \
		winecfg wineconsole winefile winemine winepath
	do
		rm "$PKG_DEST"/usr/bin/$file
		ln -sf /usr/bin/wineapploader "$PKG_DEST"/usr/bin/$file
	done

	case "$CARCH" in
	x86_64)
		x86_64-w64-mingw32-strip --strip-unneeded "$PKG_DEST"/usr/lib/wine/x86_64-windows/*.dll
		;;
	x86)
		i686-w64-mingw32-strip --strip-unneeded "$PKG_DEST"/usr/lib/wine/i386-windows/*.dll
		;;
	esac
}