diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | sci-libs/cuba/Manifest | 3 | ||||
-rw-r--r-- | sci-libs/cuba/cuba-2.1.ebuild | 57 | ||||
-rw-r--r-- | sci-libs/cuba/files/shared.patch | 137 |
4 files changed, 201 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a37d9f5 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*~ +.*.swp +.desktop + diff --git a/sci-libs/cuba/Manifest b/sci-libs/cuba/Manifest new file mode 100644 index 0000000..04a2037 --- /dev/null +++ b/sci-libs/cuba/Manifest @@ -0,0 +1,3 @@ +AUX shared.patch 4438 RMD160 69ae644305896797a91fffcbd4dcb30629be99bd SHA1 8c3a766c1352a7de18ce1f567b167590eabbec9b SHA256 4c7644563350c7db5d72a8e6164e74755e7cb451f25d06910849e6ef17b23a35 +DIST Cuba-2.1.tar.gz 311020 RMD160 20365f7711d0e7b56d3270886c6e186e209f8cf0 SHA1 0e551cca0be039f2df1fd71c2c61d499762249bd SHA256 18a71f79ed2a9587b91ffd1090a8a98f0270bdbf2f9bf0a3f12c32174e8dfdc0 +EBUILD cuba-2.1.ebuild 1057 RMD160 d44509d54dab5e671392aa23875434cbeaf53284 SHA1 eed23b5ca7959f74bf0e8613fafacfa15db0c88b SHA256 2fbdcf45d9545f6a78cd4bca2172c4bf4803dbfccd4f6f4fb1fb1f8aa3c9608f diff --git a/sci-libs/cuba/cuba-2.1.ebuild b/sci-libs/cuba/cuba-2.1.ebuild new file mode 100644 index 0000000..424fe7a --- /dev/null +++ b/sci-libs/cuba/cuba-2.1.ebuild @@ -0,0 +1,57 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils distutils + +EAPI="2" + +DESCRIPTION="A library for multidimensional numerical integration" +HOMEPAGE="http://www.feynarts.de/cuba/" +LICENSE="LGPL" +SRC_URI="http://www.feynarts.de/cuba/Cuba-${PV}.tar.gz" +S=${WORKDIR}/Cuba-${PV} + +KEYWORDS="~amd64" +IUSE="+static-libs +shared-libs doc examples" +SLOT="0" + + +src_prepare() { + if use shared-libs; then + epatch "${FILESDIR}/shared.patch" + elif use !static-libs; then + eerror "Must USE shared-libs or static-libs" + die + fi +} + +src_configure() { + econf +} + +src_compile() { + if [ -f Makefile ] || [ -f GNUmakefile ] || [ -f makefile ]; then + emake lib || die "emake failed" + else + die "No Makefile" + fi +} + +#src_test() { +# emake check +#} + + +src_install() { + use static-libs && dolib.a libcuba.a + use shared-libs && dolib.so libcuba.so* + use doc && dodoc cuba.pdf ChangeLog + if use examples; then + insinto /usr/share/doc/${PF} + doins -r demo + fi + insinto /usr/include + doins cuba.h +} + diff --git a/sci-libs/cuba/files/shared.patch b/sci-libs/cuba/files/shared.patch new file mode 100644 index 0000000..1cb55ca --- /dev/null +++ b/sci-libs/cuba/files/shared.patch @@ -0,0 +1,137 @@ +diff -urdb Cuba-2.1/makefile.in Cuba-2.1.pin/makefile.in +--- Cuba-2.1/makefile.in 2010-09-14 16:23:22.000000000 +0400 ++++ Cuba-2.1.pin/makefile.in 2011-01-02 20:10:42.000000000 +0300 +@@ -1,5 +1,5 @@ + CC = @CC@ +-CFLAGS = @CFLAGS@ @DEFS@ -I$(common) -I. -I$(srcdir) ++CFLAGS = @CFLAGS@ @DEFS@ -I$(common) -I. -I$(srcdir) -fPIC + F77 = @F77@ + FFLAGS = @FFLAGS@ + LIBS = @LIBS@ +@@ -8,6 +8,7 @@ + INSTALL_PROGRAM = @INSTALL_PROGRAM@ + RANLIB = @RANLIB@ + EXE = @EXEEXT@ ++VERSION = @PACKAGE_VERSION@ + + prefix = @prefix@ + exec_prefix = @exec_prefix@ +@@ -30,13 +31,14 @@ + + HEADERS = cuba.h + LIB = libcuba.a ++SHLIB = libcuba.so.$(VERSION).0 + MATH = Vegas$(EXE) Suave$(EXE) Divonne$(EXE) Cuhre$(EXE) + TOOLS = partview$(EXE) + + + all: lib demos $(MATH_DEFAULT) $(TOOLS_DEFAULT) + +-lib: $(LIB) ++lib: $(LIB) $(SHLIB) + + demos: demo-c$(EXE) $(DEMO_FORTRAN_DEFAULT) + +@@ -90,22 +92,18 @@ + $(LIB)(Vegas.o): $(VEGAS_C) $(VEGAS_DEPS) + $(CC) $(CFLAGS) -I$(vegas) -c -o Vegas.o $(VEGAS_C) + $(AR) $(ARFLAGS) $(LIB) Vegas.o +- $(RM) Vegas.o + + $(LIB)(llVegas.o): $(VEGAS_C) $(VEGAS_DEPS) + $(CC) $(CFLAGS) -I$(vegas) -DLONGLONGINT -c -o llVegas.o $(VEGAS_C) + $(AR) $(ARFLAGS) $(LIB) llVegas.o +- $(RM) llVegas.o + + $(LIB)(Vegas_.o): $(VEGAS_C) $(VEGAS_DEPS) + $(CC) $(CFLAGS) -I$(vegas) -DUNDERSCORE -c -o Vegas_.o $(VEGAS_C) + $(AR) $(ARFLAGS) $(LIB) Vegas_.o +- $(RM) Vegas_.o + + $(LIB)(llVegas_.o): $(VEGAS_C) $(VEGAS_DEPS) + $(CC) $(CFLAGS) -I$(vegas) -DLONGLONGINT -DUNDERSCORE -c -o llVegas_.o $(VEGAS_C) + $(AR) $(ARFLAGS) $(LIB) llVegas_.o +- $(RM) llVegas_.o + + Vegas$(EXE): $(VEGAS_TM) $(VEGAS_DEPS) + $(MCC) $(MCFLAGS) $(CFLAGS) -I$(vegas) -o Vegas$(EXE) $(VEGAS_TM) +@@ -123,22 +121,18 @@ + $(LIB)(Suave.o): $(SUAVE_C) $(SUAVE_DEPS) + $(CC) $(CFLAGS) -I$(suave) -c -o Suave.o $(SUAVE_C) + $(AR) $(ARFLAGS) $(LIB) Suave.o +- $(RM) Suave.o + + $(LIB)(llSuave.o): $(SUAVE_C) $(SUAVE_DEPS) + $(CC) $(CFLAGS) -I$(suave) -DLONGLONGINT -c -o llSuave.o $(SUAVE_C) + $(AR) $(ARFLAGS) $(LIB) llSuave.o +- $(RM) llSuave.o + + $(LIB)(Suave_.o): $(SUAVE_C) $(SUAVE_DEPS) + $(CC) $(CFLAGS) -I$(suave) -DUNDERSCORE -c -o Suave_.o $(SUAVE_C) + $(AR) $(ARFLAGS) $(LIB) Suave_.o +- $(RM) Suave_.o + + $(LIB)(llSuave_.o): $(SUAVE_C) $(SUAVE_DEPS) + $(CC) $(CFLAGS) -I$(suave) -DLONGLONGINT -DUNDERSCORE -c -o llSuave_.o $(SUAVE_C) + $(AR) $(ARFLAGS) $(LIB) llSuave_.o +- $(RM) llSuave_.o + + Suave$(EXE): $(SUAVE_TM) $(SUAVE_DEPS) + $(MCC) $(MCFLAGS) $(CFLAGS) -I$(suave) -o Suave$(EXE) $(SUAVE_TM) +@@ -157,22 +151,18 @@ + $(LIB)(Divonne.o): $(DIVONNE_C) $(DIVONNE_DEPS) + $(CC) $(CFLAGS) -I$(divonne) -c -o Divonne.o $(DIVONNE_C) + $(AR) $(ARFLAGS) $(LIB) Divonne.o +- $(RM) Divonne.o + + $(LIB)(llDivonne.o): $(DIVONNE_C) $(DIVONNE_DEPS) + $(CC) $(CFLAGS) -I$(divonne) -DLONGLONGINT -c -o llDivonne.o $(DIVONNE_C) + $(AR) $(ARFLAGS) $(LIB) llDivonne.o +- $(RM) llDivonne.o + + $(LIB)(Divonne_.o): $(DIVONNE_C) $(DIVONNE_DEPS) + $(CC) $(CFLAGS) -I$(divonne) -DUNDERSCORE -c -o Divonne_.o $(DIVONNE_C) + $(AR) $(ARFLAGS) $(LIB) Divonne_.o +- $(RM) Divonne_.o + + $(LIB)(llDivonne_.o): $(DIVONNE_C) $(DIVONNE_DEPS) + $(CC) $(CFLAGS) -I$(divonne) -DLONGLONGINT -DUNDERSCORE -c -o llDivonne_.o $(DIVONNE_C) + $(AR) $(ARFLAGS) $(LIB) llDivonne_.o +- $(RM) llDivonne_.o + + Divonne$(EXE): $(DIVONNE_TM) $(DIVONNE_DEPS) + $(MCC) $(MCFLAGS) $(CFLAGS) -I$(divonne) -o Divonne$(EXE) $(DIVONNE_TM) +@@ -189,22 +179,18 @@ + $(LIB)(Cuhre.o): $(CUHRE_C) $(CUHRE_DEPS) + $(CC) $(CFLAGS) -I$(cuhre) -c -o Cuhre.o $(CUHRE_C) + $(AR) $(ARFLAGS) $(LIB) Cuhre.o +- $(RM) Cuhre.o + + $(LIB)(llCuhre.o): $(CUHRE_C) $(CUHRE_DEPS) + $(CC) $(CFLAGS) -I$(cuhre) -DLONGLONGINT -c -o llCuhre.o $(CUHRE_C) + $(AR) $(ARFLAGS) $(LIB) llCuhre.o +- $(RM) llCuhre.o + + $(LIB)(Cuhre_.o): $(CUHRE_C) $(CUHRE_DEPS) + $(CC) $(CFLAGS) -I$(cuhre) -DUNDERSCORE -c -o Cuhre_.o $(CUHRE_C) + $(AR) $(ARFLAGS) $(LIB) Cuhre_.o +- $(RM) Cuhre_.o + + $(LIB)(llCuhre_.o): $(CUHRE_C) $(CUHRE_DEPS) + $(CC) $(CFLAGS) -I$(cuhre) -DLONGLONGINT -DUNDERSCORE -c -o llCuhre_.o $(CUHRE_C) + $(AR) $(ARFLAGS) $(LIB) llCuhre_.o +- $(RM) llCuhre_.o + + Cuhre$(EXE): $(CUHRE_TM) $(CUHRE_DEPS) + $(MCC) $(MCFLAGS) $(CFLAGS) -I$(cuhre) -o Cuhre$(EXE) $(CUHRE_TM) +@@ -221,6 +207,10 @@ + $(LIB)(llCuhre.o) $(LIB)(llCuhre_.o) + -$(RANLIB) $(LIB) + ++$(SHLIB): $(LIB) ++ $(CC) -shared -Wl,-soname,libcuba.so.$(VERSION) -o $(SHLIB) *.o ++ ln -sf $(SHLIB) libcuba.so.$(VERSION) ++ ln -sf $(SHLIB) libcuba.so + + DEMO_F = $(demo)/demo-fortran.F + DEMO_C = $(demo)/demo-c.c |