community/wine: clean up and fix abuild

This commit is contained in:
Jakub Jirutka 2016-11-26 00:27:59 +01:00
parent b08d250c74
commit 6dffd98982

View File

@ -21,23 +21,20 @@ makedepends="fontconfig-dev openldap-dev libxslt-dev libxxf86dga-dev
source="http://downloads.sourceforge.net/project/wine/Source/wine-$_pkgver.tar.bz2
musl-fix.patch
nopie.patch"
builddir="$srcdir/$pkgname-$_pkgver"
_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
default_prepare || return 1
cd "$builddir"
aclocal && autoheader && autoreconf || return 1
}
build() {
cd "$_builddir"
cd "$builddir"
case "$CARCH" in
x86_64) _win64=--enable-win64;;
x86_64) _win64=--enable-win64;;
esac
./configure \
--build=$CBUILD \
@ -54,12 +51,12 @@ build() {
}
package() {
cd "$_builddir"
cd "$builddir"
make -j1 DESTDIR="$pkgdir" install || return 1
case "$CARCH" in
x86_64) _wine="wine64";;
*) _wine="wine";;
x86_64) _wine="wine64";;
*) _wine="wine";;
esac
paxmark -psmre "$pkgdir"/usr/bin/$_wine-preloader \
@ -67,25 +64,31 @@ package() {
}
dev() {
default_dev
local file
default_dev || return 1
install -d "$subpkgdir"/usr/bin
for file in widl wmc wrc winebuild winedump function_grep.pl winedbg winemaker winegcc winecpp wineg++; do
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
default_doc || return 1
rm -fr "$subpkgdir"/usr/share/man/*.UTF-8
}
libs() {
default_libs
local ext file
default_libs || return 1
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
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 \