From patchwork Wed Apr 30 16:27:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Elsing X-Patchwork-Id: 42185 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id CF7AE27BC4B; Wed, 30 Apr 2025 17:29:17 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_VALIDITY_CERTIFIED,RCVD_IN_VALIDITY_RPBL,RCVD_IN_VALIDITY_SAFE, SPF_HELO_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3ED9627BC49 for ; Wed, 30 Apr 2025 17:29:16 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uAAJ5-0006zf-Nn; Wed, 30 Apr 2025 12:29:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uAAIz-0006xm-TB for guix-patches@gnu.org; Wed, 30 Apr 2025 12:29:06 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1uAAIw-0007Xe-VP for guix-patches@gnu.org; Wed, 30 Apr 2025 12:29:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:References:In-Reply-To:Date:From:To:Subject; bh=7q9R52PFBZlDv5aEfL2TijfjyChjXG0mIXuQ/iOf47M=; b=YuaH84tfC+ytTP38C8BHVx+DiRlzByBlV45Xtqre95LOI367y/CyA8ZA1O17kSmSQgej3uLQkP3Lyaq6SOAVpNlbFsnVx9ltaKPF1luFyFHkmYv5LnQ9aqqOzGMNwLPIDPvFRiQHHYRcraS72e8PvJL022yrt3NFPrI8LvUHKAsiwV8hUD5zf6yGAMdWGlGqaaw+tc0P4+Kdyh7Hwsbxs1Y/k/sVZkgHK843S9xeypRFq2eEnZFjtsdgtIK7+fYR0Pq28n3EVMLAjdgxpbV6XmYRlg8/u+hZP1xf7CZTRRtk7frimu4VN/x8HWP8eqUik8OPr0DHGo9DYtKZ1QGt9g==; Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1uAAIw-0008IB-Bz for guix-patches@gnu.org; Wed, 30 Apr 2025 12:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#77590] [PATCH v6 2/7] gnu: hdf-java: Update to 1.14.6 and rename to hdf5-java. Resent-From: David Elsing Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 30 Apr 2025 16:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 77590 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 77590@debbugs.gnu.org Cc: David Elsing , Andreas Enge Received: via spool by 77590-submit@debbugs.gnu.org id=B77590.174603048931736 (code B ref 77590); Wed, 30 Apr 2025 16:29:02 +0000 Received: (at 77590) by debbugs.gnu.org; 30 Apr 2025 16:28:09 +0000 Received: from localhost ([127.0.0.1]:44226 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1uAAI1-0008FT-B6 for submit@debbugs.gnu.org; Wed, 30 Apr 2025 12:28:08 -0400 Received: from mout02.posteo.de ([185.67.36.66]:38379) by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1uAAHx-0008EP-3I for 77590@debbugs.gnu.org; Wed, 30 Apr 2025 12:28:03 -0400 Received: from submission (posteo.de [185.67.36.169]) by mout02.posteo.de (Postfix) with ESMTPS id 26AF6240101 for <77590@debbugs.gnu.org>; Wed, 30 Apr 2025 18:27:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1746030475; bh=aPuHF1aX2UFuJNS/cprKC+1dONkAR57YAEe1EWZQPJk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version: Content-Transfer-Encoding:From; b=r54nBjyFCXAz0Do4i4Cv6WVR1fct0TAMD1KLHrcIrlZ29/+hxHsQp4FAoHKzKjQjc 8Q/WQ7haM5uXNNtbrV4OOTnxslJyjyxdnEtFaY4B01G7k+1AwtvO0UwYNqbPiOH9yp DUTXlVr2Sr8EkrZgNlGyso5V2EpiWEvUJX9laaRzMFuVBiHa9k2Xhxg6MdIgLYNH/S VsSVcQ8uFCufXwQQeaeTsuIV4+HZaETwr8BmKavIKAongo7B5FJzkcwr+OS0xxA+ue d5PU2+qIe2owgQ/X9fSNSsy4k1lmUlfnPwmU/hENwCAgRwdZFCkQZ2IwL/Or8FyS2+ nqVzNqilbetjA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4ZnjK6499Kz6txf; Wed, 30 Apr 2025 18:27:54 +0200 (CEST) From: David Elsing Date: Wed, 30 Apr 2025 16:27:04 +0000 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/maths.scm (hdf-java): Define as deprecated alias for... (hdf5-java): ...this new variable. Update to 1.14.6. [name]: Rename to hdf5-java. [version]: Use the same as hdf5. [source]: Use the same as hdf5. [build-system]: Change to cmake-build-system. [arguments]: Adjust #:configure-flags. Add (guix build ant-build-system) to #:modules and #:imported-modules. Adjust 'unbundle phase. Add 'patch-trace-shebang, 'generate-flexbison, 'generate-headers and 'strip-jar-timestamps phases. [native-inputs]: Use modify-inputs. Add java-slf4j-nop and zip. [inputs]: Remove hdf4 and hdf5. [synopsis, description]: Remove mention of HDF4. [license]: Use the same as hdf5. Change-Id: Idfceec17b9a8c432ab85e2fcc87de6bb5bd5a422 Signed-off-by: Andreas Enge --- gnu/packages/maths.scm | 119 +++++++++++++++++++++++------------------ 1 file changed, 66 insertions(+), 53 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index dfc5456797..e42b00d6ad 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -1973,33 +1973,24 @@ (define-public hdf5 (license (license:x11-style "https://support.hdfgroup.org/ftp/HDF5/releases/COPYING.html")))) -;; Keep this in sync with the current hdf5 package. -(define-public hdf-java +(define-public hdf5-java (package - (name "hdf-java") - (version "1.14.3") - (source - (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/HDFGroup/hdf5") - (commit (string-append "hdf5-" - (string-map - (lambda (c) (if (char=? c #\.) #\_ c)) - version))))) - (file-name (git-file-name name version)) - (sha256 - (base32 "0lw9f62zxyjiv7vx9nvnashjj39i44j8d626i7b788zkxw58csvs")) - (modules '((guix build utils))) - (snippet ; Make sure we don't use the bundled sources and binaries. - '(for-each delete-file - (find-files "java/lib" "\\.jar$"))))) - (build-system gnu-build-system) + (name "hdf5-java") + (version (package-version hdf5)) + (source (package-source hdf5)) + (build-system cmake-build-system) (arguments (list #:configure-flags - #~(list "--enable-java" - "--disable-tools") + #~(list "-DHDF5_BUILD_JAVA=ON" + "-DHDF5_BUILD_TOOLS=OFF") + #:modules + '((guix build cmake-build-system) + ((guix build ant-build-system) #:prefix ant:) + (guix build utils)) + #:imported-modules + `((guix build ant-build-system) + ,@%cmake-build-system-modules) #:phases #~(modify-phases %standard-phases (add-after 'unpack 'unbundle @@ -2010,27 +2001,35 @@ (define-public hdf-java (api (search-input-file inputs "/lib/m2/org/slf4j/slf4j-api/1.7.25/slf4j-api-1.7.25.jar")) + (nop + (search-input-file + inputs "/lib/m2/org/slf4j/slf4j-nop/1.7.25/slf4j-nop-1.7.25.jar")) (junit (search-input-file inputs "/lib/m2/junit/junit/4.12/junit-4.12.jar")) (hamcrest (search-input-file inputs "/lib/m2/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar"))) - (substitute* (append (find-files "java" "Makefile.am") - (find-files "java" "Makefile.in")) - (("\\$\\(top_srcdir\\)/java/lib/ext/slf4j-simple-2.0.6.jar") - simple) - (("\\$\\(top_srcdir\\)/java/lib/slf4j-api-2.0.6.jar") - api) - (("\\$\\(top_srcdir\\)/java/lib/junit.jar") + (substitute* "CMakeLists.txt" + (("(set *\\(HDF5_JAVA_LOGGING_JAR ).*" _ orig) + (string-append orig api ")\n")) + (("(set *\\(HDF5_JAVA_LOGGING_NOP_JAR ).*" _ orig) + (string-append orig nop ")\n")) + (("(set *\\(HDF5_JAVA_LOGGING_SIMPLE_JAR ).*" _ orig) + (string-append orig simple ")\n"))) + ;; Do not install copies of external libraries + (substitute* "java/CMakeLists.txt" + ((".*HDF5_JAVA_LOGGING.*_JAR.*") "")) + (substitute* "java/test/CMakeLists.txt" + (("\\$\\{HDF5_JAVA_LIB_DIR\\}/junit\\.jar") junit) - (("\\$\\(top_srcdir\\)/java/lib/hamcrest-core.jar") + (("\\$\\{HDF5_JAVA_LIB_DIR\\}/hamcrest-core\\.jar") hamcrest)) (substitute* '("java/test/junit.sh.in" - "java/examples/datatypes/JavaDatatypeExample.sh.in" - "java/examples/datasets/JavaDatasetExample.sh.in" - "java/examples/intro/JavaIntroExample.sh.in" - "java/examples/groups/JavaGroupExample.sh.in") + "HDF5Examples/JAVA/H5D/JavaDatasetExample.sh.in" + "HDF5Examples/JAVA/H5G/JavaGroupExample.sh.in" + "HDF5Examples/JAVA/H5T/JavaDatatypeExample.sh.in" + "HDF5Examples/JAVA/TUTR/runExample.sh.in") (("^LIST_JAR_TESTFILES=\"" m) (string-append m hamcrest "\n" junit "\n" @@ -2050,30 +2049,44 @@ (define-public hdf-java (("/usr/bin/uname") (search-input-file inputs "/bin/uname"))) (substitute* (find-files "java/test/testfiles/" ".*\\.txt$") - (("JUnit version 4.11") - "JUnit version 4.12-SNAPSHOT")))))))) + (("JUnit version 4.13.2") + "JUnit version 4.12-SNAPSHOT"))))) + (add-after 'unpack 'patch-trace-shebang + (lambda _ + (for-each patch-shebang + (find-files "bin" (lambda (file stat) + (executable-file? file)))))) + (add-after 'unpack 'generate-flexbison + (lambda _ + (invoke "bash" "bin/genparser" "hl/src"))) + (add-after 'unpack 'generate-headers + (lambda _ + (invoke "perl" "bin/make_err" "src/H5err.txt") + (invoke "perl" "bin/make_vers" "src/H5vers.txt") + (invoke "perl" "bin/make_overflow" "src/H5overflow.txt"))) + (add-after 'install 'strip-jar-timestamps + (assoc-ref ant:%standard-phases 'strip-jar-timestamps))))) (native-inputs - (list `(,icedtea "jdk") - ;; For tests: - java-hamcrest-core - java-junit - java-slf4j-simple)) + (modify-inputs (package-native-inputs hdf5) + (prepend `(,icedtea "jdk")) + (prepend java-hamcrest-core) + (prepend java-junit) + (prepend java-slf4j-nop) + (prepend java-slf4j-simple) + (prepend (@ (gnu packages compression) zip)) + (delete "gfortran"))) (inputs - (list hdf4 - hdf5 - java-slf4j-api + (list java-slf4j-api libjpeg-turbo zlib)) (home-page "https://www.hdfgroup.org") - (synopsis "Java interface for the HDF4 and HDF5 libraries") - (description "Java HDF Interface (JHI) and Java HDF5 Interface (JHI5) use -the Java Native Interface to wrap the HDF4 and HDF5 libraries, which are -implemented in C.") + (synopsis "Java interface for the HDF5 library") + (description "The Java HDF5 Interface (JHI5) uses the Java Native +Interface to wrap the HDF5 library, which is implemented in C.") + (license (package-license hdf5)))) - ;; BSD-style license: - (license (license:x11-style - "https://support.hdfgroup.org/ftp/HDF5/hdf-java\ -/current/src/unpacked/COPYING.html")))) +(define-public hdf-java + (deprecated-package "hdf-java" hdf5-java)) (define-public hdf-eos2 (package