public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/ngspice/
Date: Sun, 23 Apr 2023 08:12:28 +0000 (UTC)	[thread overview]
Message-ID: <1682237466.7bfe537e4604c1d68ea7a7e65cb4a47fda1076fa.sam@gentoo> (raw)

commit:     7bfe537e4604c1d68ea7a7e65cb4a47fda1076fa
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 23 08:11:06 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 23 08:11:06 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7bfe537e

sci-electronics/ngspice: add 40

Closes: https://bugs.gentoo.org/871114
Signed-off-by: Sam James <sam <AT> gentoo.org>

 sci-electronics/ngspice/Manifest          |   2 +
 sci-electronics/ngspice/ngspice-40.ebuild | 210 ++++++++++++++++++++++++++++++
 2 files changed, 212 insertions(+)

diff --git a/sci-electronics/ngspice/Manifest b/sci-electronics/ngspice/Manifest
index e926f3309624..888991941e70 100644
--- a/sci-electronics/ngspice/Manifest
+++ b/sci-electronics/ngspice/Manifest
@@ -6,3 +6,5 @@ DIST ngspice-35-manual.pdf 2347261 BLAKE2B 617462615525e5335f5795e625578324d2b17
 DIST ngspice-35.tar.gz 8050668 BLAKE2B d67475b55e1e14974a78451175a08ec91be24708030e0da8fa6811b7df880c8082741ec08d92c314c53480271cc074e35ad0eca27a3b7601e33fb240c834e530 SHA512 2f9b0f951e3ca8d52692beadb895b352311f67b8760f99d0e2f4718fce4b497dd68e2b933029eeacb4ed57551e959bc6e3747e64feb4722a4f841e734f5a664b
 DIST ngspice-36-manual.pdf 2397103 BLAKE2B 09dbfe4101b8e1752509caa37ba3a323da7d7391488c3245b3f614114d1666ee32ea1391ad4f39772ed950e270f028b7513115e0c13fde052bfdb5674f021b3b SHA512 bd31f99f7ec0acd2bdd24f008e22cb953bba98fd5cc1164ded0bdde3397bfffa0b0cae25dfeae6cf0e1dadd23c23faa5588010069b62392438296451347a5134
 DIST ngspice-36.tar.gz 8450071 BLAKE2B 51fa2c5998e96a05deb3764f56659ed0970d6362fcbec7367b04a5fbe76fc7dadb08e0d36b660b0e1f8e525079bedf71305877ab2de8e2ab2773c891808fb5a6 SHA512 d862097f465e92986e8d6644374d43249eebee0fb6d79b1404dbb7c11d14a058dfedd4bdb61baf5aa1ffd1d2e71167440db73eb417d4b1249a0a7b83bd39efc3
+DIST ngspice-40-manual.pdf 2462604 BLAKE2B a0d680cd76f8acb1be18e94953d70784aaf79e1bcc4bc3995a1221d81e27c13e577d182e7cbacb8430a068db7d86681f22ec4f3537b5704faacb8e982588617f SHA512 1a5c7828aa9a4554052fb01145641415d8a4cbd50db9885d5d937e1b6f50c7c541dfeeabf2efd6ea862036b4d74ce8265bdac1cfad0fc635f28651a0d397bfc5
+DIST ngspice-40.tar.gz 9431981 BLAKE2B e45d5d7a9e8d9d3fdae4eb076090a588680055a74cc24ba9ca3d93a7c42b95ee29073101d5791f8069cb27b3049aa1a451476f1df6460477fb156336602678fd SHA512 dab422cc8677e6f4bb92e06be0ce695a53d3e9abbe533c7bb91540d55d2a13514b0b166c8ccafcc17699799a846a35e260dddc400664c6e1137e1b18504e9954

diff --git a/sci-electronics/ngspice/ngspice-40.ebuild b/sci-electronics/ngspice/ngspice-40.ebuild
new file mode 100644
index 000000000000..5e10132afd22
--- /dev/null
+++ b/sci-electronics/ngspice/ngspice-40.ebuild
@@ -0,0 +1,210 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools multibuild toolchain-funcs virtualx
+
+DESCRIPTION="The Next Generation Spice (Electronic Circuit Simulator)"
+HOMEPAGE="http://ngspice.sourceforge.net"
+SRC_URI="
+	mirror://sourceforge/ngspice/${P}.tar.gz
+	doc? ( mirror://sourceforge/ngspice/${P}-manual.pdf )
+"
+
+LICENSE="BSD GPL-2 MPL-2.0"
+SLOT="0"
+IUSE="X debug deprecated doc examples fftw openmp +readline +shared tcl"
+KEYWORDS="~amd64 ~arm64 ~ppc ~riscv ~sparc ~x86 ~x64-macos"
+RESTRICT="!test? ( test )"
+
+DEPEND="
+	sys-libs/ncurses:=
+	X? (
+		x11-libs/libXaw
+		x11-libs/libXt
+		x11-libs/libX11
+	)
+	fftw? ( sci-libs/fftw:3.0= )
+	readline? ( sys-libs/readline:= )
+	tcl? (
+		dev-lang/tcl:=
+		dev-tcltk/blt
+	)
+"
+RDEPEND="${DEPEND}"
+
+DOCS=(
+	ANALYSES
+	AUTHORS
+	BUGS
+	ChangeLog
+	DEVICES
+	FAQ
+	NEWS
+	README
+	README.vdmos
+	Stuarts_Poly_Notes
+)
+
+pkg_pretend() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+}
+
+pkg_setup() {
+	[[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp
+
+	MULTIBUILD_VARIANTS=( "binaries" )
+	use shared && MULTIBUILD_VARIANTS+=( "shared" )
+	use tcl && MULTIBUILD_VARIANTS+=( "tcl" )
+}
+
+src_prepare() {
+	default
+
+	if use tcl; then
+		if use examples; then
+			find examples/tclspice -type f -iname \*tcl -or -iname \*.sh |
+			while read s
+			do
+				sed -i -e 's@../../../src/.libs/libspice.so@libspice.so@g' \
+					-e 's@package require BLT@package require Tk\npackage require BLT@g' \
+					-e "s@spice::codemodel \(.*\)/\(.*\).cm@spice::codemodel /usr/$(get_libdir)/ngspice/\2.cm@g" \
+					"${s}" || die "sed failed"
+			done
+		fi
+	fi
+
+	eautoreconf
+	multibuild_copy_sources
+}
+
+src_configure() {
+	multibuild_foreach_variant ngspice_configure
+}
+
+ngspice_configure() {
+	local myeconfargs
+
+	pushd "${BUILD_DIR}" &>/dev/null || die
+
+	if use debug; then
+		myeconfargs=(
+			--enable-debug
+			--enable-ftedebug
+			--enable-cpdebug
+			--enable-sensdebug
+			--enable-asdebug
+			--enable-stepdebug
+			--enable-pzdebug
+		)
+	else
+		myeconfargs=(
+			--disable-debug
+			--disable-ftedebug
+			--disable-cpdebug
+			--disable-sensdebug
+			--disable-asdebug
+			--disable-stepdebug
+			--disable-pzdebug
+		)
+	fi
+
+	# As of March 2021, these do not compile
+	myeconfargs+=(
+		--disable-blktmsdebug
+		--disable-smltmsdebug
+	)
+
+	myeconfargs+=(
+		--enable-xspice
+		--enable-cider
+		--disable-rpath
+		$(use_enable openmp)
+		$(use_with fftw fftw3)
+		$(use_with readline)
+	)
+
+	if [[ "${MULTIBUILD_VARIANT}" == "shared" ]]; then
+		myeconfargs+=( --with-ngshared )
+	elif [[ "${MULTIBUILD_VARIANT}" == "tcl" ]]; then
+		myeconfargs+=( --with-tcl="${EPREFIX}/usr/$(get_libdir)" )
+	else
+		myeconfargs+=(
+			$(use_enable deprecated oldapps)
+			$(use_with X x)
+		)
+	fi
+
+	econf "${myeconfargs[@]}"
+
+	popd &>/dev/null || die
+}
+
+src_compile() {
+	multibuild_foreach_variant ngspice_compile
+}
+
+ngspice_compile() {
+	pushd "${BUILD_DIR}" &>/dev/null || die
+	default
+	popd &>/dev/null || die
+}
+
+src_test() {
+	if ! use debug; then
+		# tests can be only executed for the binaries variant
+		pushd "${WORKDIR}/${P}-binaries" &>/dev/null || die
+		echo "set ngbehavior=mc" > "${HOME}"/.spiceinit || die "Failed to configure ${PN} for running the test suite"
+		virtx default
+		popd &>/dev/null || die
+	else
+		# https://sourceforge.net/p/ngspice/bugs/353/
+		ewarn
+		ewarn "Skipping tests because they are known to fail in debug mode"
+		ewarn
+	fi
+}
+
+src_install() {
+	multibuild_foreach_variant ngspice_install
+
+	# merge the installations of all variants
+	local v
+	for v in "${MULTIBUILD_VARIANTS[@]}" ; do
+		cp -a "${ED}/tmp/${v}"/* "${ED}" || die "Failed to combine multibuild installations"
+	done
+	rm -rf "${ED}/tmp" || die
+
+	use tcl && DOCS+=( README.tcl )
+	use shared && DOCS+=( README.shared-xspice )
+	use doc && DOCS+=( "${DISTDIR}"/${P}-manual.pdf )
+
+	default
+
+	if use examples; then
+		if ! use tcl; then
+			rm -rf examples/tclspice || die
+		fi
+
+		insinto /usr/share/${PN}
+		doins -r examples
+	fi
+}
+
+ngspice_install() {
+	pushd "${BUILD_DIR}" &>/dev/null || die
+
+	emake DESTDIR="${ED}/tmp/${MULTIBUILD_VARIANT}" install
+
+	# Strip shared-library and Tcl-module builds to the bare minimum;
+	# all the support files will have been handled by the 'binaries' build.
+	if [[ "${MULTIBUILD_VARIANT}" != "binaries" ]]; then
+		rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/bin{,.debug} || die
+		rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/share || die
+		rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/*.la || die
+		rm -rf "${ED}/tmp/${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/ngspice/*.cm{,.debug} || die
+	fi
+
+	popd &>/dev/null || die
+}


             reply	other threads:[~2023-04-23  8:12 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-23  8:12 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-03-10 22:43 [gentoo-commits] repo/gentoo:master commit in: sci-electronics/ngspice/ Sam James
2024-12-01 12:12 Sam James
2024-10-26 22:58 Andreas K. Hüttel
2024-03-25  9:21 Sam James
2023-12-16  4:12 Sam James
2023-06-12  4:33 Sam James
2022-08-31  6:22 Jakov Smolić
2022-08-30  9:25 Jakov Smolić
2022-05-16  8:12 David Seifert
2022-01-25 16:55 Sam James
2021-09-05 19:17 Jason Zaman
2021-03-12 18:12 Marek Szuba
2021-03-11 12:29 Marek Szuba
2021-02-22 18:57 Sam James
2019-11-04 19:10 Thomas Deutschmann
2019-11-04  8:35 Michał Górny
2019-11-03 22:17 Denis Dupeyron
2018-10-02  6:00 Jeroen Roovers
2017-12-29 15:11 Marek Szuba
2017-12-28 13:26 Marek Szuba
2017-12-27 21:11 Marek Szuba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1682237466.7bfe537e4604c1d68ea7a7e65cb4a47fda1076fa.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox