Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 11th, 2013  |  syntax: None  |  size: 2.23 KB  |  views: 6  |  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: Stefan Husmann <stefan-husmann@t-online.de>
  2. # Contributor: Benjamin van der Burgh <benjaminvdb@gmail.com>
  3.  
  4. pkgname=octave-hg
  5. pkgver=16478
  6. pkgrel=1
  7. pkgdesc="A high-level language, primarily intended for numerical computations."
  8. url="http://www.octave.org"
  9. arch=('i686' 'x86_64')
  10. license=('GPL')
  11.  
  12. # Some of these may be optional, e.g. arpack, lapack, qhull, but if they
  13. # are installed, octave will be linked against them.
  14. depends=('fftw>=3.2.2' 'curl' 'fltk' 'hdf5' 'glpk' 'arpack' \
  15.  'qrupdate' 'qscintilla' 'qhull' 'graphicsmagick')
  16.  
  17. makedepends=('pcre' 'mercurial' 'texinfo-legacy' 'gcc-fortran' 'gperf' \
  18.   'perl' 'rsync')
  19. # For building the documentation, epstool and fig2dev are searched during
  20. # build. The build works without them, but you may want to install
  21. # transfig from [extra] and epstool from AUR
  22. optdepends=('texinfo: for help-support in octave'
  23.             'gnuplot: alternative plotting')
  24. conflicts=('octave' 'octave3' 'octave-suitsparse')
  25. provides=('octave=3.7.2+')
  26. #install=octave.install
  27. options=('!emptydirs')
  28. # makepkg doesn't handle subrepos well, so leave 'source' empty and
  29. # clone from the repositories manually.
  30. #source=(hg+http://hg.savannah.gnu.org/hgweb/octave)
  31. source=()
  32. md5sums=('SKIP')
  33.  
  34. _hgroot=http://www.octave.org/hg/
  35. _hgrepo=octave
  36.  
  37. pkgver() {
  38.   echo $(hg identify -i http://hg.savannah.gnu.org/hgweb/octave|cut -d " " -f2)
  39. }
  40.  
  41. build() {
  42.   cd $srcdir
  43.  
  44.   if [ -d ${_hgrepo} ]; then
  45.     cd ${startdir}/src/${_hgrepo}
  46.     hg pull -u
  47.   else
  48.     hg clone ${_hgroot}${_hgrepo} || return 1
  49.   fi
  50.  
  51.   msg "Mercurial clone done or server timeout"
  52.   msg "Starting make..."
  53.  
  54.   rm -rf $srcdir/$_hgrepo-build
  55.   cp -rf $srcdir/$_hgrepo $srcdir/$_hgrepo-build
  56.  
  57.   cd $srcdir/$_hgrepo-build
  58.  
  59.   ./bootstrap --bootstrap-sync
  60.   LANG=C
  61.   ./configure --prefix=/usr --libexecdir=/usr/lib --enable-shared \
  62.     --with-umfpack="-lumfpack -lsuitesparseconfig -lrt" --disable-jit \
  63.     --enable-qhull --disable-java --enable-docs
  64.   make
  65. }
  66.  
  67. package() {
  68.   cd $srcdir/${_hgrepo}-build
  69.   make DESTDIR=${pkgdir} install
  70.   # add octave library path to ld.so.conf.d
  71.   install -d "${pkgdir}/etc/ld.so.conf.d"
  72.   echo "/usr/lib/${pkgname}/${pkgver}" > "${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf"
  73. }