Browse Source

pEp: java-pep-jni-adapter: Update to 2.1.0-rc0.

* pEp/nightly.scm (java-pep-jni-adapter): Update to 2.1.0-rc0.
main
Hartmut Goebel 2 years ago
parent
commit
19e0ef22d2
1 changed files with 80 additions and 82 deletions
  1. +80
    -82
      pEp/nightly.scm

+ 80
- 82
pEp/nightly.scm View File

@ -257,48 +257,46 @@ adapters.")
(license license:gpl3)))
(define-public java-pep-jni-adapter
(let ((version "0.0.0")
(changeset "710") ;; 2020-05-05 - branch sync
(checksum "1b86jrakjyw4px3r874l3yrpwmk4l687k2kc3m8sj1wxgrjb66iv"))
(package
(name "java-pep-jni-adapter")
(version (string-append version "-" changeset))
(source
(origin
(method hg-fetch)
(uri (hg-reference
(url "https://pep.foundation/dev/repos/pEpJNIAdapter")
(changeset changeset)))
(file-name (string-append name "-" version "-checkout"))
(sha256 (base32 checksum))))
(build-system gnu-build-system)
(outputs '("out" "doc"))
(arguments
`(#:test-target "test"
#:make-flags (list "doxy-all")
#:phases
(modify-phases %standard-phases
(add-before 'configure 'pin-shared-lib-path
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "src/foundation/pEp/jniadapter/AbstractEngine.java"
(("System.loadLibrary\\(\"pEpJNI\"\\);")
;(string-append "System.loadLibrary(\""
(string-append "System.load(\""
(assoc-ref outputs "out")
"/lib/libpEpJNI.so" "\");")))
#t))
(replace 'configure
;; pEpJNIAdapter does not use autotools and configure,
;; but a local.conf. We need to tweak the values there.
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(engine (assoc-ref inputs "pep-engine"))
(libadapter (assoc-ref inputs "libpepadapter"))
(openjdk (assoc-ref inputs "openjdk"))
)
(with-output-to-file "local.conf"
(lambda ()
(format #t "
(package
(name "java-pep-jni-adapter")
(version "2.1.0-rc0")
(source
(origin
(method hg-fetch)
(uri (hg-reference
(url "https://pep.foundation/dev/repos/pEpJNIAdapter")
(changeset "251fff1e1cef"))) ;; r726
(file-name (string-append name "-" version "-checkout"))
(sha256
(base32 "06kqswm34slv9dgq36w1ivqxjfcq7ccxnhnfq1bavp73w96rqq1b"))))
(build-system gnu-build-system)
(outputs '("out" "doc"))
(arguments
`(#:test-target "test"
#:make-flags (list "doxy-all")
#:phases
(modify-phases %standard-phases
(add-before 'configure 'pin-shared-lib-path
(lambda* (#:key outputs #:allow-other-keys)
(substitute* "src/foundation/pEp/jniadapter/AbstractEngine.java"
(("System.loadLibrary\\(\"pEpJNI\"\\);")
;(string-append "System.loadLibrary(\""
(string-append "System.load(\""
(assoc-ref outputs "out")
"/lib/libpEpJNI.so" "\");")))
#t))
(replace 'configure
;; pEpJNIAdapter does not use autotools and configure,
;; but a local.conf. We need to tweak the values there.
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))
(engine (assoc-ref inputs "pep-engine"))
(libadapter (assoc-ref inputs "libpepadapter"))
(openjdk (assoc-ref inputs "openjdk"))
)
(with-output-to-file "local.conf"
(lambda ()
(format #t "
PREFIX=~a
ENGINE_LIB_PATH=~a/lib
ENGINE_INC_PATH=~a/include
@ -307,47 +305,47 @@ AD_INC_PATH=~a/include
YML2_PROC=~a
JAVA_HOME=~a
"
out engine engine libadapter libadapter
(which "yml2proc") openjdk)))
(substitute* "src/Makefile"
(("^\\s+OLD_JAVA=") " xxx_OLD_JAVA="))
#t)))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(libout (string-append out "/lib/"))
(javaout (string-append out "/share/java/")))
(mkdir-p libout)
(mkdir-p javaout)
(copy-file "src/libpEpJNI.so"
(string-append libout "/libpEpJNI.so"))
(copy-file "src/pEp.jar" (string-append javaout "/pEp.jar"))
#t)))
(add-after 'install 'install-docs
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "doc"))
(docout (string-append out "/share/doc/pEp-JNI-adapter"))
(cxxout (string-append docout "/cxx"))
(javaout (string-append docout "/java")))
(mkdir-p cxxout)
(mkdir-p javaout)
(copy-recursively "doc/doxygen/cxx/html" cxxout)
(copy-recursively "doc/doxygen/java/html" javaout)
#t))))))
(native-inputs
`(("doxygen" ,doxygen)
("openjdk" ,openjdk9 "jdk")
("which" ,which)
("yml2" ,yml2)))
(inputs
`(("libpepadapter" ,libpepadapter)
("pep-engine" ,pep-engine)
("util-linux" ,util-linux "lib"))) ;; uuid.h
(home-page "https://pep.foundation/")
(synopsis "p≡p Python adapter")
(description "The pp Python adapter is an adaptor interface to the pp
out engine engine libadapter libadapter
(which "yml2proc") openjdk)))
(substitute* "src/Makefile"
(("^\\s+OLD_JAVA=") " xxx_OLD_JAVA="))
#t)))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(libout (string-append out "/lib/"))
(javaout (string-append out "/share/java/")))
(mkdir-p libout)
(mkdir-p javaout)
(copy-file "src/libpEpJNI.so"
(string-append libout "/libpEpJNI.so"))
(copy-file "src/pEp.jar" (string-append javaout "/pEp.jar"))
#t)))
(add-after 'install 'install-docs
(lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "doc"))
(docout (string-append out "/share/doc/pEp-JNI-adapter"))
(cxxout (string-append docout "/cxx"))
(javaout (string-append docout "/java")))
(mkdir-p cxxout)
(mkdir-p javaout)
(copy-recursively "doc/doxygen/cxx/html" cxxout)
(copy-recursively "doc/doxygen/java/html" javaout)
#t))))))
(native-inputs
`(("doxygen" ,doxygen)
("openjdk" ,openjdk9 "jdk")
("which" ,which)
("yml2" ,yml2)))
(inputs
`(("libpepadapter" ,libpepadapter)
("pep-engine" ,pep-engine)
("util-linux" ,util-linux "lib"))) ;; uuid.h
(home-page "https://pep.foundation/")
(synopsis "p≡p Python adapter")
(description "The pp Python adapter is an adaptor interface to the pp
(pretty Easy privacy) Engine.")
(license license:gpl3))))
(license license:gpl3)))


Loading…
Cancel
Save