add sci-electronics/opensta
authorgit <redacted>
Tue, 7 Jul 2026 11:00:21 +0000 (07:00 -0400)
committergit <redacted>
Tue, 7 Jul 2026 11:00:21 +0000 (07:00 -0400)
README.md
sci-electronics/opensta/Manifest [new file with mode: 0644]
sci-electronics/opensta/files/opensta-addZlibConditionalAndFixLibdir.patch [new file with mode: 0644]
sci-electronics/opensta/metadata.xml [new file with mode: 0644]
sci-electronics/opensta/opensta-2.2.0.ebuild [new file with mode: 0644]
sci-electronics/opensta/opensta-9999.ebuild [new file with mode: 0644]

index 0950362ea621e3a73f38e3483ec82ad31a7a60e4..93c7e43db5a016c9beab55359e17efe5acf2683e 100644 (file)
--- a/README.md
+++ b/README.md
@@ -5,4 +5,5 @@ Ebuild files taken from the official Gentoo repository.
 ## Currently available:
 * `dev-libs/boost` & `dev-libs/boost-static` - a hacky way to get static Boost libraries using a second ebuild, not all USE flags are tested!
 * `sci-electronics/magic` - updated to a newer version and set `-std=gnu89` permanently, used to fail to compile because of `termio.h` and old-style function declarations mixed with C99-style comments.
+* `sci-electronics/opensta` - new ebuild, the stable version needs SWIG 3.0, which is no longer available in the Gentoo repo, the live ebuild merges fine.
 * `sci-mathematics/cudd` - building documentation fails with a modern C++ compiler, this ebuild just skips the docs.
diff --git a/sci-electronics/opensta/Manifest b/sci-electronics/opensta/Manifest
new file mode 100644 (file)
index 0000000..cd87a5e
--- /dev/null
@@ -0,0 +1 @@
+DIST v2.2.0.tar.gz 4873166 BLAKE2B ddf60688fbf1056ee71bb8f9070e2ec3866cd78af136d7934121d9111675bcc623573126678dee3e97e84e23e5252c0965a8e3bffcc6fe78e72d83a1bd55d4c6 SHA512 130e1933f0a62e74ec64cee0b0aeb7fea4283e9c067b060752e7d27cca11095b0114923979197a5cdaafe98b5d6cc2d03a7a710b14f18ae0a0d79eb7d55eafdb
diff --git a/sci-electronics/opensta/files/opensta-addZlibConditionalAndFixLibdir.patch b/sci-electronics/opensta/files/opensta-addZlibConditionalAndFixLibdir.patch
new file mode 100644 (file)
index 0000000..236f9da
--- /dev/null
@@ -0,0 +1,14 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index f8ddda84..c700a7ad 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -31,0 +32 @@ option(CUDD_DIR "CUDD BDD package directory")
++option(USE_ZLIB "Use zlib" ON)
+@@ -405 +406,3 @@ endif()
+-include(FindZLIB)
++if(USE_ZLIB)
++      include(FindZLIB)
++endif()
+@@ -660 +663 @@ install(TARGETS sta DESTINATION bin)
+-install(TARGETS OpenSTA DESTINATION lib)
++install(TARGETS OpenSTA DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/sci-electronics/opensta/metadata.xml b/sci-electronics/opensta/metadata.xml
new file mode 100644 (file)
index 0000000..c9e5205
--- /dev/null
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+       <email>disk.destroyer@yahoo.com</email>
+       <name>datadissipation.net</name>
+</maintainer>
+<upstream>
+       <remote-id type="github">The-OpenROAD-Project/OpenSTA</remote-id>
+</upstream>
+<use>
+       <flag name="readline">Use TCL readline package (links the GNU readline library)</flag>
+       <flag name="zlib">Use zlib</flag>
+</use>
+<longdescription>
+       OpenSTA is a gate level static timing verifier. As a stand-alone executable
+       it can be used to verify the timing of a design using standard file formats.
+       OpenSTA uses a TCL command interpreter to read the design,
+       specify timing constraints and print timing reports.
+</longdescription>
+</pkgmetadata>
diff --git a/sci-electronics/opensta/opensta-2.2.0.ebuild b/sci-electronics/opensta/opensta-2.2.0.ebuild
new file mode 100644 (file)
index 0000000..a8f362e
--- /dev/null
@@ -0,0 +1,52 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake flag-o-matic
+
+DESCRIPTION="Parallax Static Timing Analyzer"
+HOMEPAGE="https://github.com/The-OpenROAD-Project/OpenSTA"
+SRC_URI="https://github.com/The-OpenROAD-Project/OpenSTA/archive/refs/tags/v${PV}.tar.gz"
+
+S="${WORKDIR}/OpenSTA-${PV}"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64"
+IUSE="readline zlib"
+
+PATCHES="
+       "${FILESDIR}"/${PN}-addZlibConditionalAndFixLibdir.patch
+"
+
+DEPEND="
+       readline? ( dev-tcltk/tclreadline:= )
+       zlib? ( sys-libs/zlib:= )
+       sci-mathematics/cudd:=
+       dev-cpp/eigen:=
+       dev-lang/tcl:=
+"
+
+RDEPEND="
+       ${DEPEND}
+"
+
+BDEPEND="
+       >=sys-devel/flex-2.6.4
+       >=sys-devel/bison-3.2.0
+       ~dev-lang/swig-3.0.0
+"
+
+src_configure() {
+
+       filter-lto
+
+       local mycmakeargs=(
+               -DCMAKE_INSTALL_LIBDIR=$(get_libdir)
+               -DUSE_ZLIB=$(usex zlib "ON" "OFF")
+               -DUSE_TCL_READLINE=$(usex readline "ON" "OFF")
+       )
+
+       cmake_src_configure
+}
diff --git a/sci-electronics/opensta/opensta-9999.ebuild b/sci-electronics/opensta/opensta-9999.ebuild
new file mode 100644 (file)
index 0000000..03bd765
--- /dev/null
@@ -0,0 +1,47 @@
+# Copyright 1999-2026 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit cmake git-r3
+
+DESCRIPTION="Parallax Static Timing Analyzer"
+HOMEPAGE="https://github.com/The-OpenROAD-Project/OpenSTA"
+EGIT_REPO_URI="https://github.com/The-OpenROAD-Project/OpenSTA"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="readline zlib"
+
+PATCHES="
+       "${FILESDIR}"/${PN}-addZlibConditionalAndFixLibdir.patch
+"
+
+DEPEND="
+       readline? ( dev-tcltk/tclreadline:= )
+       zlib? ( sys-libs/zlib:= )
+       sci-mathematics/cudd:=
+       dev-cpp/eigen:=
+       dev-lang/tcl:=
+"
+
+RDEPEND="
+       ${DEPEND}
+"
+
+BDEPEND="
+       >=sys-devel/flex-2.6.4
+       >=sys-devel/bison-3.2.0
+       >=dev-lang/swig-3.0.0
+"
+
+src_configure() {
+       local mycmakeargs=(
+               -DCMAKE_INSTALL_LIBDIR=$(get_libdir)
+               -DUSE_ZLIB=$(usex zlib "ON" "OFF")
+               -DUSE_TCL_READLINE=$(usex readline "ON" "OFF")
+       )
+
+       cmake_src_configure
+}