Created
June 3, 2014 02:59
-
-
Save CommanderAlchemy/4d200406b59bf297de71 to your computer and use it in GitHub Desktop.
wine-multimedia-git with csmt-git patchset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer [multimedia-git]: John Schoenick <john@pointysoftware.net> | |
# Maintainer [base]: Sven-Hendrik Haase <sh@lutzhaase.com> | |
# Contributor: Jan "heftig" Steffens <jan.steffens@gmail.com> | |
# Contributor: Eduardo Romero <eduardo@archlinux.org> | |
# Contributor: Giovanni Scafora <giovanni@archlinux.org> | |
pkgname=wine-multimedia-git | |
_basename=wine | |
pkgver=cs.0.8 | |
pkgrel=1 | |
epoch=1 | |
pkgdesc="Wine with Maarten Lankhorst's multimedia patches, including PulseAudio support (git version)" | |
url="http://www.winehq.com" | |
arch=(i686 x86_64) | |
license=(LGPL) | |
install=wine.install | |
# Wine gitweb: http://source.winehq.org/git/wine.git | |
# Multimedia tree gitweb: http://repo.or.cz/w/wine/multimedia.git | |
source=(30-win32-aliases.conf | |
wine-multimedia::git://repo.or.cz/wine/multimedia.git | |
"wine-gcc49.patch::http://bugs.winehq.org/attachment.cgi?id=48545&action=diff&context=patch&collapsed=&headers=1&format=raw") | |
_depends=( | |
fontconfig lib32-fontconfig | |
libxcursor lib32-libxcursor | |
libxrandr lib32-libxrandr | |
libxdamage lib32-libxdamage | |
libxi lib32-libxi | |
gettext lib32-gettext | |
freetype2 lib32-freetype2 | |
glu lib32-glu | |
libsm lib32-libsm | |
gcc-libs lib32-gcc-libs | |
desktop-file-utils | |
) | |
makedepends=(autoconf ncurses bison perl fontforge flex prelink | |
'gcc>=4.5.0-2' 'gcc-multilib>=4.5.0-2' | |
giflib lib32-giflib | |
libpng lib32-libpng | |
gnutls lib32-gnutls | |
libxinerama lib32-libxinerama | |
libxcomposite lib32-libxcomposite | |
libxmu lib32-libxmu | |
libxxf86vm lib32-libxxf86vm | |
libxml2 lib32-libxml2 | |
libldap lib32-libldap | |
lcms lib32-lcms | |
mpg123 lib32-mpg123 | |
openal lib32-openal | |
v4l-utils lib32-v4l-utils | |
alsa-lib lib32-alsa-lib | |
libpulse lib32-libpulse | |
libxcomposite lib32-libxcomposite | |
mesa lib32-mesa | |
# multilib-build has issues with provides packages like this. If you're trying | |
# to build as such, exchange for: | |
# mesa-libgl lib32-mesa-libgl | |
libgl lib32-libgl | |
libcl lib32-libcl | |
samba | |
opencl-headers | |
) | |
optdepends=( | |
giflib lib32-giflib | |
libpng lib32-libpng | |
libldap lib32-libldap | |
gnutls lib32-gnutls | |
lcms lib32-lcms | |
libxml2 lib32-libxml2 | |
mpg123 lib32-mpg123 | |
openal lib32-openal | |
v4l-utils lib32-v4l-utils | |
libpulse lib32-libpulse | |
alsa-plugins lib32-alsa-plugins | |
alsa-lib lib32-alsa-lib | |
libpulse lib32-libpulse | |
libjpeg-turbo lib32-libjpeg-turbo | |
libxcomposite lib32-libxcomposite | |
libxinerama lib32-libxinerama | |
ncurses lib32-ncurses | |
libcl lib32-libcl | |
cups | |
samba dosbox | |
) | |
# Set to 1 to auto-rebase multimedia-git onto the latest wine-git | |
# Set to 0 if you just want to use the raw multimedia-git, which doesn't | |
# rebase itself all that often. | |
_rebase=1 | |
if [ $_rebase -eq 1 ]; then | |
source[${#source[@]}]='git://github.com/stefand/wine.git' | |
sha1sums[${#sha1sums[@]}]='SKIP' | |
fi | |
if [[ $CARCH == i686 ]]; then | |
# Strip lib32 etc. on i686 | |
_depends=(${_depends[@]/*32-*/}) | |
makedepends=(${makedepends[@]/*32-*/} ${_depends[@]}) | |
makedepends=(${makedepends[@]/*-multilib*/}) | |
optdepends=(${optdepends[@]/*32-*/}) | |
provides=("wine=$pkgver") | |
conflicts=('wine') | |
else | |
makedepends=(${makedepends[@]} ${_depends[@]}) | |
provides=("wine=$pkgver" "bin32-wine=$pkgver" "wine-wow64=$pkgver") | |
conflicts=('wine' 'bin32-wine' 'wine-wow64') | |
replaces=('bin32-wine') | |
fi | |
pkgver() { | |
if [ "$_rebase" -eq 1 ]; then | |
cd "$srcdir"/wine | |
else | |
cd "$srcdir"/wine-multimedia | |
fi | |
local ver=$(git describe --always | sed 's/-/./g') | |
ver=${ver#wine.} | |
echo ${ver/\.rc/rc} | |
} | |
prepare() { | |
( | |
cd "$srcdir"/wine | |
patch -Np1 < $srcdir/wine-gcc49.patch | |
) | |
} | |
build() { | |
cd "$srcdir/wine-multimedia" | |
# Try to rebase onto upstream, skipping patches that fail | |
if [ "$_rebase" -eq 1 ]; then | |
local failed=0 | |
local needreconf | |
msg2 "Attempting to auto-rebase onto latest upstream. Set _rebase to 0 to disable this." | |
git remote add upstream "$srcdir"/wine || true | |
git fetch upstream | |
local ret=0 | |
git rebase upstream/master || ret=1 | |
while [ $ret -ne 0 ]; do | |
ret=0 | |
# If the configure.ac changed, we usually succeed at rebasing it, but | |
# not the generated 'configure', which an autoreconf fixes | |
if [ ! -z "$(git status -s configure)" ]; then | |
git add configure | |
# If the rebase at least got to a new commit, set needreconf and | |
# continue. Otherwise fall through to skipping. | |
local thiscommit="$(cat .git/rebase-apply/original-commit)" | |
msg2 "merge conflict in configure script, nuking (will autoreconf)" | |
git rebase --continue || ret=1 | |
if [ "$ret" -eq 0 ] || [ "$(cat .git/rebase-apply/original-commit)" != "$thiscommit" ]; then | |
needreconf=1 | |
continue | |
fi | |
fi | |
warning "SKIPPING patch that no longer applies: $(cat .git/rebase-apply/msg-clean)" | |
ret=0 | |
(( ++failed )) | |
git rebase --skip || ret=1 | |
done | |
if [ ! -z "$needreconf" ]; then | |
msg2 "Merge conflicts in configure script, re-generating" | |
autoreconf -v --force --install | |
fi | |
[ "$failed" -eq 0 ] || warning "$failed wine-multimedia patches failed to rebase on upstream and were dropped" | |
fi | |
cd "$srcdir" | |
# Get rid of old build dirs | |
rm -rf $_basename-{32,64}-build | |
mkdir $_basename-32-build | |
# ncurses fix | |
sed -i 's|libncurses|libncursesw|g' "$srcdir/$_basename/configure" | |
sed -i 's|lncurses|lncursesw|g' "$srcdir/$_basename/configure" | |
# These additional CPPFLAGS solve FS#27662 and FS#34195 | |
export CPPFLAGS="${CPPFLAGS/-D_FORTIFY_SOURCE=2/} -D_FORTIFY_SOURCE=0" | |
if [[ $CARCH == x86_64 ]]; then | |
msg2 "Building Wine-64..." | |
mkdir $_basename-64-build | |
cd "$srcdir/$_basename-64-build" | |
../wine-multimedia/configure \ | |
--prefix=/usr \ | |
--libdir=/usr/lib \ | |
--with-x \ | |
--without-gstreamer \ | |
--enable-win64 | |
# Gstreamer was disabled for FS#33655 | |
make | |
_wine32opts=( | |
--libdir=/usr/lib32 | |
--with-wine64="$srcdir/$_basename-64-build" | |
) | |
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig" | |
fi | |
msg2 "Building Wine-32..." | |
cd "$srcdir/$_basename-32-build" | |
../wine-multimedia/configure \ | |
--prefix=/usr \ | |
--with-x \ | |
--without-gstreamer \ | |
"${_wine32opts[@]}" | |
# These additional CFLAGS solve FS#27560 and FS#23277 | |
make CFLAGS+="-mstackrealign -mincoming-stack-boundary=2" CXXFLAGS+="-mstackrealign -mincoming-stack-boundary=2" | |
} | |
package() { | |
depends=(${_depends[@]}) | |
msg2 "Packaging Wine-32..." | |
cd "$srcdir/$_basename-32-build" | |
if [[ $CARCH == i686 ]]; then | |
make prefix="$pkgdir/usr" install | |
else | |
make prefix="$pkgdir/usr" \ | |
libdir="$pkgdir/usr/lib32" \ | |
dlldir="$pkgdir/usr/lib32/wine" install | |
msg2 "Packaging Wine-64..." | |
cd "$srcdir/$_basename-64-build" | |
make prefix="$pkgdir/usr" \ | |
libdir="$pkgdir/usr/lib" \ | |
dlldir="$pkgdir/usr/lib/wine" install | |
fi | |
# Font aliasing settings for Win32 applications | |
install -d "$pkgdir"/etc/fonts/conf.{avail,d} | |
install -m644 "$srcdir/30-win32-aliases.conf" "$pkgdir/etc/fonts/conf.avail" | |
ln -s ../conf.avail/30-win32-aliases.conf "$pkgdir/etc/fonts/conf.d/30-win32-aliases.conf" | |
} | |
sha1sums=('421889519bb7ded390fc6f921f7746d6f16fc9a4' | |
'SKIP' | |
'031ceed1a5fd4e1c26b183abfc7c0749b806a237' | |
'SKIP') | |
# vim:set ts=8 sts=2 sw=2 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment