guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: libsigrokdecode: Fix build with python 3.9.


From: guix-commits
Subject: branch master updated: gnu: libsigrokdecode: Fix build with python 3.9.
Date: Sat, 15 Jan 2022 17:03:39 -0500

This is an automated email from the git hooks/post-receive script.

dannym pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 40d5931a60 gnu: libsigrokdecode: Fix build with python 3.9.
40d5931a60 is described below

commit 40d5931a6081e1ec534d7c7cf7024d8432e4477a
Author: Danny Milosavljevic <dannym@scratchpost.org>
AuthorDate: Sat Jan 15 23:01:31 2022 +0100

    gnu: libsigrokdecode: Fix build with python 3.9.
    
    * gnu/packages/patches/libsigrokdecode-python3.9-fix.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Adjust accordingly.
    * gnu/packages/electronics.scm (libsigrokdecode)[native-inputs]: Add
    automake, autoconf.
    [source](patches): New field.
---
 gnu/local.mk                                          |  1 +
 gnu/packages/electronics.scm                          | 12 ++++++++++--
 .../patches/libsigrokdecode-python3.9-fix.patch       | 19 +++++++++++++++++++
 3 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 8cc87ce66e..2835329141 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1474,6 +1474,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/mcrypt-CVE-2012-4527.patch                      \
   %D%/packages/patches/libmemcached-build-with-gcc7.patch      \
   %D%/packages/patches/libmhash-hmac-fix-uaf.patch             \
+  %D%/packages/patches/libsigrokdecode-python3.9-fix.patch     \
   %D%/packages/patches/mercurial-hg-extension-path.patch       \
   %D%/packages/patches/mesa-opencl-all-targets.patch           \
   %D%/packages/patches/mesa-skip-tests.patch                   \
diff --git a/gnu/packages/electronics.scm b/gnu/packages/electronics.scm
index 3f4409764f..d7f6ca6e0b 100644
--- a/gnu/packages/electronics.scm
+++ b/gnu/packages/electronics.scm
@@ -29,6 +29,7 @@
   #:use-module (guix build-system cmake)
   #:use-module (gnu packages)
   #:use-module (gnu packages algebra)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages bash)
   #:use-module (gnu packages boost)
@@ -78,11 +79,18 @@ to take care of the OS-specific details when writing 
software that uses serial p
                     version ".tar.gz"))
               (sha256
                (base32
-                "1h1zi1kpsgf6j2z8j8hjpv1q7n49i3fhqjn8i178rka3cym18265"))))
+                "1h1zi1kpsgf6j2z8j8hjpv1q7n49i3fhqjn8i178rka3cym18265"))
+              (patches
+               (search-patches "libsigrokdecode-python3.9-fix.patch"))))
     (outputs '("out" "doc"))
     (arguments
      `(#:phases
        (modify-phases %standard-phases
+         (replace 'bootstrap
+           (lambda _
+             (invoke "autoconf")
+             (invoke "aclocal")
+             (invoke "automake" "-ac")))
          (add-after 'build 'build-doc
            (lambda _
              (invoke "doxygen")
@@ -94,7 +102,7 @@ to take care of the OS-specific details when writing 
software that uses serial p
                                               "/share/doc/libsigrokdecode"))
              #t)))))
     (native-inputs
-     (list check-0.14 doxygen graphviz pkg-config))
+     (list check-0.14 doxygen graphviz pkg-config automake autoconf))
     ;; libsigrokdecode.pc lists "python" in Requires.private, and "glib" in 
Requires.
     (propagated-inputs
      (list glib python))
diff --git a/gnu/packages/patches/libsigrokdecode-python3.9-fix.patch 
b/gnu/packages/patches/libsigrokdecode-python3.9-fix.patch
new file mode 100644
index 0000000000..4a6e1223ec
--- /dev/null
+++ b/gnu/packages/patches/libsigrokdecode-python3.9-fix.patch
@@ -0,0 +1,19 @@
+From: Dan HorĂ¡k <dan@danny.cz>
+Subject: Add support for Python 3.9
+
+Origin: upstream, 
https://sigrok.org/gitweb/?p=libsigrokdecode.git;a=commitdiff;h=9b0ad5177bd692f7556a4756bdbd2da81d9c34ce
+Bug-Debian: https://bugs.debian.org/972769
+
+diff --git a/configure.ac b/configure.ac
+index f9958b3..2917cb3 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -100,7 +100,7 @@ SR_PKG_CHECK_SUMMARY([srd_pkglibs_summary])
+ # first, since usually only that variant will add "-lpython3.8".
+ # 
https://docs.python.org/3/whatsnew/3.8.html#debug-build-uses-the-same-abi-as-release-build
+ SR_PKG_CHECK([python3], [SRD_PKGLIBS],
+-      [python-3.8-embed], [python-3.8 >= 3.8], [python-3.7 >= 3.7], 
[python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4 >= 3.4], [python-3.3 >= 
3.3], [python-3.2 >= 3.2], [python3 >= 3.2])
++      [python-3.9-embed], [python-3.8-embed], [python-3.8 >= 3.8], 
[python-3.7 >= 3.7], [python-3.6 >= 3.6], [python-3.5 >= 3.5], [python-3.4 >= 
3.4], [python-3.3 >= 3.3], [python-3.2 >= 3.2], [python3 >= 3.2])
+ AS_IF([test "x$sr_have_python3" = xno],
+       [AC_MSG_ERROR([Cannot find Python 3 development headers.])])
+ 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]