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 23rd, 2013  |  syntax: None  |  size: 2.49 KB  |  views: 20  |  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=16555
  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=()
  33.  
  34. _hgroot=http://www.octave.org/hg/
  35. _hgrepo=octave
  36.  
  37. pkgver() {
  38.   if [ -d $SRCDEST/${_hgrepo}/.hg ]; then
  39.     cd $SRCDEST/${_hgrepo}
  40.     echo $(hg identify -n).$(hg identify -i)
  41.   else
  42.   echo $pkgver.$(hg identify -i http://hg.savannah.gnu.org/hgweb/octave)
  43.   fi
  44. }
  45.  
  46. build() {
  47.   cd $SRCDEST
  48.  
  49.   if [ -d $SRCDEST/${_hgrepo} ]; then
  50.     cd $SRCDEST/${_hgrepo}
  51.     hg pull -u
  52.   else
  53.     hg clone ${_hgroot}${_hgrepo}
  54.   fi
  55.  
  56.   msg "Mercurial clone done or server timeout"
  57.   msg "Starting make..."
  58.  
  59.   [ -d $SRCDEST/$_hgrepo-build ] && rm -rf $SRCDEST/$_hgrepo-build
  60.   cp -rf $SRCDEST/$_hgrepo $SRCDEST/$_hgrepo-build
  61.  
  62.   cd $SRCDEST/$_hgrepo-build
  63.  
  64.   ./bootstrap
  65.   LANG=C
  66.   ./configure --prefix=/usr --libexecdir=/usr/lib --enable-shared \
  67.     --with-umfpack="-lumfpack -lsuitesparseconfig -lrt" --disable-jit \
  68.     --enable-qhull --disable-java --enable-docs MOC=moc-qt4 UIC=uic-qt4
  69.  
  70.   make
  71. }
  72.  
  73. package() {
  74.   cd $SRCDEST/${_hgrepo}-build
  75.   make DESTDIR=${pkgdir} install
  76.   # add octave library path to ld.so.conf.d
  77.   install -d "${pkgdir}/etc/ld.so.conf.d"
  78.   export _appver=$(${pkgdir}/usr/bin/octave --version | head -1 | sed "s/.*version \([^ ]*\).*$/\1/")
  79.   echo "/usr/lib/${_hgrepo}/${_appver}" > "${pkgdir}/etc/ld.so.conf.d/${_hgrepo}.conf"
  80. }
clone this paste RAW Paste Data