summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Fabbro <bicatali@gentoo.org>2009-08-13 00:28:42 +0000
committerSebastien Fabbro <bicatali@gentoo.org>2009-08-13 00:28:42 +0000
commit40df8b32a64a5f5eed95ccde9b345c5866939679 (patch)
tree89dce84a769a4ce0440c9f94bac9c8a1cc2a5220 /sci-libs/libcore
parentMask Mumble 1.2.0 snapshots for testing. (diff)
downloadgentoo-2-40df8b32a64a5f5eed95ccde9b345c5866939679.tar.gz
gentoo-2-40df8b32a64a5f5eed95ccde9b345c5866939679.tar.bz2
gentoo-2-40df8b32a64a5f5eed95ccde9b345c5866939679.zip
Version bump. Serious ebuild cleaning and added tests.
(Portage version: 2.2_rc38/cvs/Linux x86_64)
Diffstat (limited to 'sci-libs/libcore')
-rw-r--r--sci-libs/libcore/ChangeLog8
-rw-r--r--sci-libs/libcore/files/libcore-2.0.8-makefiles.patch97
-rw-r--r--sci-libs/libcore/libcore-1.7.ebuild56
-rw-r--r--sci-libs/libcore/libcore-2.0.8.ebuild72
-rw-r--r--sci-libs/libcore/metadata.xml11
5 files changed, 186 insertions, 58 deletions
diff --git a/sci-libs/libcore/ChangeLog b/sci-libs/libcore/ChangeLog
index e6961b57030c..0b45c3c934a1 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.5 2009/02/02 23:01:37 bicatali Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/libcore/ChangeLog,v 1.6 2009/08/13 00:28:42 bicatali Exp $
+
+*libcore-2.0.8 (13 Aug 2009)
+
+ 13 Aug 2009; Sébastien Fabbro <bicatali@gentoo.org> -libcore-1.7.ebuild,
+ +libcore-2.0.8.ebuild, +files/libcore-2.0.8-makefiles.patch, metadata.xml:
+ Version bump. Serious ebuild cleaning and added tests.
*libcore-1.8 (02 Feb 2009)
diff --git a/sci-libs/libcore/files/libcore-2.0.8-makefiles.patch b/sci-libs/libcore/files/libcore-2.0.8-makefiles.patch
new file mode 100644
index 000000000000..6980332837f6
--- /dev/null
+++ b/sci-libs/libcore/files/libcore-2.0.8-makefiles.patch
@@ -0,0 +1,97 @@
+--- src/Makefile.orig 2009-08-12 22:52:51.000000000 +0100
++++ src/Makefile 2009-08-12 23:38:51.000000000 +0100
+@@ -7,7 +7,7 @@
+
+ CORE_PATH=..
+
+-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.
+@@ -37,12 +37,13 @@
+
+ # The following library will be built:
+ CORE_LIB=$(CORE_PATH)/lib/libcore++${VAR}.a
+-CORE_SHARED_LIB=$(CORE_PATH)/lib/libcore++${VAR}.so
++CORE_SHARED_LIB_NAME=libcore++${VAR}.so.2.0.0
++CORE_SHARED_LIB=$(CORE_PATH)/lib/$(CORE_SHARED_LIB_NAME)
+
+ TARGET=$(CORE_LIB)
+
+ ifeq (${LINKAGE}, shared)
+- TARGET+=$(CORE_SHARED_LIB)
++ TARGET=$(CORE_SHARED_LIB)
+ endif
+
+ # =============================================================
+@@ -55,7 +56,7 @@
+ $(AR) $@ $^
+
+ ${CORE_SHARED_LIB}: $(EXPROBJS)
+- $(CXX) $(CORE_LDFLAGS) -o $@ $^
++ $(CXX) $(LDFLAGS) $(CORE_LDFLAGS) -Wl,-soname,$(CORE_SHARED_LIB_NAME).2.0.0 -o $@ $^ $(LIBS)
+
+ %${VAR}.o: %.cpp
+ ${CXX} $(CORE_CXXFLAGS) $(INCLUDE) -c $< -o $@
+--- ext/Makefile.orig 2009-08-12 22:54:55.000000000 +0100
++++ ext/Makefile 2009-08-12 23:39:19.000000000 +0100
+@@ -13,8 +13,7 @@
+ # =============================================================
+
+ CORE_PATH=..
+-INCLUDE=-I${CORE_PATH}/inc -I${CORE_PATH}/gmp/include \
+- -I${CORE_PATH}/mpfr/include
++INCLUDE=-I${CORE_PATH}/inc
+
+ MODULES := linearAlgebra geometry2d geometry3d
+
+@@ -30,14 +29,17 @@
+ 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.so
+-COREX_SHARED_LIB_LEVEL2=${CORE_PATH}/lib/libcorex++$(VAR)_level2.so
+-COREX_SHARED_LIB_LEVEL1=${CORE_PATH}/lib/libcorex++$(VAR)_level1.so
++COREX_SHARED_LIB_LEVEL3_NAME=libcorex++$(VAR)_level3.so.2.0.0
++COREX_SHARED_LIB_LEVEL2_NAME=libcorex++$(VAR)_level2.so.2.0.0
++COREX_SHARED_LIB_LEVEL1_NAME=libcorex++$(VAR)_level1.so.2.0.0
++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}
+
+ ifeq (${LINKAGE}, shared)
+- TARGET += $(COREX_SHARED_LIB_LEVEL3) $(COREX_SHARED_LIB_LEVEL2) \
++ TARGET = $(COREX_SHARED_LIB_LEVEL3) $(COREX_SHARED_LIB_LEVEL2) \
+ $(COREX_SHARED_LIB_LEVEL1)
+ endif
+
+@@ -60,7 +62,7 @@
+
+ ${COREX_SHARED_LIB_LEVEL3}: ${L3_OBJS}
+ -@rm -rf $@
+- $(CXX) $(CORE_LDFLAGS) -o $@ $?
++ $(CXX) $(LDFLAGS) $(CORE_LDFLAGS) -Wl,-soname,$(COREX_SHARED_LIB_LEVEL3_NAME).2.0.0 -o $@ $?
+
+ ${COREX_LIB_LEVEL2}: ${L2_OBJS}
+ -@rm -rf $@
+@@ -68,7 +70,7 @@
+
+ ${COREX_SHARED_LIB_LEVEL2}: ${L2_OBJS}
+ -@rm -rf $@
+- $(CXX) $(CORE_LDFLAGS) -o $@ $?
++ $(CXX) $(LDFLAGS) $(CORE_LDFLAGS) -Wl,-soname,$(COREX_SHARED_LIB_LEVEL2_NAME).2.0.0 -o $@ $?
+
+ ${COREX_LIB_LEVEL1}: ${L1_OBJS}
+ -@rm -rf $@
+@@ -76,7 +78,7 @@
+
+ ${COREX_SHARED_LIB_LEVEL1}: ${L1_OBJS}
+ -@rm -rf $@
+- $(CXX) $(CORE_LDFLAGS) -o $@ $?
++ $(CXX) $(LDFLAGS) $(CORE_LDFLAGS) -Wl,-soname,$(COREX_SHARED_LIB_LEVEL1_NAME).2.0.0 -o $@ $?
+
+ %_level3.o: %.cpp
+ ${CXX} $(CORE_CXXFLAGS) -DCORE_LEVEL=3 $(INCLUDE) -c $< -o $@
diff --git a/sci-libs/libcore/libcore-1.7.ebuild b/sci-libs/libcore/libcore-1.7.ebuild
deleted file mode 100644
index 2a32fcc8fae8..000000000000
--- a/sci-libs/libcore/libcore-1.7.ebuild
+++ /dev/null
@@ -1,56 +0,0 @@
-# Copyright 1999-2009 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/libcore/libcore-1.7.ebuild,v 1.5 2009/02/02 23:01:37 bicatali Exp $
-
-inherit eutils toolchain-funcs
-
-DESCRIPTION="Robust numerical and geometric computation library"
-HOMEPAGE="http://www.cs.nyu.edu/exact/core_pages/"
-MYP="${PN/lib}"
-SRC_URI="http://cs.nyu.edu/exact/core/download/prerelease/${MYP}_v${PV}x_std.tgz"
-
-LICENSE="QPL-1.0"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="doc"
-
-DEPEND="dev-libs/gmp
- doc? ( virtual/latex-base ) "
-RDEPEND=""
-
-S="${WORKDIR}/${MYP}_v${PV}x"
-
-src_unpack(){
- unpack ${A}
- cd "${S}"
- epatch "${FILESDIR}"/${P}.patch
- sed -i \
- -e "s/-O2/${CXXFLAGS}/g" \
- -e "s/-shared/-shared ${LDFLAGS}/g" \
- Make.config || die
-}
-
-src_compile(){
- emake CXX="$(tc-getCXX)" corelib || die "Unable to create corelib"
- emake CXX="$(tc-getCXX)" corex || die "Unable to create corex"
- if use doc; then
- cd "${S}/doc"
- emake all || die "Unable to create doc"
- fi
-}
-
-src_install(){
- dolib lib/*.a lib/*.so || die "Unable to find libraries"
- for i in $(find "${D}/usr/lib/" -name "*so" | sed "s:${D}::g"); do
- dosym $i $i.1 && dosym $i $i.1.0.0 || die "Unable to sym $i"
- done
-
- dodir /usr/include || die "Unable to create include dir"
- cp -r ./inc/* "${D}/usr/include/" || die "Unable to copy headers"
-
- dodoc FAQs README || die "Unable to install default doc"
- if use doc; then
- dodoc doc/ANNOUNCEMENT* doc/*pdf doc/papers/* || \
- die "Unable to install doc"
- fi
-}
diff --git a/sci-libs/libcore/libcore-2.0.8.ebuild b/sci-libs/libcore/libcore-2.0.8.ebuild
new file mode 100644
index 000000000000..f0b1fea85f91
--- /dev/null
+++ b/sci-libs/libcore/libcore-2.0.8.ebuild
@@ -0,0 +1,72 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/libcore/libcore-2.0.8.ebuild,v 1.1 2009/08/13 00:28:42 bicatali Exp $
+
+EAPI=2
+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"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+ dev-libs/mpfr
+ dev-libs/gmp
+ doc? ( app-doc/doxygen[latex] )"
+
+S="${WORKDIR}/${MYPN}-${PV}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-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 || die "emake shared failed"
+ rm -f src/*.o ext/*.o
+ emake VAR="" corelib corex USE_GMPXX=1 || die "emake static failed"
+ if use doc; then
+ cd "${S}/doc"
+ export VARTEXFONTS="${T}/fonts"
+ emake -j1 all || die "doc creation failed"
+ emake -j1 -C doxy/latex pdf || die "pdf doc creation failed"
+ fi
+}
+
+src_test() {
+ LD_LIBRARY_PATH="${S}/lib" emake VAR="" test || die "emake test failed"
+}
+
+src_install(){
+ dolib lib/*.a lib/*.so* || die "Unable to find libraries"
+ for i in $(find "${D}/usr/$(get_libdir)" -name "*so" | sed "s:${D}::g"); do
+ dosym $i.2.0.0 $i.2 && dosym $i.2 $i || die "Unable to sym $i"
+ done
+
+ dodir /usr/include || die "Unable to create include dir"
+ cp -r ./inc/* "${D}/usr/include/" || die "Unable to copy headers"
+
+ dodoc FAQs README
+ if use doc; then
+ dodoc doc/*.txt
+ insinto /usr/share/doc/${PF}
+ doins doc/papers/* doc/tutorial/tutorial.pdf || die
+ doins -r doc/doxy/html doc/doxy/latex/*pdf || die
+ fi
+}
diff --git a/sci-libs/libcore/metadata.xml b/sci-libs/libcore/metadata.xml
index 3190fbf9c377..316dc3d398c3 100644
--- a/sci-libs/libcore/metadata.xml
+++ b/sci-libs/libcore/metadata.xml
@@ -1,5 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
- <herd>sci-geosciences</herd>
+<herd>sci-geosciences</herd>
+<longdescription lang='en'>
+ The Core Library is a collection of C/C++ classes for exact
+ computation with real algebraic numbers.
+ It embodies our precision-driven approach and is
+ useful for robust numerical (especially geometric) algorithms.
+ The library supports the Exact Geometric Computation (EGC)
+ philosophy through its novel and easy-to-use notion of accuracy
+ levels.
+</longdescription>
</pkgmetadata>