From 2052d421af023b2f12cd7929145f4fa64a9f1193 Mon Sep 17 00:00:00 2001 From: Daniel Sabogal Date: Sat, 1 Oct 2016 20:38:36 -0400 Subject: testing/octave: new aport https://www.gnu.org/software/octave/ A high-level language, primarily intended for numerical computations --- testing/octave/APKBUILD | 67 +++++++++++++++++++++++++++++++++++++ testing/octave/abs.patch | 27 +++++++++++++++ testing/octave/gnulib.patch | 11 ++++++ testing/octave/less-docs.patch | 11 ++++++ testing/octave/libinterp-deps.patch | 10 ++++++ 5 files changed, 126 insertions(+) create mode 100644 testing/octave/APKBUILD create mode 100644 testing/octave/abs.patch create mode 100644 testing/octave/gnulib.patch create mode 100644 testing/octave/less-docs.patch create mode 100644 testing/octave/libinterp-deps.patch diff --git a/testing/octave/APKBUILD b/testing/octave/APKBUILD new file mode 100644 index 0000000000..a9824c4cae --- /dev/null +++ b/testing/octave/APKBUILD @@ -0,0 +1,67 @@ +# Contributor: Daniel Sabogal +# Maintainer: +pkgname=octave +pkgver=4.0.3 +pkgrel=0 +pkgdesc="A high-level language, primarily intended for numerical computations" +url="https://www.gnu.org/software/octave/" +arch="all" +license="GPL3" +depends="" +subpackages="$pkgname-doc" +makedepends="autoconf automake bison curl fftw-dev fltk-dev fontconfig-dev + freetype-dev gfortran glu-dev gnuplot imagemagick-dev hdf5-dev + lapack-dev libsm-dev libltdl lcms2-dev pcre-dev perl pkgconf qt-dev + readline-dev texinfo zlib-dev" +source="ftp://ftp.gnu.org/gnu/octave/$pkgname-$pkgver.tar.xz + less-docs.patch + libinterp-deps.patch + abs.patch + gnulib.patch" +builddir="$srcdir/$pkgname-$pkgver" + +prepare() { + default_prepare || return 1 + + cd "$builddir" + find -name \*.cc -o -name \*.h -o -name \*.yy | xargs sed -i -e 's/#include /#include <\1.h>/' + find -name \*.h -o -name \*.cc | xargs sed -i -e 's//"config.h"/' -e 's//"base-list.h"/' +} + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --infodir=/usr/share/info \ + --mandir=/usr/share/man \ + --localstatedir=/var \ + --enable-shared \ + --disable-static \ + || return 1 + make || return 1 +} + +package() { + make DESTDIR="$pkgdir/" \ + -C "$builddir" install || return 1 + rm -rf "$pkgdir"/usr/lib/charset.alias +} + +md5sums="73b140bc69ac21cfaa3e473b91b6842b octave-4.0.3.tar.xz +79635f1a1a0fd1b583a4a01555cc40e8 less-docs.patch +a9e3611f8526c609751dae3c35afaa8c libinterp-deps.patch +e08fd7a3d035fde524dd92ed0603ce57 abs.patch +e22f7385ef92fab75191c8925455c097 gnulib.patch" +sha256sums="dc2bec8c68fa5733a5847563634b1729356a84f3a5071008ecdb793293f0aa85 octave-4.0.3.tar.xz +2f6c87158b73c2d5881d3f5ae5b4e6811398b8868ae9ba9b202631f4b0588296 less-docs.patch +1cbfb7648783a9320a7a03f0f391074af5d1318bef796ddffd2d9cbacc685d22 libinterp-deps.patch +28ac40c2e4dbafac313f34a68560da42027815b08a880d44c61f97d9c660ce04 abs.patch +75562bd81b6cb44e9e5bacf8b1ba556df565001f9dea7960a4346073ed997c33 gnulib.patch" +sha512sums="bad009235b04be09c051dd27ebef7df2542adec0a0b57c070662deebe33a0cdceb7d6816653f5afc3fc0cc1287ba1ca1a5c50858169004210224039374c9c55d octave-4.0.3.tar.xz +d1f1e4c475cbeeac805c5ffefe19e1a65185259dfc55dabc5debc57b184de3573065c3879295ec42101ac3c7a57798c56330793eef84ae361c09e61ed3dc0f0c less-docs.patch +5ae08ddcdea63804154f5ba3808369558f717fd696f1a4ee7dccfd96c52cdb8afc85a564522d5b0cdc83c1f0a7f5ef8d509a293af2d227c8f0fe188420349733 libinterp-deps.patch +52ff16908f5ffb736dfb442bf1950b7595d8999464bbcb8265b754b8a3bdfe4f18fe5194bd4ec8606219d0e70fc82d60429e8c3c4aa33b8eb1fe54c2c5490ca2 abs.patch +50d9a7cefc0d39b666b646abe26148d7640ed2c4505244e3b5d4ba4348f80fc5d0d08465a575682fcae88d245bf72e7ba13df580003a2c5de6b7b222131a5392 gnulib.patch" diff --git a/testing/octave/abs.patch b/testing/octave/abs.patch new file mode 100644 index 0000000000..e7059f3cc0 --- /dev/null +++ b/testing/octave/abs.patch @@ -0,0 +1,27 @@ +diff -up octave-4.0.0/libinterp/corefcn/pr-output.cc.abs octave-4.0.0/libinterp/corefcn/pr-output.cc +--- octave-4.0.0/libinterp/corefcn/pr-output.cc.abs 2015-05-23 08:21:53.000000000 -0600 ++++ octave-4.0.0/libinterp/corefcn/pr-output.cc 2016-02-21 08:59:30.966291273 -0700 +@@ -21,7 +21,7 @@ along with Octave; see the file COPYING. + */ + + #ifdef HAVE_CONFIG_H +-#include ++#include "config.h" + #endif + + #include +@@ -3145,6 +3145,14 @@ PRINT_INT_SCALAR_INTERNAL (uint32_t) + 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 + /* static */ inline void + octave_print_internal_template (std::ostream& os, const intNDArray& nda, diff --git a/testing/octave/gnulib.patch b/testing/octave/gnulib.patch new file mode 100644 index 0000000000..e83fb156fd --- /dev/null +++ b/testing/octave/gnulib.patch @@ -0,0 +1,11 @@ +diff -up octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh.gnulib octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh +--- octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh.gnulib 2015-05-23 08:21:53.000000000 -0600 ++++ octave-4.0.0/liboctave/cruft/Faddeeva/Faddeeva.hh 2016-02-19 19:50:04.693811663 -0700 +@@ -27,6 +27,7 @@ + #ifndef FADDEEVA_HH + #define FADDEEVA_HH 1 + ++#include + #include + + namespace Faddeeva { diff --git a/testing/octave/less-docs.patch b/testing/octave/less-docs.patch new file mode 100644 index 0000000000..c46ee2553b --- /dev/null +++ b/testing/octave/less-docs.patch @@ -0,0 +1,11 @@ +--- octave-4.0.3/doc/interpreter/Makefile.in.orig ++++ octave-4.0.3/doc/interpreter/Makefile.in +@@ -3357,7 +3357,7 @@ + plot-textproperties.texi: genpropdoc.m + $(AM_V_GEN)$(call gen-propdoc-texi,text) + +-all-local: dvi html pdf ps doc-cache ++all-local: doc-cache + + html: $(HTMLDIR_IMAGES) + diff --git a/testing/octave/libinterp-deps.patch b/testing/octave/libinterp-deps.patch new file mode 100644 index 0000000000..6fd09a066b --- /dev/null +++ b/testing/octave/libinterp-deps.patch @@ -0,0 +1,10 @@ +--- octave-4.0.3/libinterp/link-deps.mk.orig ++++ octave-4.0.3/libinterp/link-deps.mk +@@ -10,6 +10,7 @@ + $(FT2_LIBS) \ + $(HDF5_LIBS) \ + $(MAGICK_LIBS) \ ++ $(Z_LIBS) \ + $(FFTW_XLIBS) \ + $(OPENGL_LIBS) \ + $(X11_LIBS) \ -- cgit v1.2.3