unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Gabriel Wicki <gabriel@erlikon.ch>
To: 59160@debbugs.gnu.org
Subject: bug#59160: Acknowledgement (Fritzing parts are missing)
Date: Thu, 10 Nov 2022 02:27:21 +0100	[thread overview]
Message-ID: <87wn83k39i.fsf@erlikon.ch> (raw)
In-Reply-To: <handler.59160.B.1668042432436.ack@debbugs.gnu.org> (GNU bug Tracking System's message of "Thu, 10 Nov 2022 01:08:02 +0000")

I've come up with the following patch.  It is not optimal (there's still
some warnings and it makes use of an ugly hack to get rid of a certain
"Unable to find parts git repository" message) but with that patch
Fritzing is in a usable state.



From e713d634d8358d1a24219634fa7e8ed3b5c5dff4 Mon Sep 17 00:00:00 2001
From: Gabriel Wicki <gabriel@erlikon.ch>
Date: Thu, 10 Nov 2022 01:53:41 +0100
Subject: [PATCH] * gnu/packages/engineering.scm (fritzing): Update to 0.9.6.

[source]: Update hash.
[arguments]: Update libgit2 hacks.
---
 gnu/packages/engineering.scm | 34 ++++++++++++++--------------------
 1 file changed, 14 insertions(+), 20 deletions(-)

diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
index b6a881d03b..dd12029b3f 100644
--- a/gnu/packages/engineering.scm
+++ b/gnu/packages/engineering.scm
@@ -669,7 +669,7 @@ (define-public fasthenry
 (define-public fritzing
   (package
     (name "fritzing")
-    (version "0.9.3b")
+    (version "0.9.6")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -678,7 +678,7 @@ (define-public fritzing
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0hpyc550xfhr6gmnc85nq60w00rm0ljm0y744dp0z88ikl04f4s3"))))
+                "083nz7vj7a334575smjry6257535h68gglh8a381xxa36dw96aqs"))))
     (build-system gnu-build-system)
     (arguments
      `(#:phases
@@ -687,24 +687,18 @@ (define-public fritzing
            (lambda* (#:key inputs outputs #:allow-other-keys)
              (copy-recursively (assoc-ref inputs "fritzing-parts-db")
                                "parts")
-             ;; Make compatible with libgit2 > 0.24
-             (substitute* "src/version/partschecker.cpp"
-               (("error = git_remote_connect\\(remote, GIT_DIRECTION_FETCH, &callbacks\\)")
-                "error = git_remote_connect(remote, GIT_DIRECTION_FETCH, &callbacks, NULL, NULL)"))
-
              ;; Use system libgit2 and boost.
              (substitute* "phoenix.pro"
-               (("^LIBGIT2INCLUDE =.*")
-                (string-append "LIBGIT2INCLUDE="
-                               (assoc-ref inputs "libgit2") "/include\n"))
-               (("^    LIBGIT2LIB =.*")
-                (string-append "    LIBGIT2LIB="
-                               (assoc-ref inputs "libgit2") "/lib\n")))
-             ;; This file checks for old versions of Boost, insisting on
-             ;; having us download the boost sources and placing them in the
-             ;; build directory.
-             (substitute* "pri/utils.pri"
-               (("error\\(") "message("))
+               (("^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"
@@ -723,11 +717,11 @@ (define-public fritzing
            (method git-fetch)
            (uri (git-reference
                  (url "https://github.com/fritzing/fritzing-parts")
-                 (commit version)))
+                 (commit (string-append "release_" version))))
            (file-name (git-file-name "fritzing-parts" version))
            (sha256
             (base32
-             "1d2v8k7p176j0lczx4vx9n9gbg3vw09n2c4b6w0wj5wqmifywhc1"))))))
+             "0wsvn57v6n0ygnhk2my94rrfzb962z1cj4d1xmp1farwck3811h6"))))))
     (home-page "https://fritzing.org")
     (synopsis "Electronic circuit design")
     (description
-- 
2.37.3





  parent reply	other threads:[~2022-11-10  1:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-10  1:06 bug#59160: Fritzing parts are missing Gabriel Wicki
     [not found] ` <handler.59160.B.1668042432436.ack@debbugs.gnu.org>
2022-11-10  1:27   ` Gabriel Wicki [this message]
2022-11-20 14:21     ` bug#59160: Acknowledgement (Fritzing parts are missing) Tobias Geerinckx-Rice via Bug reports for GNU Guix
     [not found]       ` <87y1s3an08.fsf@erlikon.ch>
2022-12-02 11:20         ` Gabriel Wicki

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87wn83k39i.fsf@erlikon.ch \
    --to=gabriel@erlikon.ch \
    --cc=59160@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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).