GNU bug report logs - #65807
[PATCH 0/8] gnu: libftdi: Update to 1.5; other improvements.

Previous Next

Package: guix-patches;

Reported by: Simon South <simon <at> simonsouth.net>

Date: Thu, 7 Sep 2023 15:44:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Simon South <simon <at> simonsouth.net>
To: 65807 <at> debbugs.gnu.org
Subject: [bug#65807] [PATCH 8/8] gnu: libftdi: Build API documentation.
Date: Thu,  7 Sep 2023 11:45:50 -0400
* 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





This bug report was last modified 1 year and 246 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.