cruxports/octave/Pkgfile

37 lines
1.3 KiB
Plaintext

# Description: high-level programming language for scientific computing
# URL: https://www.gnu.org/software/octave
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: arpack
# Optional: fltk qscintilla-qt5 gl2ps gnuplot graphicsmagick fftw glpk glu hdf5 qhull qrupdate suitesparse libsndfile
name=octave
version=8.4.0
release=1
source=(https://ftpmirror.gnu.org/$name/$name-$version.tar.lz)
build() {
PKGMK_OCTAVE="--prefix=/usr --libexecdir=/usr/lib --enable-shared --disable-static --disable-docs"
prt-get isinst fftw || PKGMK_OCTAVE+=" --without-fftw3 --without-fftw3f"
prt-get isinst glpk || PKGMK_OCTAVE+=" --without-glpk"
[ -e /usr/lib/libhdf5.so ] && [ -e /usr/lib/libhdf5_fortran.so ] \
|| PKGMK_OCTAVE+=" --without-hdf5"
[ -e /usr/lib/libqhull.so ] || PKGMK_OCTAVE+=" --without-qhull"
[ -e /usr/lib/libqrupdate.so ] || PKGMK_OCTAVE+=" --without-qrupdate"
cd $name-$version
./configure $PKGMK_OCTAVE
make
make DESTDIR=$PKG install
# strip junk files
rm -f $PKG/usr/lib/$name/$version/*.la
rm -rf $PKG/usr/share/$name/$version/locale
find $PKG -name CITATION -delete
find $PKG -name NEWS -delete
find $PKG -name COPYING -delete
mkdir -p $PKG/etc/ld.so.conf.d
echo "/usr/lib/$name/$version" > "$PKG/etc/ld.so.conf.d/$name.conf"
}