aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-mathematics')
-rw-r--r--sci-mathematics/abc/abc-9999.ebuild57
-rw-r--r--sci-mathematics/abc/metadata.xml12
2 files changed, 69 insertions, 0 deletions
diff --git a/sci-mathematics/abc/abc-9999.ebuild b/sci-mathematics/abc/abc-9999.ebuild
new file mode 100644
index 000000000..5f80d0d55
--- /dev/null
+++ b/sci-mathematics/abc/abc-9999.ebuild
@@ -0,0 +1,57 @@
+EAPI=7
+
+inherit git-r3 toolchain-funcs
+
+DESCRIPTION="System for sequential logic synthesis and formal verification"
+HOMEPAGE="https://people.eecs.berkeley.edu/~alanmi/abc/"
+SRC_URI=""
+EGIT_REPO_URI="https://github.com/berkeley-abc/abc.git"
+EGIT_BRANCH="master"
+
+
+LICENSE="Berkeley-ABC"
+SLOT="0"
+KEYWORDS=""
+PROPERTIES="live"
+IUSE="+static-libs +readline +pthread"
+REQUIRED_USE=""
+
+
+BDEPEND="
+ sys-devel/gcc[cxx]
+"
+
+RDEPEND="
+ readline? ( sys-libs/readline:= )
+"
+
+DEPEND="
+ ${RDEPEND}
+"
+
+
+src_compile() {
+ local MAKE_ARGS=(
+ CC=$(tc-getCC)
+ CXX=$(tc-getCXX)
+ AR=$(tc-getAR)
+ LD=$(tc-getCXX)
+ ABC_USE_PIC=1
+ $(usex readline "" "ABC_USE_NO_READLINE=1")
+ $(usex pthread "" "ABC_USE_NO_PTHREADS=1")
+ )
+
+ # We're explicitly building these targets sequentially,
+ # because if the abc executable and libabc.a are linked in parallel,
+ # we risk exhausting memory.
+ emake "${MAKE_ARGS[@]}" abc
+ emake "${MAKE_ARGS[@]}" libabc.so
+ use static-libs && emake "${MAKE_ARGS[@]}" libabc.a
+}
+
+
+src_install() {
+ dobin abc
+ dolib.so libabc.so
+ use static-libs && dolib.a libabc.a
+}
diff --git a/sci-mathematics/abc/metadata.xml b/sci-mathematics/abc/metadata.xml
new file mode 100644
index 000000000..4a61f8882
--- /dev/null
+++ b/sci-mathematics/abc/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<upstream>
+ <remote-id type="github">berkeley-abc/abc</remote-id>
+</upstream>
+<use>
+ <flag name="static-libs">Builds libabc.a</flag>
+ <flag name="readline">Enables readline support</flag>
+ <flag name="pthread">Builds with pthreads</flag>
+</use>
+</pkgmetadata>