Archived
1
0
Fork 0

gnu: lepton-eda: Use gexp for arguments.

* gnu/packages/engineering.scm (lepton-eda)[arguments]: Use gexp.
This commit is contained in:
Ricardo Wurmus 2023-03-12 21:22:01 +01:00
parent 1c5ef6bd3c
commit 753fb6a54d
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -326,29 +326,29 @@ utilities.")
m4 m4
pcb)) pcb))
(arguments (arguments
`(#:configure-flags (list
(let ((pcb (assoc-ref %build-inputs "pcb"))) #:configure-flags
#~(let ((pcb #$(this-package-input "pcb")))
;; When running "make", the POT files are built with the build time as ;; When running "make", the POT files are built with the build time as
;; their "POT-Creation-Date". Later on, "make" notices that .pot ;; their "POT-Creation-Date". Later on, "make" notices that .pot
;; files were updated and goes on to run "msgmerge"; as a result, the ;; files were updated and goes on to run "msgmerge"; as a result, the
;; non-deterministic POT-Creation-Date finds its way into .po files, ;; non-deterministic POT-Creation-Date finds its way into .po files,
;; and then in .gmo files. To avoid that, simply make sure 'msgmerge' ;; and then in .gmo files. To avoid that, simply make sure 'msgmerge'
;; never runs. See <https://bugs.debian.org/792687>. ;; never runs. See <https://bugs.debian.org/792687>.
(list "ac_cv_path_MSGMERGE=true" (list "ac_cv_path_MSGMERGE=true" "--with-gtk3"
"--with-gtk3" (string-append "--with-pcb-datadir=" pcb
(string-append "--with-pcb-datadir=" pcb "/share") "/share")
(string-append "--with-pcb-lib-path=" (string-append "--with-pcb-lib-path=" pcb
pcb "/share/pcb/pcblib-newlib:" "/share/pcb/pcblib-newlib:"
pcb "/share/pcb/newlib") pcb "/share/pcb/newlib")
"CFLAGS=-fcommon")) "CFLAGS=-fcommon"))
#:phases #:phases
(modify-phases %standard-phases #~(modify-phases %standard-phases
(add-before 'build 'fix-dynamic-link (add-before 'build 'fix-dynamic-link
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(substitute* "libleptongui/scheme/schematic/ffi.scm.in" (substitute* "libleptongui/scheme/schematic/ffi.scm.in"
(("@LIBLEPTONGUI@") (("@LIBLEPTONGUI@")
(string-append (assoc-ref outputs "out") (string-append #$output "/lib/libleptongui.so")))
"/lib/libleptongui.so")))
(substitute* '("libleptongui/scheme/schematic/ffi/gtk.scm.in" (substitute* '("libleptongui/scheme/schematic/ffi/gtk.scm.in"
"utils/attrib/lepton-attrib.scm") "utils/attrib/lepton-attrib.scm")
(("@LIBGTK@") (("@LIBGTK@")
@ -358,8 +358,7 @@ utilities.")
(search-input-file inputs "/lib/libgobject-2.0.so"))) (search-input-file inputs "/lib/libgobject-2.0.so")))
(substitute* "liblepton/scheme/lepton/ffi.scm.in" (substitute* "liblepton/scheme/lepton/ffi.scm.in"
(("@LIBLEPTON@") (("@LIBLEPTON@")
(string-append (assoc-ref outputs "out") (string-append #$output "/lib/liblepton.so")))
"/lib/liblepton.so")))
(substitute* "utils/attrib/lepton-attrib.scm" (substitute* "utils/attrib/lepton-attrib.scm"
(("@LIBLEPTONATTRIB@") (("@LIBLEPTONATTRIB@")
(string-append (assoc-ref outputs "out") (string-append (assoc-ref outputs "out")
@ -376,13 +375,14 @@ utilities.")
(string-append (getcwd) (string-append (getcwd)
"/libleptongui/src/.libs/liblepton.so")) "/libleptongui/src/.libs/liblepton.so"))
(setenv "LD_LIBRARY_PATH" (setenv "LD_LIBRARY_PATH"
(string-append (getcwd) "/libleptonattrib/src/.libs/:" (string-append (getcwd)
(getenv "LIBRARY_PATH"))) "/libleptonattrib/src/.libs/:"
#t)) (getenv "LIBRARY_PATH")))))
(add-before 'bootstrap 'prepare (add-before 'bootstrap 'prepare
(lambda _ (lambda _
;; Some of the scripts there are invoked by autogen.sh. ;; Some of the scripts there are invoked by autogen.sh.
(for-each patch-shebang (find-files "build-tools")) (for-each patch-shebang
(find-files "build-tools"))
;; Make sure 'msgmerge' can modify the PO files. ;; Make sure 'msgmerge' can modify the PO files.
(for-each (lambda (po) (for-each (lambda (po)
@ -394,20 +394,21 @@ utilities.")
(call-with-output-file "version.h" (call-with-output-file "version.h"
(lambda (port) (lambda (port)
(format port "#define PACKAGE_DATE_VERSION \"~a\"~%" (format port "#define PACKAGE_DATE_VERSION \"~a\"~%"
,(string-drop version #$(string-drop version
(+ 1 (string-index version #\-)))) (+ 1
(format port "#define PACKAGE_DOTTED_VERSION \"~a\"~%" (string-index version #\-))))
,(string-take version (format port
"#define PACKAGE_DOTTED_VERSION \"~a\"~%"
#$(string-take version
(string-index version #\-))) (string-index version #\-)))
(format port "#define PACKAGE_GIT_COMMIT \"cabbag3\"~%"))) (format port
#t)) "#define PACKAGE_GIT_COMMIT \"cabbag3\"~%")))))
(add-after 'install 'compile-scheme-files (add-after 'install 'compile-scheme-files
(lambda* (#:key outputs #:allow-other-keys) (lambda _
(unsetenv "LIBLEPTONGUI") (unsetenv "LIBLEPTONGUI")
(unsetenv "LIBLEPTON") (unsetenv "LIBLEPTON")
(unsetenv "LD_LIBRARY_PATH") (unsetenv "LD_LIBRARY_PATH")
(invoke "make" "precompile") (invoke "make" "precompile"))))))
#t)))))
(description (description
"Lepton EDA ia an @dfn{electronic design automation} (EDA) tool set "Lepton EDA ia an @dfn{electronic design automation} (EDA) tool set
forked from gEDA/gaf in late 2016. EDA tools are used for electrical circuit forked from gEDA/gaf in late 2016. EDA tools are used for electrical circuit