diff --git a/gnu/packages/libusb.scm b/gnu/packages/libusb.scm index 57f30fca0d..7c12842583 100644 --- a/gnu/packages/libusb.scm +++ b/gnu/packages/libusb.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2012 Nikita Karetnikov ;;; Copyright © 2015 Andreas Enge ;;; Copyright © 2015 Andy Wingo -;;; Copyright © 2015, 2016, 2017, 2018, 2019 Ricardo Wurmus +;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2024 Ricardo Wurmus ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Theodoros Foradis ;;; Copyright © 2017 Jonathan Brielmaier @@ -137,11 +137,11 @@ version of libusb to run with newer libusb.") (define-public libusb4java ;; There is no public release so we take the latest version from git. - (let ((commit "396d642a57678a0d9663b062c980fe100cc0ea1e") + (let ((commit "0842e8104d8772da873314e233aa625f5651fd34") (revision "1")) (package (name "libusb4java") - (version (string-append "0-" revision "." (string-take commit 9))) + (version (git-version "1.3.1" revision commit)) (source (origin (method git-fetch) (uri (git-reference @@ -150,23 +150,16 @@ version of libusb to run with newer libusb.") (file-name (git-file-name name version)) (sha256 (base32 - "0wqgapalhfh9v38ycbl6i2f5lh1wpr6fzwn5dwd0rdacypkd1gml")))) + "16hz0h8fvrr764gwj90yny1kxpf0y7p2czr7pdrw3qby21fqkzrq")))) (build-system cmake-build-system) (arguments - `(#:tests? #f ; there are no tests - #:phases - (modify-phases %standard-phases - ;; FIXME: libusb 1.0.22 deprecated libusb_set_debug, so the build - ;; fails because libusb4java uses a deprecated procedure. - (add-after 'unpack 'disable-Werror - (lambda _ - (substitute* "CMakeLists.txt" - (("-Werror") "")) - #t)) - (add-before 'configure 'set-JAVA_HOME - (lambda* (#:key inputs #:allow-other-keys) - (setenv "JAVA_HOME" (assoc-ref inputs "jdk")) - #t))))) + (list + #:tests? #f ;there are no tests + #:phases + #~(modify-phases %standard-phases + (add-before 'configure 'set-JAVA_HOME + (lambda _ + (setenv "JAVA_HOME" #$(this-package-native-input "jdk"))))))) (inputs (list libusb)) (native-inputs