all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Simon South <simon@simonsouth.net>
To: 65807@debbugs.gnu.org
Subject: [bug#65807] [PATCH v2 8/9] gnu: libftdi: Update to 1.5.
Date: Thu,  7 Sep 2023 12:37:57 -0400	[thread overview]
Message-ID: <3c421142b509727b270471e8435819708945d75b.1694104141.git.simon@simonsouth.net> (raw)
In-Reply-To: <cover.1694104141.git.simon@simonsouth.net>

* gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/libftdi.scm (libftdi): Update to 1.5.
[source]: Apply patch.
[arguments]<#:configure-flags>: Add "-DFTDIPP", "-DPYTHON_BINDINGS".
---
 gnu/local.mk                                  |  1 +
 gnu/packages/libftdi.scm                      | 10 +++--
 .../libftdi-fix-paths-when-FTDIPP-set.patch   | 39 +++++++++++++++++++
 3 files changed, 47 insertions(+), 3 deletions(-)
 create mode 100644 gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 54aec9316a..1f1f9450ab 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1445,6 +1445,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/json-c-0.12-CVE-2020-12762.patch		\
   %D%/packages/patches/julia-SOURCE_DATE_EPOCH-mtime.patch	\
   %D%/packages/patches/julia-Use-MPFR-4.2.patch	                \
+  %D%/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch	\
   %D%/packages/patches/libgeotiff-fix-tests-with-proj-9.1.1.patch	\
   %D%/packages/patches/libobjc2-unbundle-robin-map.patch	\
   %D%/packages/patches/librime-fix-build-with-gcc10.patch	\
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index 773b0ec73e..bdfc635379 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -37,7 +37,7 @@ (define-module (gnu packages libftdi)
 (define-public libftdi
   (package
     (name "libftdi")
-    (version "1.4")
+    (version "1.5")
     (source (origin
               (method url-fetch)
               (uri (string-append
@@ -45,7 +45,9 @@ (define-public libftdi
                     "libftdi1-" version ".tar.bz2"))
               (sha256
                (base32
-                "0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc"))))
+                "0jdh5r499wbz83vmpskczq5m3cfc1mcv8xqisj5i95k1r3lr2w3w"))
+              (patches
+               (search-patches "libftdi-fix-paths-when-FTDIPP-set.patch"))))
     (build-system cmake-build-system)
     (outputs '("out" "python"))
     (arguments
@@ -54,7 +56,9 @@ (define-public libftdi
       #~(list (string-append "-DCMAKE_INSTALL_DOCDIR="
                              #$output "/share/doc/" #$name "-" #$version)
               "-DEXAMPLES=OFF"
-              "-DLIB_SUFFIX=''")        ; place libraries in /lib, not /lib64
+              "-DFTDIPP=ON"
+              "-DLIB_SUFFIX=''"         ; place libraries in /lib, not /lib64
+              "-DPYTHON_BINDINGS=ON")
       #:phases
       #~(modify-phases %standard-phases
           (add-after 'install 'install-python-binding
diff --git a/gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch b/gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch
new file mode 100644
index 0000000000..0a81cceb26
--- /dev/null
+++ b/gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch
@@ -0,0 +1,39 @@
+commit cdb28383402d248dbc6062f4391b038375c52385
+Author: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date:   Fri Jul 17 21:25:03 2020 +0200
+
+    CMakeLists.txt: fix paths when FTDIPP is set
+    
+    Use the same project name (i.e. libftdi1 and not libftdipp1) when FTDIPP
+    is enabled as suggested by Aurelien Jarno in
+    http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00044.html
+    
+    Without this change, the libftdi1.pc config file defines the include
+    path as /usr/local/include/libftdipp1 while the ftdi.h file is actually
+    installed in /usr/local/include/libftdi1
+    
+    This is an issue for example for libsigrok which will fail on:
+    
+    In file included from src/hardware/asix-sigma/protocol.c:27:
+    src/hardware/asix-sigma/protocol.h:28:10: fatal error: ftdi.h: No such file or directory
+       28 | #include <ftdi.h>
+          |          ^~~~~~~~
+    
+    Fixes:
+     - http://autobuild.buildroot.org/results/1427f44e36752c337791597fab47a1889552a2fe
+    
+    Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 5aecafc..3b0b87c 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -136,7 +136,7 @@ endif ()
+ 
+ add_subdirectory(src)
+ if ( FTDIPP )
+-  project(libftdipp1 C CXX)
++  project(libftdi1 C CXX)
+   add_subdirectory(ftdipp)
+ endif ()
+ if ( PYTHON_BINDINGS )
-- 
2.40.1





  parent reply	other threads:[~2023-09-07 16:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-07 15:43 [bug#65807] [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 1/8] gnu: libftdi: Update package style Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 2/8] gnu: libftdi: Do not build example programs Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 3/8] gnu: libftdi: Install libraries to /lib instead of /lib64 Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 4/8] gnu: libftdi: Build ftdi_eeprom Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 5/8] gnu: libftdi: Build C++ bindings Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 6/8] gnu: libftdi: Build Python bindings Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 7/8] gnu: libftdi: Update to 1.5 Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 8/8] gnu: libftdi: Build API documentation Simon South
2023-09-07 16:37 ` [bug#65807] [PATCH v2 0/9] gnu: libftdi: Update to 1.5; other improvements Simon South
2023-09-07 16:37   ` [bug#65807] [PATCH v2 1/9] gnu: libftdi: Update package style Simon South
2023-09-07 16:37   ` [bug#65807] [PATCH v2 2/9] gnu: libftdi: Use HTTPS for package source Simon South
2023-09-07 16:37   ` [bug#65807] [PATCH v2 3/9] gnu: libftdi: Do not build example programs Simon South
2023-09-07 16:37   ` [bug#65807] [PATCH v2 4/9] gnu: libftdi: Install libraries to /lib instead of /lib64 Simon South
2023-09-07 16:37   ` [bug#65807] [PATCH v2 5/9] gnu: libftdi: Build ftdi_eeprom Simon South
2023-09-07 16:37   ` [bug#65807] [PATCH v2 6/9] gnu: libftdi: Build C++ bindings Simon South
2023-09-07 16:37   ` [bug#65807] [PATCH v2 7/9] gnu: libftdi: Build Python bindings Simon South
2023-09-07 16:37   ` Simon South [this message]
2023-09-07 16:37   ` [bug#65807] [PATCH v2 9/9] gnu: libftdi: Build API documentation Simon South
2023-09-14 21:38   ` bug#65807: [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements 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=3c421142b509727b270471e8435819708945d75b.1694104141.git.simon@simonsouth.net \
    --to=simon@simonsouth.net \
    --cc=65807@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.