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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (show annotations) (download)
Thu Feb 6 13:59:13 2014 UTC (5 years, 11 months ago) by tomwij
Branch: MAIN
CVS Tags: HEAD
Version bump to 1.50.

(Portage version: HEAD/cvs/Linux x86_64, signed Manifest commit with key 6D34E57D)

1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/dev-java/bcpg/bcpg-1.49.ebuild,v 1.1 2013/07/05 10:39:36 tomwij 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 # Tests are currently broken. Appears to need older version of bcprov; but since bcprov is not slotted, this can cause conflicts.
22 # Needs further investigation; though, only a small part has tests and there are no tests for bcpg itself.
23 RESTRICT="test"
24
25 COMMON_DEPEND="
26 >=dev-java/bcprov-${PV}:0[test?]"
27
28 DEPEND=">=virtual/jdk-1.5
29 app-arch/unzip
30 test? ( dev-java/junit:0 )
31 ${COMMON_DEPEND}"
32
33 RDEPEND=">=virtual/jre-1.5
34 ${COMMON_DEPEND}"
35
36 S="${WORKDIR}/${MY_P}"
37
38 src_unpack() {
39 default
40 cd "${S}"
41 unpack ./src.zip
42 }
43
44 java_prepare() {
45 mkdir "${S}"/classes
46
47 if use test ; then
48 java-pkg_jar-from --build-only junit
49 fi
50
51 java-pkg_jar-from bcprov
52 }
53
54 src_compile() {
55 find org -name "*.java" > "${T}"/src.list
56
57 local cp="bcprov.jar"
58 if use test ; then
59 cp="${cp}:junit.jar"
60 else
61 sed -i '/\/test\//d' "${T}"/src.list || die "Failed to remove test classes"
62 fi
63
64 ejavac -d "${S}"/classes -cp ${cp} "@${T}"/src.list
65
66 cd "${S}"/classes || die
67
68 jar -cf "${S}"/${PN}.jar * || die "Failed to create jar."
69 }
70
71 src_test() {
72 local cp="${PN}.jar:bcprov.jar:junit.jar"
73 local pkg="org.bouncycastle"
74
75 java -cp ${cp} ${pkg}.openpgp.test.AllTests | tee openpgp.tests
76
77 grep -q FAILURES *.tests && die "Tests failed."
78 }
79
80 src_install() {
81 java-pkg_dojar "${S}"/${PN}.jar
82
83 use source && java-pkg_dosrc org
84 use doc && java-pkg_dojavadoc docs
85 }

  ViewVC Help
Powered by ViewVC 1.1.20