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

pd-extended-PKGBUILD

By: singintime on Mar 5th, 2012  |  syntax: Bash  |  size: 3.29 KB  |  hits: 78  |  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. # Maintainer: Anh Hai Trinh <anh.hai.trinh@gmail.com>
  2. pkgname=pd-extended
  3. pkgver=0.42.5
  4. pkgrel=2
  5. pkgdesc="PureData: a real-time music and multimedia environment"
  6. url="http://puredata.info/"
  7. arch=('i686' 'x86_64' 'ppc')
  8. license=('BSD')
  9. depends=('libv4l' 'fftw' 'jack' 'tk' 'freeglut' \
  10.   'libquicktime' 'libdv' 'gsl' 'imagemagick' \
  11.   'ftgl' 'libgl' 'dssi')
  12. makedepends=('swig' 'automake' 'curl' 'rsync')
  13. conflicts=('pd' 'pd-gem' 'pdp' 'zexy')
  14. provides=('pd' 'pd-extended' 'pd-gem' 'pdp' 'zexy')
  15. replaces=(pd-extended)
  16. backup=()
  17. options=('!makeflags')
  18. install=
  19. source=(http://downloads.sourceforge.net/pure-data/Pd-0.42.5-extended.tar.gz
  20.         pidip_configure.patch
  21.         pdp_vloopback.patch)
  22. md5sums=(54c20a51d4d07396f6a806ab46b31b18
  23.          d44ce422afd37995b15be5f4c911e18e
  24.          aadce51a3a7c5eeb65c0775c3bdf7b5f)
  25.  
  26. _realsrcdir=$srcdir/Pd-$pkgver-extended
  27.  
  28. build() {
  29.   unset CFLAGS
  30.   unset LDFLAGS
  31.   unset INCLUDES
  32.  
  33.   cd $_realsrcdir
  34.  
  35.   # Build GEM with v4l2 support
  36.   sed -e "s|cd \$(gem_src)\/src \&\& .\/configure |cd \$(gem_src)\/src \&\& .\/configure --without-v4l --with-v4l2 |g" -i packages/Makefile || return 1
  37.  
  38.   # Fix -export-dynamic option (mainly in pdp)
  39.   for i in $(find . -name Makefile)
  40.     do
  41.     sed -e "s|---export-dynamic|-export-dynamic|" -i $i
  42.     sed -e "s|--export-dynamic|-export-dynamic|" -i $i
  43.   done
  44.  
  45.   # Patches for pidip (yeah, DEFINITELY in pieces! :P)
  46.   patch -p0 externals/pidip/configure.ac $srcdir/pidip_configure.patch
  47.   patch -p0 externals/pidip/modules/pdp_vloopback.c $srcdir/pdp_vloopback.patch
  48.   sed -e "s|#include <linux/videodev.h>||g" -i externals/pidip/modules/pdp_v4l2.c
  49.  
  50.   if [ "$CARCH" = "x86_64" ]; then
  51.   # fix -fPIC issue in PDP
  52.     sed -e "s|CFLAGS =|CFLAGS = -fPIC|" \
  53.       -i externals/pdp/opengl/Makefile.config || return 1
  54.   # fix -fPIC issue in pddp
  55.     sed -e "s|DEFINES =|DEFINES = -fPIC|" \
  56.       -i externals/miXed/Makefile.common || return 1
  57.   # setting additional variable
  58.     FPIC_FLAG="-fPIC"
  59.     else FPIC_FLAG=""
  60.   fi
  61.  
  62.   # build and install
  63.   cd $_realsrcdir/packages/linux_make
  64.   make \
  65.     -C $_realsrcdir/packages \
  66.     GEM_EXTRA_CXXFLAGS="$FPIC_FLAG" \
  67.     BUILDLAYOUT_DIR=$_realsrcdir/packages \
  68.     DESTDIR=$pkgdir \
  69.     prefix=/usr \
  70.     install || return 1
  71. }
  72.  
  73. package () {
  74.   cd $_realsrcdir
  75.  
  76.   install -Dm644 pd/LICENSE.txt \
  77.     $pkgdir/usr/share/licenses/pd-extended-$pkgver/LICENSE.txt
  78.  
  79.   cd packages/
  80.   mkdir -p $pkgdir/usr/lib/pd-extended
  81.   install -p linux_make/default.pdextended $pkgdir/usr/lib/pd-extended
  82.  
  83.   # Gnome menu support
  84.   install -d $pkgdir/usr/share/icons/hicolor/128x128/apps
  85.   install -p -m0644 linux_make/pd.png \
  86.     $pkgdir/usr/share/icons/hicolor/128x128/apps/
  87.   install -d $pkgdir/usr/share/icons/hicolor/48x48/apps
  88.   install -p -m0644 linux_make/pd-48x48.png \
  89.     $pkgdir/usr/share/icons/hicolor/48x48/apps/pd.png
  90.   install -d $pkgdir/usr/share/applications/
  91.   install -p linux_make/pd-extended.desktop \
  92.     $pkgdir/usr/share/applications/
  93.  
  94.   # files for /etc
  95.   cd $_realsrcdir
  96.   install -d $pkgdir/etc/bash_completion.d/
  97.   install -p scripts/bash_completion/pd $pkgdir/etc/bash_completion.d
  98.  
  99.   # Pd-related scripts
  100.   mkdir -p $pkgdir/usr/bin
  101.   install -p scripts/pd-diff $pkgdir/usr/bin/
  102.   install -p scripts/config-switcher.sh $pkgdir/usr/bin/
  103. }