Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=xfcetesting.git;a=commitdiff;h=cf7c64004ba5e132ae50d84725f79f3a59634865
commit cf7c64004ba5e132ae50d84725f79f3a59634865 Author: Marius Cirsta <[email protected]> Date: Mon Jun 25 02:20:12 2012 +0000 easymock-3.1-1-x86_64 * rebuild with openjava * changed m8r * version bump diff --git a/source/devel-extra/easymock/FrugalBuild b/source/devel-extra/easymock/FrugalBuild index f2a6fb7..ca36c2b 100644 --- a/source/devel-extra/easymock/FrugalBuild +++ b/source/devel-extra/easymock/FrugalBuild @@ -1,31 +1,33 @@ # Compiling Time: 0.03 SBU -# Maintainer: Miklos Vajna <[email protected]> +# Maintainer: Marius Cirsta <[email protected]> +# Contributor: Miklos Vajna <[email protected]> pkgname=easymock -pkgver=2.4 -pkgrel=2 +pkgver=3.1 +pkgrel=1 pkgdesc="Provides Mock Objects for interfaces in JUnit tests." -_F_java_no_gcj="y" -_F_sourceforge_sep="None" _F_sourceforge_ext=".zip" -Finclude java sourceforge -depends=('openjre') -makedepends=('openjdk') +Finclude openjava sourceforge url="http://www.easymock.org/" +depends=(${depends[@]} 'cglib' 'objenesis') groups=('devel-extra') archs=('i686' 'x86_64') -Fpkgversep="" -up2date="Flastarchive http://www.easymock.org/Downloads.html .zip" -sha1sums=('da36597659ad00ba7da59bffa96e16e6e0031782') +source=(${source[@]} build.xml \ + fix-Java7.patch) +sha1sums=('5d9d2e32658fd71c203dbba01eb6bbe124978456' \ + '394cee64b191d5c2854b49f0d0b33f860f0b5ad4' \ + 'a654e1ef2f88678ba44285396521bb9aec39c176') build() { - Fcd $pkgname$pkgver - rm -rf src - unzip -qq -d src/ src.zip + Fcd + mv easymock-3.1-sources.jar easymock-3.1-sources.zip Fjavacleanup - mkdir -p classes - javac -d classes $(find src -name "*.java") || return 1 - jar -cf easymock.jar -C classes . || return 1 - Fjar easymock.jar + Fextract easymock-3.1-sources.zip + Fpatchall + #build + cp $Fsrcdir/build.xml build.xml || Fdie + antflags="-Dproject.name=${pkgname} jar" + Fant -v ${antflags} + Fjar dist/${pkgname}.jar } diff --git a/source/devel-extra/easymock/build.xml b/source/devel-extra/easymock/build.xml new file mode 100644 index 0000000..f81582e --- /dev/null +++ b/source/devel-extra/easymock/build.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!--- + notes: Call using the following: Fant -Dpackage.name=${package name} +--> +<project name="Frugalware" default="jar" basedir="."> + <property name="src" value="org"/> + <property name="build" value="build"/> + <property name="dist" value="dist"/> + + <property name="pkg" value="${package.name}"/> + <property name="jar" value="${project.name}.jar"/> + + <target name="init"> + <tstamp/> + <mkdir dir="${build}"/> + <mkdir dir="${dist}"/> + <mkdir dir="${dist}/doc"/> + </target> + + <target name="compile" depends="init"> + <javac srcdir="${src}" destdir="${build}" classpath="${classpath}"/> + </target> + + <target name="manifest" depends="init"> + <manifest file="${build}/MANIFEST.MF" mode="update"> + <attribute name="Built-By" value="Frugalware"/> + </manifest> + </target> + + <target name="jar" depends="compile,manifest"> + <jar jarfile="${dist}/${jar}" manifest="${build}/MANIFEST.MF"> + <fileset dir="${build}"/> + </jar> + </target> + + <target name="clean"> + <delete dir="${build}"/> + <delete dir="${dist}"/> + </target> +</project> diff --git a/source/devel-extra/easymock/fix-Java7.patch b/source/devel-extra/easymock/fix-Java7.patch new file mode 100644 index 0000000..71cabe9 --- /dev/null +++ b/source/devel-extra/easymock/fix-Java7.patch @@ -0,0 +1,180 @@ +--- easymock-3.1/org/easymock/EasyMock.java 2011-11-05 10:57:38.000000000 +0000 ++++ easymock-3.1.old/org/easymock/EasyMock.java 2012-06-25 01:56:43.000000000 +0000 +@@ -1852,14 +1852,6 @@ + } + + /** +- * Expects a byte that is equal to the given value. +- * +- * @param value +- * the given value. +- * @return <code>0</code>. +- */ +- +- /** + * Expect any object but captures it for later use. + * + * @param <T> +@@ -1958,111 +1950,6 @@ + } + + /** +- * Expect any boolean but captures it for later use. +- * +- * @param captured +- * Where the parameter is captured +- * @return <code>0</code> +- * +- * @deprecated Because of harder erasure enforcement, doesn't compile in +- * Java 7 +- */ +- @Deprecated +- public static boolean capture(final Capture<Boolean> captured) { +- return captureBoolean(captured); +- } +- +- /** +- * Expect any int but captures it for later use. +- * +- * @param captured +- * Where the parameter is captured +- * @return <code>0</code> +- * +- * @deprecated Because of harder erasure enforcement, doesn't compile in +- * Java 7 +- */ +- @Deprecated +- public static int capture(final Capture<Integer> captured) { +- return captureInt(captured); +- } +- +- /** +- * Expect any long but captures it for later use. +- * +- * @param captured +- * Where the parameter is captured +- * @return <code>0</code> +- * +- * @deprecated Because of harder erasure enforcement, doesn't compile in +- * Java 7 +- */ +- @Deprecated +- public static long capture(final Capture<Long> captured) { +- return captureLong(captured); +- } +- +- /** +- * Expect any float but captures it for later use. +- * +- * @param captured +- * Where the parameter is captured +- * @return <code>0</code> +- * +- * @deprecated Because of harder erasure enforcement, doesn't compile in +- * Java 7 +- */ +- @Deprecated +- public static float capture(final Capture<Float> captured) { +- return captureFloat(captured); +- } +- +- /** +- * Expect any double but captures it for later use. +- * +- * @param captured +- * Where the parameter is captured +- * @return <code>0</code> +- * +- * @deprecated Because of harder erasure enforcement, doesn't compile in +- * Java 7 +- */ +- @Deprecated +- public static double capture(final Capture<Double> captured) { +- return captureDouble(captured); +- } +- +- /** +- * Expect any byte but captures it for later use. +- * +- * @param captured +- * Where the parameter is captured +- * @return <code>0</code> +- * +- * @deprecated Because of harder erasure enforcement, doesn't compile in +- * Java 7 +- */ +- @Deprecated +- public static byte capture(final Capture<Byte> captured) { +- return captureByte(captured); +- } +- +- /** +- * Expect any char but captures it for later use. +- * +- * @param captured +- * Where the parameter is captured +- * @return <code>0</code> +- * +- * @deprecated Because of harder erasure enforcement, doesn't compile in +- * Java 7 +- */ +- @Deprecated +- public static char capture(final Capture<Character> captured) { +- return captureChar(captured); +- } +- +- /** + * Switches the given mock objects (more exactly: the controls of the mock + * objects) to replay mode. For details, see the EasyMock documentation. + * +--- easymock-3.1/org/easymock/internal/ClassProxyFactory.java 2011-11-03 00:55:52.000000000 +0000 ++++ easymock-3.1.old/org/easymock/internal/ClassProxyFactory.java 2012-06-25 02:02:09.000000000 +0000 +@@ -161,7 +161,7 @@ + final MethodInterceptor interceptor = new MockMethodInterceptor(handler); + enhancer.setCallbackType(interceptor.getClass()); + +- Class mockClass; ++ Class<?> mockClass; + try { + mockClass = enhancer.createClass(); + } catch (final CodeGenerationException e) { +@@ -182,7 +182,7 @@ + if (ClassExtensionHelper.getCurrentConstructorArgs() != null) { + // Really instantiate the class + final ConstructorArgs args = ClassExtensionHelper.getCurrentConstructorArgs(); +- Constructor cstr; ++ Constructor<?> cstr; + try { + // Get the constructor with the same params + cstr = mockClass.getDeclaredConstructor(args.getConstructor().getParameterTypes()); +@@ -207,8 +207,8 @@ + // ///CLOVER:ON + } catch (final InvocationTargetException e) { + throw new RuntimeException( +- "Failed to instantiate mock calling constructor: Exception in constructor", e +- .getTargetException()); ++ "Failed to instantiate mock calling constructor: Exception in constructor", ++ e.getTargetException()); + } + return mock; + } else { +@@ -251,7 +251,7 @@ + * Filter all private constructors but do not check that there are + * some left + */ +- @SuppressWarnings("unchecked") ++ @SuppressWarnings("rawtypes") + @Override + protected void filterConstructors(final Class sc, final List constructors) { + CollectionUtils.filter(constructors, new VisibilityPredicate(sc, true)); +--- easymock-3.1/org/easymock/internal/matchers/CompareTo.java 2011-09-27 01:02:40.000000000 +0000 ++++ easymock-3.1.old/org/easymock/internal/matchers/CompareTo.java 2012-06-25 02:03:06.000000000 +0000 +@@ -35,7 +35,7 @@ + this.expected = value; + } + +- @SuppressWarnings("unchecked") ++ @SuppressWarnings({ "unchecked", "rawtypes" }) + public boolean matches(final Object actual) { + + if (!(actual instanceof Comparable)) { _______________________________________________ Frugalware-git mailing list [email protected] http://frugalware.org/mailman/listinfo/frugalware-git
