aboutsummaryrefslogtreecommitdiffstats
path: root/community/octave/APKBUILD
blob: f0208454980b073e322b14c4725a746b447eb4a9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
# Contributor: Duncan Bellamy <dunk@denkimushi.com>
# Contributor: Daniel Sabogal <dsabogalcc@gmail.com>
# Maintainer: Duncan Bellamy <dunk@denkimushi.com>
pkgname=octave
pkgver=7.1.0
pkgrel=1
pkgdesc="A high-level language, primarily intended for numerical computations"
url="https://www.gnu.org/software/octave/"
# ppc64le, s390x missing texlive
# missing openjdk on riscv64
arch="all !s390x !riscv64 !ppc64le"
license="GPL-3.0-or-later"
subpackages="$pkgname-dev $pkgname-doc"

case "$CARCH" in
	x86)
		#x86 libjava.so cannot find libjvm.so
		options="!check" ;;
esac

makedepends="
	arpack-dev
	autoconf
	automake
	bison
	curl-dev
	fftw-dev
	fltk-dev
	fontconfig-dev
	freetype-dev
	gfortran
	ghostscript-dev
	glpk-dev
	glu-dev
	gnuplot
	graphicsmagick-dev
	hdf5-dev
	imagemagick-dev
	java-jdk
	lcms2-dev
	libltdl
	libsm-dev
	libsndfile-dev
	libtool
	openblas-dev
	pcre-dev
	perl
	pkgconf
	portaudio-dev
	qhull-dev
	qrupdate-dev
	qscintilla-dev
	qt5-qttools-dev
	rapidjson-dev
	readline-dev
	suitesparse-dev
	texinfo
	texlive
	texlive-dvi
	xz-dev
	zip
	zlib-dev
	"
source="https://ftp.gnu.org/gnu/octave/octave-$pkgver.tar.xz
	abs.patch
	test.patch
	"

prepare() {
	default_prepare
	autoreconf -vif
}

build() {
	export JAVA_HOME="/usr/lib/jvm/default-jvm"
	./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() {
	LD_LIBRARY_PATH="/usr/lib/jvm/default-jvm/lib/server:$LD_LIBRARY_PATH" 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="
f315cfa4dfb1f8d8b0ff96ee636a330d833d9e8d308ec4dbe139b520086fe99b5ef12f3fa6cee770e2fbe468e27559ae7b14f0d77a64c970f5bf34be4ab6c213  octave-7.1.0.tar.xz
f6cd1a52686a66d9914029b3c70eba88d2468700abfb16c3bdc5c0bae2a29cbf06143e15c2828be1112d45403247ff5713edf1b1261eaf132465ac05df6c7c7c  abs.patch
a2d67ead53701c74c5837cb79cf82e93a40eec58d41bf73b07d40ecf9655d8b358ae245745a613335abd42d4954b2c41309392bbb423fa2bdd61a848079cb173  test.patch
"