Gentoo Archives: gentoo-commits

From: James Le Cuirot <chewi@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/jss/files/, dev-java/jss/
Date: Thu, 01 Oct 2015 22:18:44
Message-Id: 1443737738.fd7e7d11e8f68eda16467083d9fbce30a08ca184.chewi@gentoo
1 commit: fd7e7d11e8f68eda16467083d9fbce30a08ca184
2 Author: James Le Cuirot <chewi <AT> gentoo <DOT> org>
3 AuthorDate: Thu Oct 1 21:43:40 2015 +0000
4 Commit: James Le Cuirot <chewi <AT> gentoo <DOT> org>
5 CommitDate: Thu Oct 1 22:15:38 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fd7e7d11
7
8 dev-java/jss: Version bump to 4.3.2
9
10 * Set CC and AR correctly (bug #428188)
11 * Fix javadoc under Java 8
12 * Similify Linux kernel version fix
13 * Get more tests passing though they still need to be RESTRICTed
14
15 Package-Manager: portage-2.2.20.1
16
17 dev-java/jss/Manifest | 1 +
18 dev-java/jss/files/jss-4.3-javadoc.patch | 11 ++++
19 dev-java/jss/files/jss-4.3.2-ldflags.patch | 11 ++++
20 dev-java/jss/jss-4.3-r1.ebuild | 101 -----------------------------
21 dev-java/jss/jss-4.3.2.ebuild | 94 +++++++++++++++++++++++++++
22 5 files changed, 117 insertions(+), 101 deletions(-)
23
24 diff --git a/dev-java/jss/Manifest b/dev-java/jss/Manifest
25 index 1a2012b..c51c7a4 100644
26 --- a/dev-java/jss/Manifest
27 +++ b/dev-java/jss/Manifest
28 @@ -1 +1,2 @@
29 +DIST jss-4.3.2.tar.bz2 435542 SHA256 8bfe94668e8aa1b8fdfaf01fd45b18daa2336e1901f90922c44327116df8a278 SHA512 3296da72f204fc4a0ea58dd889cf2721a4afa0ec7b5406312e64354cc67edcfc370140ad22a24f0dfcf11e438e69ebe9da45a70b5cbaa4026b40fd5fcf96c232 WHIRLPOOL 5f72f6cccb49c40e840472329461475bfd83e6ac98ea60cee63c0194374e210df5dac038fb891635f84625c5643b0b25fa36253c78b3cad4461d647c7a0fcc15
30 DIST jss-4.3.tar.bz2 421731 SHA256 e82cdcadd6d7acd0d5f9274134dd5a88f26d7e47e7d9d8b059ce68ca413fb54e SHA512 b1ae0f2dc2ca90a30caca97e4e89a471f4d0a0483dd384f242989de8a21fdd3c99dc4c452e5ef7e23bf3de745e5868f276528f76afc8aef7a9e7fe99722e0b4f WHIRLPOOL 77773968499aa7c88ed14ae4ab899a45935d5a6c4a0b6d455428f62e81d24bd379324726bda61e3c84521040cc3439ae2a5d167f32006d6dc97ba2b3ec923f5f
31
32 diff --git a/dev-java/jss/files/jss-4.3-javadoc.patch b/dev-java/jss/files/jss-4.3-javadoc.patch
33 new file mode 100644
34 index 0000000..891e1ff
35 --- /dev/null
36 +++ b/dev-java/jss/files/jss-4.3-javadoc.patch
37 @@ -0,0 +1,11 @@
38 +--- security/jss/build_java.pl.orig 2015-10-01 23:04:22.540035573 +0100
39 ++++ security/jss/build_java.pl 2015-10-01 23:11:41.413230402 +0100
40 +@@ -323,7 +323,7 @@
41 + ensure_dir_exists("$dist_dir/jssdoc");
42 + my $targets = join(" ", @packages);
43 + print "$targets\n";
44 +- print_do("$javadoc -breakiterator -sourcepath . -d $dist_dir/jssdoc $html_header_opt $targets");
45 ++ print_do("$javadoc -Xdoclint:none -breakiterator -sourcepath . -d $dist_dir/jssdoc $html_header_opt $targets");
46 + print_do("cp $dist_dir/jssdoc/index.html $dist_dir/jssdoc/index.html.bak");
47 + print_do("cp $dist_dir/jssdoc/overview-summary.html $dist_dir/jssdoc/index.html");
48 + }
49
50 diff --git a/dev-java/jss/files/jss-4.3.2-ldflags.patch b/dev-java/jss/files/jss-4.3.2-ldflags.patch
51 new file mode 100644
52 index 0000000..fde2e26
53 --- /dev/null
54 +++ b/dev-java/jss/files/jss-4.3.2-ldflags.patch
55 @@ -0,0 +1,11 @@
56 +--- security/coreconf/Linux.mk.orig 2010-01-15 22:19:00.000000000 +0000
57 ++++ security/coreconf/Linux.mk 2015-09-27 22:17:50.102547607 +0100
58 +@@ -142,7 +142,7 @@
59 + ARCH = linux
60 +
61 + DSO_CFLAGS = -fPIC
62 +-DSO_LDOPTS = -shared $(ARCHFLAG)
63 ++DSO_LDOPTS = $(LDFLAGS) -shared $(ARCHFLAG)
64 + # The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
65 + # incorrectly reports undefined references in the libraries we link with, so
66 + # we don't use -z defs there.
67
68 diff --git a/dev-java/jss/jss-4.3-r1.ebuild b/dev-java/jss/jss-4.3-r1.ebuild
69 deleted file mode 100644
70 index 846e085..0000000
71 --- a/dev-java/jss/jss-4.3-r1.ebuild
72 +++ /dev/null
73 @@ -1,101 +0,0 @@
74 -# Copyright 1999-2015 Gentoo Foundation
75 -# Distributed under the terms of the GNU General Public License v2
76 -# $Id$
77 -
78 -EAPI="5"
79 -
80 -JAVA_PKG_IUSE="doc examples source"
81 -
82 -inherit base java-pkg-2 linux-info versionator
83 -
84 -RTM_NAME="JSS_${PV//./_}_RTM"
85 -
86 -DESCRIPTION="Network Security Services for Java (JSS)"
87 -HOMEPAGE="http://www.mozilla.org/projects/security/pki/jss/"
88 -# To prepare this tarball
89 -# cvs -d :pserver:anonymous@××××××××××××××××××.org:/cvsroot export \
90 -# -r JSS_4_3_RTM mozilla/security/coreconf
91 -# cvs -d :pserver:anonymous@××××××××××××××××××.org:/cvsroot export \
92 -# -r JSS_4_3_RTM mozilla/security/jss
93 -# tar cvjf jss-4.3.tar.bz2 mozilla
94 -SRC_URI="mirror://gentoo/${P}.tar.bz2"
95 -
96 -LICENSE="MPL-1.1"
97 -SLOT="3.4"
98 -KEYWORDS="~amd64 ~x86"
99 -
100 -CDEPEND=">=dev-libs/nspr-4.7
101 - >=dev-libs/nss-3.12"
102 -
103 -DEPEND=">=virtual/jdk-1.4
104 - app-arch/zip
105 - virtual/pkgconfig
106 - ${CDEPEND}"
107 -
108 -RDEPEND=">=virtual/jre-1.4
109 - ${CDEPEND}"
110 -
111 -S="${WORKDIR}/mozilla"
112 -
113 -java_prepare() {
114 - epatch "${FILESDIR}"/${PN}-3.4-target_source.patch
115 - epatch "${FILESDIR}"/${PN}-4.2.5-use_pkg-config.patch
116 - epatch "${FILESDIR}"/${P}-cflags.patch
117 - epatch "${FILESDIR}"/${P}-ldflags.patch
118 - epatch "${FILESDIR}"/${P}-secitem.patch
119 -}
120 -
121 -# See bug 539100.
122 -pkg_setup() {
123 - linux-info_pkg_setup
124 - java-pkg-2_pkg_setup
125 -}
126 -
127 -src_compile() {
128 - export JAVA_GENTOO_OPTS="-source $(java-pkg_get-source) -target $(java-pkg_get-target)"
129 -
130 - use amd64 && export USE_64=1
131 -
132 - cd "${S}/security/coreconf" || die
133 -
134 - # Hotfix for kernel 3.x #379283
135 - get_running_version || die "Failed to determine kernel version"
136 - if [[ ${KV_MAJOR} -ge 3 ]]; then
137 - cp Linux2.6.mk Linux${KV_MAJOR}.${KV_MINOR}.mk || die
138 - fi
139 -
140 - emake -j1 BUILD_OPT=1
141 -
142 - cd "${S}/security/jss" || die
143 - emake -j1 BUILD_OPT=1 USE_PKGCONFIG=1 NSS_PKGCONFIG=nss NSPR_PKGCONFIG=nspr
144 -
145 - if use doc; then
146 - emake -j1 BUILD_OPT=1 javadoc
147 - fi
148 -}
149 -
150 -# Investigate why this fails.
151 -#
152 -# cp: cannot stat ‘/var/tmp/portage/dev-java/jss-4.3-r1/work/mozilla/dist/Linux3.8_x86_64_glibc_PTH_64_OPT.OBJ//lib/*nssckbi*’: No such file or directory
153 -# Failed to copy builtins library at security/jss/org/mozilla/jss/tests/all.pl line 453.
154 -#
155 -# There is indeed no nssckbi file, investigation needed if that file can be
156 -# generated or whether we can remove the broken test; possibly inform upstream.
157 -RESTRICT="test"
158 -
159 -src_test() {
160 - BUILD_OPT=1 perl security/jss/org/mozilla/jss/tests/all.pl dist \
161 - "${S}"/dist/Linux*.OBJ/
162 -}
163 -
164 -src_install() {
165 - java-pkg_dojar dist/*.jar
166 -
167 - # Use this instead of the one in dist because it is a symlink
168 - # and doso handles symlinks by just symlinking to the original
169 - java-pkg_doso ./security/${PN}/lib/*/*.so
170 -
171 - use doc && java-pkg_dojavadoc dist/jssdoc
172 - use source && java-pkg_dosrc ./security/jss/org
173 - use examples && java-pkg_doexamples ./security/jss/samples
174 -}
175
176 diff --git a/dev-java/jss/jss-4.3.2.ebuild b/dev-java/jss/jss-4.3.2.ebuild
177 new file mode 100644
178 index 0000000..fb3bacf
179 --- /dev/null
180 +++ b/dev-java/jss/jss-4.3.2.ebuild
181 @@ -0,0 +1,94 @@
182 +# Copyright 1999-2015 Gentoo Foundation
183 +# Distributed under the terms of the GNU General Public License v2
184 +# $Id$
185 +
186 +EAPI="5"
187 +
188 +JAVA_PKG_IUSE="doc source"
189 +
190 +inherit multilib toolchain-funcs java-pkg-2
191 +
192 +DESCRIPTION="Network Security Services for Java (JSS)"
193 +HOMEPAGE="https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/JSS"
194 +# 4.3.2 was released but was seemingly never announced. The binary jar
195 +# exists on Mozilla's servers but Chewi could only find a source tarball
196 +# at https://obs.kolabsys.com/package/show/Kolab:3.4/jss. However, you
197 +# need to register in order to download it, hence he has mirrored it.
198 +SRC_URI="https://dev.gentoo.org/~chewi/distfiles/${P}.tar.bz2"
199 +LICENSE="MPL-1.1"
200 +SLOT="3.4"
201 +KEYWORDS="~amd64 ~x86"
202 +IUSE="examples test"
203 +
204 +CDEPEND=">=dev-libs/nspr-4.7.1
205 + >=dev-libs/nss-3.12.5"
206 +
207 +DEPEND="${CDEPEND}
208 + dev-lang/perl
209 + >=virtual/jdk-1.6
210 + virtual/pkgconfig
211 + test? ( dev-libs/nss[utils] )"
212 +
213 +RDEPEND="${CDEPEND}
214 + >=virtual/jre-1.6"
215 +
216 +S="${WORKDIR}/${P}/mozilla"
217 +
218 +java_prepare() {
219 + epatch "${FILESDIR}"/${PN}-3.4-target_source.patch
220 + epatch "${FILESDIR}"/${PN}-4.2.5-use_pkg-config.patch
221 + epatch "${FILESDIR}"/${PN}-4.3-cflags.patch
222 + epatch "${FILESDIR}"/${PN}-4.3.2-ldflags.patch
223 + epatch "${FILESDIR}"/${PN}-4.3-secitem.patch
224 +
225 + if java-pkg_is-vm-version-ge 1.8; then
226 + epatch "${FILESDIR}"/${PN}-4.3-javadoc.patch
227 + fi
228 +}
229 +
230 +src_compile() {
231 + local ARGS=(
232 + "CC=$(tc-getCC)"
233 + "AR=$(tc-getAR) cr \$@"
234 + "OS_RELEASE=2.6"
235 + "BUILD_OPT=1"
236 + )
237 +
238 + export JAVA_GENTOO_OPTS="$(java-pkg_javac-args)"
239 + use amd64 && export USE_64=1
240 +
241 + cd "${S}/security/coreconf" || die
242 + emake -j1 "${ARGS[@]}"
243 +
244 + cd "${S}/security/jss" || die
245 + emake -j1 "${ARGS[@]}" USE_PKGCONFIG=1 NSS_PKGCONFIG=nss NSPR_PKGCONFIG=nspr
246 + use doc && emake -j1 "${ARGS[@]}" javadoc
247 +}
248 +
249 +# Chewi has managed to reach a test pass rate of 31/40 (78%) but the
250 +# remainder fail due to JSS not having kept pace with the ciphersuites
251 +# in NSS. There's not much we can do about that. The suite also leaves
252 +# java processes running and exits successfully on failure.
253 +RESTRICT="test"
254 +
255 +src_test() {
256 + # Parts of NSS are required for the tests.
257 + ln -snf "${EROOT}usr/$(get_libdir)/libnssckbi.so" dist/Linux*.OBJ/lib/ || die
258 + ln -snf "${EROOT}usr/bin" dist/Linux*.OBJ/ || die
259 +
260 + # The tests must be run from this directory.
261 + cd security/jss/org/mozilla/jss/tests || die
262 + BUILD_OPT=1 perl all.pl dist "${S}"/dist/Linux*.OBJ/ || die "tests failed"
263 +}
264 +
265 +src_install() {
266 + java-pkg_dojar dist/*.jar
267 +
268 + # Use this instead of the one in dist because it is a symlink
269 + # and doso handles symlinks by just symlinking to the original
270 + java-pkg_doso ./security/${PN}/lib/*/*.so
271 +
272 + use doc && java-pkg_dojavadoc dist/jssdoc
273 + use source && java-pkg_dosrc ./security/jss/org
274 + use examples && java-pkg_doexamples ./security/jss/samples
275 +}