summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorPhil Ruffwind2018-10-08 00:37:20 -0700
committerPhil Ruffwind2018-10-08 00:43:00 -0700
commitf1352f1f0dde0b1f02c9a1fadd61bdea4338d42c (patch)
tree6fd5c894476c3d25edf1ce3071e6bfd576bb8bfd /PKGBUILD
parent00cae2a778af65d637e25a59aa1d96b7fc3fa9b1 (diff)
downloadaur-f1352f1f0dde0b1f02c9a1fadd61bdea4338d42c.tar.gz
Replace Makefile and patch with official builder
The makefile and code in the official slatec4linux.tgz supplants our custom Makefile and patch. NOTE: If you encounter linker errors of the form undefined symbol: dlmach_ This means you need to link to LAPACK as well (-llapack).
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD27
1 files changed, 16 insertions, 11 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 0a8522f1dc5..59f56b6b4c6 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,38 @@
# Maintainer: Phil Ruffwind <rf@rufflewind.com>
pkgname=slatec
pkgver=4.1
-pkgrel=3
-pkgdesc="SLATEC Common Mathematical Library"
+pkgrel=4
+pkgdesc="Common Mathematical Library"
arch=(i686 x86_64)
url=http://netlib.org/slatec
license=(PD)
-depends=()
+depends=(lapack)
makedepends=(gcc-fortran)
-source=(slatec_${pkgver}_src.tgz::http://netlib.org/slatec/slatec_src.tgz LICENSE Makefile slatec.patch)
+source=(slatec_${pkgver}_src.tgz::http://netlib.org/slatec/slatec_src.tgz
+ slatec4linux_${pkgver}.tgz::http://www.netlib.org/slatec/slatec4linux.tgz
+ LICENSE)
sha256sums=('df009d9ef9c18aae06ce68711b1ae108d3533b4f174582c3cbea0915c4fdfe01'
- 'd83a2ee63ee4bbd56d59072a0778e06685fa001047f153a3f0293d30849c8046'
- '7d8fb187324596d4d882d895c31db0afddf2984a933ab6e623de576d5f36558e'
- '4fb39658c6da25618d20e6aec0680c48d4666ab0eb1322f6e7f93a34bb51ce4f')
+ 'eef9234f8fcb49e7f4905a11eda8f453ec2ca314029a9ce303fdbc99cff42bf3'
+ 'd83a2ee63ee4bbd56d59072a0778e06685fa001047f153a3f0293d30849c8046')
prepare() {
cd "$srcdir"
- patch -p 0 <slatec.patch
+ mv *.f src
+ mv src/*.f .
}
build() {
cd "$srcdir"
- make FC=gfortran all
+ make FC=${FC-gfortran} all
}
package() {
cd "$srcdir"
- make DESTDIR="$pkgdir" PREFIX=/usr install
+ install -Dm644 static/libslatec.a "$pkgdir/usr/lib/libslatec.a"
+ install -Dm755 dynamic/libslatec.so "$pkgdir/usr/lib/libslatec.so.$pkgver"
+ ln -fs "libslatec.so.$pkgver" "$pkgdir/usr/lib/libslatec.so.${pkgver%%.*}"
+ ln -fs "libslatec.so.${pkgver%%.*}" "$pkgdir/usr/lib/libslatec.so"
install -Dm644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
install -m755 -d "$pkgdir/usr/share/slatec/src"
- install -m755 -t "$pkgdir/usr/share/slatec/src" src/*.f
+ install -m755 -t "$pkgdir/usr/share/slatec/src" *.f
}