From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id C48A2158087 for ; Tue, 25 Jan 2022 16:55:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EE6652BC001; Tue, 25 Jan 2022 16:55:35 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3AEEA2BC001 for ; Tue, 25 Jan 2022 16:55:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1F6F2342CBD for ; Tue, 25 Jan 2022 16:55:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9DAB721E for ; Tue, 25 Jan 2022 16:55:31 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1643129724.cef7fbb0d06b405c14bafe690adada911d9acea8.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-electronics/ngspice/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-electronics/ngspice/Manifest sci-electronics/ngspice/ngspice-36.ebuild X-VCS-Directories: sci-electronics/ngspice/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: cef7fbb0d06b405c14bafe690adada911d9acea8 X-VCS-Branch: master Date: Tue, 25 Jan 2022 16:55:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: a007e444-bb93-4934-8dd1-9100cea418d2 X-Archives-Hash: 69c1cec65e75cc62110ee40c1a42ae24 commit: cef7fbb0d06b405c14bafe690adada911d9acea8 Author: Yehoshua Pesach Wallach gmail com> AuthorDate: Thu Jan 13 23:09:54 2022 +0000 Commit: Sam James gentoo org> CommitDate: Tue Jan 25 16:55:24 2022 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cef7fbb0 sci-electronics/ngspice: added ngspice 36 Added ngspice-36.ebuild as exact copy of ngspice-35.ebuild. (tested, and it works) Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Yehoshua Pesach Wallach gmail.com> Closes: https://github.com/gentoo/gentoo/pull/23783 Signed-off-by: Sam James gentoo.org> sci-electronics/ngspice/Manifest | 2 + sci-electronics/ngspice/ngspice-36.ebuild | 198 ++++++++++++++++++++++++++++++ 2 files changed, 200 insertions(+) diff --git a/sci-electronics/ngspice/Manifest b/sci-electronics/ngspice/Manifest index a9fc63fa30c1..e926f3309624 100644 --- a/sci-electronics/ngspice/Manifest +++ b/sci-electronics/ngspice/Manifest @@ -4,3 +4,5 @@ DIST ngspice-34-manual.pdf 2311221 BLAKE2B e8863bab8173980a825970b90b685d3d5a597 DIST ngspice-34.tar.gz 7800546 BLAKE2B a07a7266225b8c4e478e3240718aa1fce9a77003d58477a30a6178368e7826f288007f9111797ca1c426486911d4bedd847bdf0daa69232e59333304468a4fc3 SHA512 5e90727f3f6b8675b83f71e1961d33cd498081a7f3bea5d081521f12ecb3979775159f083f84a5856233529505262c399f75d305758af51894a1245603476cf8 DIST ngspice-35-manual.pdf 2347261 BLAKE2B 617462615525e5335f5795e625578324d2b173a8d69438e43c4007177e7ca0fdf8d37b1553a4c836a352523c310bbf23ef492a01ac0a7541ca8ac0794b588a66 SHA512 df3239c4798746534d12a489d80056d45d9f3cda60336aaeb2dd541526340715a180780b0e2ced1857e9c5cbe716c4b3f0c496598f8a3e8aa36a8cd1b6a022c7 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 diff --git a/sci-electronics/ngspice/ngspice-36.ebuild b/sci-electronics/ngspice/ngspice-36.ebuild new file mode 100644 index 000000000000..607fec459334 --- /dev/null +++ b/sci-electronics/ngspice/ngspice-36.ebuild @@ -0,0 +1,198 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +inherit autotools multibuild toolchain-funcs virtualx + +DESCRIPTION="The Next Generation Spice (Electronic Circuit Simulator)" +SRC_URI="mirror://sourceforge/ngspice/${P}.tar.gz + doc? ( mirror://sourceforge/ngspice/${P}-manual.pdf )" +HOMEPAGE="http://ngspice.sourceforge.net" +LICENSE="BSD GPL-2" + +SLOT="0" +IUSE="X debug deprecated doc examples fftw openmp +readline +shared tcl" +KEYWORDS="~amd64 ~arm64 ~ppc ~sparc ~x86 ~x64-macos" + +RESTRICT="!test? ( test )" + +DEPEND="sys-libs/ncurses:0= + X? ( x11-libs/libXaw + x11-libs/libXt + x11-libs/libX11 ) + fftw? ( sci-libs/fftw:3.0 ) + readline? ( sys-libs/readline:0= ) + tcl? ( dev-lang/tcl:0 + dev-tcltk/blt )" +RDEPEND="${DEPEND}" + +DOCS=( + ANALYSES + AUTHORS + BUGS + ChangeLog + DEVICES + FAQ + NEWS + README + README.vdmos + Stuarts_Poly_Notes +) + +pkg_setup() { + MULTIBUILD_VARIANTS=( "binaries" ) + use shared && MULTIBUILD_VARIANTS+=( "shared" ) + use tcl && MULTIBUILD_VARIANTS+=( "tcl" ) + use openmp && tc-check-openmp +} + +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_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 +} + +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 +}