[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#27344] [PATCH v3 2/8] gnu: Add libngspice and ngspice.
From: |
Theodoros Foradis |
Subject: |
[bug#27344] [PATCH v3 2/8] gnu: Add libngspice and ngspice. |
Date: |
Sat, 9 Sep 2017 20:57:46 +0300 |
* gnu/packages/engineering.scm (libngspice): New variable.
* gnu/packages/engineering.scm (ngspice): New variable.
---
gnu/packages/engineering.scm | 98 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 98 insertions(+)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 2bae7582f..87defd848 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1175,3 +1175,101 @@ servers, ...")
"ASCO brings circuit optimization capabilities to existing SPICE
simulators using a
high-performance parallel differential evolution (DE) optimization algorithm.")
(license license:gpl2+)))
+
+(define-public libngspice
+ (package
+ (name "libngspice")
+ (version "26")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
"mirror://sourceforge/ngspice/ng-spice-rework/"
+ version "/ngspice-" version ".tar.gz"))
+ (sha256
+ (base32
+ "02019ndcl057nq9z41nxycqba7wxlb081ibvfj9jv010nz431qji"))
+ (modules '((guix build utils)))
+ ;; We remove the non-free cider and build without it.
+ (snippet
+ '(begin
+ (delete-file-recursively "src/ciderlib")
+ (delete-file "src/ciderinit")
+ (substitute* "configure"
+ (("src/ciderlib/Makefile") "")
+ (("src/ciderlib/input/Makefile") "")
+ (("src/ciderlib/support/Makefile") "")
+ (("src/ciderlib/oned/Makefile") "")
+ (("src/ciderlib/twod/Makefile") ""))))))
+ (build-system gnu-build-system)
+ (arguments
+ `(;; No tests for libngspice exist.
+ ;; The transient tests for ngspice fail.
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-timestamps
+ (lambda _
+ (substitute* "configure"
+ (("`date`") "Do 1. Jan 00:00:00 UTC 1970"))
+ #t))
+ (add-after 'unpack 'delete-program-manuals
+ (lambda _
+ (substitute* "man/man1/Makefile.in"
+ (("^man_MANS = ngspice\\.1 ngnutmeg\\.1 ngsconvert\\.1
ngmultidec\\.1")
+ "man_MANS = "))
+ #t))
+ (add-after 'install 'delete-script-files
+ (lambda* (#:key outputs #:allow-other-keys)
+ (delete-file-recursively
+ (string-append (assoc-ref outputs "out")
+ "/share/ngspice/scripts")))))
+ #:configure-flags
+ (list "--enable-openmp"
+ "--enable-xspice"
+ "--with-ngshared"
+ "--with-readline=yes")))
+ (native-inputs
+ `(("bison" ,bison)
+ ("flex" ,flex)))
+ (inputs
+ `(("libxaw" ,libxaw)
+ ("mpi" ,openmpi)
+ ("readline" ,readline)))
+ (home-page "http://ngspice.sourceforge.net/")
+ (synopsis "Mixed-level/mixed-signal circuit simulator")
+ (description
+ "Ngspice is a mixed-level/mixed-signal circuit simulator. It includes
address@hidden, a circuit simulator, and @code{Xspice}, an extension that
+provides code modeling support and simulation of digital components through
+an embedded event driven algorithm.")
+ (license (list license:lgpl2.0+ ; code in frontend/numparam
+ (license:non-copyleft "file:///COPYING") ; spice3 bsd-style
+ license:public-domain)))) ; xspice
+
+(define-public ngspice
+ (package (inherit libngspice)
+ (name "ngspice")
+ (arguments
+ (substitute-keyword-arguments (package-arguments libngspice)
+ ((#:configure-flags flags)
+ `(delete "--with-ngshared" ,flags))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'delete-include-files
+ (lambda _
+ (substitute* "src/Makefile.in"
+ (("^SUBDIRS = misc maths frontend spicelib include/ngspice")
+ "SUBDIRS = misc maths frontend spicelib"))
+ #t))
+ (add-after 'install 'delete-cmpp-dlmain
+ (lambda* (#:key outputs #:allow-other-keys)
+ (for-each
+ (lambda (file)
+ (delete-file
+ (string-append (assoc-ref outputs "out")
+ file)))
+ '("/bin/cmpp" "/share/ngspice/dlmain.c"))))
+ (delete 'delete-program-manuals)
+ (delete 'delete-script-files)))))
+ (inputs
+ `(("libngspice" ,libngspice)
+ ("readline" ,readline)))))
--
2.13.4
- [bug#27344] [PATCH 0/12] Add computational software and circuit simulators, Theodoros Foradis, 2017/09/09
- [bug#27344] [PATCH v3 1/8] gnu: Add asco., Theodoros Foradis, 2017/09/09
- [bug#27344] [PATCH v3 7/8] gnu: Add qucs., Theodoros Foradis, 2017/09/09
- [bug#27344] [PATCH v3 3/8] gnu: Add lapack-3.5., Theodoros Foradis, 2017/09/09
- [bug#27344] [PATCH v3 6/8] gnu: Add freehdl., Theodoros Foradis, 2017/09/09
- [bug#27344] [PATCH v3 5/8] gnu: Add xyce-parallel., Theodoros Foradis, 2017/09/09
- [bug#27344] [PATCH v3 8/8] gnu: Add qucs-s., Theodoros Foradis, 2017/09/09
- [bug#27344] [PATCH v3 4/8] gnu: Add xyce-serial., Theodoros Foradis, 2017/09/09
- [bug#27344] [PATCH v3 2/8] gnu: Add libngspice and ngspice.,
Theodoros Foradis <=
- [bug#27344] [PATCH v3 1/8] gnu: Add asco., Theodoros Foradis, 2017/09/09