summaryrefslogtreecommitdiff
path: root/dev-java/jss
diff options
context:
space:
mode:
authorPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
committerPalica <palica+gitlab@liguros.net>2020-06-23 22:35:08 +0200
commitecdac123787b96ce6649f0f91da12ea6458cc2b1 (patch)
treeb89c74d9e6fe6e8aebc4c77bcbeb4ab73214127d /dev-java/jss
parent1be72aa41cf41dedadeecf59dca9f01de6381f5e (diff)
downloadsrcux-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.gz
srcux-ecdac123787b96ce6649f0f91da12ea6458cc2b1.tar.xz
srcux-ecdac123787b96ce6649f0f91da12ea6458cc2b1.zip
Updating liguros repo
Diffstat (limited to 'dev-java/jss')
-rw-r--r--dev-java/jss/Manifest1
-rw-r--r--dev-java/jss/files/jss-3.4-target_source.patch12
-rw-r--r--dev-java/jss/files/jss-4.2.5-use_pkg-config.patch25
-rw-r--r--dev-java/jss/files/jss-4.3-cflags.patch11
-rw-r--r--dev-java/jss/files/jss-4.3-javadoc.patch11
-rw-r--r--dev-java/jss/files/jss-4.3-secitem.patch154
-rw-r--r--dev-java/jss/files/jss-4.3.2-ldflags.patch11
-rw-r--r--dev-java/jss/jss-4.3.2.ebuild93
-rw-r--r--dev-java/jss/metadata.xml17
9 files changed, 335 insertions, 0 deletions
diff --git a/dev-java/jss/Manifest b/dev-java/jss/Manifest
new file mode 100644
index 000000000000..08f711777829
--- /dev/null
+++ b/dev-java/jss/Manifest
@@ -0,0 +1 @@
+DIST jss-4.3.2.tar.bz2 435542 BLAKE2B 9623018e6e67654219fa439fdc907777cd286aa28b6bdbafee39a7082f949bc393d60dba32ca0b49178ecd423dcff0aa3ad411abb9db9332c6429d7751d89127 SHA512 3296da72f204fc4a0ea58dd889cf2721a4afa0ec7b5406312e64354cc67edcfc370140ad22a24f0dfcf11e438e69ebe9da45a70b5cbaa4026b40fd5fcf96c232
diff --git a/dev-java/jss/files/jss-3.4-target_source.patch b/dev-java/jss/files/jss-3.4-target_source.patch
new file mode 100644
index 000000000000..e024a0b8b622
--- /dev/null
+++ b/dev-java/jss/files/jss-3.4-target_source.patch
@@ -0,0 +1,12 @@
+diff -Nru jss-3.4-src/mozilla/security/jss/build_java.pl jss-3.4-src.patched/mozilla/security/jss/build_java.pl
+--- jss-3.4-src/mozilla/security/jss/build_java.pl 2002-10-17 02:33:29.000000000 +0200
++++ jss-3.4-src.patched/mozilla/security/jss/build_java.pl 2006-08-15 00:53:05.000000000 +0200
+@@ -190,7 +190,7 @@
+ #
+ if( scalar(@source_list) > 0 ) {
+ ensure_dir_exists($class_dir);
+- print_do("$javac $javac_opt_flag -sourcepath . -d $class_dir " .
++ print_do("$javac $ENV{JAVA_GENTOO_OPTS} $javac_opt_flag -sourcepath . -d $class_dir " .
+ "$classpath " . join(" ",@source_list));
+ }
+
diff --git a/dev-java/jss/files/jss-4.2.5-use_pkg-config.patch b/dev-java/jss/files/jss-4.2.5-use_pkg-config.patch
new file mode 100644
index 000000000000..a2c3a3e5ad93
--- /dev/null
+++ b/dev-java/jss/files/jss-4.2.5-use_pkg-config.patch
@@ -0,0 +1,25 @@
+Submitted By: Mario Fetka (mario-fetka at gmx dot at)
+Date: 2007-10-06
+Initial Package Version: 4.2.5
+Origin: me
+Upstream Status: #392775 UNCONFIRMED
+Description: this patch adds pkgconfig support to jss coreconf
+!!!! no check for NSS_PKGCONFIG NSPR_PKGCONFIG at the moment !!!!
+
+diff -Naur mozilla.orig/security/coreconf/location.mk mozilla/security/coreconf/location.mk
+--- mozilla.orig/security/coreconf/location.mk 2006-02-27 21:18:31.000000000 +0000
++++ mozilla/security/coreconf/location.mk 2007-10-06 10:10:17.000000000 +0000
+@@ -67,6 +67,13 @@
+
+ GARBAGE += $(DEPENDENCIES) core $(wildcard core.[0-9]*)
+
++ifdef USE_PKGCONFIG
++ NSPR_INCLUDE_DIR = `pkg-config --variable=includedir $(NSPR_PKGCONFIG)`
++ NSPR_LIB_DIR = `pkg-config --variable=libdir $(NSPR_PKGCONFIG)`
++ NSS_INCLUDE_DIR = `pkg-config --variable=includedir $(NSS_PKGCONFIG)`
++ NSS_LIB_DIR = `pkg-config --variable=libdir $(NSS_PKGCONFIG)`
++endif
++
+ ifdef NSPR_INCLUDE_DIR
+ INCLUDES += -I$(NSPR_INCLUDE_DIR)
+ endif
diff --git a/dev-java/jss/files/jss-4.3-cflags.patch b/dev-java/jss/files/jss-4.3-cflags.patch
new file mode 100644
index 000000000000..3298a2765fc1
--- /dev/null
+++ b/dev-java/jss/files/jss-4.3-cflags.patch
@@ -0,0 +1,11 @@
+--- security/coreconf/command.mk 2007-10-23 23:55:00.000000000 +0200
++++ security/coreconf/command.mk.b 2013-06-05 11:15:31.092383902 +0200
+@@ -45,7 +45,7 @@
+ CCF = $(CC) $(CFLAGS)
+ LINK_DLL = $(LINK) $(OS_DLLFLAGS) $(DLLFLAGS)
+ LINK_EXE = $(LINK) $(OS_LFLAGS) $(LFLAGS)
+-CFLAGS = $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
++CFLAGS += $(OPTIMIZER) $(OS_CFLAGS) $(XP_DEFINE) $(DEFINES) $(INCLUDES) \
+ $(XCFLAGS)
+ PERL = perl
+ RANLIB = echo
diff --git a/dev-java/jss/files/jss-4.3-javadoc.patch b/dev-java/jss/files/jss-4.3-javadoc.patch
new file mode 100644
index 000000000000..891e1ff93838
--- /dev/null
+++ b/dev-java/jss/files/jss-4.3-javadoc.patch
@@ -0,0 +1,11 @@
+--- security/jss/build_java.pl.orig 2015-10-01 23:04:22.540035573 +0100
++++ security/jss/build_java.pl 2015-10-01 23:11:41.413230402 +0100
+@@ -323,7 +323,7 @@
+ ensure_dir_exists("$dist_dir/jssdoc");
+ my $targets = join(" ", @packages);
+ print "$targets\n";
+- print_do("$javadoc -breakiterator -sourcepath . -d $dist_dir/jssdoc $html_header_opt $targets");
++ print_do("$javadoc -Xdoclint:none -breakiterator -sourcepath . -d $dist_dir/jssdoc $html_header_opt $targets");
+ print_do("cp $dist_dir/jssdoc/index.html $dist_dir/jssdoc/index.html.bak");
+ print_do("cp $dist_dir/jssdoc/overview-summary.html $dist_dir/jssdoc/index.html");
+ }
diff --git a/dev-java/jss/files/jss-4.3-secitem.patch b/dev-java/jss/files/jss-4.3-secitem.patch
new file mode 100644
index 000000000000..d9e7da394075
--- /dev/null
+++ b/dev-java/jss/files/jss-4.3-secitem.patch
@@ -0,0 +1,154 @@
+--- a/security/jss/org/mozilla/jss/CryptoManager.c 2008-05-22 06:28:09.000000000 +0200
++++ b/security/jss/org/mozilla/jss/CryptoManager.c 2013-06-05 11:09:58.649080012 +0200
+@@ -35,7 +35,7 @@
+ * ***** END LICENSE BLOCK ***** */
+ #include "_jni/org_mozilla_jss_CryptoManager.h"
+
+-#include <secitem.h>
++#include <nss/secitem.h>
+ #include <secmod.h>
+ #include <cert.h>
+ #include <certt.h>
+--- a/security/jss/org/mozilla/jss/SecretDecoderRing/KeyManager.c 2003-12-19 20:36:30.000000000 +0100
++++ b/security/jss/org/mozilla/jss/SecretDecoderRing/KeyManager.c 2013-06-05 11:09:58.585746684 +0200
+@@ -36,7 +36,7 @@
+
+ #include "_jni/org_mozilla_jss_SecretDecoderRing_KeyManager.h"
+ #include <nspr.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+ #include <jss_exceptions.h>
+ #include <jssutil.h>
+ #include <pk11func.h>
+--- a/security/jss/org/mozilla/jss/crypto/PQGParams.c 2004-04-25 17:02:21.000000000 +0200
++++ b/security/jss/org/mozilla/jss/crypto/PQGParams.c 2013-06-05 11:09:58.589080017 +0200
+@@ -39,7 +39,7 @@
+ #include <nspr.h>
+
+ #include <plarena.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+ #include <secoidt.h>
+ #include <keyt.h> /* for PQGParams */
+ #include <pk11pqg.h>
+--- a/security/jss/org/mozilla/jss/crypto/SecretDecoderRing.c 2002-01-08 20:38:46.000000000 +0100
++++ b/security/jss/org/mozilla/jss/crypto/SecretDecoderRing.c 2013-06-05 11:09:58.585746684 +0200
+@@ -36,7 +36,7 @@
+
+ #include "_jni/org_mozilla_jss_crypto_SecretDecoderRing.h"
+ #include <nspr.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+ #include <pk11sdr.h>
+ #include <jss_exceptions.h>
+ #include <jssutil.h>
+--- a/security/jss/org/mozilla/jss/pkcs11/PK11Cipher.c 2004-04-25 17:02:22.000000000 +0200
++++ b/security/jss/org/mozilla/jss/pkcs11/PK11Cipher.c 2013-06-05 11:09:58.632413347 +0200
+@@ -40,7 +40,7 @@
+ #include <plarena.h>
+ #include <seccomon.h>
+ #include <pk11func.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+
+ /* JSS includes */
+ #include <java_ids.h>
+--- a/security/jss/org/mozilla/jss/pkcs11/PK11KeyPairGenerator.c 2006-02-23 02:21:42.000000000 +0100
++++ b/security/jss/org/mozilla/jss/pkcs11/PK11KeyPairGenerator.c 2013-06-05 11:09:58.595746684 +0200
+@@ -40,7 +40,7 @@
+ #include <pk11pqg.h>
+ #include <nspr.h>
+ #include <key.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+
+ #include <jssutil.h>
+ #include <pk11util.h>
+--- a/security/jss/org/mozilla/jss/pkcs11/PK11KeyWrapper.c 2006-02-23 02:21:42.000000000 +0100
++++ b/security/jss/org/mozilla/jss/pkcs11/PK11KeyWrapper.c 2013-06-05 11:09:58.629080014 +0200
+@@ -40,7 +40,7 @@
+ #include <plarena.h>
+ #include <seccomon.h>
+ #include <pk11func.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+ #include <keyt.h>
+
+ /* JSS includes */
+--- a/security/jss/org/mozilla/jss/pkcs11/PK11MessageDigest.c 2004-04-25 17:02:22.000000000 +0200
++++ b/security/jss/org/mozilla/jss/pkcs11/PK11MessageDigest.c 2013-06-05 11:09:58.609080016 +0200
+@@ -40,7 +40,7 @@
+ #include <plarena.h>
+ #include <seccomon.h>
+ #include <pk11func.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+
+ /* JSS includes */
+ #include <java_ids.h>
+--- a/security/jss/org/mozilla/jss/pkcs11/PK11PrivKey.c 2006-04-25 03:26:42.000000000 +0200
++++ b/security/jss/org/mozilla/jss/pkcs11/PK11PrivKey.c 2013-06-05 11:09:58.609080016 +0200
+@@ -43,7 +43,7 @@
+ #include <secerr.h>
+ #include <nspr.h>
+ #include <key.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+
+ #include <jss_bigint.h>
+ #include <jssutil.h>
+--- a/security/jss/org/mozilla/jss/pkcs11/PK11Signature.c 2004-04-25 17:02:22.000000000 +0200
++++ b/security/jss/org/mozilla/jss/pkcs11/PK11Signature.c 2013-06-05 11:09:58.605746683 +0200
+@@ -35,7 +35,7 @@
+ * ***** END LICENSE BLOCK ***** */
+
+ #include <nspr.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+ #include <secoidt.h>
+ #include <secmodt.h>
+ #include <pk11func.h>
+--- a/security/jss/org/mozilla/jss/pkcs11/PK11Token.c 2007-11-10 01:37:57.000000000 +0100
++++ b/security/jss/org/mozilla/jss/pkcs11/PK11Token.c 2013-06-05 11:09:58.622413348 +0200
+@@ -53,7 +53,7 @@
+ #include <jss_bigint.h>
+ #include <Algorithm.h>
+
+-#include <secitem.h>
++#include <nss/secitem.h>
+ #include "java_ids.h"
+
+ #include "pk11util.h"
+--- a/security/jss/org/mozilla/jss/ssl/callbacks.c 2004-09-03 20:32:03.000000000 +0200
++++ b/security/jss/org/mozilla/jss/ssl/callbacks.c 2013-06-05 11:09:58.565746686 +0200
+@@ -39,7 +39,7 @@
+ #include <nspr.h>
+ #include <java_ids.h>
+ #include <jss_exceptions.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+ #include <jssutil.h>
+ #include <certt.h>
+ #include <keythi.h>
+--- a/security/jss/org/mozilla/jss/util/jssutil.c 2004-04-25 17:02:29.000000000 +0200
++++ b/security/jss/org/mozilla/jss/util/jssutil.c 2013-06-05 11:09:58.579080018 +0200
+@@ -38,7 +38,7 @@
+ #include <nspr.h>
+ #include <plstr.h>
+ #include <seccomon.h>
+-#include <secitem.h>
++#include <nss/secitem.h>
+ #include "jssutil.h"
+ #include "jss_bigint.h"
+ #include "jss_exceptions.h"
+--- a/security/jss/org/mozilla/jss/util/jssutil.h 2004-04-25 17:02:29.000000000 +0200
++++ b/security/jss/org/mozilla/jss/util/jssutil.h 2013-06-05 11:09:49.829080794 +0200
+@@ -39,7 +39,7 @@
+ /* Need to include these first.
+ * #include <nspr.h>
+ * #include <jni.h>
+- * #include <secitem.h>
++ * #include <nss/secitem.h>
+ */
+
+ PR_BEGIN_EXTERN_C
diff --git a/dev-java/jss/files/jss-4.3.2-ldflags.patch b/dev-java/jss/files/jss-4.3.2-ldflags.patch
new file mode 100644
index 000000000000..fde2e26bf77c
--- /dev/null
+++ b/dev-java/jss/files/jss-4.3.2-ldflags.patch
@@ -0,0 +1,11 @@
+--- security/coreconf/Linux.mk.orig 2010-01-15 22:19:00.000000000 +0000
++++ security/coreconf/Linux.mk 2015-09-27 22:17:50.102547607 +0100
+@@ -142,7 +142,7 @@
+ ARCH = linux
+
+ DSO_CFLAGS = -fPIC
+-DSO_LDOPTS = -shared $(ARCHFLAG)
++DSO_LDOPTS = $(LDFLAGS) -shared $(ARCHFLAG)
+ # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
+ # incorrectly reports undefined references in the libraries we link with, so
+ # we don't use -z defs there.
diff --git a/dev-java/jss/jss-4.3.2.ebuild b/dev-java/jss/jss-4.3.2.ebuild
new file mode 100644
index 000000000000..077c3bf848fb
--- /dev/null
+++ b/dev-java/jss/jss-4.3.2.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc source"
+
+inherit multilib toolchain-funcs java-pkg-2
+
+DESCRIPTION="Network Security Services for Java (JSS)"
+HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/JSS"
+# 4.3.2 was released but was seemingly never announced. The binary jar
+# exists on Mozilla's servers but Chewi could only find a source tarball
+# at https://obs.kolabsys.com/package/show/Kolab:3.4/jss. However, you
+# need to register in order to download it, hence he has mirrored it.
+SRC_URI="https://dev.gentoo.org/~chewi/distfiles/${P}.tar.bz2"
+LICENSE="MPL-1.1"
+SLOT="3.4"
+KEYWORDS="amd64 x86"
+IUSE="examples test"
+
+CDEPEND=">=dev-libs/nspr-4.7.1
+ >=dev-libs/nss-3.12.5"
+
+DEPEND="${CDEPEND}
+ dev-lang/perl
+ >=virtual/jdk-1.6
+ virtual/pkgconfig
+ test? ( dev-libs/nss[utils] )"
+
+RDEPEND="${CDEPEND}
+ >=virtual/jre-1.6"
+
+S="${WORKDIR}/${P}/mozilla"
+
+java_prepare() {
+ epatch "${FILESDIR}"/${PN}-3.4-target_source.patch
+ epatch "${FILESDIR}"/${PN}-4.2.5-use_pkg-config.patch
+ epatch "${FILESDIR}"/${PN}-4.3-cflags.patch
+ epatch "${FILESDIR}"/${PN}-4.3.2-ldflags.patch
+ epatch "${FILESDIR}"/${PN}-4.3-secitem.patch
+
+ if java-pkg_is-vm-version-ge 1.8; then
+ epatch "${FILESDIR}"/${PN}-4.3-javadoc.patch
+ fi
+}
+
+src_compile() {
+ local ARGS=(
+ "CC=$(tc-getCC)"
+ "AR=$(tc-getAR) cr \$@"
+ "OS_RELEASE=2.6"
+ "BUILD_OPT=1"
+ )
+
+ export JAVA_GENTOO_OPTS="$(java-pkg_javac-args)"
+ use amd64 && export USE_64=1
+
+ cd "${S}/security/coreconf" || die
+ emake -j1 "${ARGS[@]}"
+
+ cd "${S}/security/jss" || die
+ emake -j1 "${ARGS[@]}" USE_PKGCONFIG=1 NSS_PKGCONFIG=nss NSPR_PKGCONFIG=nspr
+ use doc && emake -j1 "${ARGS[@]}" javadoc
+}
+
+# Chewi has managed to reach a test pass rate of 31/40 (78%) but the
+# remainder fail due to JSS not having kept pace with the ciphersuites
+# in NSS. There's not much we can do about that. The suite also leaves
+# java processes running and exits successfully on failure.
+RESTRICT="test"
+
+src_test() {
+ # Parts of NSS are required for the tests.
+ ln -snf "${EROOT}usr/$(get_libdir)/libnssckbi.so" dist/Linux*.OBJ/lib/ || die
+ ln -snf "${EROOT}usr/bin" dist/Linux*.OBJ/ || die
+
+ # The tests must be run from this directory.
+ cd security/jss/org/mozilla/jss/tests || die
+ BUILD_OPT=1 perl all.pl dist "${S}"/dist/Linux*.OBJ/ || die "tests failed"
+}
+
+src_install() {
+ java-pkg_dojar dist/*.jar
+
+ # Use this instead of the one in dist because it is a symlink
+ # and doso handles symlinks by just symlinking to the original
+ java-pkg_doso ./security/${PN}/lib/*/*.so
+
+ use doc && java-pkg_dojavadoc dist/jssdoc
+ use source && java-pkg_dosrc ./security/jss/org
+ use examples && java-pkg_doexamples ./security/jss/samples
+}
diff --git a/dev-java/jss/metadata.xml b/dev-java/jss/metadata.xml
new file mode 100644
index 000000000000..a776f6baa9a4
--- /dev/null
+++ b/dev-java/jss/metadata.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer type="project">
+ <email>java@gentoo.org</email>
+ <name>Java</name>
+</maintainer>
+
+<longdescription>
+
+Network Security Services for Java (JSS) is a Java interface to NSS. It supports
+most of the security standards and encryption technologies supported by NSS. JSS
+also provides a pure Java interface for ASN.1 types and BER/DER encoding.
+
+</longdescription>
+ <origin>gentoo-staging</origin>
+</pkgmetadata>