Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
- # Contributor: Benjamin van der Burgh <benjaminvdb@gmail.com>
- pkgname=octave-hg
- pkgver=16511.03a28487fa9d.04fb96f4bea1
- pkgrel=1
- pkgdesc="A high-level language, primarily intended for numerical computations."
- url="http://www.octave.org"
- arch=('i686' 'x86_64')
- license=('GPL')
- # Some of these may be optional, e.g. arpack, lapack, qhull, but if they
- # are installed, octave will be linked against them.
- depends=('fftw>=3.2.2' 'curl' 'fltk' 'hdf5' 'glpk' 'arpack' \
- 'qrupdate' 'qscintilla' 'qhull' 'graphicsmagick')
- makedepends=('pcre' 'mercurial' 'texinfo-legacy' 'gcc-fortran' 'gperf' \
- 'perl' 'rsync')
- # For building the documentation, epstool and fig2dev are searched during
- # build. The build works without them, but you may want to install
- # transfig from [extra] and epstool from AUR
- optdepends=('texinfo: for help-support in octave'
- 'gnuplot: alternative plotting')
- conflicts=('octave' 'octave3' 'octave-suitsparse')
- provides=('octave=3.7.2+')
- install=octave.install
- options=('!emptydirs')
- # makepkg doesn't handle subrepos well, so leave 'source' empty and
- # clone from the repositories manually.
- #source=(hg+http://hg.savannah.gnu.org/hgweb/octave)
- source=()
- md5sums=()
- _hgroot=http://www.octave.org/hg/
- _hgrepo=octave
- pkgver() {
- if [ -d $SRCDEST/${_hgrepo}/.hg ]; then
- cd $SRCDEST/${_hgrepo}
- echo $(hg identify -ni|cut -d" " -f2)
- else
- echo $pkgver.$(hg identify -i http://hg.savannah.gnu.org/hgweb/octave)
- fi
- }
- build() {
- cd $SRCDEST
- if [ -d $SRCDEST/${_hgrepo} ]; then
- cd $SRCDEST/${_hgrepo}
- hg pull -u
- else
- hg clone ${_hgroot}${_hgrepo}
- fi
- msg "Mercurial clone done or server timeout"
- msg "Starting make..."
- [ -d $SRCDEST/$_hgrepo-build ] && rm -rf $SRCDEST/$_hgrepo-build
- cp -rf $SRCDEST/$_hgrepo $SRCDEST/$_hgrepo-build
- cd $SRCDEST/$_hgrepo-build
- ./bootstrap
- LANG=C
- ./configure --prefix=/usr --libexecdir=/usr/lib --enable-shared \
- --with-umfpack="-lumfpack -lsuitesparseconfig -lrt" --disable-jit \
- --enable-qhull --disable-java --enable-docs MOC=moc-qt4 UIC=uic-qt4
- make
- }
- package() {
- cd $SRCDEST/${_hgrepo}-build
- make DESTDIR=${pkgdir} install
- # add octave library path to ld.so.conf.d
- install -d "${pkgdir}/etc/ld.so.conf.d"
- export _appver=$(${pkgdir}/usr/bin/octave --version | head -1 | sed "s/.*version \([^ ]*\).*$/\1/")
- echo "/usr/lib/${_hgrepo}/${_appver}" > "${pkgdir}/etc/ld.so.conf.d/${_hgrepo}.conf"
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement