Gentoo Archives: gentoo-commits

From: Patrice Clement <monsieurp@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-java/jmock/, dev-java/jmock/files/
Date: Fri, 28 Aug 2015 09:52:16
Message-Id: 1440759076.eee278a2b0820637106b9ce7d81fe427124283c2.monsieurp@gentoo
1 commit: eee278a2b0820637106b9ce7d81fe427124283c2
2 Author: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
3 AuthorDate: Fri Aug 28 10:46:32 2015 +0000
4 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org>
5 CommitDate: Fri Aug 28 10:51:16 2015 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=eee278a2
7
8 dev-java/jmock: Change the compilation logic. Fixes bug 558908.
9
10 After yesterday's fix i.e. HOMEPAGE and SRC_URI pointing to new URLs, I wrongly
11 assumed the package structure was the same, which, unfortunately, isn't the case.
12
13 Package-Manager: portage-2.2.18
14 Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>
15
16 dev-java/jmock/files/1.1.0-build.xml.patch | 21 ----------
17 dev-java/jmock/files/1.1.0-junit-3.8.2.patch | 12 ------
18 dev-java/jmock/files/jmock-1.2.0-AbstractMo.patch | 27 +++++++++++++
19 dev-java/jmock/jmock-1.2.0-r1.ebuild | 48 +++++++++++++++++++++++
20 4 files changed, 75 insertions(+), 33 deletions(-)
21
22 diff --git a/dev-java/jmock/files/1.1.0-build.xml.patch b/dev-java/jmock/files/1.1.0-build.xml.patch
23 deleted file mode 100644
24 index 22b47ee..0000000
25 --- a/dev-java/jmock/files/1.1.0-build.xml.patch
26 +++ /dev/null
27 @@ -1,21 +0,0 @@
28 -diff -ur jmock-1.1.0.old/build.xml jmock-1.1.0/build.xml
29 ---- jmock-1.1.0.old/build.xml 2006-12-23 00:06:19.000000000 +0200
30 -+++ jmock-1.1.0/build.xml 2006-12-23 00:06:49.000000000 +0200
31 -@@ -116,7 +116,7 @@
32 - </junit>
33 - </target>
34 -
35 -- <target name="core.jar" depends="core.test.unit">
36 -+ <target name="core.jar" depends="core.compile">
37 - <mkdir dir="${build.dist.bin.dir}"/>
38 - <jar basedir="${core.build.dir}" destfile="${core.jar}" excludes="test/**" index="true"/>
39 - </target>
40 -@@ -181,7 +181,7 @@
41 - </junit>
42 - </target>
43 -
44 -- <target name="cglib.jar" depends="cglib.test.unit">
45 -+ <target name="cglib.jar" depends="cglib.compile">
46 - <mkdir dir="${build.dist.bin.dir}"/>
47 - <jar basedir="${cglib.build.dir}" destfile="${cglib.jar}" excludes="test/**" index="true"/>
48 - </target>
49
50 diff --git a/dev-java/jmock/files/1.1.0-junit-3.8.2.patch b/dev-java/jmock/files/1.1.0-junit-3.8.2.patch
51 deleted file mode 100644
52 index 411e242..0000000
53 --- a/dev-java/jmock/files/1.1.0-junit-3.8.2.patch
54 +++ /dev/null
55 @@ -1,12 +0,0 @@
56 -diff -ur jmock-1.1.0.old/core/src/org/jmock/expectation/AssertMo.java jmock-1.1.0/core/src/org/jmock/expectation/AssertMo.java
57 ---- jmock-1.1.0.old/core/src/org/jmock/expectation/AssertMo.java 2006-12-22 23:56:07.000000000 +0200
58 -+++ jmock-1.1.0/core/src/org/jmock/expectation/AssertMo.java 2006-12-22 23:56:17.000000000 +0200
59 -@@ -73,7 +73,7 @@
60 - assertTrue("Should not have verified", threwException);
61 - }
62 -
63 -- static protected void failNotEquals( String message,
64 -+ static public void failNotEquals( String message,
65 - Object expected,
66 - Object actual ) {
67 - String formatted = "";
68
69 diff --git a/dev-java/jmock/files/jmock-1.2.0-AbstractMo.patch b/dev-java/jmock/files/jmock-1.2.0-AbstractMo.patch
70 new file mode 100644
71 index 0000000..1e3a939
72 --- /dev/null
73 +++ b/dev-java/jmock/files/jmock-1.2.0-AbstractMo.patch
74 @@ -0,0 +1,27 @@
75 +--- src/org/jmock/expectation/AssertMo.java.orig 2015-08-28 10:15:13.490000000 +0000
76 ++++ src/org/jmock/expectation/AssertMo.java 2015-08-28 10:15:22.206000000 +0000
77 +@@ -73,15 +73,15 @@
78 + assertTrue("Should not have verified", threwException);
79 + }
80 +
81 +- static protected void failNotEquals( String message,
82 +- Object expected,
83 +- Object actual ) {
84 +- String formatted = "";
85 +- if (message != null) {
86 +- formatted = message + " ";
87 +- }
88 +- fail(formatted + "\nExpected:<" + expected + ">\nReceived:<" + actual + ">");
89 +- }
90 ++// static protected void failNotEquals( String message,
91 ++// Object expected,
92 ++// Object actual ) {
93 ++// String formatted = "";
94 ++// if (message != null) {
95 ++// formatted = message + " ";
96 ++// }
97 ++// fail(formatted + "\nExpected:<" + expected + ">\nReceived:<" + actual + ">");
98 ++// }
99 +
100 + public static void notImplemented( String mockName ) {
101 + throw new NotImplementedException("Not Implemented in " + mockName);
102
103 diff --git a/dev-java/jmock/jmock-1.2.0-r1.ebuild b/dev-java/jmock/jmock-1.2.0-r1.ebuild
104 new file mode 100644
105 index 0000000..fc191a9
106 --- /dev/null
107 +++ b/dev-java/jmock/jmock-1.2.0-r1.ebuild
108 @@ -0,0 +1,48 @@
109 +# Copyright 1999-2015 Gentoo Foundation
110 +# Distributed under the terms of the GNU General Public License v2
111 +# $Id$
112 +
113 +EAPI=5
114 +
115 +JAVA_PKG_IUSE="doc source"
116 +
117 +inherit java-pkg-2 java-pkg-simple
118 +
119 +DESCRIPTION="Library for testing Java code using mock objects"
120 +SRC_URI="http://www.${PN}.org/downloads/${P}-jars.zip"
121 +HOMEPAGE="http://www.jmock.org/"
122 +
123 +LICENSE="BSD"
124 +SLOT="1.0"
125 +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~amd64-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos"
126 +IUSE=""
127 +
128 +CDEPEND="dev-java/junit:0"
129 +
130 +RDEPEND=">=virtual/jre-1.6
131 + ${CDEPEND}"
132 +
133 +DEPEND=">=virtual/jdk-1.6
134 + ${CDEPEND}
135 + app-arch/unzip"
136 +
137 +S="${WORKDIR}/${P}"
138 +
139 +JAVA_SRC_DIR="src"
140 +JAVA_GENTOO_CLASSPATH="junit"
141 +
142 +src_unpack() {
143 + default
144 + unpack ${A}
145 + unzip "${S}"/"${PN}-core-${PV}.jar" -d src || die
146 + mv src "${S}" || die
147 +}
148 +
149 +java_prepare() {
150 + find -name "*.class" -delete || die
151 + rm *.jar || die
152 +
153 + # This patch isn't changing the behaviour if jmock per se.
154 + # Only the formatting is altered.
155 + epatch "${FILESDIR}"/"${P}-AbstractMo.patch"
156 +}