Pastebin launched a little side project called HostCabi.net, check it out ;-)Don't like ads? PRO users don't see any ads ;-)
Guest

wine-laa pkgbuild

By: a guest on Feb 18th, 2012  |  syntax: Bash  |  size: 4.02 KB  |  hits: 108  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. # $Id$
  2. # Maintainer: Ivo Nunes <netherblood@gmail.com>
  3.  
  4. pkgname=wine-laa
  5. pkgbasename=wine
  6. pkgver=1.4rc4
  7. pkgrel=1
  8.  
  9. _pkgbasever=${pkgver/rc/-rc}
  10.  
  11. source=(http://ibiblio.org/pub/linux/system/emulators/$pkgbasename/$pkgbasename-$_pkgbasever.tar.bz2
  12.         wine-laa.patch)
  13. md5sums=('74d6ae855718b8fdc9c70fe95026941b'
  14.          '96373ba70e61cb6cbc88e0a4af0e25ba')
  15.  
  16. pkgdesc="A compatibility layer for running Windows programs. This version of Wine includes a patch to improve gaming performance."
  17. url="http://www.winehq.com"
  18. arch=(i686 x86_64)
  19. license=(LGPL)
  20.  
  21. depends=(
  22.   fontconfig      lib32-fontconfig
  23.   mesa            lib32-mesa
  24.   libxcursor      lib32-libxcursor
  25.   libxrandr       lib32-libxrandr
  26.   libxdamage      lib32-libxdamage
  27.   libxi           lib32-libxi
  28.   gettext         lib32-gettext
  29.   desktop-file-utils
  30. )
  31.  
  32. makedepends=(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.   v4l-utils       lib32-v4l-utils
  49.   alsa-lib        lib32-alsa-lib
  50.   oss
  51. )
  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.   v4l-utils       lib32-v4l-utils
  63.   libpulse        lib32-libpulse
  64.   alsa-plugins    lib32-alsa-plugins
  65.   alsa-lib        lib32-alsa-lib
  66.   oss
  67. )
  68.  
  69. if [[ $CARCH == i686 ]]; then
  70.   # Strip lib32 etc. on i686
  71.   depends=(${depends[@]/*32-*/})
  72.   makedepends=(${makedepends[@]/*32-*/})
  73.   makedepends=(${makedepends[@]/*-multilib*/})
  74.   optdepends=(${optdepends[@]/*32-*/})
  75.   provides=("wine")
  76.   conflicts=("wine")
  77.   replaces=("wine")
  78. else
  79.   provides=("bin32-wine=$pkgver" "wine-wow64=$pkgver" )
  80.   conflicts=('bin32-wine' 'wine-wow64' )
  81.   replaces=('bin32-wine' )
  82. fi
  83.  
  84. build() {
  85.   cd "$srcdir"
  86.  
  87.   # Allow ccache to work
  88.   mv $pkgbasename-$_pkgbasever $pkgbasename
  89.  
  90.   msg2 "Patching..."
  91.   (
  92.     cd $pkgbasename
  93.     patch -p1 < ../../wine-laa.patch
  94.   )
  95.  
  96.   # Get rid of old build dirs
  97.   rm -rf $pkgbasename-{32,64}-build
  98.   mkdir $pkgbasename-32-build
  99.  
  100.   # These additional CFLAGS solve FS#27662
  101.   export CFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/} -D_FORTIFY_SOURCE=0"
  102.   export CXXFLAGS="${CFLAGS/-D_FORTIFY_SOURCE=2/} -D_FORTIFY_SOURCE=0"
  103.  
  104.   if [[ $CARCH == x86_64 ]]; then
  105.     msg2 "Building Wine-64..."
  106.  
  107.     mkdir $pkgbasename-64-build
  108.     cd "$srcdir/$pkgbasename-64-build"
  109.     ../$pkgbasename/configure \
  110.       --prefix=/usr \
  111.       --sysconfdir=/etc \
  112.       --libdir=/usr/lib \
  113.       --with-x \
  114.       --enable-win64
  115.  
  116.     make
  117.  
  118.     _wine32opts=(
  119.       --libdir=/usr/lib32
  120.       --with-wine64="$srcdir/$pkgbasename-64-build"
  121.     )
  122.  
  123.     export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
  124.   fi
  125.  
  126.   msg2 "Building Wine-32..."
  127.   cd "$srcdir/$pkgbasename-32-build"
  128.   ../$pkgbasename/configure \
  129.     --prefix=/usr \
  130.     --sysconfdir=/etc \
  131.     --with-x \
  132.     "${_wine32opts[@]}"
  133.  
  134.   # These additional CFLAGS solve FS#27560
  135.   make CFLAGS+="-mstackrealign" CXXFLAGS+="-mstackrealign"
  136. }
  137.  
  138. package() {
  139.   msg2 "Packaging Wine-32..."
  140.   cd "$srcdir/$pkgbasename-32-build"
  141.  
  142.   if [[ $CARCH == i686 ]]; then
  143.     make prefix="$pkgdir/usr" install
  144.   else
  145.     make prefix="$pkgdir/usr" \
  146.       libdir="$pkgdir/usr/lib32" \
  147.       dlldir="$pkgdir/usr/lib32/wine" install
  148.  
  149.     msg2 "Packaging Wine-64..."
  150.     cd "$srcdir/$pkgbasename-64-build"
  151.     make prefix="$pkgdir/usr" \
  152.       libdir="$pkgdir/usr/lib" \
  153.       dlldir="$pkgdir/usr/lib/wine" install
  154.   fi
  155. }
  156.  
  157. # vim:set ts=8 sts=2 sw=2 et: