summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohann Schmitz <ercpe@gentoo.org>2013-09-10 17:53:34 +0000
committerJohann Schmitz <ercpe@gentoo.org>2013-09-10 17:53:34 +0000
commitc16c5c3afbcef381b1892bc3469b3b09333fab88 (patch)
treed664149f764f091ba1e754477f64eddcd32c257e /dev-java/easymock
parentAdd SECURITYFS to the list of required kernel options. bug #484446 (diff)
downloadgentoo-2-c16c5c3afbcef381b1892bc3469b3b09333fab88.tar.gz
gentoo-2-c16c5c3afbcef381b1892bc3469b3b09333fab88.tar.bz2
gentoo-2-c16c5c3afbcef381b1892bc3469b3b09333fab88.zip
Ebuild for easymock-3.2, a mocking library for java (bug #332773)
(Portage version: 2.1.12.2/cvs/Linux x86_64, signed Manifest commit with key 77C501ED)
Diffstat (limited to 'dev-java/easymock')
-rw-r--r--dev-java/easymock/ChangeLog9
-rw-r--r--dev-java/easymock/easymock-3.2.ebuild59
-rw-r--r--dev-java/easymock/files/3.2-no-android.patch17
-rw-r--r--dev-java/easymock/metadata.xml6
4 files changed, 91 insertions, 0 deletions
diff --git a/dev-java/easymock/ChangeLog b/dev-java/easymock/ChangeLog
new file mode 100644
index 000000000000..1042688fc721
--- /dev/null
+++ b/dev-java/easymock/ChangeLog
@@ -0,0 +1,9 @@
+# ChangeLog for dev-java/easymock
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/easymock/ChangeLog,v 1.1 2013/09/10 17:53:33 ercpe Exp $
+
+*easymock-3.2 (10 Sep 2013)
+
+ 10 Sep 2013; Johann Schmitz <ercpe@gentoo.org> +easymock-3.2.ebuild,
+ +files/3.2-no-android.patch, +metadata.xml:
+ Ebuild for easymock-3.2, a mocking library for java (bug #332773)
diff --git a/dev-java/easymock/easymock-3.2.ebuild b/dev-java/easymock/easymock-3.2.ebuild
new file mode 100644
index 000000000000..8d17dd8bfea5
--- /dev/null
+++ b/dev-java/easymock/easymock-3.2.ebuild
@@ -0,0 +1,59 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-java/easymock/easymock-3.2.ebuild,v 1.1 2013/09/10 17:53:33 ercpe Exp $
+
+EAPI="5"
+
+JAVA_PKG_IUSE="doc examples source"
+
+inherit java-pkg-2 java-pkg-simple
+
+DESCRIPTION="Provides Mock Objects for interfaces in JUnit tests by generating them on the fly"
+HOMEPAGE="http://www.easymock.org/"
+SRC_URI="mirror://sourceforge/${PN}/EasyMock/${PV}/${P}.zip"
+
+LICENSE="|| ( MIT Apache-2.0 )"
+SLOT="3.2"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+COMMON_DEPEND="
+ dev-java/junit
+ dev-java/objenesis
+ dev-java/cglib:2.2
+"
+
+DEPEND=">=virtual/jdk-1.5
+ dev-java/junit:4
+ app-arch/unzip
+ ${COMMON_DEPEND}"
+
+RDEPEND=">=virtual/jre-1.5
+ ${COMMON_DEPEND}"
+
+S="${WORKDIR}/${P}"
+
+JAVA_GENTOO_CLASSPATH="junit-4,objenesis,cglib-2.2"
+JAVA_SRC_DIR="src"
+
+src_unpack() {
+ default
+
+ cd "${S}" || die
+ unzip ${P}-sources.jar -d src/ || die
+
+ if use examples; then
+ unzip ${P}-samples.jar -d examples/ || die
+ fi
+}
+
+java_prepare() {
+ epatch "${FILESDIR}"/${PV}-no-android.patch
+ rm src/org/easymock/internal/AndroidClassProxyFactory.java || die
+}
+
+src_install() {
+ java-pkg-simple_src_install
+
+ use examples && java-pkg_doexamples examples
+} \ No newline at end of file
diff --git a/dev-java/easymock/files/3.2-no-android.patch b/dev-java/easymock/files/3.2-no-android.patch
new file mode 100644
index 000000000000..18c4a00dc45f
--- /dev/null
+++ b/dev-java/easymock/files/3.2-no-android.patch
@@ -0,0 +1,17 @@
+diff --git a/src/org/easymock/internal/MocksControl.java b/src/org/easymock/internal/MocksControl.java
+index e709dc4..cd9d5a9 100644
+--- a/src/org/easymock/internal/MocksControl.java
++++ b/src/org/easymock/internal/MocksControl.java
+@@ -137,12 +137,6 @@ public class MocksControl implements IMocksControl, IExpectationSetters<Object>,
+ return cached;
+ }
+
+- // ///CLOVER:OFF
+- if (AndroidSupport.isAndroid()) {
+- return classProxyFactory = new AndroidClassProxyFactory();
+- }
+- // ///CLOVER:ON
+-
+ try {
+ return classProxyFactory = new ClassProxyFactory();
+ } catch (final NoClassDefFoundError e) {
diff --git a/dev-java/easymock/metadata.xml b/dev-java/easymock/metadata.xml
new file mode 100644
index 000000000000..604e0a4238bb
--- /dev/null
+++ b/dev-java/easymock/metadata.xml
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>java</herd>
+</pkgmetadata>
+