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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Aug 1 16:33:30 2015 UTC (4 years, 8 months ago) by monsieurp
Branch: MAIN
CVS Tags: HEAD
Version bump. Fixes bug 535882.

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

1 monsieurp 1.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.5 2015/06/14 17:52:47 monsieurp 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     CDEPEND=">=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.6
27     app-arch/unzip
28     test? (
29     dev-java/junit:0
30     )
31     ${CDEPEND}"
32    
33     RDEPEND=">=virtual/jre-1.6
34     ${CDEPEND}"
35    
36     S="${WORKDIR}/${MY_P}"
37    
38     # Package can't be build with test as bcprov and bcpkix can't be built with test.
39     RESTRICT="test"
40    
41     src_unpack() {
42     default
43     cd "${S}"
44     unpack ./src.zip
45     }
46    
47     java_prepare() {
48     mkdir "${S}"/classes
49    
50     if use test; then
51     java-pkg_jar-from --build-only junit
52     fi
53     }
54    
55     src_compile() {
56     find org -name "*.java" > "${T}"/src.list
57    
58     local cp="$(java-pkg_getjars bcprov,bcpkix,sun-jaf,javamail)"
59     if use test ; then
60     cp="${cp}:junit.jar"
61     else
62     sed -i '/\/test\//d' "${T}"/src.list || die "Failed to remove test classes"
63     fi
64    
65     ejavac -d "${S}"/classes -cp ${cp} "@${T}"/src.list
66    
67     cd "${S}"/classes
68     jar -cf "${S}"/${PN}.jar * || die "failed to create jar"
69     }
70    
71     src_test() {
72     local cp="${PN}.jar:bcprov.jar:bcpkix.jar:junit.jar"
73    
74     java -cp ${cp} org.bouncycastle.mail.smime.test.AllTests | tee mail.tests
75    
76     grep -q FAILURES *.tests && die "Tests failed."
77     }
78    
79     src_install() {
80     java-pkg_dojar "${S}"/${PN}.jar
81    
82     use source && java-pkg_dosrc org
83     use doc && java-pkg_dojavadoc docs
84     }

  ViewVC Help
Powered by ViewVC 1.1.20