[groovy18] Fix FTBFS

Michal Srb msrb at fedoraproject.org
Mon Jun 16 08:46:01 UTC 2014


commit f7ee1543b42c1864cc939a95d7af7910d22dd253
Author: Michal Srb <msrb at redhat.com>
Date:   Mon Jun 16 09:32:33 2014 +0200

    Fix FTBFS

 groovy-build-with-java8.patch |   22 ++++++++++++++++++++++
 groovy18.spec                 |   35 +++++++++++++----------------------
 2 files changed, 35 insertions(+), 22 deletions(-)
---
diff --git a/groovy-build-with-java8.patch b/groovy-build-with-java8.patch
new file mode 100644
index 0000000..5c77860
--- /dev/null
+++ b/groovy-build-with-java8.patch
@@ -0,0 +1,22 @@
+diff --git a/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java b/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
+index 21d213e..7945767 100644
+--- a/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
++++ b/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
+@@ -23,7 +23,16 @@ import org.codehaus.groovy.ast.stmt.ReturnStatement;
+ import org.codehaus.groovy.vmplugin.VMPlugin;
+ 
+ import java.lang.annotation.*;
+-import java.lang.reflect.*;
++import java.lang.reflect.Array;
++import java.lang.reflect.Constructor;
++import java.lang.reflect.Field;
++import java.lang.reflect.GenericArrayType;
++import java.lang.reflect.InvocationTargetException;
++import java.lang.reflect.Method;
++import java.lang.reflect.ParameterizedType;
++import java.lang.reflect.Type;
++import java.lang.reflect.TypeVariable;
++import java.lang.reflect.WildcardType;
+ import java.util.List;
+ 
+ /**
diff --git a/groovy18.spec b/groovy18.spec
index 45ad8f4..77a5a1d 100644
--- a/groovy18.spec
+++ b/groovy18.spec
@@ -4,7 +4,7 @@
 %global majorversion 1.8
 Name:           groovy18
 Version:        1.8.9
-Release:        10%{?dist}
+Release:        11%{?dist}
 Summary:        Dynamic language for the Java Platform
 Group:          Development/Languages
 # Some of the files are licensed under BSD and CPL terms, but the CPL has been superceded
@@ -22,8 +22,9 @@ Source5:        epl-v10.txt
 Source6:        http://www.apache.org/licenses/LICENSE-2.0.txt
 # thanks to Andy Grimm
 Patch0:         groovy-inner-interface-annotations.patch
+Patch1:         groovy-build-with-java8.patch
 
-BuildRequires:  java-devel >= 1.6
+BuildRequires:  java-devel >= 1.8
 BuildRequires:  jpackage-utils
 
 BuildRequires:  ant
@@ -32,7 +33,6 @@ BuildRequires:  ant-antlr
 BuildRequires:  apache-commons-cli
 BuildRequires:  apache-ivy
 BuildRequires:  bsf
-BuildRequires:  ecj
 BuildRequires:  jansi
 BuildRequires:  jline1
 BuildRequires:  junit
@@ -57,7 +57,7 @@ Requires:       tomcat-jsp-2.2-api
 Requires:       tomcat-servlet-3.0-api
 Requires:       xstream
 
-Requires:       java-devel >= 1.6
+Requires:       java-devel >= 1.8
 Requires:       jpackage-utils
 BuildArch:      noarch
 
@@ -84,6 +84,7 @@ find . -name "*.jar" -delete
 cp %{SOURCE4} %{SOURCE5} %{SOURCE6} .
 
 %patch0 -p1
+%patch1 -p1
 
 # fix aId for gmaven-runtime-1.8
 sed -i "s|<artifactId>groovy</artifactId>|<artifactId>%{name}</artifactId>|" pom.xml
@@ -110,16 +111,11 @@ done
 find . -name "*.java" -exec sed -i 's|org.objectweb.asm|org.objectweb.distroshaded.asm|g' {} +
 find . -name "*.groovy" -exec sed -i 's|org.objectweb.asm|org.objectweb.distroshaded.asm|g' {} +
 
-%pom_remove_dep :asm
-%pom_remove_dep :asm-commons
-%pom_remove_dep :asm-util
-%pom_remove_dep :asm-analysis
-%pom_remove_dep :asm-tree
-%pom_add_dep asm:asm-distroshaded
-%pom_add_dep asm:asm-commons-distroshaded
-%pom_add_dep asm:asm-util-distroshaded
-%pom_add_dep asm:asm-analysis-distroshaded
-%pom_add_dep asm:asm-tree-distroshaded
+%pom_change_dep :asm :asm-distroshaded
+%pom_change_dep :asm-commons :asm-commons-distroshaded
+%pom_change_dep :asm-util :asm-util-distroshaded
+%pom_change_dep :asm-analysis :asm-analysis-distroshaded
+%pom_change_dep :asm-tree :asm-tree-distroshaded
 
 %build
 mkdir -p target/lib/{compile,tools}
@@ -132,14 +128,6 @@ build-jar-repository target/lib/compile servlet jsp \
         bsf jline1/jline-1 xstream ant junit ivy commons-cli \
         jansi
 
-# thanks to Mikolaj Izdebski
-# Use ECJ instead of OpenJDK to compile MethodHandle.  This is a
-# workaround for a bug in OpenJDK that causes compilation of
-# MethodHandle to take many minutes (15min or even more), while ECJ
-# can compile it under five seconds.  See rhbz#971483 and
-# http://mail.openjdk.java.net/pipermail/compiler-dev/2013-May/006339.html
-ecj -d target/classes `find -name MethodHandle.java -o -name ArrayUtil.java`
-        
 # Build
 # TODO: Build at least tests, maybe examples
 export CLASSPATH=$(build-classpath ant/ant-antlr) 
@@ -188,6 +176,9 @@ install -p -m644 pom.xml $RPM_BUILD_ROOT/%{_mavenpomdir}/JPP-%{name}.pom
 %doc LICENSE.txt LICENSE-2.0.txt NOTICE.txt cpl-v10.txt epl-v10.txt
 
 %changelog
+* Mon Jun 16 2014 Michal Srb <msrb at redhat.com> - 1.8.9-11
+- Fix FTBFS
+
 * Sat Jun 07 2014 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.8.9-10
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
 


More information about the scm-commits mailing list