diff options
author | Sebastien Fabbro <bicatali@gentoo.org> | 2011-08-07 00:03:25 +0000 |
---|---|---|
committer | Sebastien Fabbro <bicatali@gentoo.org> | 2011-08-07 00:03:25 +0000 |
commit | 9d857929764804d150b29fba11be5cca01f44e5c (patch) | |
tree | dde1cb1a37c6928a1cd88ec27b4091dee1b21ec7 /sci-libs/libcore | |
parent | Version bump with small improvements. (diff) | |
download | gentoo-2-9d857929764804d150b29fba11be5cca01f44e5c.tar.gz gentoo-2-9d857929764804d150b29fba11be5cca01f44e5c.tar.bz2 gentoo-2-9d857929764804d150b29fba11be5cca01f44e5c.zip |
Version bump, switch to EAPI4, updated makefile patch
(Portage version: 2.1.10.10/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/libcore')
-rw-r--r-- | sci-libs/libcore/ChangeLog | 10 | ||||
-rw-r--r-- | sci-libs/libcore/files/2.1.1-makefiles.patch | 115 | ||||
-rw-r--r-- | sci-libs/libcore/libcore-2.1.1.ebuild | 74 |
3 files changed, 197 insertions, 2 deletions
diff --git a/sci-libs/libcore/ChangeLog b/sci-libs/libcore/ChangeLog index 0b45c3c934a1..c05f4afded2e 100644 --- a/sci-libs/libcore/ChangeLog +++ b/sci-libs/libcore/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sci-libs/libcore -# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/libcore/ChangeLog,v 1.6 2009/08/13 00:28:42 bicatali Exp $ +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/libcore/ChangeLog,v 1.7 2011/08/07 00:03:25 bicatali Exp $ + +*libcore-2.1.1 (07 Aug 2011) + + 07 Aug 2011; Sébastien Fabbro <bicatali@gentoo.org> + +files/2.1.1-makefiles.patch, +libcore-2.1.1.ebuild: + Version bump, switch to EAPI4, updated makefile patch *libcore-2.0.8 (13 Aug 2009) diff --git a/sci-libs/libcore/files/2.1.1-makefiles.patch b/sci-libs/libcore/files/2.1.1-makefiles.patch new file mode 100644 index 000000000000..09a8f5be2f38 --- /dev/null +++ b/sci-libs/libcore/files/2.1.1-makefiles.patch @@ -0,0 +1,115 @@ +diff -Nur core-2.1.1.orig/ext/Makefile core-2.1.1/ext/Makefile +--- core-2.1.1.orig/ext/Makefile 2011-08-06 22:53:29.000000000 +0100 ++++ core-2.1.1/ext/Makefile 2011-08-07 00:40:58.000000000 +0100 +@@ -38,16 +38,18 @@ + endif + endif + +-INCLUDE=-I${CORE_PATH}/inc -I${CORE_PATH}/gmp/include \ +- -I${CORE_PATH}/mpfr/include ++INCLUDE=-I${CORE_PATH}/inc + + + COREX_LIB_LEVEL3=${CORE_PATH}/lib/libcorex++$(VAR)_level3.a + COREX_LIB_LEVEL2=${CORE_PATH}/lib/libcorex++$(VAR)_level2.a + COREX_LIB_LEVEL1=${CORE_PATH}/lib/libcorex++$(VAR)_level1.a +-COREX_SHARED_LIB_LEVEL3=${CORE_PATH}/lib/libcorex++$(VAR)_level3.${CORE_DYLIB_EXTENSION} +-COREX_SHARED_LIB_LEVEL2=${CORE_PATH}/lib/libcorex++$(VAR)_level2.${CORE_DYLIB_EXTENSION} +-COREX_SHARED_LIB_LEVEL1=${CORE_PATH}/lib/libcorex++$(VAR)_level1.${CORE_DYLIB_EXTENSION} ++COREX_SHARED_LIB_LEVEL3_NAME=libcorex++$(VAR)_level3.${CORE_DYLIB_EXTENSION}.2 ++COREX_SHARED_LIB_LEVEL2_NAME=libcorex++$(VAR)_level2.${CORE_DYLIB_EXTENSION}.2 ++COREX_SHARED_LIB_LEVEL1_NAME=libcorex++$(VAR)_level1.${CORE_DYLIB_EXTENSION}.2 ++COREX_SHARED_LIB_LEVEL3=${CORE_PATH}/lib/$(COREX_SHARED_LIB_LEVEL3_NAME) ++COREX_SHARED_LIB_LEVEL2=${CORE_PATH}/lib/$(COREX_SHARED_LIB_LEVEL2_NAME) ++COREX_SHARED_LIB_LEVEL1=${CORE_PATH}/lib/$(COREX_SHARED_LIB_LEVEL1_NAME) + + TARGET=${COREX_LIB_LEVEL3} ${COREX_LIB_LEVEL2} ${COREX_LIB_LEVEL1} + +@@ -74,11 +76,11 @@ + -@rm -rf $@ + $(AR) $@ $? + +-COREX_SHARED_DEPS=-L${GMP_PREFIX}/lib -lgmp -L${MPFR_PREFIX}/lib -lmpfr -L${CORE_PATH}/lib -lcore++${VAR} ++COREX_SHARED_DEPS= -lgmp -lmpfr -L${CORE_PATH}/lib -lcore++${VAR} + + ${COREX_SHARED_LIB_LEVEL3}: ${L3_OBJS} + -@rm -rf $@ +- $(CXX) $(COREX_SHARED_DEPS) $(CORE_LDFLAGS) -o $@ $? ++ $(CXX) $(LDFLAGS) $(COREX_SHARED_DEPS) $(CORE_LDFLAGS) -Wl,-soname,$(COREX_SHARED_LIB_LEVEL3_NAME) -o $@ $? + + ${COREX_LIB_LEVEL2}: ${L2_OBJS} + -@rm -rf $@ +@@ -86,7 +88,7 @@ + + ${COREX_SHARED_LIB_LEVEL2}: ${L2_OBJS} + -@rm -rf $@ +- $(CXX) $(COREX_SHARED_DEPS) $(CORE_LDFLAGS) -o $@ $? ++ $(CXX) $(LDFLAGS) $(COREX_SHARED_DEPS) $(CORE_LDFLAGS) -Wl,-soname,$(COREX_SHARED_LIB_LEVEL2_NAME) -o $@ $? + + ${COREX_LIB_LEVEL1}: ${L1_OBJS} + -@rm -rf $@ +@@ -94,7 +96,7 @@ + + ${COREX_SHARED_LIB_LEVEL1}: ${L1_OBJS} + -@rm -rf $@ +- $(CXX) $(COREX_SHARED_DEPS) $(CORE_LDFLAGS) -o $@ $? ++ $(CXX) $(LDFLAGS) $(COREX_SHARED_DEPS) $(CORE_LDFLAGS) -Wl,-soname,$(COREX_SHARED_LIB_LEVEL1_NAME) -o $@ $? + + %_level3.o: %.cpp + ${CXX} $(CORE_CXXFLAGS) -DCORE_LEVEL=3 $(INCLUDE) -c $< -o $@ +diff -Nur core-2.1.1.orig/progs/Make.options core-2.1.1/progs/Make.options +--- core-2.1.1.orig/progs/Make.options 2011-08-06 22:53:29.000000000 +0100 ++++ core-2.1.1/progs/Make.options 2011-08-06 23:31:01.000000000 +0100 +@@ -11,10 +11,8 @@ + + include $(CORE_PATH)/Make.config + +-CORE_INC=-I. -I$(CORE_PATH)/inc -I$(CORE_PATH)/mpfr/include \ +- -I$(CORE_PATH)/gmp/include +-CORE_LIB=-L$(CORE_PATH)/lib -L$(CORE_PATH)/mpfr/lib -L$(CORE_PATH)/gmp/lib \ +- -lcore++$(VAR) -lmpfr -lgmp ++CORE_INC=-I. -I$(CORE_PATH)/inc ++CORE_LIB=-L$(CORE_PATH)/lib -lcore++$(VAR) -lmpfr -lgmp + + COREX_LIB_LEVEL=-lcoreex++$(VAR)_level + +diff -Nur core-2.1.1.orig/src/Makefile core-2.1.1/src/Makefile +--- core-2.1.1.orig/src/Makefile 2011-08-06 22:53:29.000000000 +0100 ++++ core-2.1.1/src/Makefile 2011-08-07 00:24:38.000000000 +0100 +@@ -23,7 +23,7 @@ + endif + endif + +-INCLUDE=-I${CORE_PATH}/inc -I${CORE_PATH}/mpfr/include -I${CORE_PATH}/gmp/include ++INCLUDE=-I${CORE_PATH}/inc + + # VAR indicates variants of the Core library + # E.g., if VAR=(empty) then we compile the release version. +@@ -44,7 +44,8 @@ + + # The following library will be built: + CORE_LIB=$(CORE_PATH)/lib/libcore++${VAR}.a +-CORE_SHARED_LIB=$(CORE_PATH)/lib/libcore++${VAR}.${CORE_DYLIB_EXTENSION} ++CORE_SHARED_LIB_NAME=libcore++${VAR}.${CORE_DYLIB_EXTENSION}.2 ++CORE_SHARED_LIB=$(CORE_PATH)/lib/$(CORE_SHARED_LIB_NAME) + + TARGET=$(CORE_LIB) + +@@ -52,7 +53,7 @@ + TARGET+=$(CORE_SHARED_LIB) + endif + +-DEPS=-L${GMP_PREFIX}/lib -L${MPFR_PREFIX}/lib -lgmp -lmpfr ++DEPS=-lgmp -lmpfr + + # ============================================================= + # RULES ====================================================== +@@ -64,7 +65,7 @@ + $(AR) $@ $^ + + ${CORE_SHARED_LIB}: $(EXPROBJS) +- $(CXX) $(DEPS) $(CORE_LDFLAGS) -o $@ $^ ++ $(CXX) $(LDFLAGS) $(CORE_LDFLAGS) -Wl,-soname,$(CORE_SHARED_LIB_NAME) $(DEPS) -o $@ $^ $(LIBS) + + %${VAR}.o: %.cpp + ${CXX} $(CORE_CXXFLAGS) $(INCLUDE) -c $< -o $@ diff --git a/sci-libs/libcore/libcore-2.1.1.ebuild b/sci-libs/libcore/libcore-2.1.1.ebuild new file mode 100644 index 000000000000..d75e9f43be13 --- /dev/null +++ b/sci-libs/libcore/libcore-2.1.1.ebuild @@ -0,0 +1,74 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/libcore/libcore-2.1.1.ebuild,v 1.1 2011/08/07 00:03:25 bicatali Exp $ + +EAPI=4 +inherit eutils toolchain-funcs versionator + +MYPN=core +DOCPV="$(get_version_component_range 1-2)" + +DESCRIPTION="Robust numerical and geometric computation library" +HOMEPAGE="http://www.cs.nyu.edu/exact/core_pages/" +SRC_URI="http://cs.nyu.edu/exact/core/download/${MYPN}/${MYPN}-${PV}.tgz + doc? ( http://cs.nyu.edu/exact/core/download/${MYPN}/${MYPN}-${DOCPV}.doc.tgz )" + +LICENSE="QPL-1.0" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="doc static-libs" + +RDEPEND="" +DEPEND="${RDEPEND} + dev-libs/mpfr + dev-libs/gmp + doc? ( app-doc/doxygen[latex] )" + +S="${WORKDIR}/${MYPN}-${PV}" + +src_prepare() { + epatch "${FILESDIR}"/${PV}-makefiles.patch + sed -i \ + -e "s/-O2/${CXXFLAGS}/g" \ + -e "s/-shared/-shared ${LDFLAGS}/g" \ + Make.config || die + sed -i -e 's/-lgmp/-lgmp -lgmpxx/g' progs/Make.options || die + # missing input file in gaussian test and buggy test in tutorial + sed -i -e '/gaussian/d' -e '/tutorial/d' progs/Makefile || die +} + +src_compile(){ + emake VAR= LINKAGE=shared corelib corex USE_GMPXX=1 + rm -f src/*.o ext/*.o + use static-libs && emake VAR="" corelib corex USE_GMPXX=1 + if use doc; then + cd "${S}/doc" + export VARTEXFONTS="${T}/fonts" + emake -j1 all + emake -j1 -C doxy/latex pdf + fi +} + +src_test() { + LD_LIBRARY_PATH="${S}/lib" emake \ + VAR= GMP_PREFIX= MPFR_PREFIX= test +} + +src_install(){ + dolib.so lib/*.so* + for i in $(find "${ED}/usr/$(get_libdir)" -name "*so" | sed "s:${ED}::g"); do + dosym $i.2 $i + done + use static-libs && dolib.a lib/*.a + + insinto /usr/include + doins ./inc/* + + dodoc FAQs README + if use doc; then + dodoc doc/*.txt + insinto /usr/share/doc/${PF} + doins doc/papers/* doc/tutorial/tutorial.pdf + doins -r doc/doxy/html doc/doxy/latex/*pdf + fi +} |