GNU bug report logs - #27344
[PATCH 0/12] Add computational software and circuit simulators

Previous Next

Package: guix-patches;

Reported by: Theodoros Foradis <theodoros.for <at> openmailbox.org>

Date: Mon, 12 Jun 2017 15:27:03 UTC

Severity: normal

Tags: patch

Done: ludo <at> gnu.org (Ludovic Courtès)

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 27344 in the body.
You can then email your comments to 27344 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 15:27:03 GMT) Full text and rfc822 format available.

Acknowledgement sent to Theodoros Foradis <theodoros.for <at> openmailbox.org>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Mon, 12 Jun 2017 15:27:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: guix-patches <at> gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 0/12] Add computational software and circuit simulators
Date: Mon, 12 Jun 2017 15:33:25 +0300
Hello Guix,

This patch series adds:
* Computational software from
<http://ab-initio.mit.edu/wiki/index.php/Main_Page>
* Qucs and its dependencies for digital circuit simulation/optimisation
* Ngspice and Xyce(serial/parallel) circuit simulators
* Qucs-s, which is a GUI that utilises those 3 simulators.

Ngspice, normally includes a non-free component (cider), which I delete
with a snippet from source, and build without. I have clearly noted the
licenses of the rest of the source code, but I would like someone to
verify I am not missing anything.


Theodoros Foradis (12):
 gnu: Add qucs-s.
 gnu: Add qucs.
 gnu: Add xyce-parallel.
 gnu: Add xyce-serial.
 gnu: Add ngspice.
 gnu: Add asco.
 gnu: Add freehdl.
 gnu: Add adms.
 gnu: Add meep.
 gnu: Add mpb.
 gnu: Add libctl.
 gnu: Add harminv.
 gnu/packages/engineering.scm | 677 +++++++++++++++++++++++++++++++++++++++-
 1 file changed, 676 insertions(+), 1 deletion(-)

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:01 GMT) Full text and rfc822 format available.

Message #8 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 01/12] gnu: Add harminv.
Date: Mon, 12 Jun 2017 19:52:15 +0300
* gnu/packages/engineering.scm (harminv): New variable.
---
 gnu/packages/engineering.scm | 39 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 7ad93653e..1311410b4 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2016 David Thompson <davet <at> gnu.org>
 ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo <at> gnu.org>
-;;; Copyright © 2016 Theodoros Foradis <theodoros.for <at> openmailbox.org>
+;;; Copyright © 2016, 2017 Theodoros Foradis <theodoros.for <at> openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -44,6 +44,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
@@ -812,3 +813,39 @@ the 'showing the effect of'-style of operation.")
 for mathematical functions.  It also provides an machine-independent
 interface to select the best such procedures to use on a given system.")
     (license license:gpl3+)))
+
+(define-public harminv
+  (package
+    (name "harminv")
+    (version "1.4")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "http://ab-initio.mit.edu/harminv/harminv-"
+                version ".tar.gz"))
+              (sha256
+               (base32
+                "1pmm8d6fx9ahhnk7w12bfa6zx3afbkg4gkvlvgwhpjxbcrvrp3jk"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'fix-tests
+           (lambda _
+             (substitute* "./sines-test.sh"
+               ; change test frequency range - default fails
+               (("0\\.15") "0.16"))
+             #t)))))
+    (native-inputs
+     `(("fortran" ,gfortran)))
+    (inputs
+     `(("lapack" ,lapack)))
+    (home-page "http://ab-initio.mit.edu/wiki/index.php/Harminv")
+    (synopsis "Harmonic inversion solver")
+    (description
+     "Harminv is a free program (and accompanying library) to solve the problem of
+harmonic inversion — given a discrete-time, finite-length signal that consists of a sum
+of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it
+determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:02 GMT) Full text and rfc822 format available.

Message #11 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 02/12] gnu: Add libctl.
Date: Mon, 12 Jun 2017 19:52:16 +0300
* gnu/packages/engineering.scm (libctl): New variable.
---
 gnu/packages/engineering.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 1311410b4..1bda7d494 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -849,3 +849,28 @@ harmonic inversion — given a discrete-time, finite-length signal that consists
 of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it
 determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
     (license license:gpl2+)))
+
+(define-public libctl
+  (package
+    (name "libctl")
+    (version "3.2.2")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "http://ab-initio.mit.edu/libctl/libctl-"
+                version ".tar.gz"))
+              (sha256
+               (base32
+                "1g7gqybq20jhdnw5vg18bgbj9jz0408gfmjvs8b4xs30pic8pgca"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("fortran" ,gfortran)))
+    (inputs
+     `(("guile" ,guile-2.2)))
+    (home-page "http://ab-initio.mit.edu/wiki/index.php/Libctl")
+    (synopsis "Flexible control files implementation for scientific simulations")
+    (description
+     "Libctl is a Guile-based library implementing flexible control files
+for scientific simulations.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:03 GMT) Full text and rfc822 format available.

Message #14 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 03/12] gnu: Add mpb.
Date: Mon, 12 Jun 2017 19:52:17 +0300
* gnu/packages/engineering.scm (mpb): New variable.
---
 gnu/packages/engineering.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 1bda7d494..64700c7f9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -62,6 +62,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages readline)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls)
@@ -874,3 +875,44 @@ determines the frequencies, decay constants, amplitudes, and phases of those sin
      "Libctl is a Guile-based library implementing flexible control files
 for scientific simulations.")
     (license license:gpl2+)))
+
+(define-public mpb
+  (package
+    (name "mpb")
+    (version "1.5")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "http://ab-initio.mit.edu/mpb/mpb-"
+                version ".tar.gz"))
+              (sha256
+               (base32
+                "1mqb2d8jq957nksayjygq58iy8i42vjryzg9iy5fpfay31wzxsix"))))
+    (build-system gnu-build-system)
+     (arguments
+      `(#:configure-flags
+        (list (string-append "--with-libctl="
+                             (assoc-ref %build-inputs "libctl")
+                             "/share/libctl"))))
+     (native-inputs
+      `(("fortran" ,gfortran)
+        ("pkg-config" ,pkg-config)
+        ("swig" ,swig)))
+    (inputs
+     `(("fftw" ,fftw)
+       ("gsl" ,gsl)
+       ("guile" ,guile-2.2)
+       ("hdf5" ,hdf5)
+       ("lapack" ,lapack)
+       ("libctl" ,libctl)
+       ("readline" ,readline)
+       ("zlib" ,zlib)))
+    (home-page "http://ab-initio.mit.edu/wiki/index.php/MIT_Photonic_Bands")
+    (synopsis "Computes band structures and electromagnetic modes of dielectric
+structures")
+    (description
+     "MIT Photonic-Bands (MPB) computes definite-frequency eigenstates (harmonic modes)
+of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using
+fully-vectorial and three-dimensional methods.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:03 GMT) Full text and rfc822 format available.

Message #17 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 04/12] gnu: Add meep.
Date: Mon, 12 Jun 2017 19:52:18 +0300
* gnu/packages/engineering.scm (meep): New variable.
---
 gnu/packages/engineering.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 64700c7f9..f096de8f7 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -916,3 +916,43 @@ structures")
 of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using
 fully-vectorial and three-dimensional methods.")
     (license license:gpl2+)))
+
+(define-public meep
+  (package
+    (name "meep")
+    (version "1.3")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "http://ab-initio.mit.edu/meep/meep-"
+                version ".tar.gz"))
+              (sha256
+               (base32
+                "0f6lbw2hrksg7xscwdqs78jc9nmzx9fs8j0hz1y4i8qknkqiyk2n"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--with-libctl="
+                            (assoc-ref %build-inputs "libctl")
+                            "/share/libctl"))))
+    (native-inputs
+     `(("fortran" ,gfortran)
+       ("pkg-config" ,pkg-config)
+       ("swig" ,swig)))
+    (inputs
+     `(("fftw" ,fftw)
+       ("gsl" ,gsl)
+       ("guile" ,guile-2.0) ; doesn't build with guile-2.2
+       ("harminv" ,harminv)
+       ("hdf5" ,hdf5)
+       ("lapack" ,lapack)
+       ("libctl" ,libctl)
+       ("mpb" ,mpb)
+       ("zlib" ,zlib)))
+    (home-page "http://ab-initio.mit.edu/wiki/index.php/Meep")
+    (synopsis "Finite-difference time-domain (FDTD) simulation software")
+    (description
+     "Meep is a finite-difference time-domain (FDTD) simulation software package
+developed at MIT to model electromagnetic systems.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:04 GMT) Full text and rfc822 format available.

Message #20 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 05/12] gnu: Add adms.
Date: Mon, 12 Jun 2017 19:52:19 +0300
* gnu/packages/engineering.scm (adms): New variable.
---
 gnu/packages/engineering.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index f096de8f7..23754fb14 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -956,3 +956,29 @@ fully-vectorial and three-dimensional methods.")
      "Meep is a finite-difference time-domain (FDTD) simulation software package
 developed at MIT to model electromagnetic systems.")
     (license license:gpl2+)))
+
+(define-public adms
+  (package
+    (name "adms")
+    (version "2.3.6")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "mirror://sourceforge/mot-adms/adms-source/"
+                (string-take version 3) "/adms-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1rn98l6jxcjhi6ai5f7p588khra9z80m0m0lql4n4sb7773fh1vk"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("flex" ,flex)
+       ("bison" ,bison)))
+    (home-page "https://sourceforge.net/projects/mot-adms")
+    (synopsis "Automatic device model synthesizer")
+    (description
+     "ADMS is a code generator that converts electrical compact device models
+specified in high-level description language into ready-to-compile C code for
+the API of spice simulators.  Based on transformations specified in XML
+language, ADMS transforms Verilog-AMS code into other target languages.")
+    (license license:gpl3)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:04 GMT) Full text and rfc822 format available.

Message #23 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 06/12] gnu: Add freehdl.
Date: Mon, 12 Jun 2017 19:52:20 +0300
* gnu/packages/engineering.scm (freehdl): New variable.
---
 gnu/packages/engineering.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 23754fb14..3f5dd9d33 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -982,3 +982,49 @@ specified in high-level description language into ready-to-compile C code for
 the API of spice simulators.  Based on transformations specified in XML
 language, ADMS transforms Verilog-AMS code into other target languages.")
     (license license:gpl3)))
+
+(define-public freehdl
+  (package
+    (name "freehdl")
+    (version "0.0.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://downloads.sourceforge.net/qucs/freehdl-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "117dqs0d4pcgbzvr3jn5ppra7n7x2m6c161ywh6laa934pw7h2bz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-pkg-config
+           (lambda _
+             (substitute* "freehdl/freehdl-config"
+               (("pkg-config") (which "pkg-config"))
+               (("cat") (which "cat")))
+             #t))
+         (add-after 'configure 'patch-freehdl-pc
+           (lambda _
+             (substitute* "freehdl.pc"
+               (("=g\\+\\+") (string-append "=" (which "g++")))
+               (("=libtool") (string-append "=" (which "libtool"))))
+             #t))
+         (add-after 'install-scripts 'make-wrapper
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/freehdl-config")
+                 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
+             #t)))))
+    (inputs
+     `(("perl" ,perl)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("libtool" ,libtool)))
+    (home-page "http://www.freehdl.seul.org/")
+    (synopsis "VHDL simulator")
+    (description
+     "FreeHDL is a compiler/simulator suite for the hardware description language VHDL.
+  VHDL'93 as well as VHDL'87 standards are supported.")
+    (license (list license:gpl2+
+                   license:lgpl2.0+)))) ; freehdl's libraries
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:05 GMT) Full text and rfc822 format available.

Message #26 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 07/12] gnu: Add asco.
Date: Mon, 12 Jun 2017 19:52:21 +0300
* gnu/packages/engineering.scm (asco): New variable.
---
 gnu/packages/engineering.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 3f5dd9d33..b88dad3b3 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -58,6 +58,7 @@
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages mpi)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
@@ -1028,3 +1029,49 @@ language, ADMS transforms Verilog-AMS code into other target languages.")
   VHDL'93 as well as VHDL'87 standards are supported.")
     (license (list license:gpl2+
                    license:lgpl2.0+)))) ; freehdl's libraries
+
+(define-public asco
+  (package
+    (name "asco")
+    (version "0.4.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/asco/asco/" version "/ASCO-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "119rbc2dc8xzwxvykgji0v0nrzvymjmlizr1bc2mihspj686kxsl"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:make-flags '("all" "asco-mpi")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'fix-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("errfunc.c" "asco.c")
+               (("cp ") (string-append (which "cp") " "))
+               (("nice") (string-append (assoc-ref inputs "coreutils") "/bin/nice")))
+             (substitute* "Makefile"
+               (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc")))
+             #t))
+         (replace 'install ; no install target
+           (lambda* (#:key outputs #:allow-other-keys)
+             (for-each (lambda (file)
+                         (install-file file (string-append
+                                             (assoc-ref outputs "out")
+                                             "/bin")))
+                       '("asco" "asco-mpi" "asco-test"
+                         "tools/alter/alter" "tools/log/log"))
+             #t)))))
+    (native-inputs
+     `(("mpi" ,openmpi)))
+    (inputs
+     `(("coreutils" ,coreutils-minimal)))
+    (home-page "http://asco.sourceforge.net/")
+    (synopsis "SPICE circuit optimizer")
+    (description
+     "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
+high-performance parallel differential evolution (DE) optimization algorithm.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:05 GMT) Full text and rfc822 format available.

Message #29 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 08/12] gnu: Add ngspice.
Date: Mon, 12 Jun 2017 19:52:22 +0300
* gnu/packages/engineering.scm (ngspice): New variable.
---
 gnu/packages/engineering.scm | 74 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 74 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b88dad3b3..1d7a3631e 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1075,3 +1075,77 @@ language, ADMS transforms Verilog-AMS code into other target languages.")
      "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
 high-performance parallel differential evolution (DE) optimization algorithm.")
     (license license:gpl2+)))
+
+(define 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
+     `(#:tests? #f
+       ; no tests for libngspice
+       ; transient tests for ngspice fail
+       #:phases %standard-phases
+       #: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
+@code{Spice3f5}, 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)
+            `(alist-cons-after 'install 'in-ng
+               (lambda* (#:key inputs outputs #:allow-other-keys)
+                 (map (lambda (lib)
+                        (copy-file
+                         (string-append (assoc-ref inputs "libngspice")
+                                        "/lib/" lib)
+                         (string-append (assoc-ref outputs "out")
+                                        "/lib/" lib)))
+                      '("libngspice.so.0" "libngspice.so"))
+                 #t)
+               ,phases)))))
+    (inputs `(("libngspice" ,libngspice)
+              ,@(package-inputs libngspice)))))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:06 GMT) Full text and rfc822 format available.

Message #32 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 09/12] gnu: Add xyce-serial.
Date: Mon, 12 Jun 2017 19:52:23 +0300
* gnu/packages/engineering.scm (xyce-serial): New variable.
---
 gnu/packages/engineering.scm | 94 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 1d7a3631e..596ddb80b 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1149,3 +1149,97 @@ an embedded event driven algorithm.")
                ,phases)))))
     (inputs `(("libngspice" ,libngspice)
               ,@(package-inputs libngspice)))))
+
+(define trilinos-serial-xyce
+  (package
+    (name "trilinos-serial-xyce")
+    (version "12.6.3")
+    (source
+     (origin (method url-fetch)
+             (uri (string-append "https://trilinos.org/oldsite/download/files/trilinos-"
+                                 version "-Source.tar.gz"))
+             (sha256
+              (base32
+               "07jd1qpsbf31cmbyyngr4l67xzwyan24dyx5wlcahgbw7x6my3wn"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:out-of-source? #t
+       #:configure-flags
+       (list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
+             "-DCMAKE_C_FLAGS=-O3 -fPIC"
+             "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
+             "-DTrilinos_ENABLE_NOX=ON"
+             "-DNOX_ENABLE_LOCA=ON"
+             "-DTrilinos_ENABLE_EpetraExt=ON"
+             "-DEpetraExt_BUILD_BTF=ON"
+             "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
+             "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
+             "-DTrilinos_ENABLE_TrilinosCouplings=ON"
+             "-DTrilinos_ENABLE_Ifpack=ON"
+             "-DTrilinos_ENABLE_Isorropia=ON"
+             "-DTrilinos_ENABLE_AztecOO=ON"
+             "-DTrilinos_ENABLE_Belos=ON"
+             "-DTrilinos_ENABLE_Teuchos=ON"
+             "-DTeuchos_ENABLE_COMPLEX=ON"
+             "-DTrilinos_ENABLE_Amesos=ON"
+             "-DAmesos_ENABLE_KLU=ON"
+             "-DAmesos_ENABLE_UMFPACK=ON"
+             "-DTrilinos_ENABLE_Sacado=ON"
+             "-DTrilinos_ENABLE_Kokkos=OFF"
+             "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
+             "-DTPL_ENABLE_AMD=ON"
+             "-DTPL_ENABLE_UMFPACK=ON"
+             "-DTPL_ENABLE_BLAS=ON"
+             "-DTPL_ENABLE_LAPACK=ON")))
+    (native-inputs
+     `(("fortran" ,gfortran)
+       ("swig" ,swig)))
+    (inputs
+     `(("boost" ,boost)
+       ("lapack" ,lapack)
+       ("suitesparse" ,suitesparse)))
+    (home-page "https://trilinos.org")
+    (synopsis "Engineering and scientific problems algorithms")
+    (description
+     "The Trilinos Project is an effort to develop algorithms and enabling
+technologies within an object-oriented software framework for the solution
+of large-scale, complex multi-physics engineering and scientific problems.
+  A unique design feature of Trilinos is its focus on packages.")
+    (license (list license:lgpl2.1+
+                   license:bsd-3))))
+
+(define-public xyce-serial
+  (package
+    (name "xyce-serial")
+    (version "6.7")
+    (source
+     (origin (method url-fetch)
+             (uri (string-append "https://archive.org/download/Xyce-"
+                                 version "/Xyce-" version ".tar.gz"))
+             (sha256
+              (base32
+               "02k952mnvrnc5kv7r65fdrn7khwq1lbyhwyvd7jznafzdpsvgm4x"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       (list
+        "CXXFLAGS=-O3 -std=c++11"
+        (string-append "ARCHDIR="
+                       (assoc-ref %build-inputs "trilinos")))))
+    (native-inputs
+     `(("bison" ,bison)
+       ("flex" ,flex)
+       ("fortran" ,gfortran)))
+    (inputs
+     `(("fftw" ,fftw)
+       ("suitesparse" ,suitesparse)
+       ("lapack" ,lapack)
+       ("trilinos" ,trilinos-serial-xyce)))
+    (home-page "https://xyce.sandia.gov/")
+    (synopsis "High-performance analog circuit simulator")
+    (description
+     "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
+capable of solving extremely large circuit problems by supporting large-scale
+parallel computing platforms.  It also supports serial execution.")
+    (license license:gpl3+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:06 GMT) Full text and rfc822 format available.

Message #35 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 10/12] gnu: Add xyce-parallel.
Date: Mon, 12 Jun 2017 19:52:24 +0300
* gnu/packages/engineering.scm (xyce-parallel): New variable.
---
 gnu/packages/engineering.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 596ddb80b..44a114622 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1243,3 +1243,40 @@ of large-scale, complex multi-physics engineering and scientific problems.
 capable of solving extremely large circuit problems by supporting large-scale
 parallel computing platforms.  It also supports serial execution.")
     (license license:gpl3+)))
+
+(define trilinos-parallel-xyce
+  (package (inherit trilinos-serial-xyce)
+    (name "trilinos-parallel-xyce")
+    (arguments
+     `(,@(substitute-keyword-arguments (package-arguments trilinos-serial-xyce)
+           ((#:configure-flags flags)
+            `(append (list "-DTrilinos_ENABLE_ShyLU=ON"
+                           "-DTrilinos_ENABLE_Zoltan=ON"
+                           "-DTPL_ENABLE_MPI=ON")
+                     ,flags)))))
+    (inputs
+     `(("mpi" ,openmpi)
+       ,@(package-inputs trilinos-serial-xyce)))))
+
+(define-public xyce-parallel
+  (package (inherit xyce-serial)
+    (name "xyce-parallel")
+    (arguments
+     `(,@(substitute-keyword-arguments (package-arguments xyce-serial)
+           ((#:configure-flags flags)
+            `(list "CXXFLAGS=-O3 -std=c++11"
+                   "CXX=mpiCC"
+                   "CC=mpicc"
+                   "F77=mpif77"
+                   "--enable-mpi"
+                   "--enable-isorropia=no"
+                   "--enable-zoltan=no"
+                   (string-append
+                    "ARCHDIR="
+                    (assoc-ref %build-inputs "trilinos")))))))
+    (propagated-inputs
+     `(("mpi" ,openmpi)))
+    (inputs
+     `(("trilinos" ,trilinos-parallel-xyce)
+       ,@(alist-delete "trilinos"
+                       (package-inputs xyce-serial))))))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:07 GMT) Full text and rfc822 format available.

Message #38 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 11/12] gnu: Add qucs.
Date: Mon, 12 Jun 2017 19:52:25 +0300
* gnu/packages/engineering.scm (qucs): New variable.
---
 gnu/packages/engineering.scm | 91 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 44a114622..4c78fde77 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -40,10 +40,12 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages fpga)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages gettext)
@@ -51,6 +53,7 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
@@ -1280,3 +1283,91 @@ parallel computing platforms.  It also supports serial execution.")
      `(("trilinos" ,trilinos-parallel-xyce)
        ,@(alist-delete "trilinos"
                        (package-inputs xyce-serial))))))
+
+(define-public qucs
+  (package
+    (name "qucs")
+    (version "0.0.19")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "https://sourceforge.net/projects/qucs/files/qucs/" version
+                "/qucs-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0giv9gfyfdizvjhq56x2pdncrlyv3k15lrsh6pk37i94vr7l7ij5"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "qucs/configure"
+               (("\\$QTDIR") (assoc-ref inputs "qt4")))
+             #t))
+         (add-after 'patch-configure 'patch-scripts
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* '("qucs/qucs/qucsdigi"
+                            "qucs/qucs/qucsdigilib"
+                            "qucs/qucs/qucsveri")
+               (("\\$BINDIR")
+                (string-append (assoc-ref outputs "out") "/bin"))
+               (("freehdl-config")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
+               (("freehdl-v2cc")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
+               (("cp ")
+                (string-append (which "cp") " "))
+               (("glibtool")
+                (which "libtool"))
+               (("sed")
+                (which "sed"))
+               (("iverilog")
+                (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
+               (("vvp")
+                (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; The test suite requires a running X server.
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")
+             #t))
+         (add-after 'install 'make-wrapper
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/qucs")
+                 `("ADMSXMLBINDIR" ":" prefix
+                   (,(string-append (assoc-ref inputs "adms") "/bin")))
+                 `("ASCOBINDIR" ":" prefix
+                   (,(string-append (assoc-ref inputs "asco") "/bin")))
+                 `("QUCS_OCTAVE" ":" prefix
+                   (,(string-append (assoc-ref inputs "octave") "/bin/octave")))))
+             #t)))
+       #:parallel-build? #f ; race condition
+       #:configure-flags '("--disable-doc"))) ; we need octave-epstk
+    (native-inputs
+     `(("gperf" ,gperf)
+       ("libtool" ,libtool)
+       ("python" ,python-2) ; for tests
+       ("matplotlib" ,python2-matplotlib) ; for tests
+       ("numpy" ,python2-numpy) ; for tests
+       ("xorg-server" ,xorg-server))) ; for tests
+    (inputs
+     `(("adms" ,adms)
+       ("asco" ,asco)
+       ("freehdl" ,freehdl)
+       ("iverilog" ,iverilog)
+       ("octave" ,octave)
+       ("qt4" ,qt-4)))
+    (propagated-inputs
+     `(("gcc-toolchain" ,gcc-toolchain-5))) ; for freehdl
+    (home-page "http://qucs.sourceforge.net/")
+    (synopsis "Circuit simulator with graphical user interface")
+    (description
+     "Qucs is a circuit simulator with graphical user interface.
+  The software aims to support all kinds of circuit simulation types,
+e.g. DC, AC, S-parameter, Transient, Noise and Harmonic Balance analysis.
+  Pure digital simulations are also supported.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 12 Jun 2017 16:55:07 GMT) Full text and rfc822 format available.

Message #41 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH 12/12] gnu: Add qucs-s.
Date: Mon, 12 Jun 2017 19:52:26 +0300
* gnu/packages/engineering.scm (qucs-s): New variable.
---
 gnu/packages/engineering.scm | 116 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 4c78fde77..3efd797ac 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1371,3 +1371,119 @@ parallel computing platforms.  It also supports serial execution.")
 e.g. DC, AC, S-parameter, Transient, Noise and Harmonic Balance analysis.
   Pure digital simulations are also supported.")
     (license license:gpl2+)))
+
+(define-public qucs-s
+  (package
+    (name "qucs-s")
+    (version "0.0.19S")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/ra3xdh/qucs/releases/download/"
+                                  version "/qucs-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1bhahvdqmayaw0306fxz1ghmjhd4fq05yk3rk7zi0z703w5imgjv"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-scripts
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("qucs/qucsdigi"
+                            "qucs/qucsdigilib"
+                            "qucs/qucsveri")
+               (("\\$BINDIR")
+                (string-append (assoc-ref inputs "qucs") "/bin"))
+               (("freehdl-config")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
+               (("freehdl-v2cc")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
+               (("glibtool")
+                (which "libtool"))
+               (("cp ")
+                (string-append (which "cp") " "))
+               (("sed")
+                (which "sed"))
+               (("iverilog")
+                (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
+               (("vvp")
+                (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
+             #t))
+         (add-after 'patch-scripts 'patch-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "qucs/main.cpp"
+               (("QucsSettings\\.Qucsator = QucsSettings\\.BinDir
+ \\+ \"qucsator\" \\+ executableSuffix")
+                (string-append "}{ QucsSettings.Qucsator = \""
+                               (assoc-ref inputs "qucs") "/bin/qucsator\""))
+               (("else QucsSettings\\.XyceExecutable =
+ \"/usr/local/Xyce-Release-6.2.0-OPENSOURCE/bin/runxyce")
+                (string-append "QucsSettings.XyceExecutable = \""
+                               (assoc-ref inputs "xyce-serial") "/bin/Xyce"))
+               (("else QucsSettings\\.XyceParExecutable =
+ \"/usr/local/Xyce-Release-6.2.0-OPENMPI-OPENSOURCE/bin/xmpirun")
+                (string-append "QucsSettings.XyceParExecutable = \""
+                               (assoc-ref inputs "mpi") "/bin/mpirun"))
+               (("%p")
+                (string-append "%p "(assoc-ref inputs "xyce-parallel") "/bin/Xyce"))
+               (("else QucsSettings\\.NgspiceExecutable = \"ngspice\"")
+                (string-append "QucsSettings.NgspiceExecutable = " "\""
+                               (assoc-ref inputs "ngspice") "/bin/ngspice\"")))
+             (substitute* "qucs/qucs_actions.cpp"
+               (("qucstrans")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucstrans"))
+               (("qucsattenuator")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucsattenuator"))
+               (("qucsrescodes")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucsrescodes")))
+             #t))
+         (add-after 'install 'install-scripts
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (for-each
+              (lambda (script)
+                (let ((file (string-append "../qucs-" ,version
+                                           "/qucs/" script))
+                      (out (assoc-ref outputs "out")))
+                  (install-file file (string-append out "/bin"))
+                  (chmod (string-append out "/bin/" script) #o555)))
+              '("qucsdigi" "qucsdigilib" "qucsveri"))
+             #t))
+         (add-after 'install-scripts 'make-wrapper
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (file (string-append out "/bin/qucs-s"))
+                    (qucs (assoc-ref inputs "qucs"))
+                    (qucsator (string-append qucs "/bin/qucsator")))
+               (wrap-program file
+                 `("QUCSATOR" ":" prefix (,qucsator))
+                 `("QUCSCONV" ":" prefix (,(string-append qucsator "/bin/qucsconv")))
+                 `("ADMSXMLBINDIR" ":" prefix (,(string-append (assoc-ref inputs "adms") "/bin")))
+                 `("ASCOBINDIR" ":" prefix (,(string-append (assoc-ref inputs "asco") "/bin")))
+                 `("QUCS_OCTAVE" ":" prefix (,(string-append (assoc-ref inputs "octave") "/bin/octave"))))
+               (symlink qucsator (string-append out "/bin/qucsator"))
+               #t))))))
+    (native-inputs
+     `(("libtool" ,libtool)))
+    (inputs
+     `(("adms" ,adms)
+       ("asco" ,asco)
+       ("freehdl" ,freehdl)
+       ("iverilog" ,iverilog)
+       ("mpi" ,openmpi)
+       ("ngspice" ,ngspice)
+       ("octave" ,octave)
+       ("qt4" ,qt-4)
+       ("qucs" ,qucs)
+       ("xyce-serial" ,xyce-serial)
+       ("xyce-parallel" ,xyce-parallel)))
+    (propagated-inputs
+     `(("gcc-toolchain" ,gcc-toolchain-5))); for freehdl
+    (home-page "https://ra3xdh.github.io/")
+    (synopsis "Circuit simulator with graphical user interface")
+    (description
+     "Qucs-S is a spin-off of the Qucs cross-platform circuit simulator.
+  S letter indicates SPICE.  The purpose of the Qucs-S subproject is to use
+free SPICE circuit simulation kernels with the Qucs GUI.  It provides the
+simulator backends @code{Qucsator}, @code{ngspice} and @code{Xyce}.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 11:33:02 GMT) Full text and rfc822 format available.

Message #44 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 02/12] gnu: Add libctl.
Date: Thu, 15 Jun 2017 13:32:46 +0200
Hi Theodoros,

> +(define-public libctl
> +  (package
> +    (name "libctl")

>(inputs)
> +     `(("guile" ,guile-2.2)))

I think both the package name and the variable name should have a "guile2.2-" prefix.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 11:36:01 GMT) Full text and rfc822 format available.

Message #47 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 06/12] gnu: Add freehdl.
Date: Thu, 15 Jun 2017 13:35:30 +0200
> +    (inputs
> +     `(("perl" ,perl)))

Does that actually get referred in the final derivation?  What part of perl does it link?




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 11:38:02 GMT) Full text and rfc822 format available.

Message #50 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 11/12] gnu: Add qucs.
Date: Thu, 15 Jun 2017 13:37:46 +0200
> +             ;; The test suite requires a running X server.
> +             (system "Xvfb :1 &")
> +             (setenv "DISPLAY" ":1")
> +             #t))

Does it?  (setenv "QT_QPA_PLATFORM" "offscreen") is not enough?




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 11:41:02 GMT) Full text and rfc822 format available.

Message #53 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 01/12] gnu: Add harminv.
Date: Thu, 15 Jun 2017 13:39:59 +0200
> +             (substitute* "./sines-test.sh"
> +               ; change test frequency range - default fails
> +               (("0\\.15") "0.16"))

Please report that upstream too...




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 11:43:02 GMT) Full text and rfc822 format available.

Message #56 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 03/12] gnu: Add mpb.
Date: Thu, 15 Jun 2017 13:42:17 +0200
Does that only provide a guile library ?  If so, then please prefix package and variable name by "guile2.2-".




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 11:46:01 GMT) Full text and rfc822 format available.

Message #59 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 08/12] gnu: Add ngspice.
Date: Thu, 15 Jun 2017 13:45:34 +0200
> +                   (license:non-copyleft "file://COPYING") ; spice3 bsd-style

This would mean the current directory of the current user on the remote host with name "COPYING".

I think you meant file:///COPYING which refers to the file "COPYING" on localhost.

> +           ((#:phases phases)
> +            `(alist-cons-after 'install 'in-ng

Please use modify-phases.

Please name the phase so that one can know what it does...

> +               (lambda* (#:key inputs outputs #:allow-other-keys)
> +                 (map (lambda (lib)
> +                        (copy-file
> +                         (string-append (assoc-ref inputs "libngspice")
> +                                        "/lib/" lib)
> +                         (string-append (assoc-ref outputs "out")
> +                                        "/lib/" lib)))
> +                      '("libngspice.so.0" "libngspice.so"))

Just use for-each...




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 11:50:02 GMT) Full text and rfc822 format available.

Message #62 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 05/12] gnu: Add adms.
Date: Thu, 15 Jun 2017 13:49:28 +0200
Hi,

On Mon, 12 Jun 2017 19:52:19 +0300
Theodoros Foradis <theodoros.for <at> openmailbox.org> wrote:
> +
> +(define-public adms
> +  (package
> +    (name "adms")
> +    (version "2.3.6")
[...]
> +                (string-take version 3)

Please use (version-major+minor version).





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 12:23:01 GMT) Full text and rfc822 format available.

Message #65 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 07/12] gnu: Add asco.
Date: Thu, 15 Jun 2017 14:22:14 +0200
> +       #:make-flags '("all" "asco-mpi")

These are not actually flags.  I think the "install" phase would then also invoke

  make all asco-mpi install




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 12:48:01 GMT) Full text and rfc822 format available.

Message #68 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 27344 <at> debbugs.gnu.org, Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 02/12] gnu: Add libctl.
Date: Thu, 15 Jun 2017 14:47:20 +0200
Hi Danny,

Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

>> +(define-public libctl
>> +  (package
>> +    (name "libctl")
>
>>(inputs)
>> +     `(("guile" ,guile-2.2)))
>
> I think both the package name and the variable name should have a "guile2.2-" prefix.

Actually no.  :-)

When Guile 2.0 was the default, I used the “guile2.2-” prefix for
packages that were using 2.2 instead of 2.0.  Now most of them are
deprecated and I do the reverse: use the “guile2.0-” prefix for packages
that are still on 2.0.

Hope that makes sense!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 14:17:02 GMT) Full text and rfc822 format available.

Message #71 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: ludo <at> gnu.org (Ludovic Courtès)
Cc: 27344 <at> debbugs.gnu.org, Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 02/12] gnu: Add libctl.
Date: Thu, 15 Jun 2017 16:15:58 +0200
Hi Ludo,

On Thu, 15 Jun 2017 14:47:20 +0200
ludo <at> gnu.org (Ludovic Courtès) wrote:

> Hi Danny,
> 
> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
> 
> >> +(define-public libctl
> >> +  (package
> >> +    (name "libctl")  
> >  
> >>(inputs)
> >> +     `(("guile" ,guile-2.2)))  
> >
> > I think both the package name and the variable name should have a "guile2.2-" prefix.  
> 
> Actually no.  :-)
> 
> When Guile 2.0 was the default, I used the “guile2.2-” prefix for
> packages that were using 2.2 instead of 2.0.  Now most of them are
> deprecated and I do the reverse: use the “guile2.0-” prefix for packages
> that are still on 2.0.

Oh okay.  But libctl should still have a "guile-" prefix, right?




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 15 Jun 2017 21:29:02 GMT) Full text and rfc822 format available.

Message #74 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 27344 <at> debbugs.gnu.org, Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 02/12] gnu: Add libctl.
Date: Thu, 15 Jun 2017 23:28:01 +0200
Heya,

Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> On Thu, 15 Jun 2017 14:47:20 +0200
> ludo <at> gnu.org (Ludovic Courtès) wrote:
>
>> Hi Danny,
>> 
>> Danny Milosavljevic <dannym <at> scratchpost.org> skribis:
>> 
>> >> +(define-public libctl
>> >> +  (package
>> >> +    (name "libctl")  
>> >  
>> >>(inputs)
>> >> +     `(("guile" ,guile-2.2)))  
>> >
>> > I think both the package name and the variable name should have a "guile2.2-" prefix.  
>> 
>> Actually no.  :-)
>> 
>> When Guile 2.0 was the default, I used the “guile2.2-” prefix for
>> packages that were using 2.2 instead of 2.0.  Now most of them are
>> deprecated and I do the reverse: use the “guile2.0-” prefix for packages
>> that are still on 2.0.
>
> Oh okay.  But libctl should still have a "guile-" prefix, right?

If it's a Guile-only library, yes.

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 16 Jun 2017 15:12:02 GMT) Full text and rfc822 format available.

Message #77 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 01/12] gnu: Add harminv.
Date: Fri, 16 Jun 2017 18:11:02 +0300
Danny Milosavljevic writes:

>> +             (substitute* "./sines-test.sh"
>> +               ; change test frequency range - default fails
>> +               (("0\\.15") "0.16"))
>
> Please report that upstream too...

I see that it has already been reported here
<https://github.com/stevengj/harminv/issues/3> and they seem to think it
must be a compiler issue. Strangely, the guy reporting that, did the
exact same change of the frequency range as I did.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 16 Jun 2017 15:17:02 GMT) Full text and rfc822 format available.

Message #80 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 03/12] gnu: Add mpb.
Date: Fri, 16 Jun 2017 18:16:24 +0300
Danny Milosavljevic writes:

> Does that only provide a guile library ?  If so, then please prefix package and variable name by "guile2.2-".

No, this does not only provide a guile library.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 16 Jun 2017 15:51:01 GMT) Full text and rfc822 format available.

Message #83 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 06/12] gnu: Add freehdl.
Date: Fri, 16 Jun 2017 18:50:36 +0300
Danny Milosavljevic writes:

>> +    (inputs
>> +     `(("perl" ,perl)))
>
> Does that actually get referred in the final derivation?  What part of perl does it link?

One of the output files (/bin/gvhdl) is actually a perl script so it
calls out to perl. Should perl not be an input?

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 16 Jun 2017 15:56:02 GMT) Full text and rfc822 format available.

Message #86 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 07/12] gnu: Add asco.
Date: Fri, 16 Jun 2017 18:54:46 +0300
Danny Milosavljevic writes:

>> +       #:make-flags '("all" "asco-mpi")
>
> These are not actually flags.  I think the "install" phase would then also invoke
>
>   make all asco-mpi install

Actually, the install phase gets replaces by a custom one because there
is no install target in the Makefile.

Should I replace the build phase as well, and just call "make all
asco-mpi" instead? I think it does just that as it is.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 16 Jun 2017 16:53:01 GMT) Full text and rfc822 format available.

Message #89 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 11/12] gnu: Add qucs.
Date: Fri, 16 Jun 2017 19:52:27 +0300
Danny Milosavljevic writes:

>> +             ;; The test suite requires a running X server.
>> +             (system "Xvfb :1 &")
>> +             (setenv "DISPLAY" ":1")
>> +             #t))
>
> Does it?  (setenv "QT_QPA_PLATFORM" "offscreen") is not enough?

Yes. I tried and (setenv "QT_QPA_PLATFORM" "offscreen") is not
enough. The other option would be to not do the tests, if pulling
xorg-server as a dependency is an issue.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 16 Jun 2017 17:21:02 GMT) Full text and rfc822 format available.

Message #92 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 08/12] gnu: Add ngspice.
Date: Fri, 16 Jun 2017 20:20:51 +0300
Danny Milosavljevic writes:

>> +                   (license:non-copyleft "file://COPYING") ; spice3 bsd-style
>
> This would mean the current directory of the current user on the remote host with name "COPYING".
>
> I think you meant file:///COPYING which refers to the file "COPYING" on localhost.
>

Right, fixed.

>> +           ((#:phases phases)
>> +            `(alist-cons-after 'install 'in-ng
>
> Please use modify-phases.
>
> Please name the phase so that one can know what it does...
>
>> +               (lambda* (#:key inputs outputs #:allow-other-keys)
>> +                 (map (lambda (lib)
>> +                        (copy-file
>> +                         (string-append (assoc-ref inputs "libngspice")
>> +                                        "/lib/" lib)
>> +                         (string-append (assoc-ref outputs "out")
>> +                                        "/lib/" lib)))
>> +                      '("libngspice.so.0" "libngspice.so"))
>
> Just use for-each...

It was in fact a mistake to have that phase there, now I just propagate
the shared library.

I am waiting for whatever other corrections before I submit a v2 for the
patch series with the suggested fixes.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 16 Jun 2017 18:20:02 GMT) Full text and rfc822 format available.

Message #95 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 11/12] gnu: Add qucs.
Date: Fri, 16 Jun 2017 20:18:58 +0200
Hi,

On Fri, 16 Jun 2017 19:52:27 +0300
Theodoros Foradis <theodoros.for <at> openmailbox.org> wrote:

> Danny Milosavljevic writes:
> 
> >> +             ;; The test suite requires a running X server.
> >> +             (system "Xvfb :1 &")
> >> +             (setenv "DISPLAY" ":1")
> >> +             #t))  
> >
> > Does it?  (setenv "QT_QPA_PLATFORM" "offscreen") is not enough?  
> 
> Yes. I tried and (setenv "QT_QPA_PLATFORM" "offscreen") is not
> enough. The other option would be to not do the tests, if pulling
> xorg-server as a dependency is an issue.

No, it's fine.  It's just good to try the non-huge-dependency case first.  Since it doesn't work, let's use xorg...

Weird, though.  Isn't qucs just a normal GUI program?  Should have been fine with just Qt offscreen...




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 16 Jun 2017 18:21:02 GMT) Full text and rfc822 format available.

Message #98 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 06/12] gnu: Add freehdl.
Date: Fri, 16 Jun 2017 20:20:19 +0200
On Fri, 16 Jun 2017 18:50:36 +0300
Theodoros Foradis <theodoros.for <at> openmailbox.org> wrote:

> Danny Milosavljevic writes:
> 
> >> +    (inputs
> >> +     `(("perl" ,perl)))  
> >
> > Does that actually get referred in the final derivation?  What part of perl does it link?  
> 
> One of the output files (/bin/gvhdl) is actually a perl script so it
> calls out to perl. Should perl not be an input?

It depends.  Does the first line of the installed program /gnu/store/*freehdl*/bin/gvhdl refer to /gnu/store/*perl*/bin/perl ?  If so then yes, it should be an input.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 17 Jun 2017 10:19:02 GMT) Full text and rfc822 format available.

Message #101 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 06/12] gnu: Add freehdl.
Date: Sat, 17 Jun 2017 13:16:52 +0300
Danny Milosavljevic writes:

> On Fri, 16 Jun 2017 18:50:36 +0300
> Theodoros Foradis <theodoros.for <at> openmailbox.org> wrote:
>
>> Danny Milosavljevic writes:
>> 
>> >> +    (inputs
>> >> +     `(("perl" ,perl)))  
>> >
>> > Does that actually get referred in the final derivation?  What part of perl does it link?  
>> 
>> One of the output files (/bin/gvhdl) is actually a perl script so it
>> calls out to perl. Should perl not be an input?
>
> It depends.  Does the first line of the installed program /gnu/store/*freehdl*/bin/gvhdl refer to /gnu/store/*perl*/bin/perl ?  If so then yes, it should be an input.

Yes, the first line is a perl shebang. I'm leaving that as it is.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 17 Jun 2017 10:39:02 GMT) Full text and rfc822 format available.

Message #104 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH 11/12] gnu: Add qucs.
Date: Sat, 17 Jun 2017 13:24:33 +0300
Danny Milosavljevic writes:

> Hi,
>
> On Fri, 16 Jun 2017 19:52:27 +0300
> Theodoros Foradis <theodoros.for <at> openmailbox.org> wrote:
>
>> Danny Milosavljevic writes:
>> 
>> >> +             ;; The test suite requires a running X server.
>> >> +             (system "Xvfb :1 &")
>> >> +             (setenv "DISPLAY" ":1")
>> >> +             #t))  
>> >
>> > Does it?  (setenv "QT_QPA_PLATFORM" "offscreen") is not enough?  
>> 
>> Yes. I tried and (setenv "QT_QPA_PLATFORM" "offscreen") is not
>> enough. The other option would be to not do the tests, if pulling
>> xorg-server as a dependency is an issue.
>
> No, it's fine.  It's just good to try the non-huge-dependency case first.  Since it doesn't work, let's use xorg...
>
> Weird, though.  Isn't qucs just a normal GUI program?  Should have been fine with just Qt offscreen...

I did try some stuff to cut down on the dependency but didn't work. I
hadn't tried that environment variable though.

I did contact the devs, and there was no insight on the issue.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 19 Jun 2017 20:41:02 GMT) Full text and rfc822 format available.

Message #107 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 03/12] gnu: Add mpb.
Date: Mon, 19 Jun 2017 22:40:43 +0200
Ok, then fine as-is.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:02 GMT) Full text and rfc822 format available.

Message #110 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 01/12] gnu: Add harminv.
Date: Thu, 22 Jun 2017 22:09:54 +0300
* gnu/packages/engineering.scm (harminv): New variable.
---
 gnu/packages/engineering.scm | 39 ++++++++++++++++++++++++++++++++++++++-
 1 file changed, 38 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index c171e2629..3252e986b 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2016 Efraim Flashner <efraim <at> flashner.co.il>
 ;;; Copyright © 2016 David Thompson <davet <at> gnu.org>
 ;;; Copyright © 2016, 2017 Ludovic Courtès <ludo <at> gnu.org>
-;;; Copyright © 2016 Theodoros Foradis <theodoros.for <at> openmailbox.org>
+;;; Copyright © 2016, 2017 Theodoros Foradis <theodoros.for <at> openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -45,6 +45,7 @@
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages freedesktop)
+  #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages gettext)
   #:use-module (gnu packages ghostscript)
@@ -843,3 +844,39 @@ interface to select the best such procedures to use on a given system.")
     (synopsis "Serial terminal emulator")
     (description "@code{minicom} is a serial terminal emulator.")
     (license license:gpl2+)))
+
+(define-public harminv
+  (package
+    (name "harminv")
+    (version "1.4")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "http://ab-initio.mit.edu/harminv/harminv-"
+                version ".tar.gz"))
+              (sha256
+               (base32
+                "1pmm8d6fx9ahhnk7w12bfa6zx3afbkg4gkvlvgwhpjxbcrvrp3jk"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'fix-tests
+           (lambda _
+             (substitute* "./sines-test.sh"
+               ; change test frequency range - default fails
+               (("0\\.15") "0.16"))
+             #t)))))
+    (native-inputs
+     `(("fortran" ,gfortran)))
+    (inputs
+     `(("lapack" ,lapack)))
+    (home-page "http://ab-initio.mit.edu/wiki/index.php/Harminv")
+    (synopsis "Harmonic inversion solver")
+    (description
+     "Harminv is a free program (and accompanying library) to solve the problem of
+harmonic inversion — given a discrete-time, finite-length signal that consists of a sum
+of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it
+determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:03 GMT) Full text and rfc822 format available.

Message #113 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 03/12] gnu: Add mpb.
Date: Thu, 22 Jun 2017 22:09:56 +0300
* gnu/packages/engineering.scm (mpb): New variable.
---
 gnu/packages/engineering.scm | 42 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index a9b41757d..8dd6fba13 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -64,6 +64,7 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages qt)
+  #:use-module (gnu packages readline)
   #:use-module (gnu packages swig)
   #:use-module (gnu packages tcl)
   #:use-module (gnu packages tls)
@@ -905,3 +906,44 @@ determines the frequencies, decay constants, amplitudes, and phases of those sin
      "Libctl is a Guile-based library implementing flexible control files
 for scientific simulations.")
     (license license:gpl2+)))
+
+(define-public mpb
+  (package
+    (name "mpb")
+    (version "1.5")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "http://ab-initio.mit.edu/mpb/mpb-"
+                version ".tar.gz"))
+              (sha256
+               (base32
+                "1mqb2d8jq957nksayjygq58iy8i42vjryzg9iy5fpfay31wzxsix"))))
+    (build-system gnu-build-system)
+     (arguments
+      `(#:configure-flags
+        (list (string-append "--with-libctl="
+                             (assoc-ref %build-inputs "libctl")
+                             "/share/libctl"))))
+     (native-inputs
+      `(("fortran" ,gfortran)
+        ("pkg-config" ,pkg-config)
+        ("swig" ,swig)))
+    (inputs
+     `(("fftw" ,fftw)
+       ("gsl" ,gsl)
+       ("guile" ,guile-2.2)
+       ("hdf5" ,hdf5)
+       ("lapack" ,lapack)
+       ("libctl" ,guile-libctl)
+       ("readline" ,readline)
+       ("zlib" ,zlib)))
+    (home-page "http://ab-initio.mit.edu/wiki/index.php/MIT_Photonic_Bands")
+    (synopsis "Computes band structures and electromagnetic modes of dielectric
+structures")
+    (description
+     "MIT Photonic-Bands (MPB) computes definite-frequency eigenstates (harmonic modes)
+of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using
+fully-vectorial and three-dimensional methods.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:03 GMT) Full text and rfc822 format available.

Message #116 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 02/12] gnu: Add guile-libctl.
Date: Thu, 22 Jun 2017 22:09:55 +0300
* gnu/packages/engineering.scm (guile-libctl): New variable.
---
 gnu/packages/engineering.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 3252e986b..a9b41757d 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -880,3 +880,28 @@ harmonic inversion — given a discrete-time, finite-length signal that consists
 of finitely-many sinusoids (possibly exponentially decaying) in a given bandwidth, it
 determines the frequencies, decay constants, amplitudes, and phases of those sinusoids.")
     (license license:gpl2+)))
+
+(define-public guile-libctl
+  (package
+    (name "guile-libctl")
+    (version "3.2.2")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "http://ab-initio.mit.edu/libctl/libctl-"
+                version ".tar.gz"))
+              (sha256
+               (base32
+                "1g7gqybq20jhdnw5vg18bgbj9jz0408gfmjvs8b4xs30pic8pgca"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("fortran" ,gfortran)))
+    (inputs
+     `(("guile" ,guile-2.2)))
+    (home-page "http://ab-initio.mit.edu/wiki/index.php/Libctl")
+    (synopsis "Flexible control files implementation for scientific simulations")
+    (description
+     "Libctl is a Guile-based library implementing flexible control files
+for scientific simulations.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:03 GMT) Full text and rfc822 format available.

Message #119 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 04/12] gnu: Add meep.
Date: Thu, 22 Jun 2017 22:09:57 +0300
* gnu/packages/engineering.scm (meep): New variable.
---
 gnu/packages/engineering.scm | 40 ++++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 8dd6fba13..d77871490 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -947,3 +947,43 @@ structures")
 of Maxwell's equations in periodic dielectric structures for arbitrary wavevectors, using
 fully-vectorial and three-dimensional methods.")
     (license license:gpl2+)))
+
+(define-public meep
+  (package
+    (name "meep")
+    (version "1.3")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "http://ab-initio.mit.edu/meep/meep-"
+                version ".tar.gz"))
+              (sha256
+               (base32
+                "0f6lbw2hrksg7xscwdqs78jc9nmzx9fs8j0hz1y4i8qknkqiyk2n"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:configure-flags
+       (list (string-append "--with-libctl="
+                            (assoc-ref %build-inputs "libctl")
+                            "/share/libctl"))))
+    (native-inputs
+     `(("fortran" ,gfortran)
+       ("pkg-config" ,pkg-config)
+       ("swig" ,swig)))
+    (inputs
+     `(("fftw" ,fftw)
+       ("gsl" ,gsl)
+       ("guile" ,guile-2.0) ; doesn't build with guile-2.2
+       ("harminv" ,harminv)
+       ("hdf5" ,hdf5)
+       ("lapack" ,lapack)
+       ("libctl" ,guile-libctl)
+       ("mpb" ,mpb)
+       ("zlib" ,zlib)))
+    (home-page "http://ab-initio.mit.edu/wiki/index.php/Meep")
+    (synopsis "Finite-difference time-domain (FDTD) simulation software")
+    (description
+     "Meep is a finite-difference time-domain (FDTD) simulation software package
+developed at MIT to model electromagnetic systems.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:04 GMT) Full text and rfc822 format available.

Message #122 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 05/12] gnu: Add adms.
Date: Thu, 22 Jun 2017 22:09:58 +0300
* gnu/packages/engineering.scm (adms): New variable.
---
 gnu/packages/engineering.scm | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index d77871490..7d6fcb6d4 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -987,3 +987,29 @@ fully-vectorial and three-dimensional methods.")
      "Meep is a finite-difference time-domain (FDTD) simulation software package
 developed at MIT to model electromagnetic systems.")
     (license license:gpl2+)))
+
+(define-public adms
+  (package
+    (name "adms")
+    (version "2.3.6")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "mirror://sourceforge/mot-adms/adms-source/"
+                (version-major+minor version) "/adms-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1rn98l6jxcjhi6ai5f7p588khra9z80m0m0lql4n4sb7773fh1vk"))))
+    (build-system gnu-build-system)
+    (native-inputs
+     `(("flex" ,flex)
+       ("bison" ,bison)))
+    (home-page "https://sourceforge.net/projects/mot-adms")
+    (synopsis "Automatic device model synthesizer")
+    (description
+     "ADMS is a code generator that converts electrical compact device models
+specified in high-level description language into ready-to-compile C code for
+the API of spice simulators.  Based on transformations specified in XML
+language, ADMS transforms Verilog-AMS code into other target languages.")
+    (license license:gpl3)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:04 GMT) Full text and rfc822 format available.

Message #125 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 07/12] gnu: Add asco.
Date: Thu, 22 Jun 2017 22:10:00 +0300
* gnu/packages/engineering.scm (asco): New variable.
---
 gnu/packages/engineering.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index f38786d1a..1bb29e6f6 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -59,6 +59,7 @@
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages mpi)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -1059,3 +1060,49 @@ language, ADMS transforms Verilog-AMS code into other target languages.")
   VHDL'93 as well as VHDL'87 standards are supported.")
     (license (list license:gpl2+
                    license:lgpl2.0+)))) ; freehdl's libraries
+
+(define-public asco
+  (package
+    (name "asco")
+    (version "0.4.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/asco/asco/" version "/ASCO-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "119rbc2dc8xzwxvykgji0v0nrzvymjmlizr1bc2mihspj686kxsl"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:make-flags '("all" "asco-mpi")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'fix-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("errfunc.c" "asco.c")
+               (("cp ") (string-append (which "cp") " "))
+               (("nice") (string-append (assoc-ref inputs "coreutils") "/bin/nice")))
+             (substitute* "Makefile"
+               (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc")))
+             #t))
+         (replace 'install ; no install target
+           (lambda* (#:key outputs #:allow-other-keys)
+             (for-each (lambda (file)
+                         (install-file file (string-append
+                                             (assoc-ref outputs "out")
+                                             "/bin")))
+                       '("asco" "asco-mpi" "asco-test"
+                         "tools/alter/alter" "tools/log/log"))
+             #t)))))
+    (native-inputs
+     `(("mpi" ,openmpi)))
+    (inputs
+     `(("coreutils" ,coreutils-minimal)))
+    (home-page "http://asco.sourceforge.net/")
+    (synopsis "SPICE circuit optimizer")
+    (description
+     "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
+high-performance parallel differential evolution (DE) optimization algorithm.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:05 GMT) Full text and rfc822 format available.

Message #128 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 06/12] gnu: Add freehdl.
Date: Thu, 22 Jun 2017 22:09:59 +0300
* gnu/packages/engineering.scm (freehdl): New variable.
---
 gnu/packages/engineering.scm | 46 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 46 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 7d6fcb6d4..f38786d1a 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1013,3 +1013,49 @@ specified in high-level description language into ready-to-compile C code for
 the API of spice simulators.  Based on transformations specified in XML
 language, ADMS transforms Verilog-AMS code into other target languages.")
     (license license:gpl3)))
+
+(define-public freehdl
+  (package
+    (name "freehdl")
+    (version "0.0.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://downloads.sourceforge.net/qucs/freehdl-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "117dqs0d4pcgbzvr3jn5ppra7n7x2m6c161ywh6laa934pw7h2bz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-pkg-config
+           (lambda _
+             (substitute* "freehdl/freehdl-config"
+               (("pkg-config") (which "pkg-config"))
+               (("cat") (which "cat")))
+             #t))
+         (add-after 'configure 'patch-freehdl-pc
+           (lambda _
+             (substitute* "freehdl.pc"
+               (("=g\\+\\+") (string-append "=" (which "g++")))
+               (("=libtool") (string-append "=" (which "libtool"))))
+             #t))
+         (add-after 'install-scripts 'make-wrapper
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/freehdl-config")
+                 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
+             #t)))))
+    (inputs
+     `(("perl" ,perl)))
+    (native-inputs
+     `(("pkg-config" ,pkg-config)
+       ("libtool" ,libtool)))
+    (home-page "http://www.freehdl.seul.org/")
+    (synopsis "VHDL simulator")
+    (description
+     "FreeHDL is a compiler/simulator suite for the hardware description language VHDL.
+  VHDL'93 as well as VHDL'87 standards are supported.")
+    (license (list license:gpl2+
+                   license:lgpl2.0+)))) ; freehdl's libraries
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:05 GMT) Full text and rfc822 format available.

Message #131 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 10/12] gnu: Add xyce-parallel.
Date: Thu, 22 Jun 2017 22:10:03 +0300
* gnu/packages/engineering.scm (xyce-parallel): New variable.
---
 gnu/packages/engineering.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index e4dff216b..8af1fff93 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1262,3 +1262,40 @@ of large-scale, complex multi-physics engineering and scientific problems.
 capable of solving extremely large circuit problems by supporting large-scale
 parallel computing platforms.  It also supports serial execution.")
     (license license:gpl3+)))
+
+(define trilinos-parallel-xyce
+  (package (inherit trilinos-serial-xyce)
+    (name "trilinos-parallel-xyce")
+    (arguments
+     `(,@(substitute-keyword-arguments (package-arguments trilinos-serial-xyce)
+           ((#:configure-flags flags)
+            `(append (list "-DTrilinos_ENABLE_ShyLU=ON"
+                           "-DTrilinos_ENABLE_Zoltan=ON"
+                           "-DTPL_ENABLE_MPI=ON")
+                     ,flags)))))
+    (inputs
+     `(("mpi" ,openmpi)
+       ,@(package-inputs trilinos-serial-xyce)))))
+
+(define-public xyce-parallel
+  (package (inherit xyce-serial)
+    (name "xyce-parallel")
+    (arguments
+     `(,@(substitute-keyword-arguments (package-arguments xyce-serial)
+           ((#:configure-flags flags)
+            `(list "CXXFLAGS=-O3 -std=c++11"
+                   "CXX=mpiCC"
+                   "CC=mpicc"
+                   "F77=mpif77"
+                   "--enable-mpi"
+                   "--enable-isorropia=no"
+                   "--enable-zoltan=no"
+                   (string-append
+                    "ARCHDIR="
+                    (assoc-ref %build-inputs "trilinos")))))))
+    (propagated-inputs
+     `(("mpi" ,openmpi)))
+    (inputs
+     `(("trilinos" ,trilinos-parallel-xyce)
+       ,@(alist-delete "trilinos"
+                       (package-inputs xyce-serial))))))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:06 GMT) Full text and rfc822 format available.

Message #134 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 08/12] gnu: Add ngspice.
Date: Thu, 22 Jun 2017 22:10:01 +0300
* gnu/packages/engineering.scm (ngspice): New variable.
---
 gnu/packages/engineering.scm | 62 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 62 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 1bb29e6f6..63e938371 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1106,3 +1106,65 @@ language, ADMS transforms Verilog-AMS code into other target languages.")
      "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
 high-performance parallel differential evolution (DE) optimization algorithm.")
     (license license:gpl2+)))
+
+(define 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
+     `(#:tests? #f
+       ; no tests for libngspice
+       ; transient tests for ngspice fail
+       #:phases %standard-phases
+       #: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
+@code{Spice3f5}, 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)))))
+    (propagated-inputs
+     `(("libngspice" ,libngspice)))))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:06 GMT) Full text and rfc822 format available.

Message #137 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 09/12] gnu: Add xyce-serial.
Date: Thu, 22 Jun 2017 22:10:02 +0300
* gnu/packages/engineering.scm (xyce-serial): New variable.
---
 gnu/packages/engineering.scm | 94 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 63e938371..e4dff216b 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1168,3 +1168,97 @@ an embedded event driven algorithm.")
             `(delete "--with-ngshared" ,flags)))))
     (propagated-inputs
      `(("libngspice" ,libngspice)))))
+
+(define trilinos-serial-xyce
+  (package
+    (name "trilinos-serial-xyce")
+    (version "12.6.3")
+    (source
+     (origin (method url-fetch)
+             (uri (string-append "https://trilinos.org/oldsite/download/files/trilinos-"
+                                 version "-Source.tar.gz"))
+             (sha256
+              (base32
+               "07jd1qpsbf31cmbyyngr4l67xzwyan24dyx5wlcahgbw7x6my3wn"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:out-of-source? #t
+       #:configure-flags
+       (list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
+             "-DCMAKE_C_FLAGS=-O3 -fPIC"
+             "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
+             "-DTrilinos_ENABLE_NOX=ON"
+             "-DNOX_ENABLE_LOCA=ON"
+             "-DTrilinos_ENABLE_EpetraExt=ON"
+             "-DEpetraExt_BUILD_BTF=ON"
+             "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
+             "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
+             "-DTrilinos_ENABLE_TrilinosCouplings=ON"
+             "-DTrilinos_ENABLE_Ifpack=ON"
+             "-DTrilinos_ENABLE_Isorropia=ON"
+             "-DTrilinos_ENABLE_AztecOO=ON"
+             "-DTrilinos_ENABLE_Belos=ON"
+             "-DTrilinos_ENABLE_Teuchos=ON"
+             "-DTeuchos_ENABLE_COMPLEX=ON"
+             "-DTrilinos_ENABLE_Amesos=ON"
+             "-DAmesos_ENABLE_KLU=ON"
+             "-DAmesos_ENABLE_UMFPACK=ON"
+             "-DTrilinos_ENABLE_Sacado=ON"
+             "-DTrilinos_ENABLE_Kokkos=OFF"
+             "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
+             "-DTPL_ENABLE_AMD=ON"
+             "-DTPL_ENABLE_UMFPACK=ON"
+             "-DTPL_ENABLE_BLAS=ON"
+             "-DTPL_ENABLE_LAPACK=ON")))
+    (native-inputs
+     `(("fortran" ,gfortran)
+       ("swig" ,swig)))
+    (inputs
+     `(("boost" ,boost)
+       ("lapack" ,lapack)
+       ("suitesparse" ,suitesparse)))
+    (home-page "https://trilinos.org")
+    (synopsis "Engineering and scientific problems algorithms")
+    (description
+     "The Trilinos Project is an effort to develop algorithms and enabling
+technologies within an object-oriented software framework for the solution
+of large-scale, complex multi-physics engineering and scientific problems.
+  A unique design feature of Trilinos is its focus on packages.")
+    (license (list license:lgpl2.1+
+                   license:bsd-3))))
+
+(define-public xyce-serial
+  (package
+    (name "xyce-serial")
+    (version "6.7")
+    (source
+     (origin (method url-fetch)
+             (uri (string-append "https://archive.org/download/Xyce-"
+                                 version "/Xyce-" version ".tar.gz"))
+             (sha256
+              (base32
+               "02k952mnvrnc5kv7r65fdrn7khwq1lbyhwyvd7jznafzdpsvgm4x"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       (list
+        "CXXFLAGS=-O3 -std=c++11"
+        (string-append "ARCHDIR="
+                       (assoc-ref %build-inputs "trilinos")))))
+    (native-inputs
+     `(("bison" ,bison)
+       ("flex" ,flex)
+       ("fortran" ,gfortran)))
+    (inputs
+     `(("fftw" ,fftw)
+       ("suitesparse" ,suitesparse)
+       ("lapack" ,lapack)
+       ("trilinos" ,trilinos-serial-xyce)))
+    (home-page "https://xyce.sandia.gov/")
+    (synopsis "High-performance analog circuit simulator")
+    (description
+     "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
+capable of solving extremely large circuit problems by supporting large-scale
+parallel computing platforms.  It also supports serial execution.")
+    (license license:gpl3+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:12:07 GMT) Full text and rfc822 format available.

Message #140 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 11/12] gnu: Add qucs.
Date: Thu, 22 Jun 2017 22:10:04 +0300
* gnu/packages/engineering.scm (qucs): New variable.
---
 gnu/packages/engineering.scm | 91 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 8af1fff93..af188eaa5 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -40,10 +40,12 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages fpga)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
@@ -52,6 +54,7 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
@@ -1299,3 +1302,91 @@ parallel computing platforms.  It also supports serial execution.")
      `(("trilinos" ,trilinos-parallel-xyce)
        ,@(alist-delete "trilinos"
                        (package-inputs xyce-serial))))))
+
+(define-public qucs
+  (package
+    (name "qucs")
+    (version "0.0.19")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "https://sourceforge.net/projects/qucs/files/qucs/" version
+                "/qucs-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0giv9gfyfdizvjhq56x2pdncrlyv3k15lrsh6pk37i94vr7l7ij5"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "qucs/configure"
+               (("\\$QTDIR") (assoc-ref inputs "qt4")))
+             #t))
+         (add-after 'patch-configure 'patch-scripts
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* '("qucs/qucs/qucsdigi"
+                            "qucs/qucs/qucsdigilib"
+                            "qucs/qucs/qucsveri")
+               (("\\$BINDIR")
+                (string-append (assoc-ref outputs "out") "/bin"))
+               (("freehdl-config")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
+               (("freehdl-v2cc")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
+               (("cp ")
+                (string-append (which "cp") " "))
+               (("glibtool")
+                (which "libtool"))
+               (("sed")
+                (which "sed"))
+               (("iverilog")
+                (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
+               (("vvp")
+                (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; The test suite requires a running X server.
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")
+             #t))
+         (add-after 'install 'make-wrapper
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/qucs")
+                 `("ADMSXMLBINDIR" ":" prefix
+                   (,(string-append (assoc-ref inputs "adms") "/bin")))
+                 `("ASCOBINDIR" ":" prefix
+                   (,(string-append (assoc-ref inputs "asco") "/bin")))
+                 `("QUCS_OCTAVE" ":" prefix
+                   (,(string-append (assoc-ref inputs "octave") "/bin/octave")))))
+             #t)))
+       #:parallel-build? #f ; race condition
+       #:configure-flags '("--disable-doc"))) ; we need octave-epstk
+    (native-inputs
+     `(("gperf" ,gperf)
+       ("libtool" ,libtool)
+       ("python" ,python-2) ; for tests
+       ("matplotlib" ,python2-matplotlib) ; for tests
+       ("numpy" ,python2-numpy) ; for tests
+       ("xorg-server" ,xorg-server))) ; for tests
+    (inputs
+     `(("adms" ,adms)
+       ("asco" ,asco)
+       ("freehdl" ,freehdl)
+       ("iverilog" ,iverilog)
+       ("octave" ,octave)
+       ("qt4" ,qt-4)))
+    (propagated-inputs
+     `(("gcc-toolchain" ,gcc-toolchain-5))) ; for freehdl
+    (home-page "http://qucs.sourceforge.net/")
+    (synopsis "Circuit simulator with graphical user interface")
+    (description
+     "Qucs is a circuit simulator with graphical user interface.
+  The software aims to support all kinds of circuit simulation types,
+e.g. DC, AC, S-parameter, Transient, Noise and Harmonic Balance analysis.
+  Pure digital simulations are also supported.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 22 Jun 2017 19:18:01 GMT) Full text and rfc822 format available.

Message #143 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: [PATCH v2 12/12] gnu: Add qucs-s.
Date: Thu, 22 Jun 2017 22:14:40 +0300
* gnu/packages/engineering.scm (qucs-s): New variable.
---
 gnu/packages/engineering.scm | 116 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 116 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index af188eaa5..0251a4c90 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1390,3 +1390,119 @@ parallel computing platforms.  It also supports serial execution.")
 e.g. DC, AC, S-parameter, Transient, Noise and Harmonic Balance analysis.
   Pure digital simulations are also supported.")
     (license license:gpl2+)))
+
+(define-public qucs-s
+  (package
+    (name "qucs-s")
+    (version "0.0.19S")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/ra3xdh/qucs/releases/download/"
+                                  version "/qucs-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1bhahvdqmayaw0306fxz1ghmjhd4fq05yk3rk7zi0z703w5imgjv"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-scripts
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("qucs/qucsdigi"
+                            "qucs/qucsdigilib"
+                            "qucs/qucsveri")
+               (("\\$BINDIR")
+                (string-append (assoc-ref inputs "qucs") "/bin"))
+               (("freehdl-config")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
+               (("freehdl-v2cc")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
+               (("glibtool")
+                (which "libtool"))
+               (("cp ")
+                (string-append (which "cp") " "))
+               (("sed")
+                (which "sed"))
+               (("iverilog")
+                (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
+               (("vvp")
+                (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
+             #t))
+         (add-after 'patch-scripts 'patch-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "qucs/main.cpp"
+               (("QucsSettings\\.Qucsator = QucsSettings\\.BinDir
+ \\+ \"qucsator\" \\+ executableSuffix")
+                (string-append "}{ QucsSettings.Qucsator = \""
+                               (assoc-ref inputs "qucs") "/bin/qucsator\""))
+               (("else QucsSettings\\.XyceExecutable =
+ \"/usr/local/Xyce-Release-6.2.0-OPENSOURCE/bin/runxyce")
+                (string-append "QucsSettings.XyceExecutable = \""
+                               (assoc-ref inputs "xyce-serial") "/bin/Xyce"))
+               (("else QucsSettings\\.XyceParExecutable =
+ \"/usr/local/Xyce-Release-6.2.0-OPENMPI-OPENSOURCE/bin/xmpirun")
+                (string-append "QucsSettings.XyceParExecutable = \""
+                               (assoc-ref inputs "mpi") "/bin/mpirun"))
+               (("%p")
+                (string-append "%p "(assoc-ref inputs "xyce-parallel") "/bin/Xyce"))
+               (("else QucsSettings\\.NgspiceExecutable = \"ngspice\"")
+                (string-append "QucsSettings.NgspiceExecutable = " "\""
+                               (assoc-ref inputs "ngspice") "/bin/ngspice\"")))
+             (substitute* "qucs/qucs_actions.cpp"
+               (("qucstrans")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucstrans"))
+               (("qucsattenuator")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucsattenuator"))
+               (("qucsrescodes")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucsrescodes")))
+             #t))
+         (add-after 'install 'install-scripts
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (for-each
+              (lambda (script)
+                (let ((file (string-append "../qucs-" ,version
+                                           "/qucs/" script))
+                      (out (assoc-ref outputs "out")))
+                  (install-file file (string-append out "/bin"))
+                  (chmod (string-append out "/bin/" script) #o555)))
+              '("qucsdigi" "qucsdigilib" "qucsveri"))
+             #t))
+         (add-after 'install-scripts 'make-wrapper
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (file (string-append out "/bin/qucs-s"))
+                    (qucs (assoc-ref inputs "qucs"))
+                    (qucsator (string-append qucs "/bin/qucsator")))
+               (wrap-program file
+                 `("QUCSATOR" ":" prefix (,qucsator))
+                 `("QUCSCONV" ":" prefix (,(string-append qucsator "/bin/qucsconv")))
+                 `("ADMSXMLBINDIR" ":" prefix (,(string-append (assoc-ref inputs "adms") "/bin")))
+                 `("ASCOBINDIR" ":" prefix (,(string-append (assoc-ref inputs "asco") "/bin")))
+                 `("QUCS_OCTAVE" ":" prefix (,(string-append (assoc-ref inputs "octave") "/bin/octave"))))
+               (symlink qucsator (string-append out "/bin/qucsator"))
+               #t))))))
+    (native-inputs
+     `(("libtool" ,libtool)))
+    (inputs
+     `(("adms" ,adms)
+       ("asco" ,asco)
+       ("freehdl" ,freehdl)
+       ("iverilog" ,iverilog)
+       ("mpi" ,openmpi)
+       ("ngspice" ,ngspice)
+       ("octave" ,octave)
+       ("qt4" ,qt-4)
+       ("qucs" ,qucs)
+       ("xyce-serial" ,xyce-serial)
+       ("xyce-parallel" ,xyce-parallel)))
+    (propagated-inputs
+     `(("gcc-toolchain" ,gcc-toolchain-5))); for freehdl
+    (home-page "https://ra3xdh.github.io/")
+    (synopsis "Circuit simulator with graphical user interface")
+    (description
+     "Qucs-S is a spin-off of the Qucs cross-platform circuit simulator.
+  S letter indicates SPICE.  The purpose of the Qucs-S subproject is to use
+free SPICE circuit simulation kernels with the Qucs GUI.  It provides the
+simulator backends @code{Qucsator}, @code{ngspice} and @code{Xyce}.")
+    (license license:gpl2+)))
-- 
2.13.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 24 Jun 2017 06:50:02 GMT) Full text and rfc822 format available.

Message #146 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v2 04/12] gnu: Add meep.
Date: Sat, 24 Jun 2017 08:49:20 +0200
Hi,

On Thu, 22 Jun 2017 22:09:57 +0300
Theodoros Foradis <theodoros.for <at> openmailbox.org> wrote:

> +       ("guile" ,guile-2.0) ; doesn't build with guile-2.2

Hmm... does that mean you can't load guile-libctl and meep in the same guile?  Does any of the programs try to do that? 




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 24 Jun 2017 06:52:02 GMT) Full text and rfc822 format available.

Message #149 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v2 03/12] gnu: Add mpb.
Date: Sat, 24 Jun 2017 08:51:05 +0200
> +    (build-system gnu-build-system)
> +     (arguments
> +      `(#:configure-flags
> +        (list (string-append "--with-libctl="
> +                             (assoc-ref %build-inputs "libctl")
> +                             "/share/libctl"))))
> +     (native-inputs
> +      `(("fortran" ,gfortran)
> +        ("pkg-config" ,pkg-config)
> +        ("swig" ,swig)))

Whitespace problem which I fixed when applying...




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 24 Jun 2017 07:19:01 GMT) Full text and rfc822 format available.

Message #152 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v2 06/12] gnu: Add freehdl.
Date: Sat, 24 Jun 2017 09:18:37 +0200
Hi Theodoros,

> +         (add-before 'configure 'patch-pkg-config
> +           (lambda _
> +             (substitute* "freehdl/freehdl-config"
> +               (("pkg-config") (which "pkg-config"))
> +               (("cat") (which "cat")))
> +             #t))

freehdl-config is installed, but it uses a path to pkg-config which is from a native-input (so it will not be retained).

Does this ever work again after removing pkg-config from your profile and then doing "guix gc" ?  I doubt it...

> +         (add-after 'configure 'patch-freehdl-pc
> +           (lambda _
> +             (substitute* "freehdl.pc"
> +               (("=g\\+\\+") (string-append "=" (which "g++")))
> +               (("=libtool") (string-append "=" (which "libtool"))))
> +             #t))

Same here...

> +         (add-after 'install-scripts 'make-wrapper
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out")))
> +               (wrap-program (string-append out "/bin/freehdl-config")
> +                 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))


> +             #t)))))
> +    (inputs
> +     `(("perl" ,perl)))
> +    (native-inputs
> +     `(("pkg-config" ,pkg-config)
> +       ("libtool" ,libtool)))

I've pushed PATCH v2 01 to 05 (inclusive) to master as:

- bf6e6c39646e6180f57a5146dd77a3a01d870c9e (adms)
- c5c380100635b47afb11c9bbb213ad1fc4cb5f64 (meep)
- 66c3639c468c822a33c746065bcbbae698d5900d (mpb)
- 5738ebee1b5e50e8e876c103be7afc2ec4f4daf0 (guile-libctl)
- 196627c2757c6dd6d2ef792e69eb6a969728cecf (harminv)

I'm not sure how to proceed so I'll stop at this point (with freehdl not in) until the path is clear :)




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 24 Jun 2017 09:15:02 GMT) Full text and rfc822 format available.

Message #155 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH v2 04/12] gnu: Add meep.
Date: Sat, 24 Jun 2017 12:14:04 +0300
Hello,

> Hi,
>
> On Thu, 22 Jun 2017 22:09:57 +0300
> Theodoros Foradis <theodoros.for <at> openmailbox.org> wrote:
>
>> +       ("guile" ,guile-2.0) ; doesn't build with guile-2.2
>
> Hmm... does that mean you can't load guile-libctl and meep in the same guile?  Does any of the programs try to do that? 

My understanding is that you cannot, but still meep, the program, is
able to use guile-libctl because it uses a C interface to it.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 24 Jun 2017 09:36:02 GMT) Full text and rfc822 format available.

Message #158 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH v2 06/12] gnu: Add freehdl.
Date: Sat, 24 Jun 2017 12:34:46 +0300
Hello,

>> +         (add-before 'configure 'patch-pkg-config
>> +           (lambda _
>> +             (substitute* "freehdl/freehdl-config"
>> +               (("pkg-config") (which "pkg-config"))
>> +               (("cat") (which "cat")))
>> +             #t))
>
> freehdl-config is installed, but it uses a path to pkg-config which is from a native-input (so it will not be retained).
>
> Does this ever work again after removing pkg-config from your profile and then doing "guix gc" ?  I doubt it...
>
>> +         (add-after 'configure 'patch-freehdl-pc
>> +           (lambda _
>> +             (substitute* "freehdl.pc"
>> +               (("=g\\+\\+") (string-append "=" (which "g++")))
>> +               (("=libtool") (string-append "=" (which "libtool"))))
>> +             #t))
>
> Same here...
>
>> +         (add-after 'install-scripts 'make-wrapper
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (let ((out (assoc-ref outputs "out")))
>> +               (wrap-program (string-append out "/bin/freehdl-config")
>> +                 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
>
>
>> +             #t)))))
>> +    (inputs
>> +     `(("perl" ,perl)))
>> +    (native-inputs
>> +     `(("pkg-config" ,pkg-config)
>> +       ("libtool" ,libtool)))
>
>
> I'm not sure how to proceed so I'll stop at this point (with freehdl not in) until the path is clear :)

You are correct, I totally missed the issue there. I can think of two
possible ways to solve the issue, though I may be making wrong
assumptions.

- Move pkg-config to inputs, and disable cross-compilation of the
  package, if possible.

- Have both pkg-configs at build time. Use the native pkg-config in
  building and reference the non-native one in freehdl-config. Is this
  possible with guix? 

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Mon, 26 Jun 2017 19:31:02 GMT) Full text and rfc822 format available.

Message #161 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH v2 06/12] gnu: Add freehdl.
Date: Mon, 26 Jun 2017 21:40:09 +0300
Hello again,

>
>> +         (add-before 'configure 'patch-pkg-config
>> +           (lambda _
>> +             (substitute* "freehdl/freehdl-config"
>> +               (("pkg-config") (which "pkg-config"))
>> +               (("cat") (which "cat")))
>> +             #t))
>
> freehdl-config is installed, but it uses a path to pkg-config which is from a native-input (so it will not be retained).
>
> Does this ever work again after removing pkg-config from your profile and then doing "guix gc" ?  I doubt it...
>
>> +         (add-after 'configure 'patch-freehdl-pc
>> +           (lambda _
>> +             (substitute* "freehdl.pc"
>> +               (("=g\\+\\+") (string-append "=" (which "g++")))
>> +               (("=libtool") (string-append "=" (which "libtool"))))
>> +             #t))
>
> Same here...
>
>> +         (add-after 'install-scripts 'make-wrapper
>> +           (lambda* (#:key outputs #:allow-other-keys)
>> +             (let ((out (assoc-ref outputs "out")))
>> +               (wrap-program (string-append out "/bin/freehdl-config")
>> +                 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
>
>
>> +             #t)))))
>> +    (inputs
>> +     `(("perl" ,perl)))
>> +    (native-inputs
>> +     `(("pkg-config" ,pkg-config)
>> +       ("libtool" ,libtool)))
>

I looked again into the issue. I would like to note that the same
problem applies to qucs and qucs-s. They both need a native libtool for
cross-compiling, and one for the final package to reference.

I have to make some changes in other references in qucs, qucs-s and asco
as well, but those are not conflicting with native inputs I
think. Namely cp, and sed.

On the topic on how could the issue be resolved, how is it determined
which package will be in PATH if the same package is included as both
native and non-native input under different names? 

Regards,
-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 20 Jul 2017 09:27:01 GMT) Full text and rfc822 format available.

Message #164 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>,
 Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 0/12] Add computational software and circuit
 simulators
Date: Thu, 20 Jul 2017 11:25:49 +0200
Hello,

Theodoros Foradis <theodoros.for <at> openmailbox.org> skribis:

> This patch series adds:
> * Computational software from
> <http://ab-initio.mit.edu/wiki/index.php/Main_Page>
> * Qucs and its dependencies for digital circuit simulation/optimisation
> * Ngspice and Xyce(serial/parallel) circuit simulators
> * Qucs-s, which is a GUI that utilises those 3 simulators.
>
> Ngspice, normally includes a non-free component (cider), which I delete
> with a snippet from source, and build without. I have clearly noted the
> licenses of the rest of the source code, but I would like someone to
> verify I am not missing anything.

Danny, Theodoros: could we make sure the non-controversial parts of
these series get committed?  :-)

TIA,
Ludo’, who is fighting bitrot.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sun, 23 Jul 2017 11:38:02 GMT) Full text and rfc822 format available.

Message #167 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v2 08/12] gnu: Add ngspice.
Date: Sun, 23 Jul 2017 13:37:12 +0200
Hi Theodoros,

apparently you are trying to provide the shared object in package "libngspice" and the executables in package "ngspice".  Is that so?

I've checked the resulting output directories for ngspice and libngspice and there's some duplication going on.

For example, both packages provide cmpp, the man pages for ALL the executables and the ngspice include files, and shared libraries as lib/ngspice/*.cm.

Was that intended?

I've also made the build reproducible by substituting "`date`" in the file "configure".




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sun, 23 Jul 2017 13:18:02 GMT) Full text and rfc822 format available.

Message #170 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v2 08/12] gnu: Add ngspice.
Date: Sun, 23 Jul 2017 15:16:46 +0200
My current version of your patch is below.

After it, the following duplicates remain:
* ./bin/cmpp
* ./lib/ngspice/analog.cm
* ./lib/ngspice/digital.cm
* ./lib/ngspice/spice2poly.cm
* ./lib/ngspice/xtradev.cm
* ./lib/ngspice/xtraevt.cm
* ./share/ngspice/dlmain.c
* ./share/ngspice/scripts/setplot
* ./share/ngspice/scripts/spectrum
* ./share/ngspice/scripts/spinit

Also, how can other programs find libngspice?  There's no pkg-config file and also no replacement (a la gtk-config) that I can see.

cmpp seems to be a preprocessor for xspice extensions - should it be part of ngspice or libngspice ? Is libngspice useful without cmpp being there ?

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 650ac2b89..2687b5758 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -59,6 +59,7 @@
   #:use-module (gnu packages linux)               ;FIXME: for pcb
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
+  #:use-module (gnu packages mpi)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -1013,3 +1014,87 @@ specified in high-level description language into ready-to-compile C code for
 the API of spice simulators.  Based on transformations specified in XML
 language, ADMS transforms Verilog-AMS code into other target languages.")
     (license license:gpl3)))
+
+(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)))
+       #: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
+@code{Spice3f5}, 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))
+          (delete 'delete-program-manuals)))))
+    (inputs
+     `(("libngspice" ,libngspice)
+       ("readline" ,readline)))))




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 28 Jul 2017 17:20:02 GMT) Full text and rfc822 format available.

Message #173 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Subject: Re: [bug#27344] [PATCH v2 08/12] gnu: Add ngspice.
Date: Fri, 28 Jul 2017 20:17:40 +0300
Hello Danny,


> apparently you are trying to provide the shared object in package "libngspice" and the executables in package "ngspice".  Is that so?

Correct. Ngspice, does not build both the executable and shared library
in the same run. The configure script must anyway be run twice, and this
is why I split the package, to begin with.

> I've checked the resulting output directories for ngspice and libngspice and there's some duplication going on.
>
> For example, both packages provide cmpp, the man pages for ALL the executables and the ngspice include files, and shared libraries as lib/ngspice/*.cm.
>
> Was that intended?

That was not intended. In the first version of the patch set, I had the
"ngspice" package copy the shared library from "libngspice" to its
output. So, there would only be one public package. After splitting it
up, I missed on fixing the duplicates.

> I've also made the build reproducible by substituting "`date`" in the file "configure".

Thanks for fixing that.

> My current version of your patch is below.
>
> After it, the following duplicates remain:
> * ./bin/cmpp
> * ./share/ngspice/dlmain.c

Should be in libngspice.

> * ./lib/ngspice/analog.cm
> * ./lib/ngspice/digital.cm
> * ./lib/ngspice/spice2poly.cm
> * ./lib/ngspice/xtradev.cm
> * ./lib/ngspice/xtraevt.cm

Should be in both packages.

> * ./share/ngspice/scripts/setplot
> * ./share/ngspice/scripts/spectrum
> * ./share/ngspice/scripts/spinit

Should be in ngspice.

> Also, how can other programs find libngspice?  There's no pkg-config file and also no replacement (a la gtk-config) that I can see.
>
> cmpp seems to be a preprocessor for xspice extensions - should it be part of ngspice or libngspice ? Is libngspice useful without cmpp being there ?
>

The program I have tested libngspice with, is Kicad (after I get this
patchset over with, I will submit a patch to update Kicad, and build
with ngspice support). I guess it finds libngspice through LIBRARY_PATH
or something? Also, it builds without cmpp being in libngspice (so
libngspice is useful without it), but cmpp should be there nonetheless.

I have updated your patch, to delete the appropriate files from ngspice
and libngspice respectively. I will send it with the updated patch
series.

Regards,
-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 28 Jul 2017 19:48:02 GMT) Full text and rfc822 format available.

Message #176 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros.for <at> openmailbox.org>
To: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 0/12] Add computational software and circuit
 simulators
Date: Fri, 28 Jul 2017 22:46:54 +0300
Hello Ludovic,

> Danny, Theodoros: could we make sure the non-controversial parts of
> these series get committed?  :-)

I have made some additions to Danny's patch for libngspice and ngspice,
and it's ready for the updated patch set.

Another issue appeared with xyce-serial and xyce-parallel, namely that
they don't build with lapack-3.7.1 which was recently updated. I got
them to build, adding a lapack-3.5.0 variant, and I have sent an email
upstream to confirm that version issue.

There is an isssue with freehdl, qucs and qucs-s. That is, some packages
need to be present at build time both as native inputs, and inputs, so
that some references are substituted with the path to the target
architecture binaries. Any ideas on how could that be done? Can a
package be both a native and non-native input without issues? I don't
know how to test that, since the problem does not obviously manifest
itself without cross-compiling.

Regards,
-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 31 Aug 2017 10:35:02 GMT) Full text and rfc822 format available.

Message #179 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 0/12] Add computational software and circuit
 simulators
Date: Thu, 31 Aug 2017 12:34:34 +0200
Hi Theodoros,

Theodoros Foradis <theodoros.for <at> openmailbox.org> skribis:

>> Danny, Theodoros: could we make sure the non-controversial parts of
>> these series get committed?  :-)
>
> I have made some additions to Danny's patch for libngspice and ngspice,
> and it's ready for the updated patch set.
>
> Another issue appeared with xyce-serial and xyce-parallel, namely that
> they don't build with lapack-3.7.1 which was recently updated. I got
> them to build, adding a lapack-3.5.0 variant, and I have sent an email
> upstream to confirm that version issue.
>
> There is an isssue with freehdl, qucs and qucs-s. That is, some packages
> need to be present at build time both as native inputs, and inputs, so
> that some references are substituted with the path to the target
> architecture binaries. Any ideas on how could that be done? Can a
> package be both a native and non-native input without issues? I don't
> know how to test that, since the problem does not obviously manifest
> itself without cross-compiling.

I’m afraid I can’t really help, but can you explicitly direct Danny to
the bits that should be readily applicable?

I guess it’s a bit hard for reviewers to follow if there’s a mixture of
patches ready to applied and work-in-progress patches.

Thanks in advance, and sorry this takes so much time!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 09 Sep 2017 17:29:02 GMT) Full text and rfc822 format available.

Message #182 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Danny Milosavljevic <dannym <at> scratchpost.org>, 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 0/12] Add computational software and circuit
 simulators
Date: Sat, 09 Sep 2017 19:51:11 +0300
Hello Ludovic,

>
> I’m afraid I can’t really help, but can you explicitly direct Danny to
> the bits that should be readily applicable?
>
> I guess it’s a bit hard for reviewers to follow if there’s a mixture of
> patches ready to applied and work-in-progress patches.
>

I am replying with an updated patch set, with the updated ngspice and
libngspice patches including the fixes that Danny proposed.

I had to add an extra patch, with lapack-3.5, as Xyce won't build with
the updated version of lapack we currently have.

The first 5 patches *should* be ready to be applied.

The 3 last ones, are the ones where there's a need for presence for both
native and non-native versions of the same inputs. I have updated
them, in a way that seems to me that works with Guix, but since I cannot
cross-compile to verify the correctness, I would like to have some confirmation.

Regards,
-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 09 Sep 2017 17:59:01 GMT) Full text and rfc822 format available.

Message #185 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros <at> foradis.org>
Subject: [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
+@code{Spice3f5}, 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





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 09 Sep 2017 17:59:02 GMT) Full text and rfc822 format available.

Message #188 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros <at> foradis.org>
Subject: [PATCH v3 3/8] gnu: Add lapack-3.5.
Date: Sat,  9 Sep 2017 20:57:47 +0300
* gnu/packages/maths.scm (lapack-3.5): New variable.
---
 gnu/packages/maths.scm | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index bebed14b5..03ca885b5 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -470,6 +470,19 @@ problems in numerical linear algebra.")
     (license (license:non-copyleft "file://LICENSE"
                                 "See LICENSE in the distribution."))))
 
+(define-public lapack-3.5
+  (package
+    (inherit lapack)
+    (version "3.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://www.netlib.org/lapack/lapack-"
+                           version ".tgz"))
+       (sha256
+        (base32
+         "0lk3f97i9imqascnlf6wr5mjpyxqcdj73pgj97dj2mgvyg9z1n4s"))))))
+
 (define-public scalapack
   (package
     (name "scalapack")
-- 
2.13.4





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 09 Sep 2017 17:59:02 GMT) Full text and rfc822 format available.

Message #191 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros <at> foradis.org>
Subject: [PATCH v3 4/8] gnu: Add xyce-serial.
Date: Sat,  9 Sep 2017 20:57:48 +0300
* gnu/packages/engineering.scm (xyce-serial): New variable.
---
 gnu/packages/engineering.scm | 94 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 94 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 87defd848..6e275fd19 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1273,3 +1273,97 @@ an embedded event driven algorithm.")
     (inputs
      `(("libngspice" ,libngspice)
        ("readline" ,readline)))))
+
+(define trilinos-serial-xyce
+  (package
+    (name "trilinos-serial-xyce")
+    (version "12.6.3")
+    (source
+     (origin (method url-fetch)
+             (uri (string-append "https://trilinos.org/oldsite/download/files/trilinos-"
+                                 version "-Source.tar.gz"))
+             (sha256
+              (base32
+               "07jd1qpsbf31cmbyyngr4l67xzwyan24dyx5wlcahgbw7x6my3wn"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:out-of-source? #t
+       #:configure-flags
+       (list "-DCMAKE_CXX_FLAGS=-O3 -fPIC"
+             "-DCMAKE_C_FLAGS=-O3 -fPIC"
+             "-DCMAKE_Fortran_FLAGS=-O3 -fPIC"
+             "-DTrilinos_ENABLE_NOX=ON"
+             "-DNOX_ENABLE_LOCA=ON"
+             "-DTrilinos_ENABLE_EpetraExt=ON"
+             "-DEpetraExt_BUILD_BTF=ON"
+             "-DEpetraExt_BUILD_EXPERIMENTAL=ON"
+             "-DEpetraExt_BUILD_GRAPH_REORDERINGS=ON"
+             "-DTrilinos_ENABLE_TrilinosCouplings=ON"
+             "-DTrilinos_ENABLE_Ifpack=ON"
+             "-DTrilinos_ENABLE_Isorropia=ON"
+             "-DTrilinos_ENABLE_AztecOO=ON"
+             "-DTrilinos_ENABLE_Belos=ON"
+             "-DTrilinos_ENABLE_Teuchos=ON"
+             "-DTeuchos_ENABLE_COMPLEX=ON"
+             "-DTrilinos_ENABLE_Amesos=ON"
+             "-DAmesos_ENABLE_KLU=ON"
+             "-DAmesos_ENABLE_UMFPACK=ON"
+             "-DTrilinos_ENABLE_Sacado=ON"
+             "-DTrilinos_ENABLE_Kokkos=OFF"
+             "-DTrilinos_ENABLE_ALL_OPTIONAL_PACKAGES=OFF"
+             "-DTPL_ENABLE_AMD=ON"
+             "-DTPL_ENABLE_UMFPACK=ON"
+             "-DTPL_ENABLE_BLAS=ON"
+             "-DTPL_ENABLE_LAPACK=ON")))
+    (native-inputs
+     `(("fortran" ,gfortran)
+       ("swig" ,swig)))
+    (inputs
+     `(("boost" ,boost)
+       ("lapack" ,lapack-3.5)
+       ("suitesparse" ,suitesparse)))
+    (home-page "https://trilinos.org")
+    (synopsis "Engineering and scientific problems algorithms")
+    (description
+     "The Trilinos Project is an effort to develop algorithms and enabling
+technologies within an object-oriented software framework for the solution
+of large-scale, complex multi-physics engineering and scientific problems.
+  A unique design feature of Trilinos is its focus on packages.")
+    (license (list license:lgpl2.1+
+                   license:bsd-3))))
+
+(define-public xyce-serial
+  (package
+    (name "xyce-serial")
+    (version "6.7")
+    (source
+     (origin (method url-fetch)
+             (uri (string-append "https://archive.org/download/Xyce-"
+                                 version "/Xyce-" version ".tar.gz"))
+             (sha256
+              (base32
+               "02k952mnvrnc5kv7r65fdrn7khwq1lbyhwyvd7jznafzdpsvgm4x"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f
+       #:configure-flags
+       (list
+        "CXXFLAGS=-O3 -std=c++11"
+        (string-append "ARCHDIR="
+                       (assoc-ref %build-inputs "trilinos")))))
+    (native-inputs
+     `(("bison" ,bison)
+       ("flex" ,flex)
+       ("fortran" ,gfortran)))
+    (inputs
+     `(("fftw" ,fftw)
+       ("suitesparse" ,suitesparse)
+       ("lapack" ,lapack-3.5)
+       ("trilinos" ,trilinos-serial-xyce)))
+    (home-page "https://xyce.sandia.gov/")
+    (synopsis "High-performance analog circuit simulator")
+    (description
+     "Xyce is a SPICE-compatible, high-performance analog circuit simulator,
+capable of solving extremely large circuit problems by supporting large-scale
+parallel computing platforms.  It also supports serial execution.")
+    (license license:gpl3+)))
-- 
2.13.4





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 09 Sep 2017 17:59:03 GMT) Full text and rfc822 format available.

Message #194 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros <at> foradis.org>
Subject: [PATCH v3 5/8] gnu: Add xyce-parallel.
Date: Sat,  9 Sep 2017 20:57:49 +0300
* gnu/packages/engineering.scm (xyce-parallel): New variable.
---
 gnu/packages/engineering.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 6e275fd19..32d087279 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1367,3 +1367,40 @@ of large-scale, complex multi-physics engineering and scientific problems.
 capable of solving extremely large circuit problems by supporting large-scale
 parallel computing platforms.  It also supports serial execution.")
     (license license:gpl3+)))
+
+(define trilinos-parallel-xyce
+  (package (inherit trilinos-serial-xyce)
+    (name "trilinos-parallel-xyce")
+    (arguments
+     `(,@(substitute-keyword-arguments (package-arguments trilinos-serial-xyce)
+           ((#:configure-flags flags)
+            `(append (list "-DTrilinos_ENABLE_ShyLU=ON"
+                           "-DTrilinos_ENABLE_Zoltan=ON"
+                           "-DTPL_ENABLE_MPI=ON")
+                     ,flags)))))
+    (inputs
+     `(("mpi" ,openmpi)
+       ,@(package-inputs trilinos-serial-xyce)))))
+
+(define-public xyce-parallel
+  (package (inherit xyce-serial)
+    (name "xyce-parallel")
+    (arguments
+     `(,@(substitute-keyword-arguments (package-arguments xyce-serial)
+           ((#:configure-flags flags)
+            `(list "CXXFLAGS=-O3 -std=c++11"
+                   "CXX=mpiCC"
+                   "CC=mpicc"
+                   "F77=mpif77"
+                   "--enable-mpi"
+                   "--enable-isorropia=no"
+                   "--enable-zoltan=no"
+                   (string-append
+                    "ARCHDIR="
+                    (assoc-ref %build-inputs "trilinos")))))))
+    (propagated-inputs
+     `(("mpi" ,openmpi)))
+    (inputs
+     `(("trilinos" ,trilinos-parallel-xyce)
+       ,@((@ (srfi srfi-1) alist-delete) "trilinos"
+          (package-inputs xyce-serial))))))
-- 
2.13.4





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 09 Sep 2017 17:59:03 GMT) Full text and rfc822 format available.

Message #197 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros <at> foradis.org>
Subject: [PATCH v3 7/8] gnu: Add qucs.
Date: Sat,  9 Sep 2017 20:57:51 +0300
* gnu/packages/engineering.scm (qucs): New variable.
---
 gnu/packages/engineering.scm | 93 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index fa09c8823..e46b1e0d9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -41,10 +41,12 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages fpga)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
@@ -53,6 +55,7 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
@@ -1463,3 +1466,93 @@ parallel computing platforms.  It also supports serial execution.")
     (license (list license:gpl2+
                    license:lgpl2.0+)))) ; freehdl's libraries
 
+(define-public qucs
+  (package
+    (name "qucs")
+    (version "0.0.19")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "https://sourceforge.net/projects/qucs/files/qucs/" version
+                "/qucs-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0giv9gfyfdizvjhq56x2pdncrlyv3k15lrsh6pk37i94vr7l7ij5"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "qucs/configure"
+               (("\\$QTDIR") (assoc-ref inputs "qt4")))
+             #t))
+         (add-after 'patch-configure 'patch-scripts
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* '("qucs/qucs/qucsdigi"
+                            "qucs/qucs/qucsdigilib"
+                            "qucs/qucs/qucsveri")
+               (("\\$BINDIR")
+                (string-append (assoc-ref outputs "out") "/bin"))
+               (("freehdl-config")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
+               (("freehdl-v2cc")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
+               (("cp ")
+                (string-append (assoc-ref inputs "coreutils") "/bin/cp" " "))
+               (("glibtool")
+                (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
+               (("sed")
+                (string-append (assoc-ref inputs "sed") "/bin/sed"))
+               (("iverilog")
+                (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
+               (("vvp")
+                (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; The test suite requires a running X server.
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")
+             #t))
+         (add-after 'install 'make-wrapper
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/qucs")
+                 `("ADMSXMLBINDIR" ":" prefix
+                   (,(string-append (assoc-ref inputs "adms") "/bin")))
+                 `("ASCOBINDIR" ":" prefix
+                   (,(string-append (assoc-ref inputs "asco") "/bin")))
+                 `("QUCS_OCTAVE" ":" prefix
+                   (,(string-append (assoc-ref inputs "octave") "/bin/octave")))))
+             #t)))
+       #:parallel-build? #f ; race condition
+       #:configure-flags '("--disable-doc"))) ; we need octave-epstk
+    (native-inputs
+     `(("gperf" ,gperf)
+       ("libtool-native" ,libtool)
+       ("python" ,python-2) ; for tests
+       ("matplotlib" ,python2-matplotlib) ; for tests
+       ("numpy" ,python2-numpy) ; for tests
+       ("xorg-server" ,xorg-server))) ; for tests
+    (inputs
+     `(("adms" ,adms)
+       ("coreutils" ,coreutils)
+       ("asco" ,asco)
+       ("freehdl" ,freehdl)
+       ("iverilog" ,iverilog)
+       ("libtool" ,libtool)
+       ("octave" ,octave)
+       ("qt4" ,qt-4)
+       ("sed" ,sed)))
+    (propagated-inputs
+     `(("gcc-toolchain" ,gcc-toolchain-5))) ; for freehdl
+    (home-page "http://qucs.sourceforge.net/")
+    (synopsis "Circuit simulator with graphical user interface")
+    (description
+     "Qucs is a circuit simulator with graphical user interface.
+  The software aims to support all kinds of circuit simulation types,
+e.g. DC, AC, S-parameter, Transient, Noise and Harmonic Balance analysis.
+  Pure digital simulations are also supported.")
+    (license license:gpl2+)))
-- 
2.13.4





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 09 Sep 2017 17:59:04 GMT) Full text and rfc822 format available.

Message #200 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros <at> foradis.org>
Subject: [PATCH v3 6/8] gnu: Add freehdl.
Date: Sat,  9 Sep 2017 20:57:50 +0300
* gnu/packages/engineering.scm (freehdl): New variable.
---
 gnu/packages/engineering.scm | 59 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 59 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 32d087279..fa09c8823 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1404,3 +1404,62 @@ parallel computing platforms.  It also supports serial execution.")
      `(("trilinos" ,trilinos-parallel-xyce)
        ,@((@ (srfi srfi-1) alist-delete) "trilinos"
           (package-inputs xyce-serial))))))
+
+(define-public freehdl
+  (package
+    (name "freehdl")
+    (version "0.0.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://downloads.sourceforge.net/qucs/freehdl-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "117dqs0d4pcgbzvr3jn5ppra7n7x2m6c161ywh6laa934pw7h2bz"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-pkg-config
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "freehdl/freehdl-config"
+               (("pkg-config")
+                (string-append (assoc-ref inputs "pkg-config")
+                               "/bin/pkg-config"))
+               (("cat")
+                (string-append (assoc-ref inputs "coreutils")
+                               "/bin/cat")))
+             #t))
+         (add-after 'configure 'patch-freehdl-pc
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "freehdl.pc"
+               (("=g\\+\\+")
+                (string-append "=" (assoc-ref inputs "gcc")
+                               "/bin/g++"))
+               (("=libtool")
+                (string-append "=" (assoc-ref inputs "libtool")
+                               "/bin/libtool")))
+             #t))
+         (add-after 'install-scripts 'make-wrapper
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/freehdl-config")
+                 `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
+             #t)))))
+    (inputs
+     `(("coreutils" ,coreutils)
+       ("gcc" ,gcc-5)
+       ("perl" ,perl)
+       ("pkg-config" ,pkg-config)
+       ("libtool" ,libtool)))
+    (native-inputs
+     `(("pkg-config-native" ,pkg-config)
+       ("libtool-native" ,libtool)))
+    (home-page "http://www.freehdl.seul.org/")
+    (synopsis "VHDL simulator")
+    (description
+     "FreeHDL is a compiler/simulator suite for the hardware description language VHDL.
+  VHDL'93 as well as VHDL'87 standards are supported.")
+    (license (list license:gpl2+
+                   license:lgpl2.0+)))) ; freehdl's libraries
+
-- 
2.13.4





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 09 Sep 2017 17:59:04 GMT) Full text and rfc822 format available.

Message #203 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros <at> foradis.org>
Subject: [PATCH v3 8/8] gnu: Add qucs-s.
Date: Sat,  9 Sep 2017 20:57:52 +0300
* gnu/packages/engineering.scm (qucs-s): New variable.
---
 gnu/packages/engineering.scm | 122 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 122 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index e46b1e0d9..25221369f 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1556,3 +1556,125 @@ parallel computing platforms.  It also supports serial execution.")
 e.g. DC, AC, S-parameter, Transient, Noise and Harmonic Balance analysis.
   Pure digital simulations are also supported.")
     (license license:gpl2+)))
+
+(define-public qucs-s
+  (package
+    (name "qucs-s")
+    (version "0.0.19S")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/ra3xdh/qucs/releases/download/"
+                                  version "/qucs-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1bhahvdqmayaw0306fxz1ghmjhd4fq05yk3rk7zi0z703w5imgjv"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-scripts
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("qucs/qucsdigi"
+                            "qucs/qucsdigilib"
+                            "qucs/qucsveri")
+               (("\\$BINDIR")
+                (string-append (assoc-ref inputs "qucs") "/bin"))
+               (("freehdl-config")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
+               (("freehdl-v2cc")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
+               (("cp ")
+                (string-append (assoc-ref inputs "coreutils") "/bin/cp" " "))
+               (("glibtool")
+                (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
+               (("sed")
+                (string-append (assoc-ref inputs "sed") "/bin/sed"))
+               (("iverilog")
+                (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
+               (("vvp")
+                (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
+             #t))
+         (add-after 'patch-scripts 'patch-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "qucs/main.cpp"
+               (("QucsSettings\\.Qucsator = QucsSettings\\.BinDir
+ \\+ \"qucsator\" \\+ executableSuffix")
+                (string-append "}{ QucsSettings.Qucsator = \""
+                               (assoc-ref inputs "qucs") "/bin/qucsator\""))
+               (("else QucsSettings\\.XyceExecutable =
+ \"/usr/local/Xyce-Release-6.2.0-OPENSOURCE/bin/runxyce")
+                (string-append "QucsSettings.XyceExecutable = \""
+                               (assoc-ref inputs "xyce-serial") "/bin/Xyce"))
+               (("else QucsSettings\\.XyceParExecutable =
+ \"/usr/local/Xyce-Release-6.2.0-OPENMPI-OPENSOURCE/bin/xmpirun")
+                (string-append "QucsSettings.XyceParExecutable = \""
+                               (assoc-ref inputs "mpi") "/bin/mpirun"))
+               (("%p")
+                (string-append "%p "(assoc-ref inputs "xyce-parallel") "/bin/Xyce"))
+               (("else QucsSettings\\.NgspiceExecutable = \"ngspice\"")
+                (string-append "QucsSettings.NgspiceExecutable = " "\""
+                               (assoc-ref inputs "ngspice") "/bin/ngspice\"")))
+             (substitute* "qucs/qucs_actions.cpp"
+               (("qucstrans")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucstrans"))
+               (("qucsattenuator")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucsattenuator"))
+               (("qucsrescodes")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucsrescodes")))
+             #t))
+         (add-after 'install 'install-scripts
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (for-each
+              (lambda (script)
+                (let ((file (string-append "../qucs-" ,version
+                                           "/qucs/" script))
+                      (out (assoc-ref outputs "out")))
+                  (install-file file (string-append out "/bin"))
+                  (chmod (string-append out "/bin/" script) #o555)))
+              '("qucsdigi" "qucsdigilib" "qucsveri"))
+             #t))
+         (add-after 'install-scripts 'make-wrapper
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (file (string-append out "/bin/qucs-s"))
+                    (qucs (assoc-ref inputs "qucs"))
+                    (qucsator (string-append qucs "/bin/qucsator")))
+               (wrap-program file
+                 `("QUCSATOR" ":" prefix (,qucsator))
+                 `("QUCSCONV" ":" prefix (,(string-append qucsator "/bin/qucsconv")))
+                 `("ADMSXMLBINDIR" ":" prefix (,(string-append (assoc-ref inputs "adms")
+                                                               "/bin")))
+                 `("ASCOBINDIR" ":" prefix (,(string-append (assoc-ref inputs "asco")
+                                                            "/bin")))
+                 `("QUCS_OCTAVE" ":" prefix (,(string-append (assoc-ref inputs "octave")
+                                                             "/bin/octave"))))
+               (symlink qucsator (string-append out "/bin/qucsator"))
+               #t))))))
+    (native-inputs
+     `(("libtool-native" ,libtool)))
+    (inputs
+     `(("adms" ,adms)
+       ("asco" ,asco)
+       ("coreutils" ,coreutils)
+       ("freehdl" ,freehdl)
+       ("iverilog" ,iverilog)
+       ("libtool" ,libtool)
+       ("mpi" ,openmpi)
+       ("ngspice" ,ngspice)
+       ("octave" ,octave)
+       ("qt4" ,qt-4)
+       ("qucs" ,qucs)
+       ("sed" ,sed)
+       ("xyce-serial" ,xyce-serial)
+       ("xyce-parallel" ,xyce-parallel)))
+    (propagated-inputs
+     `(("gcc-toolchain" ,gcc-toolchain-5))); for freehdl
+    (home-page "https://ra3xdh.github.io/")
+    (synopsis "Circuit simulator with graphical user interface")
+    (description
+     "Qucs-S is a spin-off of the Qucs cross-platform circuit simulator.
+  S letter indicates SPICE.  The purpose of the Qucs-S subproject is to use
+free SPICE circuit simulation kernels with the Qucs GUI.  It provides the
+simulator backends @code{Qucsator}, @code{ngspice} and @code{Xyce}.")
+    (license license:gpl2+)))
-- 
2.13.4





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 09 Sep 2017 17:59:05 GMT) Full text and rfc822 format available.

Message #206 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: Theodoros Foradis <theodoros <at> foradis.org>
Subject: [PATCH v3 1/8] gnu: Add asco.
Date: Sat,  9 Sep 2017 20:57:45 +0300
* gnu/packages/engineering.scm (asco): New variable.
---
 gnu/packages/engineering.scm | 47 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 47 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 0955bb4ae..2bae7582f 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -61,6 +61,7 @@
   #:use-module (gnu packages m4)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages multiprecision)
+  #:use-module (gnu packages mpi)
   #:use-module (gnu packages ncurses)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages pkg-config)
@@ -1128,3 +1129,49 @@ hexadecimal editor able to open disk files, but later support for analyzing
 binaries, disassembling code, debugging programs, attaching to remote gdb
 servers, ...")
     (license license:lgpl3)))
+
+(define-public asco
+  (package
+    (name "asco")
+    (version "0.4.10")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://sourceforge/asco/asco/" version "/ASCO-"
+                                  version ".tar.gz"))
+              (sha256
+               (base32
+                "119rbc2dc8xzwxvykgji0v0nrzvymjmlizr1bc2mihspj686kxsl"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:make-flags '("all" "asco-mpi")
+       #:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (add-before 'build 'fix-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("errfunc.c" "asco.c")
+               (("cp ") (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
+               (("nice") (string-append (assoc-ref inputs "coreutils") "/bin/nice")))
+             (substitute* "Makefile"
+               (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc")))
+             #t))
+         (replace 'install ; no install target
+           (lambda* (#:key outputs #:allow-other-keys)
+             (for-each (lambda (file)
+                         (install-file file (string-append
+                                             (assoc-ref outputs "out")
+                                             "/bin")))
+                       '("asco" "asco-mpi" "asco-test"
+                         "tools/alter/alter" "tools/log/log"))
+             #t)))))
+    (native-inputs
+     `(("mpi" ,openmpi)))
+    (inputs
+     `(("coreutils" ,coreutils-minimal)))
+    (home-page "http://asco.sourceforge.net/")
+    (synopsis "SPICE circuit optimizer")
+    (description
+     "ASCO brings circuit optimization capabilities to existing SPICE simulators using a
+high-performance parallel differential evolution (DE) optimization algorithm.")
+    (license license:gpl2+)))
-- 
2.13.4





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 09 Sep 2017 18:18:01 GMT) Full text and rfc822 format available.

Message #209 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v3 1/8] gnu: Add asco.
Date: Sat, 09 Sep 2017 21:16:52 +0300
One additional note for this package regarding mpi and cross-compiling.

This is the relevant part of the Makefile (this package is not using
autotools):
CC_MPI = <path-to-mpi-package>/bin/mpicc
asco-mpi:
	$(CC_MPI)  $(CFLAGS) -DASCO -DMPI ...

I assumed openmpi should be a native input, because mpi-cc is used. If
this is a mistake, and it won't work when cross-compiling, we can omit
building asco-mpi altogether.
-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 28 Sep 2017 12:30:02 GMT) Full text and rfc822 format available.

Message #212 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 02/12] gnu: Add libctl.
Date: Thu, 28 Sep 2017 14:29:12 +0200
I’m finally picking this up…

Theodoros Foradis <theodoros.for <at> openmailbox.org> skribis:

> * gnu/packages/engineering.scm (libctl): New variable.

Applied (without the “guile-” prefix because it also provides a C
library.)

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 28 Sep 2017 12:38:02 GMT) Full text and rfc822 format available.

Message #215 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 03/12] gnu: Add mpb.
Date: Thu, 28 Sep 2017 14:37:40 +0200
Theodoros Foradis <theodoros.for <at> openmailbox.org> skribis:

> * gnu/packages/engineering.scm (mpb): New variable.

Applied.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 28 Sep 2017 12:43:02 GMT) Full text and rfc822 format available.

Message #218 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 02/12] gnu: Add libctl.
Date: Thu, 28 Sep 2017 14:42:15 +0200
Theodoros Foradis <theodoros.for <at> openmailbox.org> skribis:

> * gnu/packages/engineering.scm (libctl): New variable.

Sorry, this was already applied.  :-/




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 28 Sep 2017 12:54:01 GMT) Full text and rfc822 format available.

Message #221 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v2 07/12] gnu: Add asco.
Date: Thu, 28 Sep 2017 14:52:49 +0200
Theodoros Foradis <theodoros.for <at> openmailbox.org> skribis:

> * gnu/packages/engineering.scm (asco): New variable.

[...]

> +         (add-before 'build 'fix-paths
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (substitute* '("errfunc.c" "asco.c")
> +               (("cp ") (string-append (which "cp") " "))
> +               (("nice") (string-append (assoc-ref inputs "coreutils") "/bin/nice")))
> +             (substitute* "Makefile"
> +               (("<FULL_PATH_TO_MPICH>/bin/mpicc") (which "mpicc")))
> +             #t))
> +         (replace 'install ; no install target
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (for-each (lambda (file)
> +                         (install-file file (string-append
> +                                             (assoc-ref outputs "out")
> +                                             "/bin")))
> +                       '("asco" "asco-mpi" "asco-test"
> +                         "tools/alter/alter" "tools/log/log"))
> +             #t)))))
> +    (native-inputs
> +     `(("mpi" ,openmpi)))
> +    (inputs
> +     `(("coreutils" ,coreutils-minimal)))

I changed the label to “coreutils-minimal” as otherwise we’d be picking
up the other coreutils.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 28 Sep 2017 12:59:01 GMT) Full text and rfc822 format available.

Message #224 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros.for <at> openmailbox.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 0/12] Add computational software and circuit
 simulators
Date: Thu, 28 Sep 2017 14:58:30 +0200
Hi,

So I managed to push ASCO, but there’s still some left.

Theodoros Foradis <theodoros.for <at> openmailbox.org> skribis:

>> Danny, Theodoros: could we make sure the non-controversial parts of
>> these series get committed?  :-)
>
> I have made some additions to Danny's patch for libngspice and ngspice,
> and it's ready for the updated patch set.
>
> Another issue appeared with xyce-serial and xyce-parallel, namely that
> they don't build with lapack-3.7.1 which was recently updated. I got
> them to build, adding a lapack-3.5.0 variant, and I have sent an email
> upstream to confirm that version issue.

OK.

> There is an isssue with freehdl, qucs and qucs-s. That is, some packages
> need to be present at build time both as native inputs, and inputs, so
> that some references are substituted with the path to the target
> architecture binaries. Any ideas on how could that be done? Can a
> package be both a native and non-native input without issues?

Yes, that’s the right way to do it.

> I don't know how to test that, since the problem does not obviously
> manifest itself without cross-compiling.

Then again, don’t spend too much time on cross-compilation support,
unless there’s evidence that the whole stack can actually be
cross-compiled.

Could we resume this?

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 28 Sep 2017 13:20:01 GMT) Full text and rfc822 format available.

Message #227 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 0/12] Add computational software and circuit
 simulators
Date: Thu, 28 Sep 2017 16:18:52 +0300
Hello Ludovic,

> So I managed to push ASCO, but there’s still some left.
>
> Could we resume this?

Please take a look at the version 3 of the patch series that I sent this
month.

Pushing asco (from version 2) was ok, the changes you did was actually
the same I did in the version 3 patch set, except that I didn't name the
coreutils-minimal input as "coreutils-minimal".

Thanks,
-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 28 Sep 2017 20:01:01 GMT) Full text and rfc822 format available.

Message #230 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH 0/12] Add computational software and circuit
 simulators
Date: Thu, 28 Sep 2017 22:00:17 +0200
Theodoros Foradis <theodoros <at> foradis.org> skribis:

> Hello Ludovic,
>
>> So I managed to push ASCO, but there’s still some left.
>>
>> Could we resume this?
>
> Please take a look at the version 3 of the patch series that I sent this
> month.
>
> Pushing asco (from version 2) was ok, the changes you did was actually
> the same I did in the version 3 patch set, except that I didn't name the
> coreutils-minimal input as "coreutils-minimal".

Oops, sorry, I don’t know how I managed to overlook v3!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 28 Sep 2017 20:08:02 GMT) Full text and rfc822 format available.

Message #233 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 2/8] gnu: Add libngspice and ngspice.
Date: Thu, 28 Sep 2017 22:07:12 +0200
Theodoros Foradis <theodoros <at> foradis.org> skribis:

> * gnu/packages/engineering.scm (libngspice): New variable.
> * gnu/packages/engineering.scm (ngspice): New variable.

I’m sorry for asking this late in the game, but I didn’t find the
answer in previous discussions: why two packages?  It seems to me that a
“lib” output would achieve the same, no?

(It’s best to leave a comment in such a situation.)

If you tell me I’m wrong, that’s OK, I’ll apply it right away!

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 28 Sep 2017 21:25:01 GMT) Full text and rfc822 format available.

Message #236 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 2/8] gnu: Add libngspice and ngspice.
Date: Fri, 29 Sep 2017 00:24:13 +0300
Ludovic Courtès writes:

> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>
>> * gnu/packages/engineering.scm (libngspice): New variable.
>> * gnu/packages/engineering.scm (ngspice): New variable.
>
> I’m sorry for asking this late in the game, but I didn’t find the
> answer in previous discussions: why two packages?  It seems to me that a
> “lib” output would achieve the same, no?
>
> (It’s best to leave a comment in such a situation.)
>
> If you tell me I’m wrong, that’s OK, I’ll apply it right away!

The way this package's build system is set up, you cannot build both the
libraries and executables in the same run. That is, you need to run
./configure (with the library-specific flag), make, then ./configure and
make again, to build everything.

This is why I split the package in two. Initially (in v1 and v2 patch
series), I had libngspice be a non-public package, and ngspice was
copying the library to its normal output.

After Danny's additions, different phases were added to both
packages, and unneeded files are deleted from their outputs. So, both
were made public, with only the minimal files needed for each
functionality.

Would it be preferable to have libngspice as a non-public package again,
and have ngspice copy it to a "lib" output?

I'm not sure what the "guix" way of handling this is.

WDYT?
-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sat, 30 Sep 2017 22:31:02 GMT) Full text and rfc822 format available.

Message #239 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v3 8/8] gnu: Add qucs-s.
Date: Sun, 01 Oct 2017 01:30:10 +0300
Having run "guix lint" before formatting the patches, I split some lines
in two, and that caused some text substitutions to fail in qucs-s
package, which I did not catch in time.

This patch (applied on top of [PATCH v3 8/8] gnu: Add qucs-s.) resolves
the issue. If it is preferred that I send the whole patch again, please
ask.

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 25221369f..74000e948 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1598,16 +1598,16 @@ e.g. DC, AC, S-parameter, Transient, Noise and Harmonic Balance analysis.
          (add-after 'patch-scripts 'patch-paths
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "qucs/main.cpp"
-               (("QucsSettings\\.Qucsator = QucsSettings\\.BinDir
- \\+ \"qucsator\" \\+ executableSuffix")
+               (((string-append "QucsSettings\\.Qucsator = QucsSettings\\.BinDir "
+                                "\\+ \"qucsator\" \\+ executableSuffix"))
                 (string-append "}{ QucsSettings.Qucsator = \""
                                (assoc-ref inputs "qucs") "/bin/qucsator\""))
-               (("else QucsSettings\\.XyceExecutable =
- \"/usr/local/Xyce-Release-6.2.0-OPENSOURCE/bin/runxyce")
+               (((string-append "else QucsSettings\\.XyceExecutable = "
+                                "\"/usr/local/Xyce-Release-6.2.0-OPENSOURCE/bin/runxyce"))
                 (string-append "QucsSettings.XyceExecutable = \""
                                (assoc-ref inputs "xyce-serial") "/bin/Xyce"))
-               (("else QucsSettings\\.XyceParExecutable =
- \"/usr/local/Xyce-Release-6.2.0-OPENMPI-OPENSOURCE/bin/xmpirun")
+               (((string-append "else QucsSettings\\.XyceParExecutable = \"/usr/local"
+                                "/Xyce-Release-6.2.0-OPENMPI-OPENSOURCE/bin/xmpirun"))
                 (string-append "QucsSettings.XyceParExecutable = \""
                                (assoc-ref inputs "mpi") "/bin/mpirun"))
                (("%p")
-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Sun, 01 Oct 2017 13:05:02 GMT) Full text and rfc822 format available.

Message #242 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 2/8] gnu: Add libngspice and ngspice.
Date: Sun, 01 Oct 2017 15:04:36 +0200
[Message part 1 (text/plain, inline)]
Hello,

Theodoros Foradis <theodoros <at> foradis.org> skribis:

> Ludovic Courtès writes:
>
>> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>>
>>> * gnu/packages/engineering.scm (libngspice): New variable.
>>> * gnu/packages/engineering.scm (ngspice): New variable.
>>
>> I’m sorry for asking this late in the game, but I didn’t find the
>> answer in previous discussions: why two packages?  It seems to me that a
>> “lib” output would achieve the same, no?
>>
>> (It’s best to leave a comment in such a situation.)
>>
>> If you tell me I’m wrong, that’s OK, I’ll apply it right away!
>
> The way this package's build system is set up, you cannot build both the
> libraries and executables in the same run. That is, you need to run
> ./configure (with the library-specific flag), make, then ./configure and
> make again, to build everything.

OK, that makes a lot of sense.

> This is why I split the package in two. Initially (in v1 and v2 patch
> series), I had libngspice be a non-public package, and ngspice was
> copying the library to its normal output.
>
> After Danny's additions, different phases were added to both
> packages, and unneeded files are deleted from their outputs. So, both
> were made public, with only the minimal files needed for each
> functionality.
>
> Would it be preferable to have libngspice as a non-public package again,
> and have ngspice copy it to a "lib" output?

Given that we’re dealing with a limitation of upstream’s build system,
I think it’s OK to do it the way you did.

I’ve committed the patch with the cosmetic changes below.

Thanks, and sorry again for the delay!

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 52a925225..0356fbfe9 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1180,6 +1180,9 @@ high-performance parallel differential evolution (DE) optimization algorithm.")
     (license license:gpl2+)))
 
 (define-public libngspice
+  ;; Note: The ngspice's build system does not allow us to build both the
+  ;; library and the executables in one go.  Thus, we have two packages.
+  ;; See <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=27344#236>.
   (package
     (name "libngspice")
     (version "26")
@@ -1249,6 +1252,7 @@ an embedded event driven algorithm.")
                    license:public-domain)))) ; xspice
 
 (define-public ngspice
+  ;; The ngspice executables (see libngpsice above.)
   (package (inherit libngspice)
     (name "ngspice")
     (arguments
@@ -1265,12 +1269,12 @@ an embedded event driven algorithm.")
                #t))
            (add-after 'install 'delete-cmpp-dlmain
              (lambda* (#:key outputs #:allow-other-keys)
-             (for-each
-              (lambda (file)
+               (for-each (lambda (file)
                            (delete-file
                             (string-append (assoc-ref outputs "out")
                                            file)))
-              '("/bin/cmpp" "/share/ngspice/dlmain.c"))))
+                         '("/bin/cmpp" "/share/ngspice/dlmain.c"))
+               #t))
            (delete 'delete-program-manuals)
            (delete 'delete-script-files)))))
     (inputs

Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 05 Oct 2017 10:10:01 GMT) Full text and rfc822 format available.

Message #245 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Trilinos (was: Re: [bug#27344] [PATCH v3 4/8] gnu: Add xyce-serial.)
Date: Thu, 05 Oct 2017 12:08:47 +0200
Hi Theodoros,

Theodoros Foradis <theodoros <at> foradis.org> skribis:

> * gnu/packages/engineering.scm (xyce-serial): New variable.

[...]

> +(define trilinos-serial-xyce
> +  (package
> +    (name "trilinos-serial-xyce")

[...]

> +(define trilinos-parallel-xyce
> +  (package (inherit trilinos-serial-xyce)
> +    (name "trilinos-parallel-xyce")

What about adding Trilinos as a first-class package, independently of
Xyce?  The package names could be “trilinos” and “trilinos-parallel”.

However, Trilinos raises its own set of issues: it’s actually a set of
50 packages, which we’d rather provide as separate packages:

  https://trilinos.org/packages/

Do you know which ones are useful to Xyce?

Thoughts?

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 06 Oct 2017 20:13:02 GMT) Full text and rfc822 format available.

Message #248 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: Trilinos (was: Re: [bug#27344] [PATCH v3 4/8] gnu: Add
 xyce-serial.)
Date: Fri, 06 Oct 2017 23:11:44 +0300
Hello Ludovic,

Ludovic Courtès writes:

> What about adding Trilinos as a first-class package, independently of
> Xyce?  The package names could be “trilinos” and “trilinos-parallel”.
>
> However, Trilinos raises its own set of issues: it’s actually a set of
> 50 packages, which we’d rather provide as separate packages:
>
>   https://trilinos.org/packages/
>
> Do you know which ones are useful to Xyce?

The trilinos-serial-xyce and trilinos-parallel-xyce non-public packages
I submitted *should* (according to Xyce's build instructions) include
only the packages useful to Xyce. Also, they are the latest version that
is compatible with Xyce (12.6.3), 12.12.1 being the latest release.

Eric Bavier, had linked me with his WIP trilinos package
(http://paste.lisp.org/display/330792) in IRC about a year ago.

I figured out that since the trilinos version used with Xyce, will
always be older than the current one, and some of the packages/configure
flags of a general trilinos package won't be compatible with it, if it
inherits a general trilinos package, it should be modified in respect to
it every time there is a trilinos update.

This is why I decided to submit two non-public trilinos xyce-specific
packages, irrespective of the trilinos package we would like to include.

WDYT?

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Wed, 11 Oct 2017 07:58:01 GMT) Full text and rfc822 format available.

Message #251 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] Trilinos
Date: Wed, 11 Oct 2017 09:57:21 +0200
Hi Theodoros,

Theodoros Foradis <theodoros <at> foradis.org> skribis:

> Ludovic Courtès writes:
>
>> What about adding Trilinos as a first-class package, independently of
>> Xyce?  The package names could be “trilinos” and “trilinos-parallel”.
>>
>> However, Trilinos raises its own set of issues: it’s actually a set of
>> 50 packages, which we’d rather provide as separate packages:
>>
>>   https://trilinos.org/packages/
>>
>> Do you know which ones are useful to Xyce?
>
> The trilinos-serial-xyce and trilinos-parallel-xyce non-public packages
> I submitted *should* (according to Xyce's build instructions) include
> only the packages useful to Xyce. Also, they are the latest version that
> is compatible with Xyce (12.6.3), 12.12.1 being the latest release.
>
> Eric Bavier, had linked me with his WIP trilinos package
> (http://paste.lisp.org/display/330792) in IRC about a year ago.
>
> I figured out that since the trilinos version used with Xyce, will
> always be older than the current one, and some of the packages/configure
> flags of a general trilinos package won't be compatible with it, if it
> inherits a general trilinos package, it should be modified in respect to
> it every time there is a trilinos update.
>
> This is why I decided to submit two non-public trilinos xyce-specific
> packages, irrespective of the trilinos package we would like to include.

OK, that makes a lot of sense, thanks for explaining.

I think that if/when we have modular Trilinos packages (where each
Trilinos package maps to one Guix package), we can revisit this and have
Xyce depend on those.

I added a comment and committed, thank you for your patience!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Wed, 11 Oct 2017 08:20:01 GMT) Full text and rfc822 format available.

Message #254 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 6/8] gnu: Add freehdl.
Date: Wed, 11 Oct 2017 10:19:27 +0200
Theodoros Foradis <theodoros <at> foradis.org> skribis:

> * gnu/packages/engineering.scm (freehdl): New variable.

I’ve applied the patch.  \o/

I have one question for which I couldn’t find an answer in the previous
discussions:

> +         (add-after 'configure 'patch-freehdl-pc
> +           (lambda* (#:key inputs #:allow-other-keys)
> +             (substitute* "freehdl.pc"
> +               (("=g\\+\\+")
> +                (string-append "=" (assoc-ref inputs "gcc")
> +                               "/bin/g++"))
> +               (("=libtool")
> +                (string-append "=" (assoc-ref inputs "libtool")
> +                               "/bin/libtool")))
> +             #t))

The effect of this is to retain a reference to GCC, Libtool, and all
their dependencies, which makes the closure of FreeHDL much bigger.

We could avoid it by just putting this in ‘freehdl.pc’:

  cxx=g++
  libtool=libtool

Now, whether this will work depends on whether/how users of ‘freehdl.pc’
use these variables.

Could you check whether that would work?

TIA!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Wed, 11 Oct 2017 08:21:02 GMT) Full text and rfc822 format available.

Message #257 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 5/8] gnu: Add xyce-parallel.
Date: Wed, 11 Oct 2017 10:20:06 +0200
[Message part 1 (text/plain, inline)]
Theodoros Foradis <theodoros <at> foradis.org> skribis:

> * gnu/packages/engineering.scm (xyce-parallel): New variable.

Applied with the change below.

Thanks,
Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 89cf6633b..9f9949ef8 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -30,6 +30,7 @@
   #:use-module (guix monads)
   #:use-module (guix store)
   #:use-module (guix utils)
+  #:use-module ((srfi srfi-1) #:hide (zip))
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix build-system cmake)
   #:use-module (guix build-system gnu)
@@ -1412,7 +1413,7 @@ parallel computing platforms.  It also supports serial execution.")
      `(("mpi" ,openmpi)))
     (inputs
      `(("trilinos" ,trilinos-parallel-xyce)
-       ,@((@ (srfi srfi-1) alist-delete) "trilinos"
+       ,@(alist-delete "trilinos"
                        (package-inputs xyce-serial))))))
 
 (define-public freehdl

Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Wed, 11 Oct 2017 08:28:01 GMT) Full text and rfc822 format available.

Message #260 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 7/8] gnu: Add qucs.
Date: Wed, 11 Oct 2017 10:27:15 +0200
Hi,

Theodoros Foradis <theodoros <at> foradis.org> skribis:

> * gnu/packages/engineering.scm (qucs): New variable.

[...]

> +    (propagated-inputs
> +     `(("gcc-toolchain" ,gcc-toolchain-5))) ; for freehdl

What’s the reason for this?

Propagated inputs should be used sparsely because they “pollute” user
profiles.  Here we’d be forcing a big package, and a specific version of
that, in user profiles, which is not OK.

Apart from that the patch LGTM though, so if we can remove these two
lines, we can commit.

Thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 12 Oct 2017 17:02:02 GMT) Full text and rfc822 format available.

Message #263 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 6/8] gnu: Add freehdl.
Date: Thu, 12 Oct 2017 20:00:57 +0300
Ludovic Courtès writes:

> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>
>> * gnu/packages/engineering.scm (freehdl): New variable.
>
> I’ve applied the patch.  \o/
>
> I have one question for which I couldn’t find an answer in the previous
> discussions:
>
>> +         (add-after 'configure 'patch-freehdl-pc
>> +           (lambda* (#:key inputs #:allow-other-keys)
>> +             (substitute* "freehdl.pc"
>> +               (("=g\\+\\+")
>> +                (string-append "=" (assoc-ref inputs "gcc")
>> +                               "/bin/g++"))
>> +               (("=libtool")
>> +                (string-append "=" (assoc-ref inputs "libtool")
>> +                               "/bin/libtool")))
>> +             #t))
>
> The effect of this is to retain a reference to GCC, Libtool, and all
> their dependencies, which makes the closure of FreeHDL much bigger.
>
> We could avoid it by just putting this in ‘freehdl.pc’:
>
>   cxx=g++
>   libtool=libtool
>
> Now, whether this will work depends on whether/how users of ‘freehdl.pc’
> use these variables.
>
> Could you check whether that would work?

Yes, I have tested this and it should work. Freehdl is a VHDL to C
compiler, so the user should be responsible for having a gcc toolchain
in his environment to run the simulations.

Now, in regard to the qucs and qucs-s packages, for the VHDL simulation
to work, libtool should be propagated (?) as well, but I'll reply to
that patch separately.

We can remove this phase (patch-freehdl-pc) altogether. Shall I submit
this patch?

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Thu, 12 Oct 2017 17:08:01 GMT) Full text and rfc822 format available.

Message #266 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 7/8] gnu: Add qucs.
Date: Thu, 12 Oct 2017 20:07:26 +0300
Hello,

Ludovic Courtès writes:

> Hi,
>
> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>
>> * gnu/packages/engineering.scm (qucs): New variable.
>
> [...]
>
>> +    (propagated-inputs
>> +     `(("gcc-toolchain" ,gcc-toolchain-5))) ; for freehdl
>
> What’s the reason for this?
>
> Propagated inputs should be used sparsely because they “pollute” user
> profiles.  Here we’d be forcing a big package, and a specific version of
> that, in user profiles, which is not OK.
>
> Apart from that the patch LGTM though, so if we can remove these two
> lines, we can commit.

Freehdl is a VHDL to C compiler, so for qucs and qucs-s to be able to do
VHDL simulations, there should be a gcc toolchain and libtool in the
user environment (libtool should be propagated as well, after the phase
removal from the freehdl package).

I think it *should* be OK to remove gcc-toolchain from the
propagated-inputs, if we provide the user with some kind of message,
that they should add a gcc-toolchain and libtool in their environment if
they want to do VHDL simulations.

Maybe it should be preferable to add a message along those lines in the
package descriptions of those 2 packages (qucs and qucs-s)?

WDYT?

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 13 Oct 2017 08:22:02 GMT) Full text and rfc822 format available.

Message #269 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 6/8] gnu: Add freehdl.
Date: Fri, 13 Oct 2017 10:21:47 +0200
Theodoros Foradis <theodoros <at> foradis.org> skribis:

> Ludovic Courtès writes:
>
>> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>>
>>> * gnu/packages/engineering.scm (freehdl): New variable.
>>
>> I’ve applied the patch.  \o/
>>
>> I have one question for which I couldn’t find an answer in the previous
>> discussions:
>>
>>> +         (add-after 'configure 'patch-freehdl-pc
>>> +           (lambda* (#:key inputs #:allow-other-keys)
>>> +             (substitute* "freehdl.pc"
>>> +               (("=g\\+\\+")
>>> +                (string-append "=" (assoc-ref inputs "gcc")
>>> +                               "/bin/g++"))
>>> +               (("=libtool")
>>> +                (string-append "=" (assoc-ref inputs "libtool")
>>> +                               "/bin/libtool")))
>>> +             #t))
>>
>> The effect of this is to retain a reference to GCC, Libtool, and all
>> their dependencies, which makes the closure of FreeHDL much bigger.
>>
>> We could avoid it by just putting this in ‘freehdl.pc’:
>>
>>   cxx=g++
>>   libtool=libtool
>>
>> Now, whether this will work depends on whether/how users of ‘freehdl.pc’
>> use these variables.
>>
>> Could you check whether that would work?
>
> Yes, I have tested this and it should work. Freehdl is a VHDL to C
> compiler, so the user should be responsible for having a gcc toolchain
> in his environment to run the simulations.

Just to be clear: does FreeHDL invoke the C compiler by itself, or is it
up to the user to compile the C code produced by FreeHDL?

In the former case, FreeHDL should definitely keep a reference to the C
compiler; otherwise it wouldn’t work out-of-the-box.  In the latter
case, it doesn’t have to keep a reference to the C compiler.

> We can remove this phase (patch-freehdl-pc) altogether. Shall I submit
> this patch?

I can do it on your behalf if you confirm that it’s FreeHDL does not
invoke the C compiler directly.

Thank you!

Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 13 Oct 2017 08:26:01 GMT) Full text and rfc822 format available.

Message #272 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 7/8] gnu: Add qucs.
Date: Fri, 13 Oct 2017 10:25:00 +0200
Theodoros Foradis <theodoros <at> foradis.org> skribis:

> Ludovic Courtès writes:
>
>> Hi,
>>
>> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>>
>>> * gnu/packages/engineering.scm (qucs): New variable.
>>
>> [...]
>>
>>> +    (propagated-inputs
>>> +     `(("gcc-toolchain" ,gcc-toolchain-5))) ; for freehdl
>>
>> What’s the reason for this?
>>
>> Propagated inputs should be used sparsely because they “pollute” user
>> profiles.  Here we’d be forcing a big package, and a specific version of
>> that, in user profiles, which is not OK.
>>
>> Apart from that the patch LGTM though, so if we can remove these two
>> lines, we can commit.
>
> Freehdl is a VHDL to C compiler, so for qucs and qucs-s to be able to do
> VHDL simulations, there should be a gcc toolchain and libtool in the
> user environment (libtool should be propagated as well, after the phase
> removal from the freehdl package).

So does qucs invoke the C compiler?  Or is it FreeHDL?  Or the user?

That one that invokes the C compiler should have its fine name
hard-coded.  Well, except if it’s the user.  ;-)

Hard-coding is preferable over propagation, to avoid “polluting” user
profiles.

> I think it *should* be OK to remove gcc-toolchain from the
> propagated-inputs, if we provide the user with some kind of message,
> that they should add a gcc-toolchain and libtool in their environment if
> they want to do VHDL simulations.
>
> Maybe it should be preferable to add a message along those lines in the
> package descriptions of those 2 packages (qucs and qucs-s)?

I think we shouldn’t abuse descriptions to give instructions.  It should
Just Work, as much as possible.

(Though I reckon that in some cases it would be nice to associate an
message with packages that would be displayed upon installation.)

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 14:09:01 GMT) Full text and rfc822 format available.

Message #275 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v3 6/8] gnu: Add freehdl.
Date: Fri, 27 Oct 2017 17:07:54 +0300
Hello Ludovic,

Ludovic Courtès writes:

> Just to be clear: does FreeHDL invoke the C compiler by itself, or is it
> up to the user to compile the C code produced by FreeHDL?
>
> In the former case, FreeHDL should definitely keep a reference to the C
> compiler; otherwise it wouldn’t work out-of-the-box.  In the latter
> case, it doesn’t have to keep a reference to the C compiler.

As I told you in IRC, I thought that this was the case, because
freehdl-v2cc, compiles to C.

It turns out that there is a script (gvhdl), that invokes the C compiler
on the output files, so I have created a patch to wrap with the correct
environment variables, and also fix some issues on an extra script
(freehdl-gennodes) that is written in guile.

I reply with that patch, and also updated patches for qucs and qucs-s,
so that we do not propagate gcc-toolchain.

Thanks for your patience,
-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 14:19:01 GMT) Full text and rfc822 format available.

Message #278 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: ludo <at> gnu.org, Theodoros Foradis <theodoros <at> foradis.org>
Subject: [PATCH v4 1/3] gnu: freehdl: Fix gvhdl and freehdl-gennodes scripts.
Date: Fri, 27 Oct 2017 17:18:17 +0300
* gnu/packages/engineering.scm (freehdl):
[arguments] <phases>: Add patch-gvhdl and patch-freehdl-gennodes phases.
Wrap-program "/bin/gvhdl" in make-wrapper phase.
[inputs]: Add guile-2.2.
---
 gnu/packages/engineering.scm | 41 ++++++++++++++++++++++++++++++++++++++---
 1 file changed, 38 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 9f9949ef8..3ce6879d6 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -42,6 +42,7 @@
   #:use-module (gnu packages bison)
   #:use-module (gnu packages boost)
   #:use-module (gnu packages check)
+  #:use-module (gnu packages commencement)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages flex)
@@ -1441,25 +1442,59 @@ parallel computing platforms.  It also supports serial execution.")
                 (string-append (assoc-ref inputs "coreutils")
                                "/bin/cat")))
              #t))
+         (add-after 'patch-pkg-config 'setenv
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "CXX" (string-append (assoc-ref inputs "gcc")
+                                          "/bin/g++"))
+             (setenv "SYSTEM_LIBTOOL" (string-append (assoc-ref inputs "libtool")
+                                                     "/bin/libtool"))
+             #t))
+         (add-after 'setenv 'patch-gvhdl
+           (lambda _
+             (substitute* "v2cc/gvhdl.in"
+               (("--mode=link") "--mode=link --tag=CXX")
+               (("-lm") "-lm FREEHDL/lib/freehdl/libieee.la"))
+             #t))
+         (add-after 'patch-gvhdl 'patch-freehdl-gennodes
+           (lambda _
+             (substitute* "freehdl/freehdl-gennodes.in"
+               (("guile") (which "guile"))
+               (("\\(debug") ";(debug")
+               (("\\(@ ") "(apply-emit")
+               (("\\(@@ ") "(apply-mini-format"))
+             #t))
          (add-after 'configure 'patch-freehdl-pc
            (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "freehdl.pc"
                (("=g\\+\\+")
-                (string-append "=" (assoc-ref inputs "gcc")
+                (string-append "=" (assoc-ref inputs "gcc-toolchain")
                                "/bin/g++"))
                (("=libtool")
                 (string-append "=" (assoc-ref inputs "libtool")
                                "/bin/libtool")))
              #t))
          (add-after 'install-scripts 'make-wrapper
-           (lambda* (#:key outputs #:allow-other-keys)
+           (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/gvhdl")
+                 `("CPLUS_INCLUDE_PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "gcc-toolchain")
+                                    "/include")))
+                 `("LIBRARY_PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "gcc-toolchain")
+                                    "/lib")))
+                 `("PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "gcc-toolchain")
+                                    "/bin")
+                    ,(string-append (assoc-ref inputs "coreutils")
+                                    "/bin"))))
                (wrap-program (string-append out "/bin/freehdl-config")
                  `("PKG_CONFIG_PATH" ":" prefix (,(string-append out "/lib/pkgconfig")))))
              #t)))))
     (inputs
      `(("coreutils" ,coreutils)
-       ("gcc" ,gcc)
+       ("gcc-toolchain" ,gcc-toolchain-5)
+       ("guile" ,guile-2.2)
        ("perl" ,perl)
        ("pkg-config" ,pkg-config)
        ("libtool" ,libtool)))
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 14:19:02 GMT) Full text and rfc822 format available.

Message #281 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: ludo <at> gnu.org, Theodoros Foradis <theodoros <at> foradis.org>
Subject: [PATCH v4 2/3] gnu: Add qucs.
Date: Fri, 27 Oct 2017 17:18:18 +0300
* gnu/packages/engineering.scm (qucs): New variable.
---
 gnu/packages/engineering.scm | 100 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 100 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 3ce6879d6..b77ad24c4 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -47,6 +47,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages flex)
   #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages fpga)
   #:use-module (gnu packages freedesktop)
   #:use-module (gnu packages gcc)
   #:use-module (gnu packages gd)
@@ -55,6 +56,7 @@
   #:use-module (gnu packages gl)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gnome)
+  #:use-module (gnu packages gperf)
   #:use-module (gnu packages gtk)
   #:use-module (gnu packages guile)
   #:use-module (gnu packages image)
@@ -1509,3 +1511,101 @@ parallel computing platforms.  It also supports serial execution.")
     (license (list license:gpl2+
                    license:lgpl2.0+)))) ; freehdl's libraries
 
+(define-public qucs
+  (package
+    (name "qucs")
+    (version "0.0.19")
+    (source (origin
+              (method url-fetch)
+              (uri
+               (string-append
+                "https://sourceforge.net/projects/qucs/files/qucs/" version
+                "/qucs-" version ".tar.gz"))
+              (sha256
+               (base32
+                "0giv9gfyfdizvjhq56x2pdncrlyv3k15lrsh6pk37i94vr7l7ij5"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-configure
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "qucs/configure"
+               (("\\$QTDIR") (assoc-ref inputs "qt4")))
+             #t))
+         (add-after 'patch-configure 'patch-scripts
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (substitute* '("qucs/qucs/qucsdigi"
+                            "qucs/qucs/qucsdigilib"
+                            "qucs/qucs/qucsveri")
+               (("\\$BINDIR")
+                (string-append (assoc-ref outputs "out") "/bin"))
+               (("freehdl-config")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
+               (("freehdl-v2cc")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
+               (("cp ")
+                (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
+               (("glibtool")
+                (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
+               (("sed")
+                (string-append (assoc-ref inputs "sed") "/bin/sed"))
+               (("iverilog")
+                (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
+               (("vvp")
+                (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
+             #t))
+         (add-before 'check 'pre-check
+           (lambda _
+             ;; The test suite requires a running X server.
+             (system "Xvfb :1 &")
+             (setenv "DISPLAY" ":1")
+             #t))
+         (add-after 'install 'make-wrapper
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               (wrap-program (string-append out "/bin/qucs")
+                 `("CPLUS_INCLUDE_PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "gcc-toolchain")
+                                    "/include")))
+                 `("PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "gcc-toolchain")
+                                    "/bin")))
+                 `("LIBRARY_PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "gcc-toolchain")
+                                    "/lib")))
+                 `("ADMSXMLBINDIR" ":" prefix
+                   (,(string-append (assoc-ref inputs "adms") "/bin")))
+                 `("ASCOBINDIR" ":" prefix
+                   (,(string-append (assoc-ref inputs "asco") "/bin")))
+                 `("QUCS_OCTAVE" ":" prefix
+                   (,(string-append (assoc-ref inputs "octave") "/bin/octave")))))
+             #t)))
+       #:parallel-build? #f ; race condition
+       #:configure-flags '("--disable-doc"))) ; we need octave-epstk
+    (native-inputs
+     `(("gperf" ,gperf)
+       ("libtool-native" ,libtool)
+       ("python" ,python-2) ; for tests
+       ("matplotlib" ,python2-matplotlib) ; for tests
+       ("numpy" ,python2-numpy) ; for tests
+       ("xorg-server" ,xorg-server))) ; for tests
+    (inputs
+     `(("adms" ,adms)
+       ("asco" ,asco)
+       ("coreutils" ,coreutils)
+       ("freehdl" ,freehdl)
+       ("gcc-toolchain" ,gcc-toolchain-5)
+       ("iverilog" ,iverilog)
+       ("libtool" ,libtool)
+       ("octave" ,octave)
+       ("qt4" ,qt-4)
+       ("sed" ,sed)))
+    (home-page "http://qucs.sourceforge.net/")
+    (synopsis "Circuit simulator with graphical user interface")
+    (description
+     "Qucs is a circuit simulator with graphical user interface.
+  The software aims to support all kinds of circuit simulation types,
+e.g. DC, AC, S-parameter, Transient, Noise and Harmonic Balance analysis.
+  Pure digital simulations are also supported.")
+    (license license:gpl2+)))
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 14:19:02 GMT) Full text and rfc822 format available.

Message #284 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: 27344 <at> debbugs.gnu.org
Cc: ludo <at> gnu.org, Theodoros Foradis <theodoros <at> foradis.org>
Subject: [PATCH v4 3/3] gnu: Add qucs-s.
Date: Fri, 27 Oct 2017 17:18:19 +0300
* gnu/packages/engineering.scm (qucs-s): New variable.
---
 gnu/packages/engineering.scm | 130 +++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 130 insertions(+)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b77ad24c4..221d39e6c 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1609,3 +1609,133 @@ parallel computing platforms.  It also supports serial execution.")
 e.g. DC, AC, S-parameter, Transient, Noise and Harmonic Balance analysis.
   Pure digital simulations are also supported.")
     (license license:gpl2+)))
+
+(define-public qucs-s
+  (package
+    (name "qucs-s")
+    (version "0.0.19S")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "https://github.com/ra3xdh/qucs/releases/download/"
+                                  version "/qucs-" version ".tar.gz"))
+              (sha256
+               (base32
+                "1bhahvdqmayaw0306fxz1ghmjhd4fq05yk3rk7zi0z703w5imgjv"))))
+    (build-system cmake-build-system)
+    (arguments
+     `(#:tests? #f ; no tests
+       #:phases
+       (modify-phases %standard-phases
+         (add-before 'configure 'patch-scripts
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* '("qucs/qucsdigi"
+                            "qucs/qucsdigilib"
+                            "qucs/qucsveri")
+               (("\\$BINDIR")
+                (string-append (assoc-ref inputs "qucs") "/bin"))
+               (("freehdl-config")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-config"))
+               (("freehdl-v2cc")
+                (string-append (assoc-ref inputs "freehdl") "/bin/freehdl-v2cc"))
+               (("cp ")
+                (string-append (assoc-ref inputs "coreutils") "/bin/cp "))
+               (("glibtool")
+                (string-append (assoc-ref inputs "libtool") "/bin/libtool"))
+               (("sed")
+                (string-append (assoc-ref inputs "sed") "/bin/sed"))
+               (("iverilog")
+                (string-append (assoc-ref inputs "iverilog") "/bin/iverilog"))
+               (("vvp")
+                (string-append (assoc-ref inputs "iverilog") "/bin/vvp")))
+             #t))
+         (add-after 'patch-scripts 'patch-paths
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute* "qucs/main.cpp"
+               (((string-append "QucsSettings\\.Qucsator = QucsSettings\\.BinDir "
+                                "\\+ \"qucsator\" \\+ executableSuffix"))
+                (string-append "}{ QucsSettings.Qucsator = \""
+                               (assoc-ref inputs "qucs") "/bin/qucsator\""))
+               (((string-append "else QucsSettings\\.XyceExecutable = "
+                                "\"/usr/local/Xyce-Release-6.2.0-OPENSOURCE/bin/runxyce"))
+                (string-append "QucsSettings.XyceExecutable = \""
+                               (assoc-ref inputs "xyce-serial") "/bin/Xyce"))
+               (((string-append "else QucsSettings\\.XyceParExecutable = \"/usr/local"
+                                "/Xyce-Release-6.2.0-OPENMPI-OPENSOURCE/bin/xmpirun"))
+                (string-append "QucsSettings.XyceParExecutable = \""
+                               (assoc-ref inputs "mpi") "/bin/mpirun"))
+               (("%p")
+                (string-append "%p "(assoc-ref inputs "xyce-parallel") "/bin/Xyce"))
+               (("else QucsSettings\\.NgspiceExecutable = \"ngspice\"")
+                (string-append "QucsSettings.NgspiceExecutable = " "\""
+                               (assoc-ref inputs "ngspice") "/bin/ngspice\"")))
+             (substitute* "qucs/qucs_actions.cpp"
+               (("qucstrans")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucstrans"))
+               (("qucsattenuator")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucsattenuator"))
+               (("qucsrescodes")
+                (string-append (assoc-ref inputs "qucs") "/bin/qucsrescodes")))
+             #t))
+         (add-after 'install 'install-scripts
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (for-each
+              (lambda (script)
+                (let ((file (string-append "../qucs-" ,version
+                                           "/qucs/" script))
+                      (out (assoc-ref outputs "out")))
+                  (install-file file (string-append out "/bin"))
+                  (chmod (string-append out "/bin/" script) #o555)))
+              '("qucsdigi" "qucsdigilib" "qucsveri"))
+             #t))
+         (add-after 'install-scripts 'make-wrapper
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (file (string-append out "/bin/qucs-s"))
+                    (qucs (assoc-ref inputs "qucs"))
+                    (qucsator (string-append qucs "/bin/qucsator")))
+               (wrap-program file
+                 `("CPLUS_INCLUDE_PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "gcc-toolchain")
+                                    "/include")))
+                 `("PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "gcc-toolchain")
+                                    "/bin")))
+                 `("LIBRARY_PATH" ":" prefix
+                   (,(string-append (assoc-ref inputs "gcc-toolchain")
+                                    "/lib")))
+                 `("QUCSATOR" ":" prefix (,qucsator))
+                 `("QUCSCONV" ":" prefix (,(string-append qucsator "/bin/qucsconv")))
+                 `("ADMSXMLBINDIR" ":" prefix (,(string-append (assoc-ref inputs "adms")
+                                                               "/bin")))
+                 `("ASCOBINDIR" ":" prefix (,(string-append (assoc-ref inputs "asco")
+                                                            "/bin")))
+                 `("QUCS_OCTAVE" ":" prefix (,(string-append (assoc-ref inputs "octave")
+                                                             "/bin/octave"))))
+               (symlink qucsator (string-append out "/bin/qucsator"))
+               #t))))))
+    (native-inputs
+     `(("libtool-native" ,libtool)))
+    (inputs
+     `(("adms" ,adms)
+       ("asco" ,asco)
+       ("coreutils" ,coreutils)
+       ("freehdl" ,freehdl)
+       ("gcc-toolchain" ,gcc-toolchain-5)
+       ("iverilog" ,iverilog)
+       ("libtool" ,libtool)
+       ("mpi" ,openmpi)
+       ("ngspice" ,ngspice)
+       ("octave" ,octave)
+       ("qt4" ,qt-4)
+       ("qucs" ,qucs)
+       ("sed" ,sed)
+       ("xyce-serial" ,xyce-serial)
+       ("xyce-parallel" ,xyce-parallel)))
+    (home-page "https://ra3xdh.github.io/")
+    (synopsis "Circuit simulator with graphical user interface")
+    (description
+     "Qucs-S is a spin-off of the Qucs cross-platform circuit simulator.
+  S letter indicates SPICE.  The purpose of the Qucs-S subproject is to use
+free SPICE circuit simulation kernels with the Qucs GUI.  It provides the
+simulator backends @code{Qucsator}, @code{ngspice} and @code{Xyce}.")
+    (license license:gpl2+)))
-- 
2.14.1





Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 15:20:02 GMT) Full text and rfc822 format available.

Message #287 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v4 1/3] gnu: freehdl: Fix gvhdl and freehdl-gennodes
 scripts.
Date: Fri, 27 Oct 2017 08:19:16 -0700
[Message part 1 (text/plain, inline)]
Hi Theodoros,

Theodoros Foradis <theodoros <at> foradis.org> skribis:

> * gnu/packages/engineering.scm (freehdl):
> [arguments] <phases>: Add patch-gvhdl and patch-freehdl-gennodes phases.
> Wrap-program "/bin/gvhdl" in make-wrapper phase.
> [inputs]: Add guile-2.2.

Applied with this change, which makes sure we’re referring to the right
“guile”:

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 92745852d..1d686271d 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1456,9 +1456,10 @@ parallel computing platforms.  It also supports serial execution.")
                (("-lm") "-lm FREEHDL/lib/freehdl/libieee.la"))
              #t))
          (add-after 'patch-gvhdl 'patch-freehdl-gennodes
-           (lambda _
+           (lambda* (#:key inputs #:allow-other-keys)
              (substitute* "freehdl/freehdl-gennodes.in"
-               (("guile") (which "guile"))
+               (("guile")
+                (string-append (assoc-ref inputs "guile") "/bin/guile"))
                (("\\(debug") ";(debug")
                (("\\(@ ") "(apply-emit")
                (("\\(@@ ") "(apply-mini-format"))
@@ -1476,6 +1477,8 @@ parallel computing platforms.  It also supports serial execution.")
          (add-after 'install-scripts 'make-wrapper
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
+               ;; 'gvhdl' invokes the C compiler directly, so hard-code its
+               ;; file name.
                (wrap-program (string-append out "/bin/gvhdl")
                  `("CPLUS_INCLUDE_PATH" ":" prefix
                    (,(string-append (assoc-ref inputs "gcc-toolchain")
[Message part 3 (text/plain, inline)]
> +       ("gcc-toolchain" ,gcc-toolchain-5)

Did you choose version 5 on purpose or would any version work?
In the latter case, I’d replace it with ‘gcc-toolchain’.

Thanks!

Ludo’.

Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 15:23:02 GMT) Full text and rfc822 format available.

Message #290 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v4 2/3] gnu: Add qucs.
Date: Fri, 27 Oct 2017 08:22:52 -0700
Theodoros Foradis <theodoros <at> foradis.org> skribis:

> * gnu/packages/engineering.scm (qucs): New variable.

[...]

> +               (wrap-program (string-append out "/bin/qucs")
> +                 `("CPLUS_INCLUDE_PATH" ":" prefix
> +                   (,(string-append (assoc-ref inputs "gcc-toolchain")
> +                                    "/include")))
> +                 `("PATH" ":" prefix
> +                   (,(string-append (assoc-ref inputs "gcc-toolchain")
> +                                    "/bin")))
> +                 `("LIBRARY_PATH" ":" prefix
> +                   (,(string-append (assoc-ref inputs "gcc-toolchain")
> +                                    "/lib")))

Is this still needed now that freehdl wraps things?

If not, could you send an updated patch?

Thank you,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 15:27:01 GMT) Full text and rfc822 format available.

Message #293 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v4 3/3] gnu: Add qucs-s.
Date: Fri, 27 Oct 2017 08:26:32 -0700
Theodoros Foradis <theodoros <at> foradis.org> skribis:

> * gnu/packages/engineering.scm (qucs-s): New variable.

There seems to be a lot of duplication with ‘qucs’.  Would it be
possible to inherit from qucs, thereby reusing its phases, and simply
provide any extra phase that’s needed?

This is our last patch, we’ll soon be able to claim victory!  :-)

Thank you,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 16:19:01 GMT) Full text and rfc822 format available.

Message #296 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v4 1/3] gnu: freehdl: Fix gvhdl and freehdl-gennodes
 scripts.
Date: Fri, 27 Oct 2017 19:17:42 +0300
Ludovic Courtès writes:

>
>> +       ("gcc-toolchain" ,gcc-toolchain-5)
>
> Did you choose version 5 on purpose or would any version work?
> In the latter case, I’d replace it with ‘gcc-toolchain’.

Any version would work. Using ‘gcc-toolchain’ I get the error:
ERROR: Unbound variable: gcc-toolchain

Maybe I'm missing the module in which it's defined? I chose version 5
because this is the version of gcc we currently use to build our
packages.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 16:22:02 GMT) Full text and rfc822 format available.

Message #299 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Theodoros Foradis <theodoros <at> foradis.org>, 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v4 2/3] gnu: Add qucs.
Date: Fri, 27 Oct 2017 19:20:51 +0300
Ludovic Courtès writes:

> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>
>> * gnu/packages/engineering.scm (qucs): New variable.
>
> [...]
>
>> +               (wrap-program (string-append out "/bin/qucs")
>> +                 `("CPLUS_INCLUDE_PATH" ":" prefix
>> +                   (,(string-append (assoc-ref inputs "gcc-toolchain")
>> +                                    "/include")))
>> +                 `("PATH" ":" prefix
>> +                   (,(string-append (assoc-ref inputs "gcc-toolchain")
>> +                                    "/bin")))
>> +                 `("LIBRARY_PATH" ":" prefix
>> +                   (,(string-append (assoc-ref inputs "gcc-toolchain")
>> +                                    "/lib")))
>
> Is this still needed now that freehdl wraps things?
>
> If not, could you send an updated patch?

Yes, it's needed because qucs and qucs-s don't use gvhdl (freehdl's
script that we wrap that calls the compiler).

They use freehdl-v2cc to compile to C, and have their own scripts to
compile to executable.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 16:23:01 GMT) Full text and rfc822 format available.

Message #302 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: Theodoros Foradis <theodoros <at> foradis.org>, 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v4 3/3] gnu: Add qucs-s.
Date: Fri, 27 Oct 2017 19:22:15 +0300
Ludovic Courtès writes:

> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>
>> * gnu/packages/engineering.scm (qucs-s): New variable.
>
> There seems to be a lot of duplication with ‘qucs’.  Would it be
> possible to inherit from qucs, thereby reusing its phases, and simply
> provide any extra phase that’s needed?
>
> This is our last patch, we’ll soon be able to claim victory!  :-)

I remember looking into that in the past, but for some reason decided
against it. I'll give it another go, and reply with the results.

-- 
Theodoros Foradis




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 19:39:02 GMT) Full text and rfc822 format available.

Message #305 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v4 1/3] gnu: freehdl: Fix gvhdl and freehdl-gennodes
 scripts.
Date: Fri, 27 Oct 2017 12:38:30 -0700
Theodoros Foradis <theodoros <at> foradis.org> skribis:

> Ludovic Courtès writes:
>
>>
>>> +       ("gcc-toolchain" ,gcc-toolchain-5)
>>
>> Did you choose version 5 on purpose or would any version work?
>> In the latter case, I’d replace it with ‘gcc-toolchain’.
>
> Any version would work. Using ‘gcc-toolchain’ I get the error:
> ERROR: Unbound variable: gcc-toolchain

Oh my bad, you’re right.  I fixed that now.

Thanks,
Ludo’.




Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Fri, 27 Oct 2017 19:43:01 GMT) Full text and rfc822 format available.

Message #308 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v4 2/3] gnu: Add qucs.
Date: Fri, 27 Oct 2017 12:42:36 -0700
[Message part 1 (text/plain, inline)]
Theodoros Foradis <theodoros <at> foradis.org> skribis:

> Ludovic Courtès writes:
>
>> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>>
>>> * gnu/packages/engineering.scm (qucs): New variable.
>>
>> [...]
>>
>>> +               (wrap-program (string-append out "/bin/qucs")
>>> +                 `("CPLUS_INCLUDE_PATH" ":" prefix
>>> +                   (,(string-append (assoc-ref inputs "gcc-toolchain")
>>> +                                    "/include")))
>>> +                 `("PATH" ":" prefix
>>> +                   (,(string-append (assoc-ref inputs "gcc-toolchain")
>>> +                                    "/bin")))
>>> +                 `("LIBRARY_PATH" ":" prefix
>>> +                   (,(string-append (assoc-ref inputs "gcc-toolchain")
>>> +                                    "/lib")))
>>
>> Is this still needed now that freehdl wraps things?
>>
>> If not, could you send an updated patch?
>
> Yes, it's needed because qucs and qucs-s don't use gvhdl (freehdl's
> script that we wrap that calls the compiler).
>
> They use freehdl-v2cc to compile to C, and have their own scripts to
> compile to executable.

Sounds good.  Committed with the changes below.

Thank you!

Ludo’.

[Message part 2 (text/x-patch, inline)]
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index 3ef1cdfbe..a5e152c40 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -1567,6 +1567,7 @@ parallel computing platforms.  It also supports serial execution.")
          (add-after 'install 'make-wrapper
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (let ((out (assoc-ref outputs "out")))
+               ;; 'qucs' directly invokes gcc, hence this wrapping.
                (wrap-program (string-append out "/bin/qucs")
                  `("CPLUS_INCLUDE_PATH" ":" prefix
                    (,(string-append (assoc-ref inputs "gcc-toolchain")
@@ -1598,7 +1599,7 @@ parallel computing platforms.  It also supports serial execution.")
        ("asco" ,asco)
        ("coreutils" ,coreutils)
        ("freehdl" ,freehdl)
-       ("gcc-toolchain" ,gcc-toolchain-5)
+       ("gcc-toolchain" ,gcc-toolchain)
        ("iverilog" ,iverilog)
        ("libtool" ,libtool)
        ("octave" ,octave)
@@ -1607,8 +1608,8 @@ parallel computing platforms.  It also supports serial execution.")
     (home-page "http://qucs.sourceforge.net/")
     (synopsis "Circuit simulator with graphical user interface")
     (description
-     "Qucs is a circuit simulator with graphical user interface.
-  The software aims to support all kinds of circuit simulation types,
-e.g. DC, AC, S-parameter, Transient, Noise and Harmonic Balance analysis.
-  Pure digital simulations are also supported.")
+     "Qucs is a circuit simulator with graphical user interface.  The software
+aims to support all kinds of circuit simulation types---e.g. DC, AC,
+S-parameter, transient, noise and harmonic balance analysis.  Pure digital
+simulations are also supported.")
     (license license:gpl2+)))

Information forwarded to guix-patches <at> gnu.org:
bug#27344; Package guix-patches. (Wed, 08 Nov 2017 17:43:02 GMT) Full text and rfc822 format available.

Message #311 received at 27344 <at> debbugs.gnu.org (full text, mbox):

From: Theodoros Foradis <theodoros <at> foradis.org>
To: Ludovic Courtès <ludo <at> gnu.org>
Cc: 27344 <at> debbugs.gnu.org
Subject: Re: [PATCH v4 3/3] gnu: Add qucs-s.
Date: Wed, 08 Nov 2017 19:42:12 +0200
Hello Ludovic,

Ludovic Courtès writes:

> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>
>> * gnu/packages/engineering.scm (qucs-s): New variable.
>
> There seems to be a lot of duplication with ‘qucs’.  Would it be
> possible to inherit from qucs, thereby reusing its phases, and simply
> provide any extra phase that’s needed?

Some paths are different in those two packages. For example:
Qucs:
> (substitute* '("qucs/qucs/qucsdigi"
>                "qucs/qucs/qucsdigilib"
>                "qucs/qucs/qucsveri")

> (wrap-program (string-append out "/bin/qucs")

Qucs-s:
> (substitute* '("qucs/qucsdigi"
>                "qucs/qucsdigilib"
>                "qucs/qucsveri")

> (let* ((out (assoc-ref outputs "out"))
>        (file (string-append out "/bin/qucs-s"))
>        (qucs (assoc-ref inputs "qucs"))
>        (qucsator (string-append qucs "/bin/qucsator")))
>   (wrap-program file

So qucs-s cannot inherit qucs, and this is why I dismissed that when I
looked at it in the past.

I think we could create a procedure, that takes the variables as
arguments and returns a qucs package. So that qucs-s inherits the
application of that procedure on different arguments.

Is this preferable to having two different packages with some identical
phases?

-- 
Theodoros Foradis




Reply sent to ludo <at> gnu.org (Ludovic Courtès):
You have taken responsibility. (Thu, 16 Nov 2017 09:55:01 GMT) Full text and rfc822 format available.

Notification sent to Theodoros Foradis <theodoros.for <at> openmailbox.org>:
bug acknowledged by developer. (Thu, 16 Nov 2017 09:55:02 GMT) Full text and rfc822 format available.

Message #316 received at 27344-done <at> debbugs.gnu.org (full text, mbox):

From: ludo <at> gnu.org (Ludovic Courtès)
To: Theodoros Foradis <theodoros <at> foradis.org>
Cc: 27344-done <at> debbugs.gnu.org
Subject: Re: [bug#27344] [PATCH v4 3/3] gnu: Add qucs-s.
Date: Thu, 16 Nov 2017 10:54:44 +0100
Hi Theodoros,

Theodoros Foradis <theodoros <at> foradis.org> skribis:

> Ludovic Courtès writes:
>
>> Theodoros Foradis <theodoros <at> foradis.org> skribis:
>>
>>> * gnu/packages/engineering.scm (qucs-s): New variable.
>>
>> There seems to be a lot of duplication with ‘qucs’.  Would it be
>> possible to inherit from qucs, thereby reusing its phases, and simply
>> provide any extra phase that’s needed?
>
> Some paths are different in those two packages. For example:
> Qucs:
>> (substitute* '("qucs/qucs/qucsdigi"
>>                "qucs/qucs/qucsdigilib"
>>                "qucs/qucs/qucsveri")
>
>> (wrap-program (string-append out "/bin/qucs")
>
> Qucs-s:
>> (substitute* '("qucs/qucsdigi"
>>                "qucs/qucsdigilib"
>>                "qucs/qucsveri")
>
>> (let* ((out (assoc-ref outputs "out"))
>>        (file (string-append out "/bin/qucs-s"))
>>        (qucs (assoc-ref inputs "qucs"))
>>        (qucsator (string-append qucs "/bin/qucsator")))
>>   (wrap-program file
>
> So qucs-s cannot inherit qucs, and this is why I dismissed that when I
> looked at it in the past.
>
> I think we could create a procedure, that takes the variables as
> arguments and returns a qucs package. So that qucs-s inherits the
> application of that procedure on different arguments.
>
> Is this preferable to having two different packages with some identical
> phases?

Well you’re right, there’s no great solution in this case.

Finally pushed as commit ef2c6b409568123e760a7dfa22d45fc09e713198.
We’re done!  :-)

Thank you!

Ludo’.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Dec 2017 12:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 6 years and 106 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.