Want more features on Pastebin? Sign Up, it's FREE!
Guest

PKGBUILD wine-wot-nv

By: a guest on Feb 12th, 2014  |  syntax: Bash  |  size: 5.28 KB  |  views: 58  |  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: 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>
  6.  
  7. pkgname=wine-wot
  8. pkgver=1.7.12
  9. pkgrel=2
  10.  
  11. _pkgname=wine
  12. _pkgrc=
  13. _pkgbasever=${pkgver}${_pkgrc}
  14.  
  15.  
  16. #_pkgbasever=${pkgver/rc/-rc}
  17.  
  18. source=(http://prdownloads.sourceforge.net/$_pkgname/$_pkgname-$_pkgbasever.tar.bz2{,.sign}
  19.         disable-dynamic-vertex-buffers2.patch
  20.         30-win32-aliases.conf)
  21. md5sums=('ce32c886af1c8a4e824e8dc1a01c5703'
  22.          'SKIP'
  23.         '3e04fd1a6cecfa9ecfceb4c88757f31f'
  24.         '1ff4e467f59409272088d92173a0f801')
  25.  
  26. pkgdesc="Wine with patches for World Of Tanks. NVIDIA version"
  27. url="http://www.winehq.com"
  28. arch=(i686 x86_64)
  29. options=(staticlibs)
  30. license=(LGPL)
  31. install=wine.install
  32.  
  33. _depends=(
  34.   fontconfig      lib32-fontconfig
  35.   libxcursor      lib32-libxcursor
  36.   libxrandr       lib32-libxrandr
  37.   libxdamage      lib32-libxdamage
  38.   libxi           lib32-libxi
  39.   gettext         lib32-gettext
  40.   freetype2       lib32-freetype2
  41.   glu             lib32-glu
  42.   libsm           lib32-libsm
  43.   gcc-libs        lib32-gcc-libs
  44.   desktop-file-utils
  45. )
  46.  
  47. makedepends=(autoconf ncurses bison perl fontforge flex prelink
  48.   'gcc>=4.5.0-2'  'gcc-multilib>=4.5.0-2'
  49.   giflib          lib32-giflib
  50.   libpng          lib32-libpng
  51.   gnutls          lib32-gnutls
  52.   libxinerama     lib32-libxinerama
  53.   libxcomposite   lib32-libxcomposite
  54.   libxmu          lib32-libxmu
  55.   libxxf86vm      lib32-libxxf86vm
  56.   libxml2         lib32-libxml2
  57.   libldap         lib32-libldap
  58.   lcms2           lib32-lcms2
  59.   mpg123          lib32-mpg123
  60.   openal          lib32-openal
  61.   v4l-utils       lib32-v4l-utils
  62.   alsa-lib        lib32-alsa-lib
  63.   libxcomposite   lib32-libxcomposite
  64.   mesa            lib32-mesa
  65.   nvidia-libgl    lib32-nvidia-libgl
  66. #  mesa-libgl      lib32-mesa-libgl
  67.   libcl           lib32-libcl
  68.   opencl-headers
  69. )
  70.  
  71. optdepends=(
  72.   giflib          lib32-giflib
  73.   libpng          lib32-libpng
  74.   libldap         lib32-libldap
  75.   gnutls          lib32-gnutls
  76.   lcms2           lib32-lcms2
  77.   libxml2         lib32-libxml2
  78.   mpg123          lib32-mpg123
  79.   openal          lib32-openal
  80.   v4l-utils       lib32-v4l-utils
  81.   libpulse        lib32-libpulse
  82.   alsa-plugins    lib32-alsa-plugins
  83.   alsa-lib        lib32-alsa-lib
  84.   libjpeg-turbo   lib32-libjpeg-turbo
  85.   libxcomposite   lib32-libxcomposite
  86.   libxinerama     lib32-libxinerama
  87.   ncurses         lib32-ncurses
  88.   libcl           lib32-libcl
  89.   cups
  90.   samba           dosbox
  91. )
  92.  
  93. if [[ $CARCH == i686 ]]; then
  94.   # Strip lib32 etc. on i686
  95.   _depends=(${_depends[@]/*32-*/})
  96.   makedepends=(${makedepends[@]/*32-*/} ${_depends[@]})
  97.   makedepends=(${makedepends[@]/*-multilib*/})
  98.   optdepends=(${optdepends[@]/*32-*/})
  99. else
  100.   makedepends=(${makedepends[@]} ${_depends[@]})
  101.   provides=("bin32-wine=$pkgver" "wine-wow64=$pkgver")
  102.   conflicts=('bin32-wine' 'wine-wow64')
  103.   replaces=('bin32-wine')
  104. fi
  105.  
  106. build() {
  107.   # Patching
  108.   cd "$srcdir/$_pkgname-$_pkgbasever"
  109.  
  110.   msg2 "Applying patch for fps..."
  111.   patch -p1 < "$startdir/disable-dynamic-vertex-buffers2.patch" || exit 1
  112.   ./tools/make_requests
  113.  
  114.   cd "$srcdir"
  115.  
  116.   # Allow ccache to work
  117.   mv $pkgname-$_pkgbasever $pkgname
  118.  
  119.   # ncurses fix
  120.   sed -i 's|libncurses|libncursesw|g' "$srcdir/$pkgname/configure"
  121.   sed -i 's|lncurses|lncursesw|g' "$srcdir/$pkgname/configure"
  122.  
  123.   # Get rid of old build dirs
  124.   rm -rf $pkgname-{32,64}-build
  125.   mkdir $pkgname-32-build
  126.  
  127.   # These additional CPPFLAGS solve FS#27662 and FS#34195
  128.   export CPPFLAGS="${CPPFLAGS/-D_FORTIFY_SOURCE=2/} -D_FORTIFY_SOURCE=0"
  129.  
  130.   if [[ $CARCH == x86_64 ]]; then
  131.     msg2 "Building Wine-64..."
  132.  
  133.     mkdir $pkgname-64-build
  134.     cd "$srcdir/$pkgname-64-build"
  135.     ../$pkgname/configure \
  136.       --prefix=/usr \
  137.       --libdir=/usr/lib \
  138.       --with-x \
  139.       --without-gstreamer \
  140.       --enable-win64
  141.     # Gstreamer was disabled for FS#33655
  142.  
  143.     make
  144.  
  145.     _wine32opts=(
  146.       --libdir=/usr/lib32
  147.       --with-wine64="$srcdir/$pkgname-64-build"
  148.     )
  149.  
  150.     export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
  151.   fi
  152.  
  153.   msg2 "Building Wine-32..."
  154.   cd "$srcdir/$pkgname-32-build"
  155.   ../$pkgname/configure \
  156.     --prefix=/usr \
  157.     --with-x \
  158.     --without-gstreamer \
  159.     "${_wine32opts[@]}"
  160.  
  161.   # These additional flags solve FS#23277
  162.   make CFLAGS+="-mstackrealign -mincoming-stack-boundary=2" CXXFLAGS+="-mstackrealign -mincoming-stack-boundary=2"
  163. }
  164.  
  165. package() {
  166.   depends=(${_depends[@]})
  167.  
  168.   msg2 "Packaging Wine-32..."
  169.   cd "$srcdir/$pkgname-32-build"
  170.  
  171.   if [[ $CARCH == i686 ]]; then
  172.     make prefix="$pkgdir/usr" install
  173.   else
  174.     make prefix="$pkgdir/usr" \
  175.       libdir="$pkgdir/usr/lib32" \
  176.       dlldir="$pkgdir/usr/lib32/wine" install
  177.  
  178.     msg2 "Packaging Wine-64..."
  179.     cd "$srcdir/$pkgname-64-build"
  180.     make prefix="$pkgdir/usr" \
  181.       libdir="$pkgdir/usr/lib" \
  182.       dlldir="$pkgdir/usr/lib/wine" install
  183.   fi
  184.  
  185.   # Font aliasing settings for Win32 applications
  186.   install -d "$pkgdir"/etc/fonts/conf.{avail,d}
  187.   install -m644 "$srcdir/30-win32-aliases.conf" "$pkgdir/etc/fonts/conf.avail"
  188.   ln -s ../conf.avail/30-win32-aliases.conf "$pkgdir/etc/fonts/conf.d/30-win32-aliases.conf"
  189. }
  190.  
  191. # vim:set ts=8 sts=2 sw=2 et:
clone this paste RAW Paste Data