APKBUILD 2.77 KB
Newer Older
Daniel Sabogal's avatar
Daniel Sabogal committed
1 2 3
# Contributor: Daniel Sabogal <dsabogalcc@gmail.com>
# Maintainer:
pkgname=octave
4
pkgver=4.2.0
5
pkgrel=4
Daniel Sabogal's avatar
Daniel Sabogal committed
6 7
pkgdesc="A high-level language, primarily intended for numerical computations"
url="https://www.gnu.org/software/octave/"
8
arch="all !s390x"
9
license="GPL-3.0"
Daniel Sabogal's avatar
Daniel Sabogal committed
10 11
depends=""
subpackages="$pkgname-doc"
12
makedepends="autoconf automake libtool bison curl fftw-dev fltk-dev fontconfig-dev
Daniel Sabogal's avatar
Daniel Sabogal committed
13 14 15
	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"
16
source="ftp://ftp.gnu.org/gnu/octave/$pkgname-$pkgver.tar.gz
Daniel Sabogal's avatar
Daniel Sabogal committed
17 18 19 20 21 22 23 24 25 26 27 28
	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 <c\(math\|stdlib\)>/#include <\1.h>/'
	find -name \*.h -o -name \*.cc | xargs sed -i -e 's/<config.h>/"config.h"/' -e 's/<base-list.h>/"base-list.h"/'
29
	autoreconf -vif
Daniel Sabogal's avatar
Daniel Sabogal committed
30 31 32 33 34
}

build() {
	cd "$builddir"
	./configure \
35 36 37 38
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
Daniel Sabogal's avatar
Daniel Sabogal committed
39
		--infodir=/usr/share/info \
40 41
		--mandir=/usr/share/man \
		--localstatedir=/var \
Daniel Sabogal's avatar
Daniel Sabogal committed
42 43 44 45 46 47 48 49 50 51 52 53
		--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
}

54 55 56 57
md5sums="4423db4dd6c2b43cacf9e9dcfa95473d  octave-4.2.0.tar.gz
1b8f1f97aa4acc3777c8760759ef3bb0  less-docs.patch
cf78869bd53964b339578c054614de38  libinterp-deps.patch
bb971c157909841c1ccbe17ae0c6244c  abs.patch
Daniel Sabogal's avatar
Daniel Sabogal committed
58
e22f7385ef92fab75191c8925455c097  gnulib.patch"
59 60 61 62
sha256sums="443ba73782f3531c94bcf016f2f0362a58e186ddb8269af7dcce973562795567  octave-4.2.0.tar.gz
827aae1d7ca615a855733d031aa77aedc076b4db01bb70add4e5631f9084a326  less-docs.patch
978280090f7e490c5e5b92785854b6dbe2971e1c7ed9c1f3c087a6e6f61a40e8  libinterp-deps.patch
fe0683d91d36805a7787fb5b70ccc052a6aaf08594b95b97a904504f5227986d  abs.patch
Daniel Sabogal's avatar
Daniel Sabogal committed
63
75562bd81b6cb44e9e5bacf8b1ba556df565001f9dea7960a4346073ed997c33  gnulib.patch"
64 65 66 67
sha512sums="5d16665d4ef8f218320f471704f8702f3a2911cc4a083cae318c1df0f787d50dddbc511dc91e11379314d65cecac6d521abac026860feca19d11ffdb52d3e678  octave-4.2.0.tar.gz
eb2b754c15eda423bf59061728052993a2ee9611d474e7fa6026f2961561764e6fc56fbb8128ec266bb569e99d7fecb5b68b5ed3f02ae33dd27709a89426f204  less-docs.patch
093b13ad457e290d746908a5de1855071b2cd27b4c08101826d32fcf63398e863c3b72bb81f19255a04a880a2bf49e3ced1141bf7d0044db1328c6f2c9492f66  libinterp-deps.patch
bcd111f35baf2681da2b1ad1edbe956ee359c5fb0114797b27747fa78e6f118406bb7fb325c1fa03c18e29815d2d4b8d9a28faf72c1fbbec526e8fbaed0cb820  abs.patch
Daniel Sabogal's avatar
Daniel Sabogal committed
68
50d9a7cefc0d39b666b646abe26148d7640ed2c4505244e3b5d4ba4348f80fc5d0d08465a575682fcae88d245bf72e7ba13df580003a2c5de6b7b222131a5392  gnulib.patch"