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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sat Aug 1 16:41:30 2015 UTC (4 years, 6 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/bcpg/bcpg-1.50.ebuild,v 1.1 2014/02/06 13:59:13 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     CDEPEND="
26     >=dev-java/bcprov-${PV}:0[test?]"
27    
28     DEPEND=">=virtual/jdk-1.6
29     app-arch/unzip
30     test? (
31     dev-java/junit:0
32     )
33     ${CDEPEND}"
34    
35     RDEPEND=">=virtual/jre-1.6
36     ${CDEPEND}"
37    
38     S="${WORKDIR}/${MY_P}"
39    
40     src_unpack() {
41     default
42     cd "${S}"
43     unpack ./src.zip
44     }
45    
46     java_prepare() {
47     mkdir "${S}"/classes
48    
49     if use test; then
50     java-pkg_jar-from --build-only junit
51     fi
52    
53     java-pkg_jar-from bcprov
54     }
55    
56     src_compile() {
57     find org -name "*.java" > "${T}"/src.list
58    
59     local cp="bcprov.jar"
60     if use test ; then
61     cp="${cp}:junit.jar"
62     else
63     sed -i '/\/test\//d' "${T}"/src.list || die "Failed to remove test classes"
64     fi
65    
66     ejavac -d "${S}"/classes -cp ${cp} "@${T}"/src.list
67    
68     cd "${S}"/classes || die
69    
70     jar -cf "${S}"/${PN}.jar * || die "Failed to create jar."
71     }
72    
73     src_test() {
74     local cp="${PN}.jar:bcprov.jar:junit.jar"
75     local pkg="org.bouncycastle"
76    
77     java -cp ${cp} ${pkg}.openpgp.test.AllTests | tee openpgp.tests
78    
79     grep -q FAILURES *.tests && die "Tests failed."
80     }
81    
82     src_install() {
83     java-pkg_dojar "${S}"/${PN}.jar
84    
85     use source && java-pkg_dosrc org
86     use doc && java-pkg_dojavadoc docs
87     }

  ViewVC Help
Powered by ViewVC 1.1.20