summaryrefslogtreecommitdiff
path: root/user/gsl/APKBUILD
blob: 8c694d429a031a9ed0d77211bf61f14f1ec01c44 (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
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=gsl
pkgver=2.8
pkgrel=0
pkgdesc="Modern numerical library for C and C++"
url="https://www.gnu.org/software/gsl/gsl.html"
arch="all"
license="GPL-3.0+"
depends=""
makedepends=""
subpackages="$pkgname-dev $pkgname-doc"
source="https://ftp.gnu.org/gnu/gsl/gsl-$pkgver.tar.gz
	gsl-2.4-portable.patch
	static-inline.patch
	"

prepare() {
	default_prepare

	case "$CTARGET_ARCH" in
		pmmx)	#763 (applies to this entire block)
			override="multifit_nlinear multilarge_nlinear specfunc";
			for k in $override; do
				sed -i $k/Makefile.in \
					-e '/^CFLAGS = /s/$/ -O0/g' \
					;
			done
			skipthis="spmatrix";
			for k in $skipthis; do
				sed -i $k/Makefile.in \
					-e '/^TESTS = /d' \
					;
			done
			;;
		ppc)	#764 (applies to this entire block)
			skipthis="complex";
			for k in $skipthis; do
				sed -i $k/Makefile.in \
					-e '/^TESTS = /d' \
					;
			done
			;;
	esac
}

build() {
	case "$CTARGET_ARCH" in
		ppc)	export ac_cv_c_ieee_interface=unknown;
			;;
	esac

	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="4427f6ce59dc14eabd6d31ef1fcac1849b4d7357faf48873aef642464ddf21cc9b500d516f08b410f02a2daa9a6ff30220f3995584b0a6ae2f73c522d1abb66b  gsl-2.8.tar.gz
f6a22e82c8f4a1d5ea7b647cbd015cdb9d2e4e9d39728e8f2dba3fdefac64d3f7c8fbc5ec597e6ab315ec1bd49e0e3af4aba091b358a68d9d789884331f4be24  gsl-2.4-portable.patch
7aa882af7136b6948124885eec6b9bdb2703f581d1656488a6aab8c48f601690fa87f2d6d2566c3a8fa200a5c09310ee076aec847779490ff02e03a5bcd0a2a0  static-inline.patch"