summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerhard Bräunlich <wippbox@gmx.net>2016-09-02 16:50:44 +0200
committerDavid Seifert <soap@gentoo.org>2016-09-02 22:09:17 +0200
commit589878b95a26ebcd738dff3d370f374f405e64ab (patch)
tree80eeac2d73aefa08b3bb7970d1d38ad28afac85a /sci-libs/cmpfit
parentsci-libs/ccfits: revbump (EAPI 4 -> 6) (diff)
downloadgentoo-589878b95a26ebcd738dff3d370f374f405e64ab.tar.gz
gentoo-589878b95a26ebcd738dff3d370f374f405e64ab.tar.bz2
gentoo-589878b95a26ebcd738dff3d370f374f405e64ab.zip
sci-libs/cmpfit: revbump (EAPI 4 -> 6)
Package-Manager: portage-2.2.28 Closes: https://github.com/gentoo/gentoo/pull/2190 Signed-off-by: David Seifert <soap@gentoo.org>
Diffstat (limited to 'sci-libs/cmpfit')
-rw-r--r--sci-libs/cmpfit/cmpfit-1.2-r1.ebuild39
1 files changed, 39 insertions, 0 deletions
diff --git a/sci-libs/cmpfit/cmpfit-1.2-r1.ebuild b/sci-libs/cmpfit/cmpfit-1.2-r1.ebuild
new file mode 100644
index 000000000000..ddb701f1f973
--- /dev/null
+++ b/sci-libs/cmpfit/cmpfit-1.2-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+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"
+IUSE="static-libs"
+
+DOCS=( README DISCLAIMER )
+
+src_compile() {
+ if use static-libs; then
+ $(tc-getCC) ${CFLAGS} -c mpfit.c || die "non-PIC compilation failed"
+ $(tc-getAR) cr libmpfit.a mpfit.o || die "creation of static archive failed"
+ fi
+ $(tc-getCC) ${CFLAGS} -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} testmpfit.c -L. -lmpfit -lm -o testmpfit || die
+ LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./testmpfit || die
+}
+
+src_install() {
+ dolib.so libmpfit.so
+ use static-libs && dolib.a libmpfit.a
+ doheader mpfit.h
+ einstalldocs
+}