octave-hg: Add PKGBUILD

This commit is contained in:
Les De Ridder 2018-11-29 05:34:12 +01:00
parent 60128b3578
commit addb43c662
2 changed files with 61 additions and 0 deletions

3
octave-hg/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
*
!.gitignore
!PKGBUILD

58
octave-hg/PKGBUILD Normal file
View File

@ -0,0 +1,58 @@
# Maintainer: Ronald van Haren <ronald.archlinux.org>
# Contributor : shining <shiningxc.at.gmail.com>
# Contributor : cyberdune <cyberdune@gmail.com>
_pkgname=octave
pkgname=$_pkgname-hg
pkgver=r26145.64b972120ec3
pkgrel=1
conflicts=('octave')
provides=('octave')
pkgdesc="A high-level language, primarily intended for numerical computations."
arch=('x86_64')
url="http://www.octave.org"
license=('GPL')
depends=('fftw' 'curl' 'graphicsmagick' 'glpk' 'hdf5' 'qhull' 'arpack' 'glu' 'ghostscript'
'suitesparse' 'gl2ps' 'qscintilla-qt5' 'libsndfile' 'qt5-tools' 'qrupdate')
makedepends=('gcc-fortran' 'texlive-core' 'suitesparse' 'texinfo' 'gnuplot' 'fltk' 'portaudio' 'jdk8-openjdk' 'mercurial')
optdepends=('texinfo: for help-support in octave'
'gnuplot: alternative plotting'
'portaudio: audio support'
'java-runtime: java support'
'fltk: FLTK GUI')
source=(hg+https://www.octave.org/hg/octave)
options=('!emptydirs')
validpgpkeys=('DBD9C84E39FE1AAE99F04446B05F05B75D36644B') # John W. Eaton
sha512sums=('SKIP')
build() {
cd "${srcdir}/${_pkgname}"
./bootstrap
export CFLAGS="-march=native -Ofast"
./configure --prefix=/usr --libexecdir=/usr/lib \
--enable-shared --disable-static \
--with-quantum-depth=16 \
--with-umfpack="-lumfpack -lsuitesparseconfig" \
--enable-jit
# https://mailman.cae.wisc.edu/pipermail/help-octave/2012-September/053991.html
LANG=C make
}
package(){
cd "${srcdir}/${_pkgname}"
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"
}
pkgver() {
cd "$_pkgname"
printf "r%s.%s" "$(hg identify -n)" "$(hg identify -i)"
}