all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Tor-björn Claesson" <tclaesson@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: 60640@debbugs.gnu.org
Subject: [bug#60640] Gnu: Add gdcm
Date: Sat, 14 Jan 2023 23:58:43 +0200	[thread overview]
Message-ID: <87358cn5e4.fsf@gmail.com> (raw)
In-Reply-To: <87wn5q9epc.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

And here is the last patch, which uses system packages where possible.
All  nice things in these patches are thanks to the help of Tobias,
any screwups are mine.

Thanks!
Tor-björn

[-- Attachment #2: 0001-gnu-gdcm-Use-system-packages-where-possible.patch --]
[-- Type: text/x-patch, Size: 3795 bytes --]

From 77a7609eb727c53028846d0bf54204cdf9f58f9c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tor-bj=C3=B6rn=20Claesson?= <tclaesson@gmail.com>
Date: Sat, 14 Jan 2023 23:56:43 +0200
Subject: [PATCH] gnu: gdcm: Use system packages where possible.

---
 gnu/packages/bioinformatics.scm | 47 +++++++++++++++++++++++++++++++--
 1 file changed, 45 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index e45d33ec2b..41709fd9ed 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -17853,7 +17853,29 @@ (define-public gdcm
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "1w78cmm9q7aavs7svdkl4dgilcqk4yazci9m6x7icrssb7cj991i"))))
+                "1w78cmm9q7aavs7svdkl4dgilcqk4yazci9m6x7icrssb7cj991i"))
+              (modules '((guix build utils)
+                         (ice-9 ftw)))
+              (snippet
+               '(begin
+                  (define (unbundle? file)
+                    (member file '("dicom3tools"
+                                   "gdcmexpat"
+                                   "gdcmutfcpp"
+                                   "gdcmuuid"
+                                   "gdcmzlib"
+                                   "getopt"
+                                   "KWStyle"
+                                   "pvrg"
+                                   "Release"
+                                   "Release"
+                                   "VTK")))
+                  (with-directory-excursion "Utilities"
+                    (for-each (lambda (utility)
+                                (delete-file-recursively utility)
+                                (substitute* "CMakeLists.txt"
+                                  (((string-append ".*/" utility "/.*")) "")))
+                              (scandir "." unbundle?)))))))
     (build-system cmake-build-system)
     (outputs '("out" "bin" "doc"))
     (arguments
@@ -17882,6 +17904,20 @@ (define-public gdcm
                              "|gdcmscu-find-dicomserver"
                              "|TestEcho"
                              "|TestFind'")
+              ;; Libraries
+              "-DGDCM_USE_SYSTEM_EXPAT:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_JSON:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_LIBXML2:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_OPENSSL:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_POPPLER:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_UUID:BOOL=ON"
+              "-DGDCM_USE_SYSTEM_ZLIB:BOOL=ON"
+              ;; TODO: Unbundle these if possible.
+              "-DGDCM_USE_SYSTEM_CHARLS:BOOL=OFF"
+              "-DGDCM_USE_SYSTEM_LJPEG:BOOL=OFF"
+              "-DGDCM_USE_SYSTEM_OPENJPEG:BOOL=OFF"
+              "-DGDCM_USE_SYSTEM_PAPYRUS3:BOOL=OFF"
+              "-DGDCM_USE_SYSTEM_SOCKETXX:BOOL=OFF"
               ;; Documentation
               "-DGDCM_DOCUMENTATION:BOOL=ON"
               "-DGDCM_PDF_DOCUMENTATION:BOOL=ON"
@@ -17890,7 +17926,14 @@ (define-public gdcm
               "-DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF" ;; TODO: need ‘xsl-ns’
               ;; Utilities
               "-DGDCM_BUILD_APPLICATIONS:BOOL=ON")))
-    (native-inputs (list doxygen ghostscript graphviz texlive))
+    (inputs (list expat
+                  json-c
+                  libxml2
+                  openssl
+                  poppler
+                  `(,util-linux "lib")
+                  zlib))
+    (native-inputs (list doxygen ghostscript graphviz pkg-config texlive))
     (home-page "https://gdcm.sourceforge.net/wiki/index.php/Main_Page")
     (synopsis "Grassroots DICOM library")
     (description
-- 
2.38.1


  parent reply	other threads:[~2023-01-14 22:01 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-07 19:40 [bug#60640] Gnu: Add gdcm Tor-björn Claesson
     [not found] ` <handler.60640.B.167314095112989.ack@debbugs.gnu.org>
2023-01-08  7:59   ` [bug#60640] Acknowledgement (Gnu: Add gdcm) Tor-björn Claesson
2023-01-08  8:04     ` Tor-björn Claesson
2023-01-09  8:28       ` Tobias Geerinckx-Rice via Guix-patches via
2023-01-09 10:50         ` Tor-björn Claesson
2023-01-10  7:01           ` ( via Guix-patches via
2023-01-10 14:40     ` Tobias Geerinckx-Rice via Guix-patches via
2023-01-10 15:10       ` Tor-björn Claesson
2023-01-12 22:17     ` [bug#60640] Gnu: Add gdcm Ludovic Courtès
2023-01-13 10:45       ` Tor-björn Claesson
2023-01-13 23:50         ` Ludovic Courtès
2023-01-14  8:19           ` Tor-björn Claesson
2023-01-14  9:30           ` Tor-björn Claesson
2023-01-17 14:36             ` Ludovic Courtès
2023-01-14 17:06           ` Tor-björn Claesson
2023-01-17 14:38             ` Ludovic Courtès
2023-01-17 19:21               ` Tor-björn Claesson
2023-01-25 22:22                 ` Ludovic Courtès
2023-01-20 11:30               ` Tor-björn Claesson
2023-01-20 12:44                 ` Tor-björn Claesson
2023-01-25 22:01                   ` Ludovic Courtès
2023-01-31 21:42                     ` Tor-björn Claesson
2023-01-25 22:49                   ` Ludovic Courtès
2023-01-27 15:06                     ` Tor-björn Claesson
2023-01-14 19:34           ` Tor-björn Claesson
2023-01-14 21:58           ` Tor-björn Claesson [this message]
2023-01-10 14:52 ` Tobias Geerinckx-Rice via Guix-patches via
2023-01-11  5:29   ` Tor-björn Claesson
2023-01-12 11:21     ` Tor-björn Claesson
2024-02-19 22:41 ` bug#60640: " Sharlatan Hellseher

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=87358cn5e4.fsf@gmail.com \
    --to=tclaesson@gmail.com \
    --cc=60640@debbugs.gnu.org \
    --cc=ludo@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.