Hello community, here is the log from the commit of package java-1_5_0-gcj-compat for openSUSE:Factory checked in at 2017-09-17 22:35:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/java-1_5_0-gcj-compat (Old) and /work/SRC/openSUSE:Factory/.java-1_5_0-gcj-compat.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "java-1_5_0-gcj-compat" Sun Sep 17 22:35:55 2017 rev:37 rq:526026 version:1.5.0.0 Changes: -------- --- /work/SRC/openSUSE:Factory/java-1_5_0-gcj-compat/java-1_5_0-gcj-compat.changes 2017-09-12 19:39:41.511543962 +0200 +++ /work/SRC/openSUSE:Factory/.java-1_5_0-gcj-compat.new/java-1_5_0-gcj-compat.changes 2017-09-17 22:35:56.436800619 +0200 @@ -1,0 +2,14 @@ +Wed Sep 13 13:18:26 UTC 2017 - fst...@suse.com + +- Instead of a symlink to gcj, make javac a script that runs the + gcj's ecj.jar. This provides for us a javac that has compatible + options with OpenJDK's javac. + +------------------------------------------------------------------- +Mon Sep 11 11:09:03 UTC 2017 - fst...@suse.com + +- Clean the spec file a bit +- Link required header files to the jvmdir in order to allow build + with different versions of gcj and gcc + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ java-1_5_0-gcj-compat.spec ++++++ --- /var/tmp/diff_new_pack.jYPSuP/_old 2017-09-17 22:35:58.248545897 +0200 +++ /var/tmp/diff_new_pack.jYPSuP/_new 2017-09-17 22:35:58.252545335 +0200 @@ -17,9 +17,9 @@ %define section free -%define gccsuffix %{nil} +%define gccsuffix %(rpm -q --qf "%{VERSION}" gcc-java | sed 's#\.##g') %define gccbinsuffix %(rpm -q --qf "-%{VERSION}" gcc-java) -%define origin gcj%{gccsuffix} +%define origin gcj %define priority 1505 %define javaver 1.5.0 %define buildver 0 @@ -55,30 +55,18 @@ # Call gij instead of gcj in the "java" wrapper script: Patch0: gcc43-fixes.patch Patch1: python_prefix.patch -#!BuildIgnore: antlr BuildRequires: antlr-bootstrap -%if 0%{?suse_version} > 1230 -BuildRequires: ca-certificates-mozilla -%else -BuildRequires: openssl-certs -%endif BuildRequires: gcc-gij BuildRequires: gcc-java BuildRequires: python-devel BuildRequires: unzip BuildRequires: update-alternatives +#!BuildIgnore: antlr Requires(post): coreutils -Requires(post): update-alternatives -# gcc-java should not be required, see Suse Bugzilla bug #151732 -# even if it would be required it should have been a PreReq -# because gcj was called in the post install section -# now the gcj related stuff is only done via triggerin -#Requires: gcc%{gccsuffix}-java >= %{gccver} -#PreReq: libgcj%{gccsuffix} >= %{gccver} -#Requires: libgcj%{gccsuffix} >= %{gccver} -Requires(pre): sed Requires(post): sed +Requires(post): update-alternatives Requires(pre): gcc-gij +Requires(pre): sed # See java-1_4_2-sun.spec: Provides: j2re = %{javaver} Provides: java = %{javaver} @@ -96,7 +84,6 @@ Provides: jre-%{javaver}-%{bits} Provides: jre-%{javaver}-%{origin} = %{version}-%{release} Provides: jre-%{javaver}-%{origin}-%{bits} = %{version}-%{release} -Provides: jre-%{javaver}-%{origin}-%{bits} = %{version}-%{release} Provides: jre-%{origin} = %{version}-%{release} Provides: jre-%{origin}-%{bits} = %{version}-%{release} # See java-1_4_2-sun.spec and Suse Bugzilla bug #148186: @@ -124,7 +111,11 @@ Provides: classpath-jta = %{version} Obsoletes: classpath-jta <= 0.95 Provides: jta -BuildRoot: %{_tmppath}/%{name}-%{version}-build +%if 0%{?suse_version} > 1230 +BuildRequires: ca-certificates-mozilla +%else +BuildRequires: openssl-certs +%endif %description This package contains shell scripts and symbolic links to simulate a @@ -134,8 +125,7 @@ Summary: JPackage development scripts for GCJ Group: Development/Languages/Java Requires: %{name} = %{version}-%{release} -# See Suse Bugzilla bug #151732 comment #17: -Requires: gcc-java >= %{gccver} +Requires: gcc%{gccsuffix}-java >= %{gccver} # Be able to check bytecode version Requires: unzip Requires(post): coreutils @@ -178,7 +168,7 @@ make %{?_smp_mflags} %install -make %{?_smp_mflags} DESTDIR=%{buildroot} install +%make_install install -dm 755 %{buildroot}%{_jvmdir}/%{cname}-%{version}/jre/lib # make a link to ecj.jar in the lib dir: ln -sf %{_javadir}/libgcj%{gccbinsuffix}.jar %{buildroot}%{_jvmdir}/%{cname}-%{version}/jre/lib/jdtcore.jar @@ -203,6 +193,19 @@ rm -f %{buildroot}/%{_jvmdir}/%{sdkdir}/bin/javadoc rm -f %{buildroot}/%{_bindir}/gjdoc +# Create a script that uses the gcj's ecj.jar as java compiler. +# This provides javac that is option-compatible with openjdk +pushd %{buildroot}/%{_jvmdir}/%{sdkdir}/bin/ +rm -f javac +JAVAC=`pwd`/javac +ECJJAR=`gcj%{gccbinsuffix} -print-file-name=ecj.jar` +cat <<EOF > $JAVAC +#!/bin/sh +exec gij%{gccbinsuffix} -cp $ECJJAR org.eclipse.jdt.internal.compiler.batch.Main \${1+\$@} +EOF +chmod +x ${JAVAC} +popd + # generate file lists find %{buildroot}%{_jvmdir}/%{jredir} -type d \ | sed 's|'%{buildroot}'|%dir |' > %{name}-%{version}-all.files @@ -316,10 +319,12 @@ java_sdk_%{javaver} %{_jvmdir}/%{sdklnk} %{priority} \ --slave %{_jvmjardir}/java-%{javaver} \ java_sdk_%{javaver}_exports %{_jvmjardir}/%{sdklnk} -# now the gcj related stuff is only done via triggerin -#ln -sf \ -# `gcj%{gccsuffix} -print-file-name=include/jni.h` \ -# %{_jvmdir}/%{cname}-%{version}/include/jni.h +for i in gcj/libgcj-config.h jawt.h jawt_md.h jni.h jni_md.h; do + mkdir -p `dirname %{_jvmdir}/%{cname}-%{version}/include/$i` + ln -sf \ + `gcj%{gccbinsuffix} -print-file-name=include/$i` \ + %{_jvmdir}/%{cname}-%{version}/include/$i +done # little work-around if no version-less link to libgcj-x.y.z.jar does not exist if [ ! -e %{_javadir}/libgcj-tool.sjar ] && ls %{_javadir}/libgcj-tools-*.jar 2>/dev/null >&2 then @@ -352,7 +357,6 @@ fi %files -f %{name}-%{version}.files -%defattr(-,root,root,-) %ghost %{_sysconfdir}/alternatives/java %ghost %{_sysconfdir}/alternatives/jre %ghost %{_sysconfdir}/alternatives/jre_exports @@ -384,7 +388,6 @@ %{_bindir}/rebuild-gcj-db %files devel -f %{name}-%{version}-sdk-bin.files -%defattr(-,root,root) %ghost %{_sysconfdir}/alternatives/javac %ghost %{_sysconfdir}/alternatives/java_sdk %ghost %{_sysconfdir}/alternatives/java_sdk_exports