Advertisement
Guest User

Untitled

a guest
Apr 11th, 2013
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.42 KB | None | 0 0
  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=d3b01ae21259
  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. # We didn't check out the repository yet, so we have no version information..
  39. echo $(hg identify -i http://hg.savannah.gnu.org/hgweb/octave|cut -d " " -f2)
  40. }
  41.  
  42. build() {
  43. cd $srcdir
  44.  
  45. if [ -d ${_hgrepo} ]; then
  46. cd ${startdir}/src/${_hgrepo}
  47. hg pull -u
  48. else
  49. hg clone ${_hgroot}${_hgrepo} || return 1
  50. fi
  51.  
  52. msg "Mercurial clone done or server timeout"
  53. msg "Starting make..."
  54.  
  55. rm -rf $srcdir/$_hgrepo-build
  56. cp -rf $srcdir/$_hgrepo $srcdir/$_hgrepo-build
  57.  
  58. cd $srcdir/$_hgrepo-build
  59.  
  60. ./bootstrap --bootstrap-sync
  61. LANG=C
  62. ./configure --prefix=/usr --libexecdir=/usr/lib --enable-shared \
  63. --with-umfpack="-lumfpack -lsuitesparseconfig -lrt" --disable-jit \
  64. --enable-qhull --disable-java --enable-docs
  65. make
  66. }
  67.  
  68. package() {
  69. cd $srcdir/${_hgrepo}-build
  70. make DESTDIR=${pkgdir} install
  71. # add octave library path to ld.so.conf.d
  72. install -d "${pkgdir}/etc/ld.so.conf.d"
  73. export _appver=$(${pkgdir}/usr/bin/octave --version | head -1 | sed "s/.*version \([^ ]*\).*$/\1/")
  74. echo "/usr/lib/${_hgrepo}/${_appver}" > "${pkgdir}/etc/ld.so.conf.d/${_hgrepo}.conf"
  75. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement