/[gentoo-x86]/dev-java/bcmail/bcmail-1.50.ebuild
Gentoo

Contents of /dev-java/bcmail/bcmail-1.50.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.5 - (show annotations) (download)
Sun Jun 14 17:52:47 2015 UTC (4 years, 7 months ago) by monsieurp
Branch: MAIN
CVS Tags: HEAD
Changes since 1.4: +2 -2 lines
Stable for x86 via ALLARCHES. Fix bug 481960.

Signed-off-by: Patrice Clement <monsieurp@gentoo.org>
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 93491BB8)

1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-java/bcmail/bcmail-1.50.ebuild,v 1.4 2015/05/19 09:27:13 ago Exp $
4
5 EAPI="5"
6
7 JAVA_PKG_IUSE="doc source test"
8
9 inherit java-pkg-2 java-ant-2
10
11 MY_P="${PN}-jdk15on-${PV/./}"
12
13 DESCRIPTION="Java cryptography APIs"
14 HOMEPAGE="http://www.bouncycastle.org/java.html"
15 SRC_URI="http://www.bouncycastle.org/download/${MY_P}.tar.gz"
16
17 LICENSE="BSD"
18 SLOT="0"
19 KEYWORDS="amd64 ppc ppc64 x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
20
21 COMMON_DEPEND=">=dev-java/bcprov-${PV}:0[test?]
22 ~dev-java/bcpkix-${PV}:0[test?]
23 dev-java/sun-jaf:0
24 java-virtuals/javamail:0"
25
26 DEPEND=">=virtual/jdk-1.5
27 app-arch/unzip
28 test? ( dev-java/junit:0 )
29 ${COMMON_DEPEND}"
30
31 RDEPEND=">=virtual/jre-1.5
32 ${COMMON_DEPEND}"
33
34 S="${WORKDIR}/${MY_P}"
35
36 # Package can't be build with test as bcprov and bcpkix can't be built with test.
37 RESTRICT="test"
38
39 src_unpack() {
40 default
41 cd "${S}"
42 unpack ./src.zip
43 }
44
45 java_prepare() {
46 mkdir "${S}"/classes
47
48 if use test ; then
49 java-pkg_jar-from --build-only junit
50 fi
51 }
52
53 src_compile() {
54 find org -name "*.java" > "${T}"/src.list
55
56 local cp="$(java-pkg_getjars bcprov,bcpkix,sun-jaf,javamail)"
57 if use test ; then
58 cp="${cp}:junit.jar"
59 else
60 sed -i '/\/test\//d' "${T}"/src.list || die "Failed to remove test classes"
61 fi
62
63 ejavac -d "${S}"/classes -cp ${cp} "@${T}"/src.list
64
65 cd "${S}"/classes
66 jar -cf "${S}"/${PN}.jar * || die "failed to create jar"
67 }
68
69 src_test() {
70 local cp="${PN}.jar:bcprov.jar:bcpkix.jar:junit.jar"
71
72 java -cp ${cp} org.bouncycastle.mail.smime.test.AllTests | tee mail.tests
73
74 grep -q FAILURES *.tests && die "Tests failed."
75 }
76
77 src_install() {
78 java-pkg_dojar "${S}"/${PN}.jar
79
80 use source && java-pkg_dosrc org
81 use doc && java-pkg_dojavadoc docs
82 }

  ViewVC Help
Powered by ViewVC 1.1.20