GNU bug report logs - #73570
[PATCH] gnu: ngspice: Preserve libngspice inputs.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Richard Sent <richard@HIDDEN>; Keywords: patch; dated Mon, 30 Sep 2024 19:41:01 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 30 Sep 2024 19:40:22 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Sep 30 15:40:22 2024
Received: from localhost ([127.0.0.1]:46571 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1svMFp-0003fV-F2
	for submit <at> debbugs.gnu.org; Mon, 30 Sep 2024 15:40:22 -0400
Received: from lists.gnu.org ([209.51.188.17]:44134)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <richard@HIDDEN>) id 1svMFn-0003fP-1W
 for submit <at> debbugs.gnu.org; Mon, 30 Sep 2024 15:40:19 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <richard@HIDDEN>)
 id 1svMFF-0006UB-Ml
 for guix-patches@HIDDEN; Mon, 30 Sep 2024 15:39:45 -0400
Received: from mail-108-mta74.mxroute.com ([136.175.108.74])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.90_1) (envelope-from <richard@HIDDEN>)
 id 1svMFE-0001l7-3V
 for guix-patches@HIDDEN; Mon, 30 Sep 2024 15:39:45 -0400
Received: from filter006.mxroute.com ([136.175.111.3] filter006.mxroute.com)
 (Authenticated sender: mN4UYu2MZsgR)
 by mail-108-mta74.mxroute.com (ZoneMTA) with ESMTPSA id 19244720c770003e01.001
 for <guix-patches@HIDDEN>
 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384);
 Mon, 30 Sep 2024 19:39:37 +0000
X-Zone-Loop: dd5fb042d9d2d391e967b597631d6e9ced9c6ca7c663
X-Originating-IP: [136.175.111.3]
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;
 d=freakingpenguin.com; s=x; h=Content-Transfer-Encoding:Content-Type:
 MIME-Version:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:
 Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc
 :Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:
 List-Subscribe:List-Post:List-Owner:List-Archive;
 bh=1jo6+WF4bBGcbjmOBxVCfKIXyzA8vHW82dklTfIBMW4=; b=UNg8Ec+0RbS86lsBMohOJHKUuH
 SDUjUwGOFvQTriBijfIXaapjE3+JQFr1Cyt+bGh2lsH1vN3r+LUiC81L6dyTPyLXi5hKJL5DXzuUV
 abed3QtxzeIPhcpPEjmNGUn/B4CflBimq1ZtZbee/gnzgyKSMKLKqYKblJO8dmsJMvnc4cmHupVOP
 UihqC/SMqcuVnbvG5SEg81km+SxHLg05zm3a7V7FWiaRsLcmLGs/MStFL9JUIl2W99DvMcaC5TmbL
 jJHkF6bw2PJ/S0lQJWvtUOVZJg0RNmYEEqXGoFhep4pjgZAtzn+/kgu3KJ1HsdmhhHIHm+HY3HIzi
 Y5YEtdVQ==;
From: Richard Sent <richard@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: ngspice: Preserve libngspice inputs.
Date: Mon, 30 Sep 2024 15:38:57 -0400
Message-ID: <51aa2d68e01d38caf5fe7652c6c4a6a204beab19.1727725137.git.richard@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Authenticated-Id: richard@HIDDEN
Received-SPF: pass client-ip=136.175.108.74;
 envelope-from=richard@HIDDEN; helo=mail-108-mta74.mxroute.com
X-Spam_score_int: -16
X-Spam_score: -1.7
X-Spam_bar: -
X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1,
 DKIM_SIGNED=0.1, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001,
 RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=no autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.9 (/)
X-Debbugs-Envelope-To: submit
Cc: Richard Sent <richard@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.1 (/)

If inputs are lost between libngspice and ngspice, the configure script will
emit warnings (e.g. bison) or disable functionality (libxaw and X11) in the
executable.

* gnu/packages/engineering.scm (ngspice): Modify libngspice inputs instead of
replacing them.

Change-Id: Ia66fcffba3032b0a37289c60ced12c98b705b548
---
Hi all,

This fixes an issue where functionality in ngspice that should be
enabled would be disabled, most notably X11 support.

To test this, you can use this file:

> .title dual rc ladder
> * file name rcrcac.cir
> R1 int in 10k
> V1 in 0 dc 0 ac 1 PULSE (0 5 1u 1u 1u 1 1)
> R2 out int 1k
> C1 int 0 1u
> C2 out 0 100n
> 
> .control
> ac dec 10 1 100k
> # "Interactive" X11 output.
> plot vdb(out)
> plot ph(out)
> .endc
> 
> .end

Without this patch, "$ guix shell ngspice -- ngspice file.cir" fails
to display graphs, printing "Can't open viewport for graphics."

This also fixes a couple warnings logged during the configure phase,
e.g. bison not found.

 gnu/packages/engineering.scm | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index db35c2532c..e046b6de07 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -41,6 +41,7 @@
 ;;; Copyright © 2023 pinoaffe <pinoaffe@HIDDEN>
 ;;; Copyright © 2024 Juliana Sims <juli@HIDDEN>
 ;;; Copyright © 2024 Nguyễn Gia Phong <mcsinyx@HIDDEN>
+;;; Copyright © 2024 Richard Sent <richard@HIDDEN>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -2095,8 +2096,14 @@ (define-public ngspice
        ((#:phases phases)
         #~(modify-phases #$phases
             (delete 'delete-scripts)))))
-    (native-inputs (list perl))
-    (inputs (list libngspice readline))))
+    (native-inputs (modify-inputs (package-native-inputs libngspice)
+                     (prepend perl)))
+    (inputs (modify-inputs (package-inputs libngspice)
+              ;; Make sure libngspice inputs are preserved. The configure
+              ;; script will complain and potentially disable functionality if
+              ;; inputs are not found when the executable and library are
+              ;; built in separate steps. e.g. libxaw and X11 support.
+              (prepend libngspice readline)))))
 
 (define trilinos-serial-xyce
   ;; Note: This is a Trilinos containing only the packages Xyce needs, so we

base-commit: ee64bcfb796ef36db4b63f79540627fb25f3320a
-- 
2.46.0





Acknowledgement sent to Richard Sent <richard@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#73570; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Sun, 12 Jan 2025 05:45:02 UTC

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