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,88 +326,89 @@ utilities.")
m4 m4
pcb)) pcb))
(arguments (arguments
`(#:configure-flags (list
(let ((pcb (assoc-ref %build-inputs "pcb"))) #:configure-flags
;; When running "make", the POT files are built with the build time as #~(let ((pcb #$(this-package-input "pcb")))
;; their "POT-Creation-Date". Later on, "make" notices that .pot ;; When running "make", the POT files are built with the build time as
;; files were updated and goes on to run "msgmerge"; as a result, the ;; their "POT-Creation-Date". Later on, "make" notices that .pot
;; non-deterministic POT-Creation-Date finds its way into .po files, ;; files were updated and goes on to run "msgmerge"; as a result, the
;; and then in .gmo files. To avoid that, simply make sure 'msgmerge' ;; non-deterministic POT-Creation-Date finds its way into .po files,
;; never runs. See <https://bugs.debian.org/792687>. ;; and then in .gmo files. To avoid that, simply make sure 'msgmerge'
(list "ac_cv_path_MSGMERGE=true" ;; never runs. See <https://bugs.debian.org/792687>.
"--with-gtk3" (list "ac_cv_path_MSGMERGE=true" "--with-gtk3"
(string-append "--with-pcb-datadir=" pcb "/share") (string-append "--with-pcb-datadir=" pcb
(string-append "--with-pcb-lib-path=" "/share")
pcb "/share/pcb/pcblib-newlib:" (string-append "--with-pcb-lib-path=" pcb
pcb "/share/pcb/newlib") "/share/pcb/pcblib-newlib:"
"CFLAGS=-fcommon")) pcb "/share/pcb/newlib")
#:phases "CFLAGS=-fcommon"))
(modify-phases %standard-phases #:phases
(add-before 'build 'fix-dynamic-link #~(modify-phases %standard-phases
(lambda* (#:key inputs outputs #:allow-other-keys) (add-before 'build 'fix-dynamic-link
(substitute* "libleptongui/scheme/schematic/ffi.scm.in" (lambda* (#:key inputs outputs #:allow-other-keys)
(("@LIBLEPTONGUI@") (substitute* "libleptongui/scheme/schematic/ffi.scm.in"
(string-append (assoc-ref outputs "out") (("@LIBLEPTONGUI@")
"/lib/libleptongui.so"))) (string-append #$output "/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@")
(search-input-file inputs "/lib/libgtk-3.so"))) (search-input-file inputs "/lib/libgtk-3.so")))
(substitute* '("libleptongui/scheme/schematic/ffi/gobject.scm.in") (substitute* '("libleptongui/scheme/schematic/ffi/gobject.scm.in")
(("@LIBGOBJECT@") (("@LIBGOBJECT@")
(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") "/lib/libleptonattrib.so")))
"/lib/libleptonattrib.so"))) (substitute* "liblepton/scheme/lepton/log.scm.in"
(substitute* "liblepton/scheme/lepton/log.scm.in" (("@LIBGLIB@")
(("@LIBGLIB@") (search-input-file inputs "/lib/libglib-2.0.so")))
(search-input-file inputs "/lib/libglib-2.0.so")))
;; For finding libraries when running tests before installation. ;; For finding libraries when running tests before installation.
(setenv "LIBLEPTONGUI" (setenv "LIBLEPTONGUI"
(string-append (getcwd) (string-append (getcwd)
"/libleptongui/src/.libs/libleptongui.so")) "/libleptongui/src/.libs/libleptongui.so"))
(setenv "LIBLEPTON" (setenv "LIBLEPTON"
(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)
(chmod po #o666)) (chmod po #o666))
(find-files "." "\\.po$")) (find-files "." "\\.po$"))
;; This would normally be created by invoking 'git', but it ;; This would normally be created by invoking 'git', but it
;; doesn't work here. ;; doesn't work here.
(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
(string-index version #\-))) "#define PACKAGE_DOTTED_VERSION \"~a\"~%"
(format port "#define PACKAGE_GIT_COMMIT \"cabbag3\"~%"))) #$(string-take version
#t)) (string-index version #\-)))
(add-after 'install 'compile-scheme-files (format port
(lambda* (#:key outputs #:allow-other-keys) "#define PACKAGE_GIT_COMMIT \"cabbag3\"~%")))))
(unsetenv "LIBLEPTONGUI") (add-after 'install 'compile-scheme-files
(unsetenv "LIBLEPTON") (lambda _
(unsetenv "LD_LIBRARY_PATH") (unsetenv "LIBLEPTONGUI")
(invoke "make" "precompile") (unsetenv "LIBLEPTON")
#t))))) (unsetenv "LD_LIBRARY_PATH")
(invoke "make" "precompile"))))))
(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