summaryrefslogblamecommitdiff
path: root/user/wine/APKBUILD
blob: 99cf1f2dd42c0f2a62e1f9d17544cebff737887b (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11



                                                              
                                                 
            
            



                                                            
                   







                                                                           
                                                            


                                                                       
                                                                                     


                           
























































                                               













































                                                                                      
                                                                                                                                                               

                                                                                                                                                      
# 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: A. Wilcox <awilfox@adelielinux.org>
pkgname=wine
pkgver=3.0.2
pkgrel=0
pkgdesc="A compatibility layer for running Windows programs"
url="http://www.winehq.com"
arch="pmmx x86 x86_64"
license="LGPL-2.0|"
# As of 2.0.3 most of the tests fails
options="!check"
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 libxml2-dev dbus-dev libxi-dev
	gnutls-dev tiff-dev v4l-utils-dev udisks2-dev autoconf automake
	openal-soft-dev pulseaudio-dev sane-dev eudev-dev
	"
source="http://dl.winehq.org/$pkgname/source/${pkgver%.[1-9]}/$pkgname-$pkgver.tar.xz
	no-pie.patch
	winhlp32-flex.patch
	"

prepare() {
	cd "$builddir"

	default_prepare
	aclocal && autoheader && autoreconf
}

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-cups \
		--with-curses \
		--with-dbus \
		--with-fontconfig \
		--with-freetype \
		--with-jpeg \
		--with-openal \
		--with-opengl \
		--with-png \
		--with-pulse \
		--with-sane \
		--with-udev \
		--with-va \
		--with-x \
		--with-xcomposite \
		--with-xinerama \
		--with-xslt \
		$_win64 
	make
}

check() {
	cd "$builddir"
	make test
}

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

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

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

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

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

libs() {
	local file ext
	default_libs

	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
}

sha512sums="dbd0f242c5eace297ad16e314b8ad139e7d430de7eb8ca52b2006d0b80db4809e28a0e785d404a65ea1acdb56e7f06ebfc9a50071db1edaa6180c8835e7c4b13  wine-3.0.2.tar.xz
d853875f7d659617bdfba364704abd75b760d12977f1f13acc73acb3c8fefec0549677fb79a4f8955e073d64078b3071d63d97262522e22b7832a66d3d820a9c  no-pie.patch
522a94a31fc459e80ea7dd05f7aee64f6ae666ec05236d06614acde118d5c60002e0f253ae75edb5f02164f22937ca89578504b690d1a5611bd60f703c8f0c00  winhlp32-flex.patch"