Adding ECG core library
[shuber-gentoo-overlay.git] / dev-libs / core / core-2.1.ebuild
diff --git a/dev-libs/core/core-2.1.ebuild b/dev-libs/core/core-2.1.ebuild
new file mode 100644 (file)
index 0000000..ecd57eb
--- /dev/null
@@ -0,0 +1,94 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI=3
+
+DESCRIPTION="Exact arithmetics library intended for exact geometric computations"
+HOMEPAGE="http://cs.nyu.edu/exact/core_pages/"
+SRC_URI="http://cs.nyu.edu/exact/core/download/core/${P}.std.tgz -> ${P}.tgz"
+
+LICENSE="QPL"
+SLOT="0"
+KEYWORDS="~x86 ~amd64"
+RESTRICT="mirror"
+IUSE="debug shared extensions doc"
+
+DEPEND="
+       dev-libs/gmp
+       dev-libs/mpfr
+       doc? (
+               virtual/latex-base
+               app-doc/doxygen
+       )
+       "
+RDEPEND="${DEPEND}"
+S="${WORKDIR}/${P}.1"
+
+
+src_compile() {
+       export PLATFORM="gnu"
+       export LINKAGE="static"
+       if use shared; then
+               einfo "Add shared version"
+               LINKAGE="shared"
+       fi
+
+       emake corelib
+       if use extensions; then
+               emake corex
+       fi
+
+       if use debug; then
+               einfo "Compile debug version"
+               export VAR=Debug
+               emake corelib
+
+               if use extensions; then
+                       emake corex
+               fi
+       fi
+
+       if use doc; then
+               cd doc
+               emake
+       fi
+}
+
+
+src_install() {
+       
+       dolib.a lib/libcore*.a
+       if use shared; then
+               dolib.so lib/libcore*.so
+       fi
+
+       dodoc README
+       dodoc FAQs
+
+
+       if use doc; then
+
+               dodoc doc/stackOverflow.txt
+               dodoc doc/bigNumFormat.txt
+               dodoc doc/eclipse.txt
+               dodoc doc/tutorial/tutorial.pdf
+
+               docinto announce
+               dodoc doc/announce/*
+
+               docinto papers
+               dodoc doc/papers/*
+               
+               docinto html
+               dodoc doc/doxy/html/*
+       fi
+
+       insinto /usr/include/
+       cd inc
+       doins -r CORE
+}
+
+
+
+