# Maintainer: Stefan Husmann # Contributor: Benjamin van der Burgh pkgname=octave-hg pkgver=16555 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 -n).$(hg identify -i) 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" }