Update java-native-access
more/packages/java.scm
| 33 | 33 | #:use-module (gnu packages compression) | |
| 34 | 34 | #:use-module (gnu packages docbook) | |
| 35 | 35 | #:use-module (gnu packages java) | |
| 36 | + | #:use-module (gnu packages libffi) | |
| 36 | 37 | #:use-module (gnu packages maven) | |
| 37 | 38 | #:use-module (gnu packages perl) | |
| 38 | 39 | #:use-module (gnu packages web) | |
| 39 | 40 | #:use-module (gnu packages xml) | |
| 41 | + | #:use-module (gnu packages xorg) | |
| 40 | 42 | #:use-module (more packages groovy) | |
| 41 | 43 | #:use-module (more packages maven) | |
| 42 | 44 | #:use-module (more packages python)) | |
… | |||
| 4691 | 4693 | (define-public java-native-access | |
| 4692 | 4694 | (package | |
| 4693 | 4695 | (name "java-native-access") | |
| 4694 | - | (version "4.5.0") | |
| 4696 | + | (version "4.5.1") | |
| 4695 | 4697 | (source (origin | |
| 4696 | 4698 | (method url-fetch) | |
| 4697 | 4699 | (uri (string-append "https://github.com/java-native-access/jna/" | |
… | |||
| 4699 | 4701 | (file-name (string-append name "-" version ".tar.gz")) | |
| 4700 | 4702 | (sha256 | |
| 4701 | 4703 | (base32 | |
| 4702 | - | "1lvk6r530iqd404g5gpqmzxc46qzysa5ds6a02nz8kcr2bg2rqgi")))) | |
| 4704 | + | "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9")) | |
| 4705 | + | (modules '((guix build utils))) | |
| 4706 | + | (snippet | |
| 4707 | + | `(for-each delete-file (find-files "." ".*.jar"))))) | |
| 4703 | 4708 | (build-system ant-build-system) | |
| 4704 | 4709 | (arguments | |
| 4705 | - | `(#:jar-name "jna.jar" | |
| 4706 | - | #:tests? #f)); no tests | |
| 4707 | - | (home-page "") | |
| 4708 | - | (synopsis "") | |
| 4709 | - | (description "") | |
| 4710 | + | `(#:tests? #f; FIXME: tests require reflections.jar | |
| 4711 | + | #:test-target "test" | |
| 4712 | + | #:make-flags (list "-Ddynlink.native=true") | |
| 4713 | + | #:phases | |
| 4714 | + | (modify-phases %standard-phases | |
| 4715 | + | (add-before 'build 'fix-build.xml | |
| 4716 | + | (lambda* (#:key inputs #:allow-other-keys) | |
| 4717 | + | (substitute* "build.xml" | |
| 4718 | + | ;; Since we removed the bundled ant.jar, give the correct path | |
| 4719 | + | (("lib/ant.jar") (string-append (assoc-ref inputs "ant") "/lib/ant.jar")) | |
| 4720 | + | ;; We removed generated native libraries. We can only rebuild one | |
| 4721 | + | ;; so don't fail if we can't find a native library for another architecture. | |
| 4722 | + | (("zipfileset") "zipfileset erroronmissingarchive=\"false\"")) | |
| 4723 | + | ;; Copy test dependencies | |
| 4724 | + | (copy-file (string-append (assoc-ref inputs "java-junit") | |
| 4725 | + | "/share/java/junit.jar") | |
| 4726 | + | "lib/junit.jar") | |
| 4727 | + | (copy-file (string-append (assoc-ref inputs "java-hamcrest-core") | |
| 4728 | + | "/share/java/hamcrest-core.jar") | |
| 4729 | + | "lib/hamcrest-core.jar") | |
| 4730 | + | ;; FIXME: once reflections.jar is built, copy it to lib/test. | |
| 4731 | + | #t)) | |
| 4732 | + | (add-before 'build 'build-native | |
| 4733 | + | (lambda _ | |
| 4734 | + | (invoke "ant" "-Ddynlink.native=true" "native") | |
| 4735 | + | #t)) | |
| 4736 | + | (replace 'install | |
| 4737 | + | (install-jars "build"))))) | |
| 4738 | + | (inputs | |
| 4739 | + | `(("libffi" ,libffi) | |
| 4740 | + | ("libx11" ,libx11) | |
| 4741 | + | ("libxt" ,libxt))) | |
| 4742 | + | (native-inputs | |
| 4743 | + | `(("java-junit" ,java-junit) | |
| 4744 | + | ("java-hamcrest-core" ,java-hamcrest-core))) | |
| 4745 | + | (home-page "https://github.com/java-native-access/jna") | |
| 4746 | + | (synopsis "Access to native shared libraries from Java") | |
| 4747 | + | (description "JNA provides Java programs easy access to native shared | |
| 4748 | + | libraries without writing anything but Java code - no JNI or native code is | |
| 4749 | + | required. JNA allows you to call directly into native functions using natural | |
| 4750 | + | Java method invocation.") | |
| 4710 | 4751 | ;; Java Native Access project (JNA) is dual-licensed under 2 | |
| 4711 | 4752 | ;; alternative Open Source/Free licenses: LGPL 2.1 or later and | |
| 4712 | 4753 | ;; Apache License 2.0. (starting with JNA version 4.0.0). | |