* [bug#65807] [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements.
@ 2023-09-07 15:43 Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 1/8] gnu: libftdi: Update package style Simon South
` (8 more replies)
0 siblings, 9 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 15:43 UTC (permalink / raw)
To: 65807
This patch series updates and improves the package for libftdi, a library for
communicating with USB-to-serial adapter ICs from FTDI.
The patches
- Refresh gently the formatting of the package;
- Disable the building of example programs, which aren't installed anyway;
- Enable the building of libftdi's ftdi_eeprom utility, its bindings for C++
and Python, and its API documentation; and
- Update libftdi to its latest version, 1.5.
I've kept the package in its own module as moving it to embedded.scm, where it
probably belongs, triggers the circular-dependency problem described in issue
65716.[0]
I've tested this on AArch64 and x86-64 with an FT232H module and everything
appears fine. All of libftdi's 14 dependents continue to build with the
exception of arachne-pnr, an existing failure.[1]
[0] https://issues.guix.gnu.org/65716
[1] http://ci.guix.gnu.org/search?query=arachne-pnr
---
Simon South (8):
gnu: libftdi: Update package style.
gnu: libftdi: Do not build example programs.
gnu: libftdi: Install libraries to /lib instead of /lib64.
gnu: libftdi: Build ftdi_eeprom.
gnu: libftdi: Build C++ bindings.
gnu: libftdi: Build Python bindings.
gnu: libftdi: Update to 1.5.
gnu: libftdi: Build API documentation.
gnu/local.mk | 1 +
gnu/packages/libftdi.scm | 77 ++++++++++++++++---
.../libftdi-fix-paths-when-FTDIPP-set.patch | 39 ++++++++++
3 files changed, 106 insertions(+), 11 deletions(-)
create mode 100644 gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch
base-commit: 811f4fc509a57ff14b1dd03d76fea66085e3f5e1
--
2.40.1
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH 1/8] gnu: libftdi: Update package style.
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 ` Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 2/8] gnu: libftdi: Do not build example programs Simon South
` (7 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 15:45 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm: Re-order #:use-module statements.
(libftdi): Wrap long lines; reformat gently.
[license]: Use "license:" prefix.
---
gnu/packages/libftdi.scm | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index e39e0b3d71..4cfa1d3424 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -18,12 +18,12 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages libftdi)
- #:use-module (guix licenses)
+ #:use-module (guix build-system cmake)
#:use-module (guix download)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
- #:use-module (gnu packages libusb)
- #:use-module (guix build-system cmake))
+ #:use-module (gnu packages libusb))
(define-public libftdi
(package
@@ -32,18 +32,17 @@ (define-public libftdi
(source (origin
(method url-fetch)
(uri (string-append
- "http://www.intra2net.com/en/developer/libftdi/download/libftdi1-"
- version ".tar.bz2"))
+ "http://www.intra2net.com/en/developer/libftdi/download/"
+ "libftdi1-" version ".tar.bz2"))
(sha256
(base32
"0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc"))))
(build-system cmake-build-system)
(propagated-inputs
- (list libusb)) ; required by libftdi1.pc
+ (list libusb)) ; required by libftdi1.pc
(home-page "https://www.intra2net.com/en/developer/libftdi/")
(synopsis "FTDI USB driver with bitbang mode")
(description
- "libFTDI is a library to talk to FTDI chips: FT232BM,
-FT245BM, FT2232C, FT2232D, FT245R and FT232H including the popular
-bitbangmode.")
- (license lgpl2.1)))
+ "libFTDI is a library to talk to FTDI chips: FT232BM, FT245BM, FT2232C,
+FT2232D, FT245R and FT232H including the popular bitbangmode.")
+ (license license:lgpl2.1)))
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH 2/8] gnu: libftdi: Do not build example programs.
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 ` Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 3/8] gnu: libftdi: Install libraries to /lib instead of /lib64 Simon South
` (6 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 15:45 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[arguments]: Add with "-DEXAMPLES"
configure flag.
---
gnu/packages/libftdi.scm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index 4cfa1d3424..ae7cbe62f2 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -20,6 +20,7 @@
(define-module (gnu packages libftdi)
#:use-module (guix build-system cmake)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
@@ -38,6 +39,8 @@ (define-public libftdi
(base32
"0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc"))))
(build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags #~(list "-DEXAMPLES=OFF")))
(propagated-inputs
(list libusb)) ; required by libftdi1.pc
(home-page "https://www.intra2net.com/en/developer/libftdi/")
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH 3/8] gnu: libftdi: Install libraries to /lib instead of /lib64.
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 ` Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 4/8] gnu: libftdi: Build ftdi_eeprom Simon South
` (5 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 15:45 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[arguments]<#:configure-flags>: Add
"-DLIB_SUFFIX".
---
gnu/packages/libftdi.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index ae7cbe62f2..f38346d8b2 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -40,7 +40,10 @@ (define-public libftdi
"0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc"))))
(build-system cmake-build-system)
(arguments
- (list #:configure-flags #~(list "-DEXAMPLES=OFF")))
+ (list
+ #:configure-flags
+ #~(list "-DEXAMPLES=OFF"
+ "-DLIB_SUFFIX=''"))) ; place libraries in /lib, not /lib64
(propagated-inputs
(list libusb)) ; required by libftdi1.pc
(home-page "https://www.intra2net.com/en/developer/libftdi/")
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH 4/8] gnu: libftdi: Build ftdi_eeprom.
2023-09-07 15:43 [bug#65807] [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements Simon South
` (2 preceding siblings ...)
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 ` Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 5/8] gnu: libftdi: Build C++ bindings Simon South
` (4 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 15:45 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[arguments]<#:configure-flags>: Add
"-DCMAKE_INSTALL_DOCDIR".
[native-inputs]: Add with pkg-config.
[inputs]: Add with libconfuse.
[license]: Add GPL version 2.
---
gnu/packages/libftdi.scm | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index f38346d8b2..c5461bcf87 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -24,7 +24,9 @@ (define-module (gnu packages libftdi)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
- #:use-module (gnu packages libusb))
+ #:use-module (gnu packages libusb)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages textutils))
(define-public libftdi
(package
@@ -42,8 +44,14 @@ (define-public libftdi
(arguments
(list
#:configure-flags
- #~(list "-DEXAMPLES=OFF"
+ #~(list (string-append "-DCMAKE_INSTALL_DOCDIR="
+ #$output "/share/doc/" #$name "-" #$version)
+ "-DEXAMPLES=OFF"
"-DLIB_SUFFIX=''"))) ; place libraries in /lib, not /lib64
+ (native-inputs
+ (list pkg-config))
+ (inputs
+ (list libconfuse))
(propagated-inputs
(list libusb)) ; required by libftdi1.pc
(home-page "https://www.intra2net.com/en/developer/libftdi/")
@@ -51,4 +59,5 @@ (define-public libftdi
(description
"libFTDI is a library to talk to FTDI chips: FT232BM, FT245BM, FT2232C,
FT2232D, FT245R and FT232H including the popular bitbangmode.")
- (license license:lgpl2.1)))
+ (license (list license:gpl2 ; ftdi_eeprom
+ license:lgpl2.1)))) ; main library
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH 5/8] gnu: libftdi: Build C++ bindings.
2023-09-07 15:43 [bug#65807] [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements Simon South
` (3 preceding siblings ...)
2023-09-07 15:45 ` [bug#65807] [PATCH 4/8] gnu: libftdi: Build ftdi_eeprom Simon South
@ 2023-09-07 15:45 ` Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 6/8] gnu: libftdi: Build Python bindings Simon South
` (3 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 15:45 UTC (permalink / raw)
To: 65807
Enabling the C++ bindings allows the test suite to be run, although this fails
without access to the host's USB interface.
* gnu/packages/libftdi.scm (libftdi)[arguments]: Add #:test-target, #:tests?.
(inputs): Add boost.
---
gnu/packages/libftdi.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index c5461bcf87..b5f481e9ba 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -24,6 +24,7 @@ (define-module (gnu packages libftdi)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
+ #:use-module (gnu packages boost)
#:use-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages textutils))
@@ -47,11 +48,13 @@ (define-public libftdi
#~(list (string-append "-DCMAKE_INSTALL_DOCDIR="
#$output "/share/doc/" #$name "-" #$version)
"-DEXAMPLES=OFF"
- "-DLIB_SUFFIX=''"))) ; place libraries in /lib, not /lib64
+ "-DLIB_SUFFIX=''") ; place libraries in /lib, not /lib64
+ #:test-target "check"
+ #:tests? #f)) ; tests fail without access to USB
(native-inputs
(list pkg-config))
(inputs
- (list libconfuse))
+ (list boost libconfuse))
(propagated-inputs
(list libusb)) ; required by libftdi1.pc
(home-page "https://www.intra2net.com/en/developer/libftdi/")
@@ -59,5 +62,5 @@ (define-public libftdi
(description
"libFTDI is a library to talk to FTDI chips: FT232BM, FT245BM, FT2232C,
FT2232D, FT245R and FT232H including the popular bitbangmode.")
- (license (list license:gpl2 ; ftdi_eeprom
+ (license (list license:gpl2 ; ftdi_eeprom, C++ bindings
license:lgpl2.1)))) ; main library
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH 6/8] gnu: libftdi: Build Python bindings.
2023-09-07 15:43 [bug#65807] [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements Simon South
` (4 preceding siblings ...)
2023-09-07 15:45 ` [bug#65807] [PATCH 5/8] gnu: libftdi: Build C++ bindings Simon South
@ 2023-09-07 15:45 ` Simon South
2023-09-07 15:45 ` [bug#65807] [PATCH 7/8] gnu: libftdi: Update to 1.5 Simon South
` (2 subsequent siblings)
8 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 15:45 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[outputs]: Add "python".
[arguments]<#:phases>: Add with "install-python-binding" phase.
[native-inputs]: Add python, swig.
---
gnu/packages/libftdi.scm | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index b5f481e9ba..d9ebd4a2df 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2023 Simon South <simon@simonsouth.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,15 +19,19 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages libftdi)
+ #:use-module (guix build utils)
#:use-module (guix build-system cmake)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
#:use-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages swig)
#:use-module (gnu packages textutils))
(define-public libftdi
@@ -42,6 +47,7 @@ (define-public libftdi
(base32
"0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc"))))
(build-system cmake-build-system)
+ (outputs '("out" "python"))
(arguments
(list
#:configure-flags
@@ -49,10 +55,26 @@ (define-public libftdi
#$output "/share/doc/" #$name "-" #$version)
"-DEXAMPLES=OFF"
"-DLIB_SUFFIX=''") ; place libraries in /lib, not /lib64
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'install-python-binding
+ (lambda _
+ (let* ((python-version
+ #$(version-major+minor (package-version python)))
+ (python-lib-path
+ (string-append "/lib/python" python-version)))
+ (mkdir-p (string-append #$output:python "/lib"))
+ (mkdir-p (string-append #$output:python "/share/libftdi"))
+ (rename-file (string-append #$output python-lib-path)
+ (string-append #$output:python python-lib-path))
+ (rename-file (string-append #$output
+ "/share/libftdi/examples")
+ (string-append #$output:python
+ "/share/libftdi/examples"))))))
#:test-target "check"
#:tests? #f)) ; tests fail without access to USB
(native-inputs
- (list pkg-config))
+ (list pkg-config python swig))
(inputs
(list boost libconfuse))
(propagated-inputs
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH 7/8] gnu: libftdi: Update to 1.5.
2023-09-07 15:43 [bug#65807] [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements Simon South
` (5 preceding siblings ...)
2023-09-07 15:45 ` [bug#65807] [PATCH 6/8] gnu: libftdi: Build Python bindings Simon South
@ 2023-09-07 15:45 ` 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
8 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 15:45 UTC (permalink / raw)
To: 65807
* 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 d9ebd4a2df..ae3e6cf660 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
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH 8/8] gnu: libftdi: Build API documentation.
2023-09-07 15:43 [bug#65807] [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements Simon South
` (6 preceding siblings ...)
2023-09-07 15:45 ` [bug#65807] [PATCH 7/8] gnu: libftdi: Update to 1.5 Simon South
@ 2023-09-07 15:45 ` Simon South
2023-09-07 16:37 ` [bug#65807] [PATCH v2 0/9] gnu: libftdi: Update to 1.5; other improvements Simon South
8 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 15:45 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[outputs]: Add "doc" output.
[arguments]<#:configure-flags>: Add "-DDOCUMENTATION".
<#:phases>: Add "install-documentation" phase.
[native-inputs]: Add doxygen, graphviz.
---
gnu/packages/libftdi.scm | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index ae3e6cf660..f4998cd84e 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -28,6 +28,8 @@ (define-module (gnu packages libftdi)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages documentation)
+ #:use-module (gnu packages graphviz)
#:use-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -49,12 +51,13 @@ (define-public libftdi
(patches
(search-patches "libftdi-fix-paths-when-FTDIPP-set.patch"))))
(build-system cmake-build-system)
- (outputs '("out" "python"))
+ (outputs '("out" "doc" "python"))
(arguments
(list
#:configure-flags
#~(list (string-append "-DCMAKE_INSTALL_DOCDIR="
#$output "/share/doc/" #$name "-" #$version)
+ "-DDOCUMENTATION=ON"
"-DEXAMPLES=OFF"
"-DFTDIPP=ON"
"-DLIB_SUFFIX=''" ; place libraries in /lib, not /lib64
@@ -74,11 +77,20 @@ (define-public libftdi
(rename-file (string-append #$output
"/share/libftdi/examples")
(string-append #$output:python
- "/share/libftdi/examples"))))))
+ "/share/libftdi/examples")))))
+ (add-after 'install-python-binding 'install-documentation
+ (lambda _
+ (let ((share (string-append #$output:doc "/share")))
+ (copy-recursively "doc/man"
+ (string-append share "/man"))
+ (copy-recursively "doc/html"
+ (string-append share "/doc/"
+ #$name "-" #$version
+ "/html"))))))
#:test-target "check"
#:tests? #f)) ; tests fail without access to USB
(native-inputs
- (list pkg-config python swig))
+ (list doxygen graphviz pkg-config python swig))
(inputs
(list boost libconfuse))
(propagated-inputs
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH v2 0/9] gnu: libftdi: Update to 1.5; other improvements.
2023-09-07 15:43 [bug#65807] [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements Simon South
` (7 preceding siblings ...)
2023-09-07 15:45 ` [bug#65807] [PATCH 8/8] gnu: libftdi: Build API documentation Simon South
@ 2023-09-07 16:37 ` Simon South
2023-09-07 16:37 ` [bug#65807] [PATCH v2 1/9] gnu: libftdi: Update package style Simon South
` (9 more replies)
8 siblings, 10 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 16:37 UTC (permalink / raw)
To: 65807
Here's a v2 of this patch series that adds a commit updating the package's
source URL to use HTTPS instead of HTTP, silencing a warning from guix lint.
(There's always something...)
Everything else is unchanged. Here's the original cover letter:
This patch series updates and improves the package for libftdi, a library for
communicating with USB-to-serial adapter ICs from FTDI.
The patches
- Refresh gently the formatting of the package;
- Disable the building of example programs, which aren't installed anyway;
- Enable the building of libftdi's ftdi_eeprom utility, its bindings for C++
and Python, and its API documentation; and
- Update libftdi to its latest version, 1.5.
I've kept the package in its own module as moving it to embedded.scm, where it
probably belongs, triggers the circular-dependency problem described in issue
65716.[0]
I've tested this on AArch64 and x86-64 with an FT232H module and everything
appears fine. All of libftdi's 14 dependents continue to build with the
exception of arachne-pnr, an existing failure.[1]
[0] https://issues.guix.gnu.org/65716
[1] http://ci.guix.gnu.org/search?query=arachne-pnr
---
Simon South (9):
gnu: libftdi: Update package style.
gnu: libftdi: Use HTTPS for package source.
gnu: libftdi: Do not build example programs.
gnu: libftdi: Install libraries to /lib instead of /lib64.
gnu: libftdi: Build ftdi_eeprom.
gnu: libftdi: Build C++ bindings.
gnu: libftdi: Build Python bindings.
gnu: libftdi: Update to 1.5.
gnu: libftdi: Build API documentation.
gnu/local.mk | 1 +
gnu/packages/libftdi.scm | 77 ++++++++++++++++---
.../libftdi-fix-paths-when-FTDIPP-set.patch | 39 ++++++++++
3 files changed, 106 insertions(+), 11 deletions(-)
create mode 100644 gnu/packages/patches/libftdi-fix-paths-when-FTDIPP-set.patch
base-commit: 811f4fc509a57ff14b1dd03d76fea66085e3f5e1
--
2.40.1
^ permalink raw reply [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH v2 1/9] gnu: libftdi: Update package style.
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 ` Simon South
2023-09-07 16:37 ` [bug#65807] [PATCH v2 2/9] gnu: libftdi: Use HTTPS for package source Simon South
` (8 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 16:37 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm: Re-order #:use-module statements.
(libftdi): Wrap long lines; reformat gently.
[license]: Use "license:" prefix.
---
gnu/packages/libftdi.scm | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index e39e0b3d71..4cfa1d3424 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -18,12 +18,12 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages libftdi)
- #:use-module (guix licenses)
+ #:use-module (guix build-system cmake)
#:use-module (guix download)
+ #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
- #:use-module (gnu packages libusb)
- #:use-module (guix build-system cmake))
+ #:use-module (gnu packages libusb))
(define-public libftdi
(package
@@ -32,18 +32,17 @@ (define-public libftdi
(source (origin
(method url-fetch)
(uri (string-append
- "http://www.intra2net.com/en/developer/libftdi/download/libftdi1-"
- version ".tar.bz2"))
+ "http://www.intra2net.com/en/developer/libftdi/download/"
+ "libftdi1-" version ".tar.bz2"))
(sha256
(base32
"0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc"))))
(build-system cmake-build-system)
(propagated-inputs
- (list libusb)) ; required by libftdi1.pc
+ (list libusb)) ; required by libftdi1.pc
(home-page "https://www.intra2net.com/en/developer/libftdi/")
(synopsis "FTDI USB driver with bitbang mode")
(description
- "libFTDI is a library to talk to FTDI chips: FT232BM,
-FT245BM, FT2232C, FT2232D, FT245R and FT232H including the popular
-bitbangmode.")
- (license lgpl2.1)))
+ "libFTDI is a library to talk to FTDI chips: FT232BM, FT245BM, FT2232C,
+FT2232D, FT245R and FT232H including the popular bitbangmode.")
+ (license license:lgpl2.1)))
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH v2 2/9] gnu: libftdi: Use HTTPS for package source.
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 ` Simon South
2023-09-07 16:37 ` [bug#65807] [PATCH v2 3/9] gnu: libftdi: Do not build example programs Simon South
` (7 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 16:37 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[source]: Use HTTPS.
---
gnu/packages/libftdi.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index 4cfa1d3424..b881aa5cc2 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -32,7 +32,7 @@ (define-public libftdi
(source (origin
(method url-fetch)
(uri (string-append
- "http://www.intra2net.com/en/developer/libftdi/download/"
+ "https://www.intra2net.com/en/developer/libftdi/download/"
"libftdi1-" version ".tar.bz2"))
(sha256
(base32
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH v2 3/9] gnu: libftdi: Do not build example programs.
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 ` Simon South
2023-09-07 16:37 ` [bug#65807] [PATCH v2 4/9] gnu: libftdi: Install libraries to /lib instead of /lib64 Simon South
` (6 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 16:37 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[arguments]: Add with "-DEXAMPLES"
configure flag.
---
gnu/packages/libftdi.scm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index b881aa5cc2..74df12a354 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -20,6 +20,7 @@
(define-module (gnu packages libftdi)
#:use-module (guix build-system cmake)
#:use-module (guix download)
+ #:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
@@ -38,6 +39,8 @@ (define-public libftdi
(base32
"0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc"))))
(build-system cmake-build-system)
+ (arguments
+ (list #:configure-flags #~(list "-DEXAMPLES=OFF")))
(propagated-inputs
(list libusb)) ; required by libftdi1.pc
(home-page "https://www.intra2net.com/en/developer/libftdi/")
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH v2 4/9] gnu: libftdi: Install libraries to /lib instead of /lib64.
2023-09-07 16:37 ` [bug#65807] [PATCH v2 0/9] gnu: libftdi: Update to 1.5; other improvements Simon South
` (2 preceding siblings ...)
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 ` Simon South
2023-09-07 16:37 ` [bug#65807] [PATCH v2 5/9] gnu: libftdi: Build ftdi_eeprom Simon South
` (5 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 16:37 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[arguments]<#:configure-flags>: Add
"-DLIB_SUFFIX".
---
gnu/packages/libftdi.scm | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index 74df12a354..1e97793a93 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -40,7 +40,10 @@ (define-public libftdi
"0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc"))))
(build-system cmake-build-system)
(arguments
- (list #:configure-flags #~(list "-DEXAMPLES=OFF")))
+ (list
+ #:configure-flags
+ #~(list "-DEXAMPLES=OFF"
+ "-DLIB_SUFFIX=''"))) ; place libraries in /lib, not /lib64
(propagated-inputs
(list libusb)) ; required by libftdi1.pc
(home-page "https://www.intra2net.com/en/developer/libftdi/")
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH v2 5/9] gnu: libftdi: Build ftdi_eeprom.
2023-09-07 16:37 ` [bug#65807] [PATCH v2 0/9] gnu: libftdi: Update to 1.5; other improvements Simon South
` (3 preceding siblings ...)
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 ` Simon South
2023-09-07 16:37 ` [bug#65807] [PATCH v2 6/9] gnu: libftdi: Build C++ bindings Simon South
` (4 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 16:37 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[arguments]<#:configure-flags>: Add
"-DCMAKE_INSTALL_DOCDIR".
[native-inputs]: Add with pkg-config.
[inputs]: Add with libconfuse.
[license]: Add GPL version 2.
---
gnu/packages/libftdi.scm | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index 1e97793a93..b3fb717905 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -24,7 +24,9 @@ (define-module (gnu packages libftdi)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
- #:use-module (gnu packages libusb))
+ #:use-module (gnu packages libusb)
+ #:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages textutils))
(define-public libftdi
(package
@@ -42,8 +44,14 @@ (define-public libftdi
(arguments
(list
#:configure-flags
- #~(list "-DEXAMPLES=OFF"
+ #~(list (string-append "-DCMAKE_INSTALL_DOCDIR="
+ #$output "/share/doc/" #$name "-" #$version)
+ "-DEXAMPLES=OFF"
"-DLIB_SUFFIX=''"))) ; place libraries in /lib, not /lib64
+ (native-inputs
+ (list pkg-config))
+ (inputs
+ (list libconfuse))
(propagated-inputs
(list libusb)) ; required by libftdi1.pc
(home-page "https://www.intra2net.com/en/developer/libftdi/")
@@ -51,4 +59,5 @@ (define-public libftdi
(description
"libFTDI is a library to talk to FTDI chips: FT232BM, FT245BM, FT2232C,
FT2232D, FT245R and FT232H including the popular bitbangmode.")
- (license license:lgpl2.1)))
+ (license (list license:gpl2 ; ftdi_eeprom
+ license:lgpl2.1)))) ; main library
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH v2 6/9] gnu: libftdi: Build C++ bindings.
2023-09-07 16:37 ` [bug#65807] [PATCH v2 0/9] gnu: libftdi: Update to 1.5; other improvements Simon South
` (4 preceding siblings ...)
2023-09-07 16:37 ` [bug#65807] [PATCH v2 5/9] gnu: libftdi: Build ftdi_eeprom Simon South
@ 2023-09-07 16:37 ` Simon South
2023-09-07 16:37 ` [bug#65807] [PATCH v2 7/9] gnu: libftdi: Build Python bindings Simon South
` (3 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 16:37 UTC (permalink / raw)
To: 65807
Enabling the C++ bindings allows the test suite to be run, although this fails
without access to the host's USB interface.
* gnu/packages/libftdi.scm (libftdi)[arguments]: Add #:test-target, #:tests?.
(inputs): Add boost.
---
gnu/packages/libftdi.scm | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index b3fb717905..0a996b05e7 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -24,6 +24,7 @@ (define-module (gnu packages libftdi)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
+ #:use-module (gnu packages boost)
#:use-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages textutils))
@@ -47,11 +48,13 @@ (define-public libftdi
#~(list (string-append "-DCMAKE_INSTALL_DOCDIR="
#$output "/share/doc/" #$name "-" #$version)
"-DEXAMPLES=OFF"
- "-DLIB_SUFFIX=''"))) ; place libraries in /lib, not /lib64
+ "-DLIB_SUFFIX=''") ; place libraries in /lib, not /lib64
+ #:test-target "check"
+ #:tests? #f)) ; tests fail without access to USB
(native-inputs
(list pkg-config))
(inputs
- (list libconfuse))
+ (list boost libconfuse))
(propagated-inputs
(list libusb)) ; required by libftdi1.pc
(home-page "https://www.intra2net.com/en/developer/libftdi/")
@@ -59,5 +62,5 @@ (define-public libftdi
(description
"libFTDI is a library to talk to FTDI chips: FT232BM, FT245BM, FT2232C,
FT2232D, FT245R and FT232H including the popular bitbangmode.")
- (license (list license:gpl2 ; ftdi_eeprom
+ (license (list license:gpl2 ; ftdi_eeprom, C++ bindings
license:lgpl2.1)))) ; main library
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH v2 7/9] gnu: libftdi: Build Python bindings.
2023-09-07 16:37 ` [bug#65807] [PATCH v2 0/9] gnu: libftdi: Update to 1.5; other improvements Simon South
` (5 preceding siblings ...)
2023-09-07 16:37 ` [bug#65807] [PATCH v2 6/9] gnu: libftdi: Build C++ bindings Simon South
@ 2023-09-07 16:37 ` Simon South
2023-09-07 16:37 ` [bug#65807] [PATCH v2 8/9] gnu: libftdi: Update to 1.5 Simon South
` (2 subsequent siblings)
9 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 16:37 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[outputs]: Add "python".
[arguments]<#:phases>: Add with "install-python-binding" phase.
[native-inputs]: Add python, swig.
---
gnu/packages/libftdi.scm | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index 0a996b05e7..773b0ec73e 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2023 Simon South <simon@simonsouth.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -18,15 +19,19 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu packages libftdi)
+ #:use-module (guix build utils)
#:use-module (guix build-system cmake)
#:use-module (guix download)
#:use-module (guix gexp)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
+ #:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
#:use-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
+ #:use-module (gnu packages python)
+ #:use-module (gnu packages swig)
#:use-module (gnu packages textutils))
(define-public libftdi
@@ -42,6 +47,7 @@ (define-public libftdi
(base32
"0x0vncf6i92slgrn0h7ghkskqbglbs534220qa84d0qg114zndpc"))))
(build-system cmake-build-system)
+ (outputs '("out" "python"))
(arguments
(list
#:configure-flags
@@ -49,10 +55,26 @@ (define-public libftdi
#$output "/share/doc/" #$name "-" #$version)
"-DEXAMPLES=OFF"
"-DLIB_SUFFIX=''") ; place libraries in /lib, not /lib64
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'install 'install-python-binding
+ (lambda _
+ (let* ((python-version
+ #$(version-major+minor (package-version python)))
+ (python-lib-path
+ (string-append "/lib/python" python-version)))
+ (mkdir-p (string-append #$output:python "/lib"))
+ (mkdir-p (string-append #$output:python "/share/libftdi"))
+ (rename-file (string-append #$output python-lib-path)
+ (string-append #$output:python python-lib-path))
+ (rename-file (string-append #$output
+ "/share/libftdi/examples")
+ (string-append #$output:python
+ "/share/libftdi/examples"))))))
#:test-target "check"
#:tests? #f)) ; tests fail without access to USB
(native-inputs
- (list pkg-config))
+ (list pkg-config python swig))
(inputs
(list boost libconfuse))
(propagated-inputs
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH v2 8/9] gnu: libftdi: Update to 1.5.
2023-09-07 16:37 ` [bug#65807] [PATCH v2 0/9] gnu: libftdi: Update to 1.5; other improvements Simon South
` (6 preceding siblings ...)
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
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
9 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 16:37 UTC (permalink / raw)
To: 65807
* 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
^ permalink raw reply related [flat|nested] 20+ messages in thread
* [bug#65807] [PATCH v2 9/9] gnu: libftdi: Build API documentation.
2023-09-07 16:37 ` [bug#65807] [PATCH v2 0/9] gnu: libftdi: Update to 1.5; other improvements Simon South
` (7 preceding siblings ...)
2023-09-07 16:37 ` [bug#65807] [PATCH v2 8/9] gnu: libftdi: Update to 1.5 Simon South
@ 2023-09-07 16:37 ` Simon South
2023-09-14 21:38 ` bug#65807: [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements Ludovic Courtès
9 siblings, 0 replies; 20+ messages in thread
From: Simon South @ 2023-09-07 16:37 UTC (permalink / raw)
To: 65807
* gnu/packages/libftdi.scm (libftdi)[outputs]: Add "doc" output.
[arguments]<#:configure-flags>: Add "-DDOCUMENTATION".
<#:phases>: Add "install-documentation" phase.
[native-inputs]: Add doxygen, graphviz.
---
gnu/packages/libftdi.scm | 18 +++++++++++++++---
1 file changed, 15 insertions(+), 3 deletions(-)
diff --git a/gnu/packages/libftdi.scm b/gnu/packages/libftdi.scm
index bdfc635379..02efcbbbc0 100644
--- a/gnu/packages/libftdi.scm
+++ b/gnu/packages/libftdi.scm
@@ -28,6 +28,8 @@ (define-module (gnu packages libftdi)
#:use-module (guix utils)
#:use-module (gnu packages)
#:use-module (gnu packages boost)
+ #:use-module (gnu packages documentation)
+ #:use-module (gnu packages graphviz)
#:use-module (gnu packages libusb)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
@@ -49,12 +51,13 @@ (define-public libftdi
(patches
(search-patches "libftdi-fix-paths-when-FTDIPP-set.patch"))))
(build-system cmake-build-system)
- (outputs '("out" "python"))
+ (outputs '("out" "doc" "python"))
(arguments
(list
#:configure-flags
#~(list (string-append "-DCMAKE_INSTALL_DOCDIR="
#$output "/share/doc/" #$name "-" #$version)
+ "-DDOCUMENTATION=ON"
"-DEXAMPLES=OFF"
"-DFTDIPP=ON"
"-DLIB_SUFFIX=''" ; place libraries in /lib, not /lib64
@@ -74,11 +77,20 @@ (define-public libftdi
(rename-file (string-append #$output
"/share/libftdi/examples")
(string-append #$output:python
- "/share/libftdi/examples"))))))
+ "/share/libftdi/examples")))))
+ (add-after 'install-python-binding 'install-documentation
+ (lambda _
+ (let ((share (string-append #$output:doc "/share")))
+ (copy-recursively "doc/man"
+ (string-append share "/man"))
+ (copy-recursively "doc/html"
+ (string-append share "/doc/"
+ #$name "-" #$version
+ "/html"))))))
#:test-target "check"
#:tests? #f)) ; tests fail without access to USB
(native-inputs
- (list pkg-config python swig))
+ (list doxygen graphviz pkg-config python swig))
(inputs
(list boost libconfuse))
(propagated-inputs
--
2.40.1
^ permalink raw reply related [flat|nested] 20+ messages in thread
* bug#65807: [PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements.
2023-09-07 16:37 ` [bug#65807] [PATCH v2 0/9] gnu: libftdi: Update to 1.5; other improvements Simon South
` (8 preceding siblings ...)
2023-09-07 16:37 ` [bug#65807] [PATCH v2 9/9] gnu: libftdi: Build API documentation Simon South
@ 2023-09-14 21:38 ` Ludovic Courtès
9 siblings, 0 replies; 20+ messages in thread
From: Ludovic Courtès @ 2023-09-14 21:38 UTC (permalink / raw)
To: Simon South; +Cc: 65807-done
Hello,
Simon South <simon@simonsouth.net> skribis:
> gnu: libftdi: Update package style.
> gnu: libftdi: Use HTTPS for package source.
> gnu: libftdi: Do not build example programs.
> gnu: libftdi: Install libraries to /lib instead of /lib64.
> gnu: libftdi: Build ftdi_eeprom.
> gnu: libftdi: Build C++ bindings.
> gnu: libftdi: Build Python bindings.
> gnu: libftdi: Update to 1.5.
> gnu: libftdi: Build API documentation.
Applied, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 20+ messages in thread
end of thread, other threads:[~2023-09-14 21:39 UTC | newest]
Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 ` [bug#65807] [PATCH v2 8/9] gnu: libftdi: Update to 1.5 Simon South
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
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.