From: Sharlatan Hellseher <sharlatanus@gmail.com>
To: 62941@debbugs.gnu.org
Cc: Sharlatan Hellseher <sharlatanus@gmail.com>
Subject: [bug#62941] [PATCH 2/3] gnu: fritzing: Improve package style.
Date: Tue, 18 Apr 2023 21:19:59 +0100 [thread overview]
Message-ID: <20230418202000.11729-2-sharlatanus@gmail.com> (raw)
In-Reply-To: <20230418202000.11729-1-sharlatanus@gmail.com>
* 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.
---
gnu/packages/engineering.scm | 95 +++++++++++++++++-------------------
1 file changed, 46 insertions(+), 49 deletions(-)
diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index dd8a711566..67e72b58a3 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -711,58 +711,55 @@ (define-public fritzing
(package
(name "fritzing")
(version "0.9.6")
- (source (origin
- (method git-fetch)
- (uri (git-reference
- (url "https://github.com/fritzing/fritzing-app")
- (commit version)))
- (file-name (git-file-name name version))
- (sha256
- (base32
- "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))))
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/fritzing/fritzing-app")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (replace 'configure
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (copy-recursively (assoc-ref inputs "fritzing-parts-db")
- "parts")
- ;; Use system libgit2 and boost.
- (substitute* "phoenix.pro"
- (("^LIBGIT_STATIC.*")
- (string-append "LIBGIT2INCLUDE=" (assoc-ref inputs "libgit2") "/include\n"
- "LIBGIT2LIB=" (assoc-ref inputs "libgit2") "/lib\n"
- "INCLUDEPATH += $$LIBGIT2INCLUDE\n"
- "LIBS += -L$$LIBGIT2LIB -lgit2\n"))
- (("^.*pri/libgit2detect.pri.") ""))
- ;; Trick the internal mechanism to load the parts
- (substitute* "src/version/partschecker.cpp"
- ((".*git_libgit2_init.*")
- "return \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";"))
-
- (let ((out (assoc-ref outputs "out")))
- (invoke "qmake"
- (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," out "/lib")
- (string-append "PREFIX=" out)
- "phoenix.pro")))))))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'configure
+ (lambda _
+ ;; Integrate parts library
+ (copy-recursively
+ (string-append #$(this-package-native-input "fritzing-parts")
+ "/share/library")
+ "parts")
+ ;; Use system libgit2 and boost.
+ (substitute* "phoenix.pro"
+ (("^LIBGIT_STATIC.*")
+ (string-append
+ "LIBGIT2INCLUDE=" #$(this-package-input "libgit2") "/include\n"
+ "LIBGIT2LIB=" #$(this-package-input "libgit2") "/lib\n"
+ "INCLUDEPATH += $$LIBGIT2INCLUDE\n"
+ "LIBS += -L$$LIBGIT2LIB -lgit2\n"))
+ (("^.*pri/libgit2detect.pri.") ""))
+ ;; Trick the internal mechanism to load the parts
+ (substitute* "src/version/partschecker.cpp"
+ ((".*git_libgit2_init.*")
+ "return \"083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs\";"))
+ (invoke "qmake"
+ (string-append "QMAKE_LFLAGS_RPATH=-Wl,-rpath," #$output "/lib")
+ (string-append "PREFIX=" #$output)
+ "phoenix.pro"))))))
+ (native-inputs
+ (list fritzing-parts))
(inputs
- `(("qtbase" ,qtbase-5)
- ("qtserialport" ,qtserialport)
- ("qtsvg-5" ,qtsvg-5)
- ("libgit2" ,libgit2)
- ("boost" ,boost)
- ("zlib" ,zlib)
- ("fritzing-parts-db"
- ,(origin
- (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"))))))
+ (list boost
+ libgit2
+ qtbase-5
+ ;; TODO: Needs to be renamed to qtserialport-5. when version 6 is
+ ;; packed.
+ qtserialport
+ qtsvg-5
+ zlib))
(home-page "https://fritzing.org")
(synopsis "Electronic circuit design")
(description
--
2.39.2
next prev parent reply other threads:[~2023-04-18 20:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-18 20:09 [bug#62941] [PATCH 0/3] gnu: fritzing: Improve package style Sharlatan Hellseher
2023-04-18 20:19 ` [bug#62941] [PATCH 1/3] gnu: Add fritzing-parts Sharlatan Hellseher
2023-04-18 20:19 ` Sharlatan Hellseher [this message]
2023-04-18 20:20 ` [bug#62941] [PATCH 3/3] gnu: Sort use-module alphabetically in (gnu packages engineering) Sharlatan Hellseher
2023-08-10 22:46 ` bug#62941: [PATCH 0/3] gnu: fritzing: Improve package style Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230418202000.11729-2-sharlatanus@gmail.com \
--to=sharlatanus@gmail.com \
--cc=62941@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.