1 # Maintainer: John Schoenick <john@pointysoftware.net>
2 # Contributor: Sven-Hendrik Haase <sh@lutzhaase.com>
3 # Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com>
4 # Contributor: Eduardo Romero <eduardo@archlinux.org>
5 # Contributor: Giovanni Scafora <giovanni@archlinux.org>
7 pkgname=wine-multimedia-git
12 pkgdesc="A compatibility layer for running Windows programs"
13 url="http://www.winehq.com"
19 fontconfig lib32-fontconfig
21 libxcursor lib32-libxcursor
22 libxrandr lib32-libxrandr
23 libxdamage lib32-libxdamage
24 libxxf86dga lib32-libxxf86dga
26 alsa-lib lib32-alsa-lib
29 # Required for new openalSOFT api calls that arn't in release yet.
30 # Sound wont work without this!
31 openal-git lib32-openal-git
32 # The pulse driver wont work without this, but you can remove it if you don't expect to use it.
33 alsa-plugins-git lib32-alsa-plugins-git
36 makedepends=(autoconf ncurses bison perl fontforge flex prelink git
37 'gcc>=4.5.0-2' 'gcc-multilib>=4.5.0-2'
41 libxinerama lib32-libxinerama
42 libxcomposite lib32-libxcomposite
44 libxxf86vm lib32-libxxf86vm
53 v4l-utils lib32-v4l-utils
55 # This is required if you want the build to support OSS,
56 # but since this is an AUR package and just installing OSS can devestate your alsa sound system,
57 # I'm leaving it out by default.
71 v4l-utils lib32-v4l-utils
75 # Set to 1 to auto-rebase multimedia-git onto the latest wine-git
76 # Set to 0 if you just want to use the raw multimedia-git, which doesn't
77 # rebase itself all that often.
80 # Wine gitweb: http://source.winehq.org/git/wine.git
81 # Multimedia tree gitweb: http://repo.or.cz/w/wine/multimedia.git
82 _gitroot=git://repo.or.cz/wine/multimedia.git
83 _gitname=wine-multimedia
84 _upstream=git://source.winehq.org/git/wine.git
86 # This is used when _rebase=1, see comment in build()
87 source=(winemultimedia_add_winepulse_getpriority.patch)
88 sha256sums=('209b22d5fe05a59ddb5108507261641f733256ba218bfe932df867fb0757aeb9')
90 if [[ $CARCH == i686 ]]; then
91 # Strip lib32 etc. on i686
92 depends=(${depends[@]/*32-*/})
93 makedepends=(${makedepends[@]/*32-*/})
94 makedepends=(${makedepends[@]/*-multilib*/})
95 optdepends=(${optdepends[@]/*32-*/})
96 provides=("wine=$pkgver")
99 provides=("wine=$pkgver" "bin32-wine=$pkgver" "wine-wow64=$pkgver")
100 conflicts=('wine' 'bin32-wine' 'wine-wow64')
101 replaces=('bin32-wine')
108 if [ ! -d "$_gitname" ]; then
110 # The reason we clone upstream and add a remote
111 # to multimedia is mainly because repo.or.cz
112 # is much slower - it could be done either way.
113 msg2 "Cloning wine git"
114 git clone "$_upstream" "$_gitname"
117 msg2 "Fetching multimedia git"
118 git remote add multimedia "$_gitroot"
120 git checkout -b multimedia multimedia/master
125 msg2 "Updating multimedia git"
126 git checkout -f multimedia
127 # The multimedia branch sometimes rebases itself, so
128 # we fetch and hard reset. If you want to apply your
129 # own patches to your local repository, replace this
130 # line with just "git pull" - But be aware that
131 # you're responsible for fixing desync in the future.
132 git fetch multimedia && git reset --hard multimedia/master && git clean -xfd
134 if [ "$_rebase" -gt 0 ]; then
135 msg2 "Pulling upstream patches onto multimedia git"
137 # Make a 'temp' branch to rebase on upstream
138 git branch -D temp || true
141 git merge --squash -Xours origin/master || true
142 # -Xours resolves conflicts by just keeping the multimedia branch versions,
143 # this might return errors due to deleted files, which don't present a problem
146 # The following commit added GetPriority() to all the drivers:
147 # http://source.winehq.org/git/wine.git/commitdiff/c4b94b1ba4ee1664c0a14515d6fbc6d648e9175b
148 # So this patch adds the same thing to winepulse, fixing it refusing to load when rebasing
150 # If this is failing to apply, its possible the multimedia folks added it, in which case
151 # it can be dropped here.
152 patch -Np1 -i "${srcdir}/winemultimedia_add_winepulse_getpriority.patch"
156 # Get rid of old build dirs
157 rm -rf $_basename-{32,64}-build
158 mkdir $_basename-32-build
160 if [[ $CARCH == x86_64 ]]; then
161 msg2 "Building Wine-64..."
163 mkdir $_basename-64-build
164 cd "$srcdir/$_basename-64-build"
165 ../$_gitname/configure \
176 --with-wine64="$srcdir/$_basename-64-build"
179 export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
182 msg2 "Building Wine-32..."
183 cd "$srcdir/$_basename-32-build"
184 ../$_gitname/configure \
194 msg2 "Packaging Wine-32..."
195 cd "$srcdir/$_basename-32-build"
197 if [[ $CARCH == i686 ]]; then
198 make prefix="$pkgdir/usr" install
200 make prefix="$pkgdir/usr" \
201 libdir="$pkgdir/usr/lib32" \
202 dlldir="$pkgdir/usr/lib32/wine" install
204 msg2 "Packaging Wine-64..."
205 cd "$srcdir/$_basename-64-build"
206 make prefix="$pkgdir/usr" \
207 libdir="$pkgdir/usr/lib" \
208 dlldir="$pkgdir/usr/lib/wine" install
212 # vim:set ts=8 sts=2 sw=2 et: