From 467a7b614ccafa2de51a8e56a6ecf384fb6fa07b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor-bj=C3=B6rn=20Claesson?= Date: Fri, 27 Jan 2023 17:03:36 +0200 Subject: [PATCH 3/3] gnu: gdcm: Use more system libraries. gnu: gdcm: Use more system libraries. --- gnu/packages/bioinformatics.scm | 48 ++++++++++++++++++++++++++++++--- 1 file changed, 45 insertions(+), 3 deletions(-) diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 9a3c0f7d42..77b3388f2e 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -18082,7 +18082,28 @@ (define-public gdcm (file-name (git-file-name name version)) (sha256 (base32 - "1rf0p7dnakjry0fa6ax1h762bn0l5n6ibfdxn077mjvwgpqan51l")))) + "1rf0p7dnakjry0fa6ax1h762bn0l5n6ibfdxn077mjvwgpqan51l")) + (modules '((guix build utils) + (ice-9 ftw))) + (snippet + '(begin + (define (unbundle? file) + (member file '("dicom3tools" + "gdcmexpat" + "gdcmutfcpp" + "gdcmuuid" + "gdcmzlib" + "getopt" + "KWStyle" + "pvrg" + "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 @@ -18123,8 +18144,29 @@ (define-public gdcm "-DGDCM_PDF_DOCUMENTATION:BOOL=OFF" (string-append "-DGDCM_INSTALL_DOC_DIR=" #$output:doc "/share/doc/" #$name) - "-DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF"))) ; TODO: need ‘xsl-ns’ - (native-inputs (list doxygen graphviz)) + "-DGDCM_BUILD_DOCBOOK_MANPAGES:BOOL=OFF" ; TODO: need ‘xsl-ns’ + ;; Libraries + "-DGDCM_USE_SYSTEM_EXPAT: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_JSON: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"))) + (inputs (list + expat + libxml2 + openssl + poppler + `(,util-linux "lib") + zlib)) + (native-inputs (list doxygen graphviz pkg-config)) (home-page "https://gdcm.sourceforge.net/wiki/index.php/Main_Page") (synopsis "Grassroots DICOM library") (description -- 2.39.1