From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36524) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dKScO-00026h-FO for guix-patches@gnu.org; Mon, 12 Jun 2017 12:55:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dKScN-000148-Bk for guix-patches@gnu.org; Mon, 12 Jun 2017 12:55:08 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:41221) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dKScN-000137-89 for guix-patches@gnu.org; Mon, 12 Jun 2017 12:55:07 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dKScN-00042O-2K for guix-patches@gnu.org; Mon, 12 Jun 2017 12:55:07 -0400 Subject: [bug#27344] [PATCH 11/12] gnu: Add qucs. Resent-Message-ID: From: Theodoros Foradis Date: Mon, 12 Jun 2017 19:52:25 +0300 Message-Id: <20170612165226.1268-11-theodoros.for@openmailbox.org> In-Reply-To: <20170612165226.1268-1-theodoros.for@openmailbox.org> References: <20170612165226.1268-1-theodoros.for@openmailbox.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 27344@debbugs.gnu.org * 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