guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: java-usb4java: Update to 1.3.0.


From: guix-commits
Subject: 02/02: gnu: java-usb4java: Update to 1.3.0.
Date: Sun, 7 Apr 2024 15:40:59 -0400 (EDT)

rekado pushed a commit to branch master
in repository guix.

commit 3571e4752501fb0f7da7785a3834009f522eb24c
Author: Ricardo Wurmus <rekado@elephly.net>
AuthorDate: Sun Apr 7 19:54:22 2024 +0200

    gnu: java-usb4java: Update to 1.3.0.
    
    * gnu/packages/libusb.scm (java-usb4java): Update to 1.3.0.
    [arguments]: Use plain list; use SEARCH-INPUT-FILE; adjust
    'disable-broken-tests; remove trailing #T from build phases.
    
    Change-Id: Ia5cd72b7c6c0426bcd95804802d14f3e5c728e1c
---
 gnu/packages/libusb.scm | 67 +++++++++++++++++++++++--------------------------
 1 file changed, 31 insertions(+), 36 deletions(-)

diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm
index 7c12842583..948d5dbccc 100644
--- a/gnu/packages/libusb.scm
+++ b/gnu/packages/libusb.scm
@@ -206,7 +206,7 @@ Go-like binding.")
 (define-public java-usb4java
   (package
     (name "java-usb4java")
-    (version "1.2.0")
+    (version "1.3.0")
     (source (origin
               (method git-fetch)
               (uri (git-reference
@@ -215,43 +215,38 @@ Go-like binding.")
               (file-name (git-file-name name version))
               (sha256
                (base32
-                "0aip6k24czz5g58qwb963mpick0b6ks774drfpdd8gcdvj9iv87j"))))
+                "0fwf8d2swgm8pmvssy53ixnc0pb5bfvc8iy42mf3dwgvr1zzvgmv"))))
     (build-system ant-build-system)
     (arguments
-     `(#:jar-name "usb4java.jar"
-       #:phases
-       (modify-phases %standard-phases
-         ;; Usually, native libusb4java libraries for all supported systems
-         ;; would be included in the jar and extracted at runtime.  Since we
-         ;; build everything from source we cannot just bundle pre-built
-         ;; binaries for other systems.  Instead, we patch the loader to
-         ;; directly return the appropriate library for this system.  The
-         ;; downside is that the jar will only work on the same architecture
-         ;; that it was built on.
-         (add-after 'unpack 'copy-libusb4java
-           (lambda* (#:key inputs #:allow-other-keys)
-             (substitute* "src/main/java/org/usb4java/Loader.java"
-               (("private static String extractLibrary" line)
-                (string-append
-                 line "(final String a, final String b) {"
-                 "return \""
-                 (assoc-ref inputs "libusb4java") "/lib/libusb4java.so"
-                 "\"; }\n"
-                 "private static String _extractLibrary")))
-             #t))
-         (add-after 'unpack 'disable-broken-tests
-           (lambda _
-             (with-directory-excursion "src/test/java/org/usb4java"
-               ;; These tests should only be run when USB devices are present.
-               (substitute* '("LibUsbGlobalTest.java"
-                              "TransferTest.java")
-                 (("this.context = new Context\\(\\);")
-                  "this.context = null;")
-                 (("LibUsb.init") "//"))
-               (substitute* "DeviceListIteratorTest.java"
-                 (("this.iterator.remove" line)
-                  (string-append "assumeUsbTestsEnabled();" line))))
-             #t)))))
+     (list
+      #:jar-name "usb4java.jar"
+      #:phases
+      #~(modify-phases %standard-phases
+          ;; Usually, native libusb4java libraries for all supported systems
+          ;; would be included in the jar and extracted at runtime.  Since we
+          ;; build everything from source we cannot just bundle pre-built
+          ;; binaries for other systems.  Instead, we patch the loader to
+          ;; directly return the appropriate library for this system.  The
+          ;; downside is that the jar will only work on the same architecture
+          ;; that it was built on.
+          (add-after 'unpack 'copy-libusb4java
+            (lambda* (#:key inputs #:allow-other-keys)
+              (substitute* "src/main/java/org/usb4java/Loader.java"
+                (("private static String extractLibrary" line)
+                 (string-append
+                  line "(final String a, final String b) {"
+                  "return \""
+                  (search-input-file inputs "/lib/libusb4java.so")
+                  "\"; }\n"
+                  "private static String _extractLibrary")))))
+          (add-after 'unpack 'disable-broken-tests
+            (lambda _
+              (with-directory-excursion "src/test/java/org/usb4java"
+                ;; These tests should only be run when USB devices are present.
+                (substitute* '("LibUsbGlobalTest.java"
+                               "TransferTest.java")
+                  (("this.context = new Context\\(\\);")
+                   "this.context = null;"))))))))
     (inputs
      (list libusb4java java-commons-lang3 java-junit java-hamcrest-core))
     (home-page "http://usb4java.org/";)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]