Octave: new recipe (#1256)

This commit is contained in:
miqlas
2017-03-28 06:33:44 +02:00
committed by Jérôme Duval
parent 7204e0f284
commit 4f39d94495
2 changed files with 197 additions and 0 deletions

View File

@@ -0,0 +1,153 @@
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="1"
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:liboctinterp$secondaryArchSuffix = $portVersion
lib:liboctave$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
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:liblapack$secondaryArchSuffix
#lib:libmagick++_6.q16$secondaryArchSuffix
lib:libncursesw$secondaryArchSuffix
lib:libopenblas$secondaryArchSuffix
lib:libpcre$secondaryArchSuffix
lib:libreadline$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
octave${secondaryArchSuffix}_devel = $portVersion
devel:liboctinterp$secondaryArchSuffix = $portVersion
devel:liboctave$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:liblapack$secondaryArchSuffix
#devel:libmagick++_6.q16$secondaryArchSuffix
devel:libncursesw$secondaryArchSuffix
devel:libopenblas$secondaryArchSuffix
devel:libpcre$secondaryArchSuffix
devel:libreadline$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:awk
cmd:bison
cmd:find
#cmd:flex
cmd:gfortran$secondaryArchSuffix
cmd:gnuplot$secondaryArchSuffix
#cmd:gperf
cmd:grep
#cmd:gs
cmd:g++$secondaryArchSuffix
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
}

View File

@@ -0,0 +1,44 @@
From 90d63741636b88d9fd84a281d99eb6c87fcf193e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= <zmizsei@extrowerk.com>
Date: Sun, 26 Mar 2017 19:42:22 +0200
Subject: rusage Haiku patch
diff --git a/liboctave/wrappers/time-wrappers.c b/liboctave/wrappers/time-wrappers.c
index 5bc8c89..99c9452 100644
--- a/liboctave/wrappers/time-wrappers.c
+++ b/liboctave/wrappers/time-wrappers.c
@@ -128,6 +128,7 @@ octave_getrusage_wrapper (time_t *usr_sec, time_t *sys_sec,
*sys_sec = ru.ru_stime.tv_sec;
*sys_usec = ru.ru_stime.tv_usec;
+#ifndef __HAIKU__
*maxrss = ru.ru_maxrss;
*ixrss = ru.ru_ixrss;
*idrss = ru.ru_idrss;
@@ -142,6 +143,22 @@ octave_getrusage_wrapper (time_t *usr_sec, time_t *sys_sec,
*nsignals = ru.ru_nsignals;
*nvcsw = ru.ru_nvcsw;
*nivcsw = ru.ru_nivcsw;
+#else
+ *maxrss = 0;
+ *ixrss = 0;
+ *idrss = 0;
+ *isrss = 0;
+ *minflt = 0;
+ *majflt = 0;
+ *nswap = 0;
+ *inblock = 0;
+ *oublock = 0;
+ *msgsnd = 0;
+ *msgrcv = 0;
+ *nsignals = 0;
+ *nvcsw = 0;
+ *nivcsw = 0;
+#endif
}
return status;
--
2.11.0