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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.3 - (hide annotations) (download)
Sun Aug 3 10:15:54 2014 UTC (5 years, 9 months ago) by sera
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +1 -1 lines
FILE REMOVED
Remove old

(Portage version: 2.2.10/cvs/Linux x86_64, signed Manifest commit with key 3C5CF75A)

1 tomwij 1.1 # Copyright 1999-2013 Gentoo Foundation
2     # Distributed under the terms of the GNU General Public License v2
3 sera 1.3 # $Header: /var/cvsroot/gentoo-x86/dev-java/bcmail/bcmail-1.49.ebuild,v 1.2 2013/06/14 20:03:13 aballier Exp $
4 tomwij 1.1
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 aballier 1.2 KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~x64-macos"
20 tomwij 1.1
21     COMMON_DEPEND=">=dev-java/bcprov-${PV}-r2:0[test?]
22     >=dev-java/bcpkix-${PV}-r1: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