The package rpms/eclipse-swt.git has added or updated architecture specific content in its spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s): https://src.fedoraproject.org/cgit/rpms/eclipse-swt.git/commit/?id=40cdd8362....
Change: +ExclusiveArch: s390x x86_64 aarch64 ppc64le
Thanks.
Full change: ============
commit 1a85e307780eed96ec02e460412359ccfdcdd16f Author: Nicolas De Amicis deamicis@bluewin.ch Date: Tue Sep 28 20:45:15 2021 +0200
Update README.md
diff --git a/README.md b/README.md index 014454e..cb44dec 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,3 @@ # eclipse-swt
-The eclipse-swt package +Eclipse SWT: The Standard Widget Toolkit for GTK+
commit 40cdd8362562130f5dbce217b54b1176ba3f6ca3 Author: Nicolas De Amicis deamicis@bluewin.ch Date: Mon Sep 27 22:48:38 2021 +0200
Initial import (#1997278).
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b4342ef --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/eclipse-platform-sources-4.21.tar.xz diff --git a/eclipse-swt-avoid-javascript-at-build.patch b/eclipse-swt-avoid-javascript-at-build.patch new file mode 100644 index 0000000..b78e435 --- /dev/null +++ b/eclipse-swt-avoid-javascript-at-build.patch @@ -0,0 +1,94 @@ +From dd7d5dd0a820b3efd1a7955a7b80c881a40ddafc Mon Sep 17 00:00:00 2001 +From: Mat Booth mat.booth@redhat.com +Date: Sat, 21 Mar 2020 15:29:00 +0000 +Subject: [PATCH] Avoid the need to have javascript interpreter in the build + root + +--- + .../bundles/binaries-parent/pom.xml | 17 ------ + .../bundles/org.eclipse.swt/buildSWT.xml | 53 ++++--------------- + 2 files changed, 11 insertions(+), 59 deletions(-) + +diff --git a/eclipse.platform.swt.binaries/bundles/binaries-parent/pom.xml b/eclipse.platform.swt.binaries/bundles/binaries-parent/pom.xml +index 4d209cfdc..eab439ae5 100644 +--- a/eclipse.platform.swt.binaries/bundles/binaries-parent/pom.xml ++++ b/eclipse.platform.swt.binaries/bundles/binaries-parent/pom.xml +@@ -74,23 +74,6 @@ + </goals> + </execution> + </executions> +- <dependencies> +- <dependency> +- <groupId>org.mozilla</groupId> +- <artifactId>rhino-runtime</artifactId> +- <version>1.7.13</version> +- </dependency> +- <dependency> +- <groupId>org.apache.ant</groupId> +- <artifactId>ant</artifactId> +- <version>1.10.11</version> +- </dependency> +- <dependency> +- <groupId>org.apache.ant</groupId> +- <artifactId>ant-apache-bsf</artifactId> +- <version>1.10.11</version> +- </dependency> +- </dependencies> + </plugin> + </plugins> + </build> +diff --git a/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml b/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml +index 9d4bb1b6f..6c1cdf690 100644 +--- a/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml ++++ b/eclipse.platform.swt/bundles/org.eclipse.swt/buildSWT.xml +@@ -255,9 +255,6 @@ + <antcall target="build_classes"> + <param name="cp" value=".classpath_gtk"/> + </antcall> +- <antcall target="build_classes"> +- <param name="cp" value=".classpath_win32"/> +- </antcall> + + <antcall target="check_preprocessing"/> + </target> +@@ -293,6 +290,11 @@ + <ant antfile="${tmpdir}/copy_chromium.xml" target="copy_files"/> + + <javac includeantruntime="false" srcdir="${buildDir}" encoding="utf8"></javac> ++ <javadoc destdir="docs/api" author="true" version="true" use="true" windowtitle="Eclipse SWT API" encoding="utf8"> ++ <packageset dir="${buildDir}" defaultexcludes="yes"> ++ <include name="**/**"/> ++ </packageset> ++ </javadoc> + </target> + + <!-- common build tasks --> +@@ -426,27 +428,8 @@ + <!-- Set swt_version, new_version, (and rev, min_ver, maj_ver, new_rev, new_min_ver, new_maj_ver) from the make_common.mak --> + <target name="get_version" unless="swt_version"> + <loadproperties srcFile="${repo.src}/${file_make_common}"/> +- <script language="javascript"> +- <![CDATA[ +- rev = project.getProperty("rev"); +- min_ver = project.getProperty("min_ver"); +- maj_ver = project.getProperty("maj_ver"); +- new_rev = parseInt(rev) + 1; +- new_min_ver = min_ver; +- new_maj_ver = maj_ver; +- one = new_maj_ver; +- two = new_min_ver; +- three = new_rev; +- four = 0; +- project.setProperty("new_rev", new_rev); +- project.setProperty("new_min_ver", new_min_ver); +- project.setProperty("new_maj_ver", new_maj_ver); +- project.setProperty("new_comma_ver", one + "," + two + "," + three + "," + four); +- ]]> +- </script> + <property name="swt_version" value="${maj_ver}${min_ver}r${rev}"/> +- <property name="new_version" value="${new_maj_ver}${new_min_ver}r${new_rev}"/> +- <echo>Version=${swt_version}; New=${new_version}; New comma_ver=${new_comma_ver}</echo> ++ <echo>Version=${swt_version}</echo> + </target> + + <target name="get_new_release_version" unless="min_ver"> diff --git a/eclipse-swt-fedora-build-native.patch b/eclipse-swt-fedora-build-native.patch new file mode 100644 index 0000000..6a12f92 --- /dev/null +++ b/eclipse-swt-fedora-build-native.patch @@ -0,0 +1,24 @@ +--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse-SWT-PI/gtk/library/make_linux.mak ++++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse-SWT-PI/gtk/library/make_linux.mak +@@ -20,7 +20,7 @@ + #SWT_LIB_DEBUG=1 # to debug glue code in /bundles/org.eclipse.swt/bin/library. E.g os_custom.c:swt_fixed_forall(..) + # Can be set via environment like: export SWT_LIB_DEBUG=1 + ifdef SWT_LIB_DEBUG +-SWT_DEBUG = -O0 -g3 -ggdb3 ++#SWT_DEBUG = -O0 -g3 -ggdb3 + NO_STRIP=1 + endif + + +--- a/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse-SWT-PI/gtk/library/build.sh ++++ b/eclipse.platform.swt/bundles/org.eclipse.swt/Eclipse-SWT-PI/gtk/library/build.sh +@@ -74,7 +74,8 @@ + + MAKE_TYPE=make + +-export CFLAGS='-O -Wall -fPIC' ++export CFLAGS="$CFLAGS" ++OUTPUT_DIR=../../.. + + # Determine which OS we are on + if [ "${OS}" = "" ]; then diff --git a/eclipse-swt-rm-eclipse-tasks-and-customize-build.patch b/eclipse-swt-rm-eclipse-tasks-and-customize-build.patch new file mode 100644 index 0000000..e8f7196 --- /dev/null +++ b/eclipse-swt-rm-eclipse-tasks-and-customize-build.patch @@ -0,0 +1,55 @@ +--- a/eclipse.platform.swt/bundles/org.eclipse.swt/build.xml ++++ b/eclipse.platform.swt/bundles/org.eclipse.swt/build.xml +@@ -26,6 +26,15 @@ + <condition property="p2.publish.parts" value="true"> + <istrue value="${p2.gathering}" /> + </condition> ++ <property name="repo.src" value="../../../eclipse.platform.swt"/> ++ <property name="file_make_common" value="bundles/org.eclipse.swt/Eclipse SWT/common/library/make_common.mak"/> ++ </target> ++ ++ <!-- Set swt_version, new_version, (and rev, min_ver, maj_ver, new_rev, new_min_ver, new_maj_ver) from the make_common.mak --> ++ <target name="get_version" depends="init" unless="swt_version"> ++ <loadproperties srcFile="${repo.src}/${file_make_common}"/> ++ <property name="swt_version" value="${maj_ver}${min_ver}r${rev}"/> ++ <echo>Version=${swt_version}</echo> + </target> + + <target name="build.update.jar" depends="init"> +@@ -42,15 +51,24 @@ + <antcall target="gather.bin.parts"> + <param name="destination.temp.folder" value="${build.result.folder}" /> + </antcall> +- <eclipse.gatherBundle metadataRepository="${p2.build.repo}" artifactRepository="${p2.build.repo}" buildResultFolder="${build.result.folder}" targetFolder="${build.result.folder}/${full.name}" /> + </target> + +- <target name="gather.bin.parts" depends="init" if="destination.temp.folder"> ++ <target name="gather.bin.parts" depends="get_version" if="destination.temp.folder"> + <mkdir dir="${destination.temp.folder}/${full.name}" /> + <copy todir="${destination.temp.folder}/${full.name}"> +- <fileset dir="${basedir}" includes="plugin.properties,about.html,about_files/,META-INF/" /> ++ <fileset dir="${basedir}" includes="plugin.properties,about.html,about_files/,META-INF/,version.txt" /> ++ <fileset dir="../../../tmp/check.compile.master/build" includes="**/*.class" excludes="**/ole/** **/win32/**"/> ++ <fileset dir="Eclipse SWT PI/gtk/library" includes="**/*.so" excludes="libswt-webkit2extension-*.so"/> + </copy> +- <eclipse.versionReplacer path="${destination.temp.folder}/${full.name}" version="${version.suffix}" /> ++ <copy todir="${destination.temp.folder}/${full.name}/webkitextensions${swt_version}"> ++ <fileset dir="Eclipse SWT PI/gtk/library" includes="libswt-webkit2extension-*.so"/> ++ </copy> ++ <copy todir="${destination.temp.folder}/${full.name}/org/eclipse/swt/internal"> ++ <fileset dir="Eclipse SWT/common/org/eclipse/swt/internal" includes="**/SWTMessages.properties"/> ++ </copy> ++ <copy todir="${destination.temp.folder}/${full.name}/org/eclipse/swt/internal/gtk"> ++ <fileset dir="Eclipse SWT PI/gtk/org/eclipse/swt/internal/gtk" includes="**/*.css"/> ++ </copy> + </target> + + <target name="build.jars" /> +@@ -60,7 +78,6 @@ + + <target name="copy.classpath" unless="haveclasspath"> + <copy file=".classpath_${osgi.ws}" tofile=".classpath" /> +- <eclipse.refreshLocal resource="." depth="infinite" /> + </target> + + <target name="setup.classpath"> diff --git a/eclipse-swt.spec b/eclipse-swt.spec new file mode 100644 index 0000000..2b195cc --- /dev/null +++ b/eclipse-swt.spec @@ -0,0 +1,140 @@ +Epoch: 1 + +%global swtdir eclipse-platform-sources-I20210906-0500 +%global eclipse_rel %{version} +%global eclipse_tag R-%{eclipse_rel}-202109060500 +%global swtsrcdir eclipse.platform.swt/bundles/org.eclipse.swt +%global eclipse_arch %{_arch} + +Name: eclipse-swt +Version: 4.21 +Release: 1%{?dist} +Summary: Eclipse SWT: The Standard Widget Toolkit for GTK+ + +License: EPL-2.0 +URL: https://www.eclipse.org/swt/ + +Source0: https://download.eclipse.org/eclipse/downloads/drops4/%%7Beclipse_tag%7D/ecl... +# Copy of the script https://git.eclipse.org/c/linuxtools/org.eclipse.linuxtools.eclipse-build.gi.... Need for create secondary arch for s390x +Source1: ensure_arch.sh + +# Avoid the need for a javascript interpreter at build time +Patch0: eclipse-swt-avoid-javascript-at-build.patch +# Remove eclipse tasks and modify build tasks to generate jar like expected +Patch1: eclipse-swt-rm-eclipse-tasks-and-customize-build.patch +# Add fedora cflags to build native libs +Patch2: eclipse-swt-fedora-build-native.patch + +ExclusiveArch: s390x x86_64 aarch64 ppc64le + +Requires: java-11-openjdk +Requires: webkit2gtk3 + +BuildRequires: java-11-openjdk-devel +BuildRequires: javapackages-local +BuildRequires: ant +BuildRequires: gcc +BuildRequires: make +BuildRequires: webkit2gtk3-devel +BuildRequires: cairo-devel +BuildRequires: gtk3-devel +BuildRequires: mesa-libGLU-devel + +Provides: eclipse-swt = 1:%{version}-%{release} +Obsoletes: eclipse-swt <= 1:4.19-3 + +%description +SWT is an open source widget toolkit for Java designed to provide +efficient, portable access to the user-interface facilities of the +operating systems on which it is implemented. + +%javadoc_package + +%prep +%setup -q -n %{swtdir} +%patch0 -p1 +%patch1 -p1 + +# Remove pre-compiled native launchers +rm -rf rt.equinox.binaries/org.eclipse.equinox.executable/{bin,contributed}/ + +# Delete pre-built binary artifacts except some test data that cannot be generated +rm -rf rt.equinox.p2/ +rm -rf eclipse.jdt.core/org.eclipse.jdt.core.tests.model/ +find . ! -path "*/JCL/*" ! -name "rtstubs*.jar" ! -name "javax15api.jar" ! -name "j9stubs.jar" ! -name "annotations.jar" \ +-type f -name *.jar -delete +find -name '*.class' -delete +find -name '*.jar' -delete +find -name '*.so' -delete +find -name '*.dll' -delete +find -name '*.jnilib' -delete + +# Patch doesn't support path with spaces, renaming and back to apply patch +mv %{swtsrcdir}/Eclipse\ SWT\ PI %{swtsrcdir}/Eclipse-SWT-PI +%patch2 -p1 +mv %{swtsrcdir}/Eclipse-SWT-PI %{swtsrcdir}/Eclipse\ SWT\ PI + +# This part generates secondary fragments using primary fragments +%pom_xpath_inject "pom:plugin[pom:artifactId='target-platform-configuration']/pom:configuration/pom:environments" \ + "<environment><os>linux</os><ws>gtk</ws><arch>s390x</arch></environment>" eclipse-platform-parent +rm -rf eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.linux.s390x +rm -rf rt.equinox.framework/bundles/org.eclipse.equinox.launcher.gtk.linux.s390x +for dir in rt.equinox.binaries rt.equinox.framework/bundles eclipse.platform.swt.binaries/bundles ; do + %{_sourcedir}/ensure_arch.sh "$dir" x86_64 s390x +done + +cp %{swtsrcdir}/Eclipse\ SWT/common/library/* %{swtsrcdir}/Eclipse\ SWT\ PI/gtk/library/ +cp %{swtsrcdir}/Eclipse\ SWT/common/version.txt %{swtsrcdir}/ +cp %{swtsrcdir}/Eclipse\ SWT\ PI/{common,cairo}/library/* %{swtsrcdir}/Eclipse\ SWT\ PI/gtk/library/ +cp %{swtsrcdir}/Eclipse\ SWT\ OpenGL/glx/library/* %{swtsrcdir}/Eclipse\ SWT\ PI/gtk/library/ +cp %{swtsrcdir}/Eclipse\ SWT\ WebKit/gtk/library/* %{swtsrcdir}/Eclipse\ SWT\ PI/gtk/library/ +cp %{swtsrcdir}/Eclipse\ SWT\ AWT/gtk/library/* %{swtsrcdir}/Eclipse\ SWT\ PI/gtk/library/ +cp eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.linux.%{eclipse_arch}/about_files/*.txt %{swtsrcdir}/about_files/ + +%build + +export JAVA_HOME=%{_jvmdir}/java-11-openjdk + +cd %{swtsrcdir} + +# Build native part +export SWT_LIB_DEBUG=1 +export CFLAGS="${RPM_OPT_FLAGS}" +export LFLAGS="${RPM_LD_FLAGS}" +ant -f buildSWT.xml build_local -Dbuild_dir=Eclipse\ SWT\ PI/gtk/library -Dtargets="-gtk3 install" -Dclean= -Dcflags="${RPM_OPT_FLAGS}" -Dlflags="${RPM_LD_FLAGS}" + +# Build Java part +ant -f buildSWT.xml check_compilation_all_platforms -Drepo.src=../../ + +# Build Jar file +ant -f build.xml + +%install +# Generate addition Maven metadata +rm -rf .xmvn/ .xmvn-reactor + +# Install Maven metadata for SWT +JAR=%{swtsrcdir}/org.eclipse.swt_*.jar +VER=$(echo $JAR | sed -e "s/.*_(.*).jar/\1/") +%mvn_artifact "org.eclipse.swt:org.eclipse.swt:jar:$VER" %{swtsrcdir}/org.eclipse.swt_*.jar +%mvn_alias "org.eclipse.swt:org.eclipse.swt" "org.eclipse.swt:swt" +%mvn_file "org.eclipse.swt:org.eclipse.swt" swt + +%mvn_install -J %{swtsrcdir}/docs/api/ + +#fix so permissions +find %{swtsrcdir}/*.so -name *.so -exec chmod a+x {} ; + +install -d 755 %{buildroot}/%{_libdir}/%{name} +cp -a %{swtsrcdir}/*.so %{buildroot}/%{_libdir}/%{name} + +%files -f .mfiles +%{_libdir}/%{name} +%license LICENSE +%license NOTICE + +%changelog +* Wed Sep 22 2021 Nicolas De Amicis deamicis@bluewin.ch - 1:4.21-1 +- Initial packaging + + diff --git a/ensure_arch.sh b/ensure_arch.sh new file mode 100755 index 0000000..e5aaea0 --- /dev/null +++ b/ensure_arch.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# Ensures bundles exist for secondary arches by copying the bundle for +# the source arch for the given target arches and performing some arch +# name substitution on the copies. +# +# Usage: +# $ ensure_arch.sh bundleDir sourceArch targetArch targetArch ... + +pushd $1 1>/dev/null +srcs=$(ls | grep -e "gtk.linux.$2$" || ls | grep -e "linux.$2$") +if [ -z "$srcs" ] ; then + echo "no bundle found for $2" + exit 1 +fi +for a in ${@:3} ; do + for src in $srcs ; do + tgt=${src/$2/$a} + if [ -d "$tgt" ] ; then + echo "bundle $tgt already exists" + else + cp -r ${src} $tgt + for f in $(cd $tgt && find . -type f | grep $2) ; do + mv $tgt/$f $tgt/${f/$2/$a} + done + find $tgt -type f -exec sed -i -e "s/$2/$a/g" {} ; + echo "bundle $tgt created" + fi + done +done +popd 1>/dev/null diff --git a/sources b/sources new file mode 100644 index 0000000..270b313 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (eclipse-platform-sources-4.21.tar.xz) = 3c3e1dba42d34c847afb879c53f1fbc7c4a47c64798be9e113e9f4f790b3d9efb0c86873f7c7b55afb77a4a26776a1e5c5da95be46b843d0dbf7a1b6f8df27d9
arch-excludes@lists.fedoraproject.org