summaryrefslogtreecommitdiff
path: root/sci-electronics/ngspice
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-12-30 01:11:30 +0000
committerV3n3RiX <venerix@redcorelinux.org>2017-12-30 01:11:30 +0000
commit76dfef0cec9170000357d2f354e412daf48941fc (patch)
tree56647120c0ee20ab3494475c86722034cd194b02 /sci-electronics/ngspice
parentccf84bcd604130256d1377cd58f0a634ae6ee20f (diff)
gentoo resync : 30.12.2017
Diffstat (limited to 'sci-electronics/ngspice')
-rw-r--r--sci-electronics/ngspice/Manifest5
-rw-r--r--sci-electronics/ngspice/files/ngspice-27-blt_linkage_workaround.patch12
-rw-r--r--sci-electronics/ngspice/files/ngspice-27-fix_parsing_tcl_commands.patch16
-rw-r--r--sci-electronics/ngspice/metadata.xml3
-rw-r--r--sci-electronics/ngspice/ngspice-27-r1.ebuild192
5 files changed, 227 insertions, 1 deletions
diff --git a/sci-electronics/ngspice/Manifest b/sci-electronics/ngspice/Manifest
index bc3fda5f8355..2b54fe7111ac 100644
--- a/sci-electronics/ngspice/Manifest
+++ b/sci-electronics/ngspice/Manifest
@@ -1,10 +1,13 @@
AUX ngspice-26-respect-ldflags.patch 728 BLAKE2B 7646de91df0a49ab6f5dc6fe58ed5f4044d80a8e5730dddc249dd5c4fb45aff5bf6b8c9bd249edf6bf9bcd16d501334c5116fceea6d181befc846c084d0521aa SHA512 8183ec06e05d9fc22322e8ddef96b72f83681344abf1d9d150fc2058bf906b0eebb83e97c7f39cd74afe316a49ad7a779a3f61f6cd3a79ca967ce037c84bcb98
AUX ngspice-27-autoconf_fftw3.patch 959 BLAKE2B bfc7e1eefd9ea591fee57e8e06dae4eddd5e677a6ffe493a274ad1c1ef9a580f05eda805252b837ce95df8bdf083e43beecb864118eee383d70a79fbaec8c0e7 SHA512 880269c6d3f5b1cb8fe7518df4763b5202923cc216481380ff3f4f3e519c181e3027d6310061df58ffac644aaf7255b768e184960c01fe1dd6afbd9ea7c31eec
+AUX ngspice-27-blt_linkage_workaround.patch 305 BLAKE2B d31977f4acbaf9d0f015cb34adf3b27733307ea98dc3c5a0206605546d62b4b207f19f277131bb6f351842e36de3e4df583c6c450d70d9ffee87e160a818ee8d SHA512 2eab1af989d1729d900f75505be0ddad9302705eb10a2aec6966a3abf9446cca66f42972770e2e24a085702bab49976fefa2868f06ffb5651c9197d13dc0bf2a
+AUX ngspice-27-fix_parsing_tcl_commands.patch 448 BLAKE2B d5d3532bca4301aa4c281173cbdf23d33ea61869ea6731d1ebf782e2bca5945a407ae1e566258564d1ab899330b5b7a85fa8c1b2fc79b2214dbf29a2a2c1e5b2 SHA512 ba82cf454d14fbfeb38a4b0942d1e947ca76a54976aec8fcac08913f8a08f12878593bb067ba469ea9a6c818ea6ea372119c500be1841058b840d9928dcf54ad
AUX ngspice-27-split_terminfo.patch 1081 BLAKE2B 8e44c6fe8447b419986206cc658a255e3c574d81cbbb3079d00f08046978f7a08c8c3e9697fdbf009aa1840df60d0045bd6712351280977cf8e66e3d2d505ab2 SHA512 2e5b7f83045304fbc5b35a9c7aeff3ed343b27d830e4d69bf5b30c631f59965241116afc5d062f3fb16b20710e42897605fc614fecb01997a92c595c47510f66
DIST ngspice-26-manual.pdf 2141771 BLAKE2B 16956c46640de4696f7197997b170a2b1aad9b2f9fbe299b801de100d8aaca949b5be6f259e353a168ae90d992d91ff65e8a819b49fdf509fae98ec7dfa610d7 SHA512 1c160aeef61d8091a6d788677bcf7ea682393cc886d5d535f87bb800cdae4f095cbf1e833babadea481956b904b4bdb688cc18b80d9d6a29cab33a54275abab1
DIST ngspice-26.tar.gz 6925987 BLAKE2B 8f8e54000234ea3896a55863df99b6ce83ad322e3049845e0a817635ebfebdc8398e6fa4831727c4798a8d9dce1b1c2a01354505e48dc0b2db9e9036aa2ae5aa SHA512 eb6a81df90de803c9f7544e8d0de7cc413aac169f69d1dec5cc6d2e667b66d42aede7f14c75bcdd10288be0c2ac07863fd4028b9fe59f2f515d680c2ffa41cab
DIST ngspice-27-manual.pdf 3117788 BLAKE2B 6e271abc50b0139c4776844ea31176d231e68c70ce34d0daec48aefc5ef5a9eac90a77f3141081f38c6ac8d42bb95ec061bf1d43bfd3a4fb13e4822c2eff4f57 SHA512 ed87764715917e2cd832c49e911a2908dba9907f9f01c933cb7f97a92c7f9ff345bc26a2f0561dd34b2eede6874b6a67b4864abf3dcff127bd0306e778e997b5
DIST ngspice-27.tar.gz 7372998 BLAKE2B ce8590518fa4eb4292c73c4eaefdd9d0da19bca8120b51daae954a5b9d86f51912d2dccb5a827480caadce8321373d96f045226db4986a78bcc9170f2e46f9a5 SHA512 1714f95ab5716c228a0b39395a742e8b9a823e0e6f7e08625d089541ea786df5fd7b9d2982bcec8431e27ac6ba7603ecc507f9cfcb0a6aacd53f5633f52bd2ea
EBUILD ngspice-26.ebuild 2548 BLAKE2B 533c7db0e236b11332e1f2b572d14b745daa5ce655ad000ad5ef2b5c7cb1248b46f8ad929c8de29de04b5891e4ce15f1361add1f0ff340a8b8db826e1d2b46cd SHA512 89d650f33921f5eba3faede8ae79c5f914e7b1e4d3c192e0bd824ee32ca54c6a0a587a30937bb3c56f1e369fbd8a387f61d381f9fb7e1b3fb9ac05e2ae67f18b
+EBUILD ngspice-27-r1.ebuild 4283 BLAKE2B 67439d2b41e5feee5df3a403c3272770369f071ee119f14a55b3e933ec9c56330f5b7f56bacf41adf831bebfa0b29c9cc07168a95b9c122e66cc00922b5850d0 SHA512 9c7827ef53f3334ebc531bf2163f060b8c9c9ec7ac5661e1b4864523ed6995f5a611c39906482d9c706edba780290f9135dc737ebf53953825413f71c40cda45
EBUILD ngspice-27.ebuild 1828 BLAKE2B f7e886b443f1d58cce69434a5dd9dd87cbd67cd0d6432b99a7efd857f4f7feb36cec3f56502550227785cbffd51f11b819394d247fd4b45c7ed0862f1e5739c1 SHA512 e2fc30a6ce6ef0ecc83444f4e3a305826bdb7c3591984382e0f1cfd9469d5caf0771d4aacd8c8e0e35fff6eb06e3577c13e655692cf610c30586e02558b2292f
-MISC metadata.xml 535 BLAKE2B 53be75db949e7b32e1ab6eed9ed8ff23acecab02d3018ce2f7e13933fbc2d2a48b085722b52dd9188fa98541c4efdebfdfa111f97bbda5abcf8f9b799c2ee83f SHA512 000662a5b7881c4e2aef407bc63730edfa24360fd49ba8fc4811bbf6a643503d782c36de292084131231600de8a707833952a032c885a0df02985bcb99df8444
+MISC metadata.xml 613 BLAKE2B 658a1ccd1c1149c4b3626b482b1c80845502b80d0cd9316117f433edc4d2e5106ac92b97c3bebc23c43a82247592cc85068b08eea3caa859f976548f2a890a73 SHA512 791dc0311699db360c5e013f33786fb546119010cb8bbc36fc91ac6a522f1642f4297d8ffb945291ee20ce337647777d06e463083ac6ca0888d36ff0e1a71dcc
diff --git a/sci-electronics/ngspice/files/ngspice-27-blt_linkage_workaround.patch b/sci-electronics/ngspice/files/ngspice-27-blt_linkage_workaround.patch
new file mode 100644
index 000000000000..53415c748d6d
--- /dev/null
+++ b/sci-electronics/ngspice/files/ngspice-27-blt_linkage_workaround.patch
@@ -0,0 +1,12 @@
+--- a/configure.ac
++++ b/configure.ac
+@@ -461,6 +461,9 @@
+ AC_MSG_ERROR([Couldn't find BLT])
+ fi
+ rm -f conftest.tcl
++
++ AC_SEARCH_LIBS([Blt_GetVector], [BLT BLT24 BLT25],,
++ [AC_MSG_ERROR([Couldnt find BLT library.])])
+
+ AC_CHECK_LIB([pthread], [pthread_create])
+
diff --git a/sci-electronics/ngspice/files/ngspice-27-fix_parsing_tcl_commands.patch b/sci-electronics/ngspice/files/ngspice-27-fix_parsing_tcl_commands.patch
new file mode 100644
index 000000000000..bad336590dfa
--- /dev/null
+++ b/sci-electronics/ngspice/files/ngspice-27-fix_parsing_tcl_commands.patch
@@ -0,0 +1,16 @@
+--- a/src/tclspice.c
++++ b/src/tclspice.c
+@@ -828,10 +828,9 @@
+ int i;
+ NG_IGNORE(clientData);
+ save_interp();
+- /* Looks backwards through the first command and strips the :: part */
+- for (i = strlen(argv[0])-1; i > 0; i--)
+- if (argv[0][i] == *":")
+- argv[0] += i + 1;
++ char *prefix = strstr(argv[0], "spice::");
++ if (prefix)
++ argv[0] = prefix + 7;
+ return _run(argc, (char **)argv);
+ }
+
diff --git a/sci-electronics/ngspice/metadata.xml b/sci-electronics/ngspice/metadata.xml
index 54267123c561..ed47ec5f1705 100644
--- a/sci-electronics/ngspice/metadata.xml
+++ b/sci-electronics/ngspice/metadata.xml
@@ -9,6 +9,9 @@
Ngspice is a mixed-level/mixed-signal circuit simulator. Its code is based on
three open source software packages: Spice3f5, Cider1b1 and Xspice.
</longdescription>
+ <use>
+ <flag name="shared">Build ngspice as a shared library</flag>
+ </use>
<upstream>
<remote-id type="sourceforge">ngspice</remote-id>
</upstream>
diff --git a/sci-electronics/ngspice/ngspice-27-r1.ebuild b/sci-electronics/ngspice/ngspice-27-r1.ebuild
new file mode 100644
index 000000000000..849d3e48a217
--- /dev/null
+++ b/sci-electronics/ngspice/ngspice-27-r1.ebuild
@@ -0,0 +1,192 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit autotools multibuild toolchain-funcs
+
+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 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
+ NEWS
+ README
+ Stuarts_Poly_Notes
+)
+
+PATCHES=(
+ "${FILESDIR}"/${P}-autoconf_fftw3.patch
+ "${FILESDIR}"/${P}-blt_linkage_workaround.patch
+ "${FILESDIR}"/${P}-fix_parsing_tcl_commands.patch
+ "${FILESDIR}"/${P}-split_terminfo.patch
+)
+
+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 |
+ 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
+}
+
+src_configure() {
+ multibuild_copy_sources
+ 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-xgraph \
+ --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_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 doc && DOCS+=( "${DISTDIR}"/${P}-manual.pdf )
+
+ default
+
+ # We don't need ngmakeidx to be installed
+ rm -f "${D}"/usr/bin/ngmakeidx
+ rm -f "${D}"/usr/share/man/man1/ngmakeidx.1
+
+ 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
+ multibuild_foreach_variant ngspice_test
+ else
+ # https://sourceforge.net/p/ngspice/bugs/353/
+ ewarn
+ ewarn "Skipping tests because they are known to fail in debug mode"
+ ewarn
+ fi
+}
+
+ngspice_test() {
+ pushd "${BUILD_DIR}"
+ default
+}