Fridrich Strba 2022-03-07 19:24:44 +00:00 committed by Git OBS Bridge
parent d933cc5116
commit e9f94d2e91
3 changed files with 48 additions and 5 deletions

View File

@ -1,3 +1,13 @@
-------------------------------------------------------------------
Mon Mar 7 19:21:06 UTC 2022 - Fridrich Strba <fstrba@suse.com>
- Added patch:
* jaw-dependencies.patch
+ Compile all java files in one run
+ Compile the classes with source/target 8, since the code
does not allow lower versions
+ Compile the module-info.class with source/target 9
-------------------------------------------------------------------
Fri Dec 11 08:36:20 UTC 2020 - Fridrich Strba <fstrba@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package java-atk-wrapper
#
# Copyright (c) 2020 SUSE LLC
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -27,6 +27,7 @@ URL: https://gitlab.gnome.org/GNOME/java-atk-wrapper/
Source0: https://download.gnome.org/sources/%{name}/%{major_version}/%{name}-%{version}.tar.xz
Source1: HOWTO
Source2: https://gitlab.gnome.org/GNOME/%{name}/-/raw/%{version}/autogen.sh
Patch0: jaw-dependencies.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: java-devel >= 1.8
@ -43,7 +44,6 @@ BuildRequires: pkgconfig(glib-2.0) >= 2.32.0
BuildRequires: pkgconfig(gobject-2.0)
BuildRequires: pkgconfig(gobject-introspection-1.0)
BuildRequires: pkgconfig(gthread-2.0)
BuildConflicts: java-devel >= 9
Requires: java >= 1.8
Requires: xprop
@ -59,14 +59,14 @@ change of underlying communication mechanism.
%prep
%setup -q
%patch0 -p1
cp %{SOURCE1} %{SOURCE2} .
rm -f wrapper/org/GNOME/Accessibility/AtkWrapper.java
%build
chmod +x autogen.sh
./autogen.sh
%configure --libdir=%{_libdir}/%{name} --disable-modular-jar JAVACFLAGS="-source 8 -target 8"
make %{?_smp_mflags} -j1
%configure --libdir=%{_libdir}/%{name} --disable-modular-jar
make %{?_smp_mflags}
%install
make -C jni install DESTDIR=%{buildroot}

33
jaw-dependencies.patch Normal file
View File

@ -0,0 +1,33 @@
--- java-atk-wrapper-0.38.0/configure.ac 2022-03-07 20:15:51.171967671 +0100
+++ java-atk-wrapper-0.38.0/configure.ac 2020-03-05 23:17:04.000000000 +0100
@@ -46,7 +46,7 @@
AS_IF([test "x$enable_modular_jar" = "xyes"], [
JAVA_REQUIRED=9.0.0
], [
- JAVA_REQUIRED=1.7.0
+ JAVA_REQUIRED=1.8.0
])
JAVA_ERROR_MESSAGE="Java $JAVA_REQUIRED or later is required to build java-access-bridge"
AM_CONDITIONAL([MODULAR_JAR], [test "x$enable_modular_jar" = "xyes"])
--- java-atk-wrapper-0.38.0/wrapper/Makefile.am 2019-04-01 16:22:10.000000000 +0200
+++ java-atk-wrapper-0.38.0/wrapper/Makefile.am 2022-03-07 19:47:41.281675042 +0100
@@ -19,7 +19,7 @@
if MODULAR_JAR
module-info.class : $(srcdir)/module-info.java
- $(JAVAC) -cp $(top_builddir)/wrapper -sourcepath $(top_srcdir)/wrapper:$(top_builddir)/wrapper $(JAVACFLAGS) -d $(top_builddir)/wrapper $<
+ $(JAVAC) -cp $(top_builddir)/wrapper -sourcepath $(top_srcdir)/wrapper:$(top_builddir)/wrapper $(JAVACFLAGS) -source 9 -target 9 -d $(top_builddir)/wrapper $<
$(JARFILES) : $(DEP_CLASSES) module-info.class
$(JAR) cfm $(JARFILES) $(srcdir)/manifest.txt org/GNOME/Accessibility/*.class module-info.class -C $(srcdir) META-INF/services/javax.accessibility.AccessibilityProvider
--- java-atk-wrapper-0.38.0/wrapper/org/GNOME/Accessibility/Makefile.am 2019-05-20 20:54:30.000000000 +0200
+++ java-atk-wrapper-0.38.0/wrapper/org/GNOME/Accessibility/Makefile.am 2022-03-07 20:12:54.986888891 +0100
@@ -12,7 +12,7 @@
all-local: $(BUILD_CLASSES)
%.class : %.java AtkWrapper.java
- $(JAVAC) -cp $(top_builddir)/wrapper -sourcepath $(top_srcdir)/wrapper:$(top_builddir)/wrapper $(JAVACFLAGS) -d $(top_builddir)/wrapper $<
+ $(JAVAC) -cp $(top_builddir)/wrapper -sourcepath $(top_srcdir)/wrapper:$(top_builddir)/wrapper $(JAVACFLAGS) -source 8 -target 8 -d $(top_builddir)/wrapper $(JAVA_SRC) AtkWrapper.java
clean-local:
$(RM) *.class