# Maintainer: Stefan Husmann <stefan-husmann@t-online.de>
# Contributor: Benjamin van der Burgh <benjaminvdb@gmail.com>
pkgname=octave-hg
pkgver=16478
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=('SKIP')
_hgroot=http://www.octave.org/hg/
_hgrepo=octave
pkgver() {
echo $(hg identify -i http://hg.savannah.gnu.org/hgweb/octave|cut -d " " -f2)
}
build() {
cd $srcdir
if [ -d ${_hgrepo} ]; then
cd ${startdir}/src/${_hgrepo}
hg pull -u
else
hg clone ${_hgroot}${_hgrepo} || return 1
fi
msg "Mercurial clone done or server timeout"
msg "Starting make..."
rm -rf $srcdir/$_hgrepo-build
cp -rf $srcdir/$_hgrepo $srcdir/$_hgrepo-build
cd $srcdir/$_hgrepo-build
./bootstrap --bootstrap-sync
LANG=C
./configure --prefix=/usr --libexecdir=/usr/lib --enable-shared \
--with-umfpack="-lumfpack -lsuitesparseconfig -lrt" --disable-jit \
--enable-qhull --disable-java --enable-docs
make
}
package() {
cd $srcdir/${_hgrepo}
make DESTDIR=${pkgdir} install
# add octave library path to ld.so.conf.d
install -d "${pkgdir}/etc/ld.so.conf.d"
echo "/usr/lib/${pkgname}/${pkgver}" > "${pkgdir}/etc/ld.so.conf.d/${pkgname}.conf"
}