updated on Fri Jan 20 00:01:56 UTC 2012
[aur-mirror.git] / wine-lol / PKGBUILD
blob8f1a6f5aca1c0e1b228f62712e1eef564e7ba6d2
1 # $Id$
2 # Maintainer: Egon Ashrafinia <wubbbi@gmx.de>
3 # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
4 # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
5 # Contributor: Eduardo Romero <eduardo@archlinux.org>
6 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
8 pkgname=wine-lol
9 pkgver=1.3.36
10 pkgrel=1
12 _pkgrealname="wine"
14 source=(http://ibiblio.org/pub/linux/system/emulators/$_pkgrealname/$_pkgrealname-$pkgver.tar.bz2
15         ole-force-inproc-instead-of-local.patch)
16 md5sums=('51e20231aa72a7b9db89aefdae8e92e3'
17          '58091d383f16a71fde88fee4eac7b602')
19 pkgdesc="A compatibility layer for running Windows programs. This version of Wine includes a patch to run League of Legends."
20 url="http://www.winehq.com"
21 arch=(i686 x86_64)
22 license=(LGPL)
23 install=wine.install
25 depends=(
26   fontconfig      lib32-fontconfig
27   mesa            lib32-mesa 
28   libxcursor      lib32-libxcursor
29   libxrandr       lib32-libxrandr
30   libxdamage      lib32-libxdamage
31   libxi           lib32-libxi
32   gettext         lib32-gettext
33   desktop-file-utils
36 makedepends=(autoconf ncurses bison perl fontforge flex prelink
37   'gcc>=4.5.0-2'  'gcc-multilib>=4.5.0-2'
38   giflib          lib32-giflib
39   libxpm          lib32-libxpm
40   libpng          lib32-libpng
41   libxinerama     lib32-libxinerama
42   libxcomposite   lib32-libxcomposite
43   libxmu          lib32-libxmu
44   libxxf86vm      lib32-libxxf86vm
45   libxml2         lib32-libxml2
46   libxslt         lib32-libxslt
47   libldap         lib32-libldap
48   lcms            lib32-lcms
49   mpg123          lib32-mpg123
50   openal          lib32-openal
51   libcups         lib32-libcups
52   v4l-utils       lib32-v4l-utils
53   alsa-lib        lib32-alsa-lib
54   oss
56   
57 optdepends=(
58   giflib          lib32-giflib
59   libpng          lib32-libpng
60   libldap         lib32-libldap
61   lcms            lib32-lcms
62   libxml2         lib32-libxml2
63   mpg123          lib32-mpg123
64   openal          lib32-openal
65   libcups         lib32-libcups
66   v4l-utils       lib32-v4l-utils
67   libpulse        lib32-libpulse
68   alsa-plugins    lib32-alsa-plugins
69   alsa-lib        lib32-alsa-lib
70   oss
73 if [[ $CARCH == i686 ]]; then
74   # Strip lib32 etc. on i686
75   depends=(${depends[@]/*32-*/})
76   makedepends=(${makedepends[@]/*32-*/})
77   makedepends=(${makedepends[@]/*-multilib*/})
78   optdepends=(${optdepends[@]/*32-*/})
79   provides=("bin32-wine=$pkgver" "wine=$pkgver")
80   conflicts=('bin32-wine' 'wine')
81   replaces=('bin32-wine' 'wine')
82 else
83   provides=("bin32-wine=$pkgver" "wine-wow64=$pkgver" "wine=$pkgver")
84   conflicts=('bin32-wine' 'wine-wow64' 'wine')
85   replaces=('bin32-wine' 'wine')
88 build() {
89   cd "$srcdir"
91   # Allow ccache to work
92   mv $_pkgrealname-$pkgver $_pkgrealname
94   msg2 "Patching..."
95   (
96     cd $_pkgrealname
97     patch -Np1 < ../../ole-force-inproc-instead-of-local.patch
98   )
100   # Get rid of old build dirs
101   rm -rf $_pkgrealname-{32,64}-build
102   mkdir $_pkgrealname-32-build
103   
104   # These additional CFLAGS solve FS#27662
105   export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/} -D_FORTIFY_SOURCE=0"
106   export CXXFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/} -D_FORTIFY_SOURCE=0"
108   if [[ $CARCH == x86_64 ]]; then
109     msg2 "Building Wine-64..."
111     mkdir $_pkgrealname-64-build
112     cd "$srcdir/$_pkgrealname-64-build"
113     ../$_pkgrealname/configure \
114       --prefix=/usr \
115       --sysconfdir=/etc \
116       --libdir=/usr/lib \
117       --with-x \
118       --enable-win64
120     make
122     _wine32opts=(
123       --libdir=/usr/lib32
124       --with-wine64="$srcdir/$_pkgrealname-64-build"
125     )
127     export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
128   fi
130   msg2 "Building Wine-32..."
131   cd "$srcdir/$_pkgrealname-32-build"
132   ../$_pkgrealname/configure \
133     --prefix=/usr \
134     --sysconfdir=/etc \
135     --with-x \
136     "${_wine32opts[@]}"
138    # These additional CFLAGS solve FS#27560
139    make CFLAGS+="-mstackrealign" CXXFLAGS+="-mstackrealign"
142 package() {
143   msg2 "Packaging Wine-32..."
144   cd "$srcdir/$_pkgrealname-32-build"
146   if [[ $CARCH == i686 ]]; then
147     make prefix="$pkgdir/usr" install
148   else
149     make prefix="$pkgdir/usr" \
150       libdir="$pkgdir/usr/lib32" \
151       dlldir="$pkgdir/usr/lib32/wine" install
153     msg2 "Packaging Wine-64..."
154     cd "$srcdir/$_pkgrealname-64-build"
155     make prefix="$pkgdir/usr" \
156       libdir="$pkgdir/usr/lib" \
157       dlldir="$pkgdir/usr/lib/wine" install
158   fi
161 # vim:set ts=8 sts=2 sw=2 et: