Update java-native-access

Julien LepillerWed Mar 14 18:14:35+0100 2018

c3607eb

Update java-native-access

more/packages/java.scm

3333
  #:use-module (gnu packages compression)
3434
  #:use-module (gnu packages docbook)
3535
  #:use-module (gnu packages java)
36+
  #:use-module (gnu packages libffi)
3637
  #:use-module (gnu packages maven)
3738
  #:use-module (gnu packages perl)
3839
  #:use-module (gnu packages web)
3940
  #:use-module (gnu packages xml)
41+
  #:use-module (gnu packages xorg)
4042
  #:use-module (more packages groovy)
4143
  #:use-module (more packages maven)
4244
  #:use-module (more packages python))

46914693
(define-public java-native-access
46924694
  (package
46934695
    (name "java-native-access")
4694-
    (version "4.5.0")
4696+
    (version "4.5.1")
46954697
    (source (origin
46964698
              (method url-fetch)
46974699
              (uri (string-append "https://github.com/java-native-access/jna/"

46994701
              (file-name (string-append name "-" version ".tar.gz"))
47004702
              (sha256
47014703
               (base32
4702-
                "1lvk6r530iqd404g5gpqmzxc46qzysa5ds6a02nz8kcr2bg2rqgi"))))
4704+
                "0zrpzkib6b905i018a9pqlzkqinphywr6y4jwv6mwp63jjqvqkd9"))
4705+
              (modules '((guix build utils)))
4706+
              (snippet
4707+
                `(for-each delete-file (find-files "." ".*.jar")))))
47034708
    (build-system ant-build-system)
47044709
    (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.")
47104751
    ;; Java Native Access project (JNA) is dual-licensed under 2 
47114752
    ;; alternative Open Source/Free licenses: LGPL 2.1 or later and 
47124753
    ;; Apache License 2.0. (starting with JNA version 4.0.0).