me
/
guix
Archived
1
0
Fork 0

gnu: fritzing: Improve package style.

* gnu/package/engineering.scm (fritzing): Improve package style.
  Use Gexp.
  [inputs]: Remove labels. Sort alphabetically.
  [native-inputs]: Introduce it, use fritzing-parts instead local source.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
master
Sharlatan Hellseher 2023-04-18 21:19:59 +01:00 committed by Ludovic Courtès
parent 10d9d08c9a
commit 11d0006b2a
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 46 additions and 49 deletions

View File

@ -713,28 +713,33 @@ multipole-accelerated algorithm.")
(package (package
(name "fritzing") (name "fritzing")
(version "0.9.6") (version "0.9.6")
(source (origin (source
(origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://github.com/fritzing/fritzing-app") (url "https://github.com/fritzing/fritzing-app")
(commit version))) (commit version)))
(file-name (git-file-name name version)) (file-name (git-file-name name version))
(sha256 (sha256
(base32 (base32 "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))))
"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
#~(modify-phases %standard-phases
(replace 'configure (replace 'configure
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda _
(copy-recursively (assoc-ref inputs "fritzing-parts-db") ;; Integrate parts library
(copy-recursively
(string-append #$(this-package-native-input "fritzing-parts")
"/share/library")
"parts") "parts")
;; Use system libgit2 and boost. ;; Use system libgit2 and boost.
(substitute* "phoenix.pro" (substitute* "phoenix.pro"
(("^LIBGIT_STATIC.*") (("^LIBGIT_STATIC.*")
(string-append "LIBGIT2INCLUDE=" (assoc-ref inputs "libgit2") "/include\n" (string-append
"LIBGIT2LIB=" (assoc-ref inputs "libgit2") "/lib\n" "LIBGIT2INCLUDE=" #$(this-package-input "libgit2") "/include\n"
"LIBGIT2LIB=" #$(this-package-input "libgit2") "/lib\n"
"INCLUDEPATH += $$LIBGIT2INCLUDE\n" "INCLUDEPATH += $$LIBGIT2INCLUDE\n"
"LIBS += -L$$LIBGIT2LIB -lgit2\n")) "LIBS += -L$$LIBGIT2LIB -lgit2\n"))
(("^.*pri/libgit2detect.pri.") "")) (("^.*pri/libgit2detect.pri.") ""))
@ -742,29 +747,21 @@ multipole-accelerated algorithm.")
(substitute* "src/version/partschecker.cpp" (substitute* "src/version/partschecker.cpp"
((".*git_libgit2_init.*") ((".*git_libgit2_init.*")
"return \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";")) "return \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";"))
(let ((out (assoc-ref outputs "out")))
(invoke "qmake" (invoke "qmake"
(string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib") (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," #$output "/lib")
(string-append "PREFIX=" out) (string-append "PREFIX=" #$output)
"phoenix.pro"))))))) "phoenix.pro"))))))
(native-inputs
(list fritzing-parts))
(inputs (inputs
`(("qtbase" ,qtbase-5) (list boost
("qtserialport" ,qtserialport) libgit2
("qtsvg-5" ,qtsvg-5) qtbase-5
("libgit2" ,libgit2) ;; TODO: Needs to be renamed to qtserialport-5. when version 6 is
("boost" ,boost) ;; packed.
("zlib" ,zlib) qtserialport
("fritzing-parts-db" qtsvg-5
,(origin zlib))
(method git-fetch)
(uri (git-reference
(url "https://github.com/fritzing/fritzing-parts")
(commit (string-append "release_" version))))
(file-name (git-file-name "fritzing-parts" version))
(sha256
(base32
"0wsvn57v6n0ygnhk2my94rrfzb962z1cj4d1xmp1farwck3811h6"))))))
(home-page "https://fritzing.org") (home-page "https://fritzing.org")
(synopsis "Electronic circuit design") (synopsis "Electronic circuit design")
(description (description