updated on Wed Jan 25 16:08:47 UTC 2012
[aur-mirror.git] / wine-wow64-git / PKGBUILD
blob908a08b872fdb4091a66e4a88324b4f6448add43
1 # Maintainer: Jan "heftig" Steffens <jan.steffens@gmail.com>
2 # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
3 # Contributor: Eduardo Romero <eduardo@archlinux.org>
4 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
6 _gitname=wine
7 pkgver=20110907
8 pkgrel=1
10 pkgname=$_gitname-wow64-git
12 _gitroot=git://source.winehq.org/git/wine.git
14 pkgdesc="A compatibility layer for running Windows programs (both 32-bit and 64-bit; from git)"
15 url="http://www.winehq.com"
16 arch=(i686 x86_64)
17 license=(LGPL)
18 install=wine.install
20 depends=(
21   fontconfig      lib32-fontconfig
22   mesa            lib32-mesa 
23   libxcursor      lib32-libxcursor
24   libxrandr       lib32-libxrandr
25   libxdamage      lib32-libxdamage
26   libxxf86dga     lib32-libxxf86dga
27   libxi           lib32-libxi
28   alsa-lib        lib32-alsa-lib
29   desktop-file-utils
32 makedepends=(git autoconf ncurses bison perl fontforge flex prelink
33   'gcc>=4.5.0-2'  'gcc-multilib>=4.5.0-2'
34   giflib          lib32-giflib
35   libxpm          lib32-libxpm
36   libpng          lib32-libpng
37   libxinerama     lib32-libxinerama
38   libxcomposite   lib32-libxcomposite
39   libxmu          lib32-libxmu
40   libxxf86vm      lib32-libxxf86vm
41   libxml2         lib32-libxml2
42   libxslt         lib32-libxslt
43   libldap         lib32-libldap
44   lcms            lib32-lcms
45   mpg123          lib32-mpg123
46   openal          lib32-openal
47   libcups         lib32-libcups
48   gnutls          lib32-gnutls
49   v4l-utils       lib32-v4l-utils
50   oss
52   
53 optdepends=(
54   giflib          lib32-giflib
55   libpng          lib32-libpng
56   libldap         lib32-libldap
57   lcms            lib32-lcms
58   libxml2         lib32-libxml2
59   mpg123          lib32-mpg123
60   openal          lib32-openal
61   libcups         lib32-libcups
62   gnutls          lib32-gnutls
63   v4l-utils       lib32-v4l-utils
64   oss
67 if [[ $CARCH == i686 ]]; then
68   # Strip lib32 etc. on i686
69   depends=(${depends[@]/*32-*/})
70   makedepends=(${makedepends[@]/*32-*/})
71   makedepends=(${makedepends[@]/*-multilib*/})
72   optdepends=(${optdepends[@]/*32-*/})
73   provides=(wine)
74   conflicts=(wine)
75 else
76   provides=(wine bin32-wine wine-wow64)
77   conflicts=(wine bin32-wine wine-wow64)
80 build() {
81   cd "$srcdir"
83   msg2 "Connecting to Git..."
84   if [ -d $_gitname ] ; then
85     ( cd $_gitname && git pull ) || warning "Git pull failed!"
86   else
87     git clone $_gitroot
88   fi
90   # Get rid of old build dirs
91   rm -rf $_gitname-{32,64}-build
92   mkdir $_gitname-32-build
94   if [[ $CARCH == x86_64 ]]; then
95     msg2 "Building Wine-64..."
97     mkdir $_gitname-64-build
98     cd "$srcdir/$_gitname-64-build"
99     ../$_gitname/configure \
100       --prefix=/usr \
101       --sysconfdir=/etc \
102       --libdir=/usr/lib \
103       --with-x \
104       --enable-win64
106     make
108     _wine32opts=(
109       --libdir=/usr/lib32
110       --with-wine64="$srcdir/$_gitname-64-build"
111     )
113     export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
114   fi
116   msg2 "Building Wine-32..."
117   cd "$srcdir/$_gitname-32-build"
118   ../$_gitname/configure \
119     --prefix=/usr \
120     --sysconfdir=/etc \
121     --with-x \
122     "${_wine32opts[@]}"
124   make
127 package() {
128   msg2 "Packaging Wine-32..."
129   cd "$srcdir/$_gitname-32-build"
131   if [[ $CARCH == i686 ]]; then
132     make prefix="$pkgdir/usr" install
133   else
134     make prefix="$pkgdir/usr" \
135       libdir="$pkgdir/usr/lib32" \
136       dlldir="$pkgdir/usr/lib32/wine" install
138     msg2 "Packaging Wine-64..."
139     cd "$srcdir/$_gitname-64-build"
140     make prefix="$pkgdir/usr" \
141       libdir="$pkgdir/usr/lib" \
142       dlldir="$pkgdir/usr/lib/wine" install
143   fi
146 # vim:set ts=8 sts=2 sw=2 et: