# Contributor: Valery Kartel # Contributor: Sören Tempel # Contributor: Łukasz Jendrysik # Maintainer: Natanael Copa pkgname=wine pkgver=1.8.2 _pkgver=${pkgver/_/-} pkgrel=0 pkgdesc="A compatibility layer for running Windows programs" url="http://www.winehq.com" arch="x86 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 bison libpng-dev libjpeg-turbo-dev freetype-dev ncurses-dev openssl-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://downloads.sourceforge.net/project/wine/Source/wine-$_pkgver.tar.bz2 musl-fix.patch" _builddir="$srcdir"/$pkgname-$_pkgver prepare() { cd "$_builddir" for i in $source; do case $i in *.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;; esac done 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() { 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 } dev() { 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() { 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 -exec basename {} \;`; 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="a23072d18310678c8cd878948dfaf8c0 wine-1.8.2.tar.bz2 80c4e60c14a055b070e87338f22c6a0f musl-fix.patch" sha256sums="51624fadf0145e87f0c01e7ce8524ea1e8d9d360c3e8a86e78cd26a52ce55a6f wine-1.8.2.tar.bz2 28059ac713a3636657267b9238ac9ca28416d7a3d6dbac142ed68dcbf460d88b musl-fix.patch" sha512sums="ed4883443b29c00409143932de40c543a65acfc01ce61f223e6ed852e6869d1936e5d6c1c3942335d2fb6c9ee923f6187ba9f3207af9900911c4258c0266a321 wine-1.8.2.tar.bz2 6cbbaa561db4ea2048e1c5db3b66dddea554d8e2aa120e8615403a4891f1bd08fcd8c273ccb3fc6a824dac2fb53165237a1f4111d86cfee1de4a18fa7262ea39 musl-fix.patch"