aboutsummaryrefslogtreecommitdiffstats
path: root/community
diff options
context:
space:
mode:
authorDuncan Bellamy <dunk@denkimushi.com>2021-02-14 22:33:09 +0000
committerLeo <thinkabit.ukim@gmail.com>2021-02-26 21:30:59 +0000
commit976640b9f65f17ec49ef41ca036f1509feac8892 (patch)
tree334de41589c07fc2a75040439f183e1e29d75d1d /community
parent559401599ef2c8555017b5c1f787c16654ca66da (diff)
downloadaports-976640b9f65f17ec49ef41ca036f1509feac8892.tar.gz
aports-976640b9f65f17ec49ef41ca036f1509feac8892.tar.bz2
aports-976640b9f65f17ec49ef41ca036f1509feac8892.tar.xz
community/octave: move from testing
* upgrade to 6.2.0 * use openjdk8 for 32bit arches * take over maintainership * fixes #12252 * fixes #12480
Diffstat (limited to 'community')
-rw-r--r--community/octave/APKBUILD112
-rw-r--r--community/octave/abs.patch19
-rw-r--r--community/octave/libinterp-deps.patch12
3 files changed, 143 insertions, 0 deletions
diff --git a/community/octave/APKBUILD b/community/octave/APKBUILD
new file mode 100644
index 0000000000..e576def827
--- /dev/null
+++ b/community/octave/APKBUILD
@@ -0,0 +1,112 @@
+# Contributor: Duncan Bellamy <dunk@denkimushi.com>
+# Contributor: Daniel Sabogal <dsabogalcc@gmail.com>
+# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
+pkgname=octave
+pkgver=6.2.0
+pkgrel=0
+pkgdesc="A high-level language, primarily intended for numerical computations"
+url="https://www.gnu.org/software/octave/"
+# mips: missing openblas
+# s390x missing texlive
+arch="all !s390x !mips !mips64"
+license="GPL-3.0-or-later"
+subpackages="$pkgname-doc"
+
+if [ "$CARCH" == "x86" ]
+then
+ #x86 libjava.so cannot find libjvm.so
+ options="!check"
+fi
+
+#openjdk8 needed for 32bit support
+case "$CARCH" in
+ x86|armv7|armhf)
+ _jdkver=8 ;;
+ *)
+ _jdkver=11 ;;
+esac
+
+_jhome=/usr/lib/jvm/java-1."$_jdkver"-openjdk
+makedepends="arpack-dev
+ autoconf
+ automake
+ bison
+ curl
+ curl-dev
+ fftw-dev
+ fltk-dev
+ fontconfig-dev
+ freetype-dev
+ gfortran
+ ghostscript-dev
+ glpk-dev
+ glu-dev
+ gnuplot
+ graphicsmagick-dev
+ hdf5-dev
+ imagemagick-dev
+ lapack-dev
+ lcms2-dev
+ libltdl
+ libsm-dev
+ libsndfile-dev
+ libtool
+ openblas-dev
+ openjdk$_jdkver
+ pcre-dev
+ perl
+ pkgconf
+ portaudio-dev
+ qhull-dev
+ qrupdate-dev
+ qscintilla-dev
+ qt5-qttools-dev
+ readline-dev
+ suitesparse-dev
+ texinfo
+ texlive
+ texlive-dvi
+ xz-dev
+ zip
+ zlib-dev
+ "
+source="https://ftpmirror.gnu.org/octave/octave-$pkgver.tar.gz
+ libinterp-deps.patch
+ abs.patch
+ "
+
+prepare() {
+ default_prepare
+ autoreconf -vif
+}
+
+build() {
+ export JAVA_HOME=$_jhome
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --infodir=/usr/share/info \
+ --mandir=/usr/share/man \
+ --localstatedir=/var \
+ --enable-shared \
+ --disable-static \
+ --disable-rpath
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir/" \
+ -C "$builddir" install
+ rm -rf "$pkgdir"/usr/lib/charset.alias
+ rm -rf "$pkgdir"/usr/share/octave/"$pkgver"/etc/tests
+}
+
+sha512sums="4039b68ffa77e599c63aa5748411603e86943be63ce96b6810547ba9776fe400939957fd8c40b2f212dfe244c76e58fdbbc4025179c9785b773da9bbb9fedaf2 octave-6.2.0.tar.gz
+f449d84ec0b9e18919473d9efc5b6628dc9eb62bbb4fe8160ef9c280546b7b2f07ea803992240063685ec4e8519b80002c752647060fc438e6dce8d464b98b6d libinterp-deps.patch
+f6cd1a52686a66d9914029b3c70eba88d2468700abfb16c3bdc5c0bae2a29cbf06143e15c2828be1112d45403247ff5713edf1b1261eaf132465ac05df6c7c7c abs.patch"
diff --git a/community/octave/abs.patch b/community/octave/abs.patch
new file mode 100644
index 0000000000..4dab61fd9b
--- /dev/null
+++ b/community/octave/abs.patch
@@ -0,0 +1,19 @@
+add inline functions needed for alpine
+
+--- octave-4.2.0/libinterp/corefcn/pr-output.cc.orig
++++ octave-4.2.0/libinterp/corefcn/pr-output.cc
+@@ -3152,6 +3152,14 @@
+ PRINT_INT_SCALAR_INTERNAL (int64_t)
+ PRINT_INT_SCALAR_INTERNAL (uint64_t)
+
++inline unsigned int abs (unsigned int x) { return x; }
++inline long unsigned int abs (long unsigned int x) { return x; }
++inline long long unsigned int abs (long long unsigned int x) { return x; }
++inline short unsigned int abs (short unsigned int x) { return x; }
++inline unsigned char abs (unsigned char x) { return x; }
++inline signed char abs (signed char x) { return abs((int)x); }
++inline short int abs (short int x) { return abs((int)x); }
++
+ template <typename T>
+ /* static */ inline void
+ octave_print_internal_template (std::ostream& os, const intNDArray<T>& nda,
diff --git a/community/octave/libinterp-deps.patch b/community/octave/libinterp-deps.patch
new file mode 100644
index 0000000000..9c2e84ecd9
--- /dev/null
+++ b/community/octave/libinterp-deps.patch
@@ -0,0 +1,12 @@
+add LIBADD for compilation with alpine
+
+--- a/libinterp/corefcn/module.mk
++++ b/libinterp/corefcn/module.mk
+@@ -318,6 +318,7 @@
+ $(HDF5_CPPFLAGS) \
+ $(LLVM_CPPFLAGS) \
+ $(Z_CPPFLAGS)
++libinterp_corefcn_libcorefcn_la_LIBADD = $(Z_LIBS)
+
+ libinterp_corefcn_libcorefcn_la_CFLAGS = $(AM_CFLAGS) $(WARN_CFLAGS)
+