Gentoo Archives: gentoo-commits

From: David Seifert <soap@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/cmpfit/
Date: Fri, 02 Sep 2016 20:09:41
Message-Id: 1472846957.589878b95a26ebcd738dff3d370f374f405e64ab.soap@gentoo
1 commit: 589878b95a26ebcd738dff3d370f374f405e64ab
2 Author: Gerhard Bräunlich <wippbox <AT> gmx <DOT> net>
3 AuthorDate: Fri Sep 2 14:50:44 2016 +0000
4 Commit: David Seifert <soap <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 2 20:09:17 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=589878b9
7
8 sci-libs/cmpfit: revbump (EAPI 4 -> 6)
9
10 Package-Manager: portage-2.2.28
11 Closes: https://github.com/gentoo/gentoo/pull/2190
12
13 Signed-off-by: David Seifert <soap <AT> gentoo.org>
14
15 sci-libs/cmpfit/cmpfit-1.2-r1.ebuild | 39 ++++++++++++++++++++++++++++++++++++
16 1 file changed, 39 insertions(+)
17
18 diff --git a/sci-libs/cmpfit/cmpfit-1.2-r1.ebuild b/sci-libs/cmpfit/cmpfit-1.2-r1.ebuild
19 new file mode 100644
20 index 00000000..ddb701f
21 --- /dev/null
22 +++ b/sci-libs/cmpfit/cmpfit-1.2-r1.ebuild
23 @@ -0,0 +1,39 @@
24 +# Copyright 1999-2016 Gentoo Foundation
25 +# Distributed under the terms of the GNU General Public License v2
26 +# $Id$
27 +
28 +EAPI=6
29 +
30 +inherit toolchain-funcs
31 +
32 +DESCRIPTION="MINPACK-1 Least Squares Fitting Library in C"
33 +HOMEPAGE="http://www.physics.wisc.edu/~craigm/idl/cmpfit.html"
34 +SRC_URI="http://www.physics.wisc.edu/~craigm/idl/down/${P}.tar.gz"
35 +
36 +LICENSE="public-domain minpack"
37 +SLOT="0"
38 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
39 +IUSE="static-libs"
40 +
41 +DOCS=( README DISCLAIMER )
42 +
43 +src_compile() {
44 + if use static-libs; then
45 + $(tc-getCC) ${CFLAGS} -c mpfit.c || die "non-PIC compilation failed"
46 + $(tc-getAR) cr libmpfit.a mpfit.o || die "creation of static archive failed"
47 + fi
48 + $(tc-getCC) ${CFLAGS} -fPIC -c mpfit.c -o mpfit.so || die "PIC compilation failed"
49 + $(tc-getCC) ${LDFLAGS} -shared -Wl,-soname=libmpfit.so mpfit.so -lm -o libmpfit.so || die "linking failed"
50 +}
51 +
52 +src_test() {
53 + $(tc-getCC) ${CFLAGS} testmpfit.c -L. -lmpfit -lm -o testmpfit || die
54 + LD_LIBRARY_PATH=.:${LD_LIBRARY_PATH} ./testmpfit || die
55 +}
56 +
57 +src_install() {
58 + dolib.so libmpfit.so
59 + use static-libs && dolib.a libmpfit.a
60 + doheader mpfit.h
61 + einstalldocs
62 +}