From 43647036d768ad81066900ecc16aff1b85fc923b Mon Sep 17 00:00:00 2001 From: Denis Dupeyron Date: Sun, 3 Nov 2019 15:16:58 -0700 Subject: sci-electronics/ngspice: bump to 31, bug 660354 Package-Manager: Portage-2.3.78, Repoman-2.3.17 Signed-off-by: Denis Dupeyron --- sci-electronics/ngspice/Manifest | 2 + sci-electronics/ngspice/metadata.xml | 1 + sci-electronics/ngspice/ngspice-31.ebuild | 181 ++++++++++++++++++++++++++++++ 3 files changed, 184 insertions(+) create mode 100644 sci-electronics/ngspice/ngspice-31.ebuild (limited to 'sci-electronics/ngspice') diff --git a/sci-electronics/ngspice/Manifest b/sci-electronics/ngspice/Manifest index 106266fe01b9..57c13c48af82 100644 --- a/sci-electronics/ngspice/Manifest +++ b/sci-electronics/ngspice/Manifest @@ -1,2 +1,4 @@ DIST ngspice-27-manual.pdf 3117788 BLAKE2B 6e271abc50b0139c4776844ea31176d231e68c70ce34d0daec48aefc5ef5a9eac90a77f3141081f38c6ac8d42bb95ec061bf1d43bfd3a4fb13e4822c2eff4f57 SHA512 ed87764715917e2cd832c49e911a2908dba9907f9f01c933cb7f97a92c7f9ff345bc26a2f0561dd34b2eede6874b6a67b4864abf3dcff127bd0306e778e997b5 DIST ngspice-27.tar.gz 7372998 BLAKE2B ce8590518fa4eb4292c73c4eaefdd9d0da19bca8120b51daae954a5b9d86f51912d2dccb5a827480caadce8321373d96f045226db4986a78bcc9170f2e46f9a5 SHA512 1714f95ab5716c228a0b39395a742e8b9a823e0e6f7e08625d089541ea786df5fd7b9d2982bcec8431e27ac6ba7603ecc507f9cfcb0a6aacd53f5633f52bd2ea +DIST ngspice-31-manual.pdf 2149244 BLAKE2B 155f7299cbb6d7c7953d8488e11f0bffc3c18097f02194c491174a9af387cda9e87cb79b13a37f402616386e7e82230eb4d41909fe37d900792e48f2f49c71dd SHA512 3322df92791718979a275f2640f82c3417f394a76d27ebf06b46f29a40a1ee3ef57c65a75a7ba67e697b55bd435f81e9ee61c78532f991a2dd6844b4f325eb55 +DIST ngspice-31.tar.gz 7250057 BLAKE2B dabc8e1084eba957d6dad06e74f878b51e97dc8bc49b04ee612a6f9eaadde7302450c9ab93e943c4af42197b6bbdca7cae534464ccd2fcd4869b8a48b6f3140d SHA512 448024f398d267911d5d2a48da03eb0d87ba1133ce39d5132bd318dde8ad359d19c7f85f6b4ec88c08b081c9140f7b931334d84173019a22aa2ac98482bd7d5d diff --git a/sci-electronics/ngspice/metadata.xml b/sci-electronics/ngspice/metadata.xml index ed47ec5f1705..293e59a7c77f 100644 --- a/sci-electronics/ngspice/metadata.xml +++ b/sci-electronics/ngspice/metadata.xml @@ -10,6 +10,7 @@ three open source software packages: Spice3f5, Cider1b1 and Xspice. + Build old and deprecated apps Build ngspice as a shared library diff --git a/sci-electronics/ngspice/ngspice-31.ebuild b/sci-electronics/ngspice/ngspice-31.ebuild new file mode 100644 index 000000000000..b29be4149ffc --- /dev/null +++ b/sci-electronics/ngspice/ngspice-31.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2019 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 ~ppc ~sparc ~x86 ~x64-macos" + +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} + X? ( sci-visualization/xgraph )" + +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() { + 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 + + eapply_user + eautoreconf + multibuild_copy_sources +} + +src_configure() { + multibuild_foreach_variant ngspice_configure +} + +ngspice_configure() { + pushd "${BUILD_DIR}" + + local myconf + if use debug; then + myconf="--enable-debug \ + --enable-ftedebug \ + --enable-cpdebug \ + --enable-sensdebug \ + --enable-asdebug \ + --enable-stepdebug \ + --enable-pzdebug" + else + myconf="--disable-debug \ + --disable-ftedebug \ + --disable-cpdebug \ + --disable-sensdebug \ + --disable-asdebug \ + --disable-stepdebug \ + --disable-pzdebug" + fi + # As of December 2017, these do not compile + myconf="${myconf} \ + --disable-blktmsdebug \ + --disable-smltmsdebug" + + myconf="${myconf} \ + --enable-xspice \ + --enable-cider \ + --disable-dependency-tracking \ + --disable-rpath \ + $(use_enable openmp) \ + $(use_with fftw fftw3) \ + $(use_with readline)" + + if [ "${MULTIBUILD_VARIANT}" == "shared" ]; then + myconf="${myconf} \ + --with-ngshared" + elif [ "${MULTIBUILD_VARIANT}" == "tcl" ]; then + myconf="${myconf} \ + --with-tcl" + else + myconf="${myconf} \ + $(use_enable deprecated oldapps) \ + $(use_with X x)" + fi + + econf ${myconf} +} + +src_compile() { + multibuild_foreach_variant ngspice_compile +} + +ngspice_compile() { + pushd "${BUILD_DIR}" + default +} + +src_install() { + multibuild_foreach_variant ngspice_install + + # merge the installations of all variants + for v in "${MULTIBUILD_VARIANTS[@]}" ; do + cp -a "${D}_${v}"/* "${D}" || die "Failed to combine multibuild installations" + rm -rf "${D}_${v}" + done + + use tcl && DOCS+=( README.tcl ) + use shared && DOCS+=( README.shared-xspice ) + use doc && DOCS+=( "${DISTDIR}"/${P}-manual.pdf ) + + default + + if use examples; then + use tcl || rm -rf examples/tclspice + + insinto /usr/share/${PN} + doins -r examples + fi +} + +ngspice_install() { + pushd "${BUILD_DIR}" + + emake DESTDIR="${D}_${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 "${D}_${MULTIBUILD_VARIANT}"/usr/bin{,.debug} + rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/share + rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/*.la + rm -rf "${D}_${MULTIBUILD_VARIANT}"/usr/$(get_libdir)/ngspice/*.cm{,.debug} + fi +} + +src_test() { + if ! use debug; then + # tests can be only executed for the binaries variant + pushd "${WORKDIR}/${P}-binaries" + virtx default + popd + else + # https://sourceforge.net/p/ngspice/bugs/353/ + ewarn + ewarn "Skipping tests because they are known to fail in debug mode" + ewarn + fi +} -- cgit v1.2.3