summaryrefslogtreecommitdiff
path: root/sci-libs/cmpfit/cmpfit-1.4.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-03-27 06:06:27 +0000
committerV3n3RiX <venerix@redcorelinux.org>2021-03-27 06:06:27 +0000
commit8d5dbd847cbc704a6a06405856e94b461011afe3 (patch)
tree4d26462d027b14926335894749d2e01d982234d0 /sci-libs/cmpfit/cmpfit-1.4.ebuild
parent5bb9ff1ee56d2b5e75e01a7f066d8b0cec84ec02 (diff)
gentoo resync : 27.03.2021
Diffstat (limited to 'sci-libs/cmpfit/cmpfit-1.4.ebuild')
-rw-r--r--sci-libs/cmpfit/cmpfit-1.4.ebuild32
1 files changed, 32 insertions, 0 deletions
diff --git a/sci-libs/cmpfit/cmpfit-1.4.ebuild b/sci-libs/cmpfit/cmpfit-1.4.ebuild
new file mode 100644
index 000000000000..ff93f77a140c
--- /dev/null
+++ b/sci-libs/cmpfit/cmpfit-1.4.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs
+
+DESCRIPTION="MINPACK-1 Least Squares Fitting Library in C"
+HOMEPAGE="http://www.physics.wisc.edu/~craigm/idl/cmpfit.html"
+SRC_URI="http://www.physics.wisc.edu/~craigm/idl/down/${P}.tar.gz"
+
+LICENSE="public-domain minpack"
+SLOT="0"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+
+DOCS=( README DISCLAIMER )
+
+src_compile() {
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} -fPIC -c mpfit.c -o mpfit.so || die "PIC compilation failed"
+ $(tc-getCC) ${LDFLAGS} -shared -Wl,-soname=libmpfit.so mpfit.so -lm -o libmpfit.so || die "linking failed"
+}
+
+src_test() {
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} testmpfit.c -L. -lmpfit -lm -o testmpfit || die
+ LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./testmpfit || die
+}
+
+src_install() {
+ dolib.so libmpfit.so
+ doheader mpfit.h
+ einstalldocs
+}