void-packages/srcpkgs/octave/template

74 lines
2.2 KiB
Bash

# Template file for 'octave'
pkgname=octave
version=9.2.0
revision=2
build_style=gnu-configure
build_helper=qmake6
configure_args="--disable-docs"
hostmakedepends="perl gcc-fortran pkg-config qt6-base qt6-tools"
makedepends="pcre2-devel readline-devel libSM-devel libltdl-devel lcms2-devel
glpk-devel SuiteSparse-devel rapidjson arpack-ng-devel libsndfile-devel
portaudio-devel libcurl-devel fftw-devel libgraphicsmagick-devel
qt6-base-devel qt6-tools-devel qt6-qt5compat-devel qt6-plugin-sqlite
qscintilla-qt6-devel glu-devel fltk-devel fontconfig-devel freetype-devel
gl2ps-devel libgomp-devel libqhull-devel zlib-devel"
depends="qt6-plugin-sqlite texinfo"
checkdepends="zip unzip ghostscript gnuplot tar texinfo"
short_desc="High-level language, primarily intended for numerical computations"
maintainer="Gonzalo Tornaría <tornaria@cmat.edu.uy>"
license="GPL-3.0-or-later"
homepage="https://octave.org/"
changelog="http://hg.savannah.gnu.org/hgweb/octave/raw-file/default/etc/NEWS.${version%%.*}.md"
distfiles="${GNU_SITE}/octave/octave-${version}.tar.gz"
checksum=0636554b05996997e431caad4422c00386d2d7c68900472700fecf5ffeb7c991
# Use OpenBLAS on platforms where it is available and fallback to regular BLAS
# on all others.
case "$XBPS_TARGET_MACHINE" in
# List of supported architectures copied from openblas.
armv[67]*|aarch64*|i686*|x86_64*|ppc64*)
makedepends+=" openblas-devel"
configure_args+=" --with-blas=openblas --with-lapack=openblas"
;;
*)
makedepends+=" blas-devel lapack-devel"
;;
esac
if [ -z "$CROSS_BUILD" ]; then
# hdf5 is nocross
makedepends+=" hdf5-devel"
fi
if [ -n "$CROSS_BUILD" ];then
# cross build cannot determine integer size for BLAS
# our BLAS (lapack and openblas) are built with 32 bit ints
# even in 64 bit architectures
configure_args+=" ax_blas_integer_size=4"
fi
case "$XBPS_TARGET_MACHINE" in
ppc64*) ;;
ppc*) broken="fails to configure";;
esac
pre_build() {
chmod +x build-aux/mk-opts.pl
}
post_install() {
# add helper to launch octave from dmenu etc.
printf "#!/bin/sh\noctave --gui" > octave-gui
vbin octave-gui
# install man pages
for f in doc/*/*.1; do
vman $f
done
# install info files
vmkdir usr/share/info
touch ${DESTDIR}/usr/share/info/dir
vcopy "doc/*/*.info*" usr/share/info
}