Accepting request 532706 from Java:packages

Remove dependency on gcc-java

OBS-URL: https://build.opensuse.org/request/show/532706
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/antlr?expand=0&rev=38
This commit is contained in:
Dominique Leuenberger 2017-10-10 09:41:02 +00:00 committed by Git OBS Bridge
commit f3176e3dd1
2 changed files with 10 additions and 7 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Oct 9 09:56:54 UTC 2017 - fstrba@suse.com
- Remove requirement of gcc-java all together and build with
any java version that exists and is able to use source and target
1.6
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Sep 20 17:39:46 UTC 2017 - fstrba@suse.com Wed Sep 20 17:39:46 UTC 2017 - fstrba@suse.com

View File

@ -27,8 +27,7 @@ Group: Development/Libraries/Java
Url: http://www.antlr.org Url: http://www.antlr.org
Source0: antlr-%{version}.tar.bz2 Source0: antlr-%{version}.tar.bz2
Source1: manifest.antlr Source1: manifest.antlr
BuildRequires: gcc-gij BuildRequires: java-devel >= 1.6
BuildRequires: gcc-java
BuildRequires: unzip BuildRequires: unzip
BuildRequires: zip BuildRequires: zip
BuildArch: noarch BuildArch: noarch
@ -45,7 +44,6 @@ find | grep "\(ShowString.java$\|StreamConverter.java$\)" && exit 42
# variables: # variables:
TARGET_DIR=`pwd` TARGET_DIR=`pwd`
CLASSPATH_ORIG="$CLASSPATH" CLASSPATH_ORIG="$CLASSPATH"
LIB_GCJ="`ls %{_javadir}/libgcj-*.jar`"
#>>> delete binary file and files not needed #>>> delete binary file and files not needed
function delBinaryFiles() { function delBinaryFiles() {
set +x set +x
@ -69,7 +67,6 @@ function mkTargetClasspath() {
} }
#>>> compiles all *.java file in the current directory tree #>>> compiles all *.java file in the current directory tree
# uses mkTargetClasspath for CLASSPATH variable # uses mkTargetClasspath for CLASSPATH variable
# uses LIB_GCJ for CLASSPATH
function compileFiles() { function compileFiles() {
mkTargetClasspath mkTargetClasspath
set +x set +x
@ -94,11 +91,10 @@ function compileFiles() {
# uses $TARGET_DIR to move created jar to # uses $TARGET_DIR to move created jar to
function mkJar() { function mkJar() {
find -name "version.txt" -or -name "*.class" -or -name "*.properties" -or -name "*.rsc" -or -name "*manifest*" |\ find -name "version.txt" -or -name "*.class" -or -name "*.properties" -or -name "*.rsc" -or -name "*manifest*" |\
xargs gjar%{gccbinsuffix} -m manifest.* -cf ${1}.jar ; xargs jar cfm ${1}.jar manifest.* ;
mv ${1}.jar $TARGET_DIR mv ${1}.jar $TARGET_DIR
} }
ECJJAR=`gcj%{gccbinsuffix} -print-file-name=ecj.jar` COMPILER_COMMAND="javac -source 1.6 -target 1.6 -cp "
COMPILER_COMMAND="gij%{gccbinsuffix} -cp $ECJJAR org.eclipse.jdt.internal.compiler.batch.Main -cp "
delBinaryFiles delBinaryFiles
mkdir src mkdir src
mv antlr src mv antlr src