From patchwork Tue Sep 13 21:11:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Garek Dyszel X-Patchwork-Id: 42607 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 4F22A27BBEA; Tue, 13 Sep 2022 22:12:12 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id B5C9927BBE9 for ; Tue, 13 Sep 2022 22:12:11 +0100 (BST) Received: from localhost ([::1]:59692 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oYDCU-0000TH-U9 for patchwork@mira.cbaines.net; Tue, 13 Sep 2022 17:12:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55940) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oYDCN-0000SX-Ow for guix-patches@gnu.org; Tue, 13 Sep 2022 17:12:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36083) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oYDCN-0008Up-Gr for guix-patches@gnu.org; Tue, 13 Sep 2022 17:12:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oYDCM-0002rM-95 for guix-patches@gnu.org; Tue, 13 Sep 2022 17:12:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#57774] [PATCH v2] Add qucs-s. References: <875yhrgtrb.fsf@disroot.org> In-Reply-To: <875yhrgtrb.fsf@disroot.org> Resent-From: Garek Dyszel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Sep 2022 21:12:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 57774 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 57774@debbugs.gnu.org Received: via spool by 57774-submit@debbugs.gnu.org id=B57774.166310351610979 (code B ref 57774); Tue, 13 Sep 2022 21:12:02 +0000 Received: (at 57774) by debbugs.gnu.org; 13 Sep 2022 21:11:56 +0000 Received: from localhost ([127.0.0.1]:53015 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYDCG-0002r1-0t for submit@debbugs.gnu.org; Tue, 13 Sep 2022 17:11:56 -0400 Received: from knopi.disroot.org ([178.21.23.139]:39130) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oYDCD-0002qq-Mf for 57774@debbugs.gnu.org; Tue, 13 Sep 2022 17:11:54 -0400 Received: from localhost (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id DD3A741A85; Tue, 13 Sep 2022 23:11:51 +0200 (CEST) X-Virus-Scanned: SPAM Filter at disroot.org Received: from knopi.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavisd-new, port 10024) with UTF8SMTP id 3H7DD9eWxdHX; Tue, 13 Sep 2022 23:11:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1663103509; bh=K8NmuEdO/MCNrj9SylCnyO0qv5vwZDhIJUhvIXZQJNo=; h=From:To:Cc:Subject:Date; b=BE/l9F2loKTSEY5bSPMPmwf2BtrH1wstlB2j38WRt0EyaWdMowNxpCo9+XZeRzcF4 ODBJACWR5muNEeu0wiQSqJ/mG1id2/IHQi7vDO87pp1a21hzWgUAl/wRLsz8dAad7X yJGr7+4WJ+RHeLoQUYLdL+3/ZJgApivUHmEfeTsUyvjTKhmsxn1tRP20RZdwya45Pe QkKu4tqGqgbRSum8HIzzoqWJWGKuj+jm+ntxj6Vw+Tt6EiiyF7yDknFs/mHj0AMJsJ BiZ2+wNiz/d+IPHQ5cPpQ+BqP+T1iLGvtt0s0gXtAWacO33K7B08Dp3P+x5eYhFL6/ OLB2AOZ0LEqrA== Date: Tue, 13 Sep 2022 21:11:40 +0000 Message-ID: <87fsgvm12r.fsf@disroot.org> Mime-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" Reply-to: Garek Dyszel X-ACL-Warn: , Garek Dyszel via Guix-patches X-Patchwork-Original-From: Garek Dyszel via Guix-patches via From: Garek Dyszel X-getmail-retrieved-from-mailbox: Patches ( and Artyom, I synthesized my last version of this package with Artyom's version in https://debbugs.gnu.org/cgi/bugreport.cgi?bug=56768. Starting over from that version, more or less, automatically fixed the following issues: 1. (outputs '("out")) removed 2. (propagated-inputs (list ngspice)) removed 3. (arguments `( --> (arguments (list : style changed Further changes: 1. Overly long description shortened by blending ('s suggestion and Artyom's version. 2. Regexps in the (substitute*) procedure now correctly detect and replace the lines where ngspice and octave are referenced in qucs/main.cpp. Let me know what you think. Thanks, Garek * gnu/packages/engineering.scm (qucs-s): New variable. --- gnu/packages/engineering.scm | 60 ++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm index a8b9f1e786..e759134ae4 100644 --- a/gnu/packages/engineering.scm +++ b/gnu/packages/engineering.scm @@ -36,6 +36,7 @@ ;;; Copyright © 2022 Artyom V. Poptsov ;;; Copyright © 2022 Maxim Cournoyer ;;; Copyright © 2022 Felix Gruber +;;; Copyright © 2022 Garek Dyszel ;;; ;;; This file is part of GNU Guix. ;;; @@ -2006,6 +2007,65 @@ (define-public xyce-parallel ,@(alist-delete "trilinos" (package-inputs xyce-serial)))))) +(define-public qucs-s + (package + (name "qucs-s") + (version "0.0.24") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/ra3xdh/qucs_s") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1lbkaw0grw9w7d37z5dbhaqi8p57cpf9yp071zp6xrairkgimdx8")))) + (build-system qt-build-system) + (native-inputs (list qttools-5)) + (inputs (list qtbase-5 qtscript qtsvg-5 ngspice octave)) + (arguments + (list #:tests? #f ;no tests + #:phases #~(modify-phases %standard-phases + (add-after 'unpack 'patch + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "qucs/main.cpp" + ;; Use the user's configuration files in + ;; ~/.config/qucs/qucs_s.conf for the + ;; locations of ngspice and octave. If + ;; the locations are not given in + ;; ~/.config/qucs/qucs_s.conf, use the + ;; locations provided by Guix. + (("QString ngsp_exe = \ +QCoreApplication::applicationDirPath\\(\\) \\+") + (string-append + "QString ngsp_exe = \"" + (search-input-file inputs "/bin/ngspice") + "\";")) + (("QDir::separator\\(\\) \\+ \"ngspice\" \\+ \ +executableSuffix;") "") + (("else QucsSettings.OctaveExecutable = \"octave\" \ +\\+ QString\\(executableSuffix\\);") + (string-append + "else QucsSettings.OctaveExecutable = \"" + (search-input-file inputs "/bin/octave") + "\";")))))))) + (synopsis "GUI for different circuit simulation kernels") + (description + "@code{Qucs-S} provides a fork of the Qucs circuit simulator, +which is used as a graphical user interface for a number of popular +circuit simulation engines. The package contains libraries for +schematic capture, visualization and components. The following +simulation kernels are supported: + +@itemize +@item Ngspice (recommended) +@item Xyce +@item SpiceOpus +@item Qucsator (non-spice) +@end itemize") + (home-page "https://ra3xdh.github.io/") + (license license:gpl2+))) + (define-public freehdl (package (name "freehdl")