Files
haikuports/sci-mathematics/octave/octave-4.2.1.recipe
2019-05-24 16:14:07 -04:00

172 lines
4.7 KiB
Bash

SUMMARY="A high-level language for numerical computations"
DESCRIPTION="GNU Octave is a high-level language, primarily intended for \
numerical computations. It provides a convenient command line interface \
for solving linear and nonlinear problems numerically."
HOMEPAGE="http://www.octave.org/"
COPYRIGHT="1996-2017 John W. Eaton"
LICENSE="GNU GPL v3"
REVISION="4"
SOURCE_URI="https://ftp.gnu.org/gnu/octave/octave-$portVersion.tar.gz"
CHECKSUM_SHA256="80c28f6398576b50faca0e602defb9598d6f7308b0903724442c2a35a605333b"
PATCHES="octave-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="?x86"
PROVIDES="
octave$secondaryArchSuffix = $portVersion
cmd:mkoctfile$secondaryArchSuffix = $portVersion
cmd:mkoctfile_$portVersion$secondaryArchSuffix = $portVersion
cmd:octave$secondaryArchSuffix = $portVersion
cmd:octave_$portVersion$secondaryArchSuffix = $portVersion
cmd:octave_cli$secondaryArchSuffix = $portVersion
cmd:octave_cli_$portVersion$secondaryArchSuffix = $portVersion
cmd:octave_config$secondaryArchSuffix = $portVersion
cmd:octave_config_$portVersion$secondaryArchSuffix = $portVersion
lib:liboctave$secondaryArchSuffix = $portVersion
lib:liboctinterp$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
cmd:gnuplot$secondaryArchSuffix
cmd:gs
lib:libbz2$secondaryArchSuffix
lib:libcrypto$secondaryArchSuffix
lib:libcurl$secondaryArchSuffix
lib:libfftw3$secondaryArchSuffix
lib:libfontconfig$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libgfortran$secondaryArchSuffix
lib:libGl$secondaryArchSuffix
lib:libGLU$secondaryArchSuffix
lib:libgomp$secondaryArchSuffix
# lib:libgraphicsmagick$secondaryArchSuffix
# lib:libhdf5$secondaryArchSuffix
# lib:liblapack$secondaryArchSuffix
# lib:libmagick++_6.q16$secondaryArchSuffix
lib:libncursesw$secondaryArchSuffix
lib:libopenblas$secondaryArchSuffix
lib:libpcre$secondaryArchSuffix
# lib:libQt5Core$secondaryArchSuffix
# lib:libQt5Gui$secondaryArchSuffix
# lib:libQt5Network$secondaryArchSuffix
# lib:libQt5OpenGL$secondaryArchSuffix
# lib:libQt5PrintSupport$secondaryArchSuffix
# lib:libQt5Widgets$secondaryArchSuffix
lib:libreadline$secondaryArchSuffix
lib:libsndfile$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
octave${secondaryArchSuffix}_devel = $portVersion
devel:liboctave$secondaryArchSuffix = $portVersion
devel:liboctinterp$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
octave$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libbz2$secondaryArchSuffix
devel:libcrypto$secondaryArchSuffix
devel:libcurl$secondaryArchSuffix
devel:libfftw3$secondaryArchSuffix
devel:libfontconfig$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libgfortran$secondaryArchSuffix
devel:libGl$secondaryArchSuffix
devel:libGLU$secondaryArchSuffix
devel:libgomp$secondaryArchSuffix
# devel:libgraphicsmagick$secondaryArchSuffix
# devel:libhdf5$secondaryArchSuffix
# devel:liblapack$secondaryArchSuffix
# devel:libmagick++_6.q16$secondaryArchSuffix
devel:libncursesw$secondaryArchSuffix
devel:libopenblas$secondaryArchSuffix
devel:libpcre$secondaryArchSuffix
# devel:libQt5Core$secondaryArchSuffix
# devel:libQt5Gui$secondaryArchSuffix
# devel:libQt5Network$secondaryArchSuffix
# devel:libQt5OpenGL$secondaryArchSuffix
# devel:libQt5PrintSupport$secondaryArchSuffix
# devel:libQt5Widgets$secondaryArchSuffix
devel:libreadline$secondaryArchSuffix
devel:libsndfile$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:bison >= 3
cmd:find
# cmd:flex
cmd:g++$secondaryArchSuffix
cmd:gfortran$secondaryArchSuffix
cmd:gnuplot$secondaryArchSuffix
# cmd:gperf
cmd:grep
cmd:gs
cmd:less
cmd:libtoolize$secondaryArchSuffix
cmd:make
# cmd:makeinfo
cmd:perl
cmd:pkg_config$secondaryArchSuffix
# cmd:python
# cmd:rsvg_convert
cmd:sed
"
BUILD()
{
export LDFLAGS="-lnetwork"
runConfigure ./configure \
--disable-docs \
--without-qt \
--with-openssl \
--without-x
make $jobArgs
}
INSTALL()
{
make install-strip
# Remove libtool .la files
# TODO libs should be left in $libDir/octave/$portVersion
# Move libs to $libDir to please Haikuporter complaining
# about missing libs.
for f in liboctave liboctinterp; do
rm -rf $libDir/octave/$portVersion/$f.la
mv $libDir/octave/$portVersion/$f.so* $libDir
done
# Remove empty folders
rm -rf $libDir/octave/$portVersion/site
for f in api-v51 site; do
rm -rf $libDir/octave/$f
done
# Remove unnecessary stuff
for f in appdata icons; do
rm -rf $dataDir/$f
done
prepareInstalledDevelLibs \
liboctave \
liboctinterp
# devel package
packageEntries devel \
$developDir
}
TEST()
{
make check
}