all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [bug#35162] [PATCH] gnu: Add gnucap.
@ 2019-04-05 17:29 Arun Isaac
  2019-04-06 10:24 ` Danny Milosavljevic
  0 siblings, 1 reply; 3+ messages in thread
From: Arun Isaac @ 2019-04-05 17:29 UTC (permalink / raw)
  To: 35162

* gnu/packages/engineering.scm (gnucap): New variable.
---
 gnu/packages/engineering.scm | 56 +++++++++++++++++++++++++++++++++++-
 1 file changed, 55 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index a90ceab0d2..cf308e03f6 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -9,7 +9,7 @@
 ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2018, 2019 Jonathan Brielmaier <jonathan.brielmaier@web.de>
-;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
+;;; Copyright © 2018, 2019 Arun Isaac <arunisaac@systemreboot.net>
 ;;; Copyright © 2019 Tim Stahel <swedneck@swedneck.xyz>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -2008,3 +2008,57 @@ editors.")
 slicing software to x3g files for standalone 3D printing on common 3D
 printers.")
     (license license:gpl2+)))
+
+(define-public gnucap
+  (package
+    (name "gnucap")
+    (version "20171003")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://git.savannah.gnu.org/cgit/gnucap.git/snapshot/gnucap-"
+                           version ".tar.gz"))
+       (sha256
+        (base32
+         "16m09xa685qhj5fqq3bcgakrwnb74xhf5f7rpqkkf9fg8plzbb1g"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("readline" ,readline)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'configure
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out")))
+               ;; Set correct rpath so that gnucap finds libgnucap.so.
+               (substitute* (list "apps/configure" "lib/configure"
+                                  "main/configure" "modelgen/configure")
+                 (("LDFLAGS =")
+                  (string-append "LDFLAGS = -Wl,-rpath=" out "/lib")))
+               ;; gnucap uses a hand-written configure script that expects the
+               ;; --prefix argument to be the first argument passed to it.
+               (invoke "./configure" (string-append "--prefix=" out)))))
+         (replace 'check
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((out (assoc-ref outputs "out"))
+                   (libpath "../lib/O:../apps/O"))
+               (with-directory-excursion "tests"
+                 ;; Make test return non-zero exit code when a test fails.
+                 (substitute* "test"
+                   (("/bin/sh") "/bin/sh -e")
+                   (("\\|\\| echo \"\\*\\*\\*\\* \\$ii fails \\*\\*\\*\\*\"") ""))
+                 ;; Fix expected plugin search path for test c_attach.1.gc
+                 (substitute* "==out/c_attach.1.gc.out"
+                   (("/usr/local/lib/gnucap")
+                    (string-append libpath ":" out "/lib/gnucap")))
+                 ;; Set library path so that gnucap can find libgnucap.so
+                 ;; while running the tests.
+                 (setenv "LD_LIBRARY_PATH" libpath)
+                 (invoke "./test" "../main/O/gnucap" "" "test-output" "==out"))))))))
+    (home-page "https://www.gnu.org/software/gnucap/")
+    (synopsis "Mixed analog and digital circuit simulator")
+    (description "GNUcap is a circuit analysis package.  It offers a general
+purpose circuit simulator and can perform DC and transient analyses, fourier
+analysis and AC analysis.  The engine is designed to do true mixed-mode
+simulation.")
+    (license license:gpl3+)))
-- 
2.21.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [bug#35162] [PATCH] gnu: Add gnucap.
  2019-04-05 17:29 [bug#35162] [PATCH] gnu: Add gnucap Arun Isaac
@ 2019-04-06 10:24 ` Danny Milosavljevic
  2019-04-09  7:56   ` bug#35162: " Arun Isaac
  0 siblings, 1 reply; 3+ messages in thread
From: Danny Milosavljevic @ 2019-04-06 10:24 UTC (permalink / raw)
  To: Arun Isaac; +Cc: 35162

[-- Attachment #1: Type: text/plain, Size: 7 bytes --]

LGTM!

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#35162: [PATCH] gnu: Add gnucap.
  2019-04-06 10:24 ` Danny Milosavljevic
@ 2019-04-09  7:56   ` Arun Isaac
  0 siblings, 0 replies; 3+ messages in thread
From: Arun Isaac @ 2019-04-09  7:56 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: 35162-done

[-- Attachment #1: Type: text/plain, Size: 32 bytes --]


Pushed, thanks for the review!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-04-09  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-04-05 17:29 [bug#35162] [PATCH] gnu: Add gnucap Arun Isaac
2019-04-06 10:24 ` Danny Milosavljevic
2019-04-09  7:56   ` bug#35162: " Arun Isaac

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.