Remove dependency on gcc-java

OBS-URL: https://build.opensuse.org/package/show/Java:packages/antlr?expand=0&rev=42
This commit is contained in:
Fridrich Strba 2017-10-09 09:58:01 +00:00 committed by Git OBS Bridge
parent 3efca3a64b
commit 304f9bf4fa
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

View File

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