From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mHjGADRxyV7kKwAA0tVLHw (envelope-from ) for ; Sat, 23 May 2020 18:53:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id 2PM3ODNxyV6MdwAAB5/wlQ (envelope-from ) for ; Sat, 23 May 2020 18:53:39 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 90E5C940276 for ; Sat, 23 May 2020 18:53:39 +0000 (UTC) Received: from localhost ([::1]:36282 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jcZH8-0002Ox-IZ for larch@yhetil.org; Sat, 23 May 2020 14:53:38 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53294) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcZFc-0000qv-3L for guix-patches@gnu.org; Sat, 23 May 2020 14:52:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:52347) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jcZFb-0005Gc-KH for guix-patches@gnu.org; Sat, 23 May 2020 14:52:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jcZFb-00006W-Jp for guix-patches@gnu.org; Sat, 23 May 2020 14:52:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#41490] [PATCH 5/5] gnu: Add java-pep-adapter. Resent-From: Hartmut Goebel Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 23 May 2020 18:52:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41490 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 41490@debbugs.gnu.org X-Debbugs-Original-To: 41490@debbugs.gnu.org, guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1590259898339 (code B ref -1); Sat, 23 May 2020 18:52:03 +0000 Received: (at submit) by debbugs.gnu.org; 23 May 2020 18:51:38 +0000 Received: from localhost ([127.0.0.1]:35656 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcZFB-00005H-Nc for submit@debbugs.gnu.org; Sat, 23 May 2020 14:51:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:35044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jcZF6-0008W5-3z for submit@debbugs.gnu.org; Sat, 23 May 2020 14:51:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53256) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcZF5-0000eM-Rv for guix-patches@gnu.org; Sat, 23 May 2020 14:51:31 -0400 Received: from mail-out.m-online.net ([212.18.0.9]:36604) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jcZEy-0005DW-Qo for guix-patches@gnu.org; Sat, 23 May 2020 14:51:31 -0400 Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 49Tsrq5pM7z1qrfh; Sat, 23 May 2020 20:51:23 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 49Tsrq5cj7z1qr47; Sat, 23 May 2020 20:51:23 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id Tb8-By-i99MW; Sat, 23 May 2020 20:51:22 +0200 (CEST) Received: from hermia.goebel-consult.de (ppp-188-174-50-23.dynamic.mnet-online.de [188.174.50.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPS; Sat, 23 May 2020 20:51:22 +0200 (CEST) Received: from thisbe.fritz.box (unknown [192.168.110.24]) by hermia.goebel-consult.de (Postfix) with ESMTP id DBA9860489; Sat, 23 May 2020 20:51:09 +0200 (CEST) From: Hartmut Goebel Date: Sat, 23 May 2020 20:51:04 +0200 Message-Id: X-Mailer: git-send-email 2.21.3 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: none client-ip=212.18.0.9; envelope-from=h.goebel@crazy-compilers.com; helo=mail-out.m-online.net X-detected-operating-system: by eggs.gnu.org: First seen = 2020/05/23 14:48:50 X-ACL-Warn: Detected OS = Linux 3.11 and newer X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Spam-Score: -3.3 (---) X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Spam-Score: -0.01 X-TUID: KUvwm6Zm1NK+ * gnu/packages/pep.scm (java-pep-adapter): New variable. --- gnu/packages/pep.scm | 100 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) diff --git a/gnu/packages/pep.scm b/gnu/packages/pep.scm index bcef915970..0f169efd22 100644 --- a/gnu/packages/pep.scm +++ b/gnu/packages/pep.scm @@ -26,6 +26,8 @@ #:use-module (gnu packages) #:use-module (gnu packages base) #:use-module (gnu packages boost) + #:use-module (gnu packages documentation) + #:use-module (gnu packages java) #:use-module (gnu packages linux) #:use-module (gnu packages mail) ; for libetpan #:use-module (gnu packages nettle) @@ -247,3 +249,101 @@ ENGINE_INC_PATH=~a/include (description "The p≡p Python adapter is an adaptor interface to the p≡p (pretty Easy privacy) engine.") (license license:gpl3))) + +(define-public java-pep-adapter + (package + (name "java-pep-adapter") + (version "2.0.2") + (source + (origin + (method hg-fetch) + (uri (hg-reference + (url "https://pep.foundation/dev/repos/pEpJNIAdapter") + (changeset "9292f1b1a76a"))) ;; r699 + (file-name (string-append name "-" version "-checkout")) + (sha256 + (base32 "107ldpssc80bq8kndn2nqmav31gphj4lqagaiv3fddlfph4vji48")))) + (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 'fix-includes + (lambda _ + (substitute* "src/jniutils.hh" + (("#pragma once\n" line) + (string-append line + "#include \n" + "#include \n" + "#include \n"))) + #t)) + (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.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 +AD_LIB_PATH=~a/lib +AD_INC_PATH=~a/include +YML2_PROC=~a +JAVA_HOME=~a +" + out engine engine libadapter libadapter + (which "yml2proc") openjdk))) + (substitute* "src/Makefile" ;; suppress some warnings + (("^\\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))) ;; uuid.h + (home-page "https://pep.foundation/") + (synopsis "Java adapter for p≡p (pretty Easy Privacy)") + (description "The p≡p JNI adapter is a Java adapter interface to the p≡p +(pretty Easy privacy) engine.") + (license license:gpl3))) -- 2.21.3