The package rpms/gimp3.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/gimp3.git/commit/?id=d2afa1ba5f421d2....
Change: +%ifnarch %plain_lua_arches
Thanks.
Full change: ============
commit d2afa1ba5f421d2c45c68cda40b569626b930e01 Author: Nils Philippsen nils@tiptoe.de Date: Wed Jun 12 14:55:00 2024 +0200
Fix issues found since attempts to build
- Fix bug report url
The string is used verbatim in different places where one would expect HTML entities to be used for ampersands, and others don’t.
- Fix parameter type in psd_read_len()
This otherwised failed compiling on hardware architectures with a gsize type of different length.
https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1557
- Detect Lua 5.4 and fall back to unversioned name
https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1626
- Fix gobject introspection references
https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1625 (backported)
- Fix generating RPM macro file
- Skip tests on s390x
On this platform, tests simply hang and I don’t have the capacity to investigate.
- Use SPDX license identifiers consistently
[skip changelog]
Signed-off-by: Nils Philippsen nils@tiptoe.de
diff --git a/0001-Detect-Lua-5.4-and-fall-back-to-unversioned-name.patch b/0001-Detect-Lua-5.4-and-fall-back-to-unversioned-name.patch new file mode 100644 index 0000000..246ca8c --- /dev/null +++ b/0001-Detect-Lua-5.4-and-fall-back-to-unversioned-name.patch @@ -0,0 +1,35 @@ +From 7f61e17bb71031875392fea3a2c4465fee8e05a6 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen nils@tiptoe.de +Date: Thu, 9 May 2024 23:51:28 +0200 +Subject: [PATCH] Detect Lua 5.4 and fall back to unversioned name + +Signed-off-by: Nils Philippsen nils@tiptoe.de +--- + meson.build | 7 ++++--- + 1 file changed, 4 insertions(+), 3 deletions(-) + +diff --git a/meson.build b/meson.build +index f478092180..b34de415a1 100644 +--- a/meson.build ++++ b/meson.build +@@ -1126,13 +1126,14 @@ endif + ## Lua + + have_lua = false +-# At time of writing, lua-lgi works Lua 5.1, Lua 5.2, Lua 5.3 and LuaJIT2. On ++# At time of writing, lua-lgi works Lua 5.1, 5.2, 5.3, 5.4 and LuaJIT2. On + # most platforms, we use luajit. On MSYS2, only lua5.1 works with lua-lgi. This +-# is why we use this order for lua detection. ++# is why we use this order for lua detection. Fall back to an unversioned ++# program name. + if get_option('lua').allowed() + have_lua_lgi = false + +- foreach lua_bin : [ 'luajit', 'lua5.1', 'lua5.2', 'lua5.3' ] ++ foreach lua_bin : [ 'luajit', 'lua5.1', 'lua5.2', 'lua5.3', 'lua5.4', 'lua' ] + lua = find_program(lua_bin, required: false) + + if lua.found() and meson.can_run_host_binaries() +-- +2.45.0 + diff --git a/0001-plug-ins-Fix-parameter-type-in-psd_read_len.patch b/0001-plug-ins-Fix-parameter-type-in-psd_read_len.patch new file mode 100644 index 0000000..9fe8009 --- /dev/null +++ b/0001-plug-ins-Fix-parameter-type-in-psd_read_len.patch @@ -0,0 +1,43 @@ +From af27954891bfed53653450b7817eb957a7c696b5 Mon Sep 17 00:00:00 2001 +From: Nils Philippsen nils@tiptoe.de +Date: Wed, 22 May 2024 15:42:21 +0200 +Subject: [PATCH] plug-ins: Fix parameter type in psd_read_len() + +The function expects *data to be 64bit wide which is incidentally true +on some architectures but not others. Make it explicit (and portable). + +Signed-off-by: Nils Philippsen nils@tiptoe.de +--- + plug-ins/file-psd/psd-util.c | 2 +- + plug-ins/file-psd/psd-util.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/plug-ins/file-psd/psd-util.c b/plug-ins/file-psd/psd-util.c +index 7793a7df82..1768fb97f9 100644 +--- a/plug-ins/file-psd/psd-util.c ++++ b/plug-ins/file-psd/psd-util.c +@@ -204,7 +204,7 @@ psd_read (GInputStream *input, + + gboolean + psd_read_len (GInputStream *input, +- gsize *data, ++ guint64 *data, + gint psd_version, + GError **error) + { +diff --git a/plug-ins/file-psd/psd-util.h b/plug-ins/file-psd/psd-util.h +index 911298be86..497b6bbb72 100644 +--- a/plug-ins/file-psd/psd-util.h ++++ b/plug-ins/file-psd/psd-util.h +@@ -34,7 +34,7 @@ gint psd_read (GInputStream *input, + GError **error); + + gboolean psd_read_len (GInputStream *input, +- gsize *data, ++ guint64 *data, + gint psd_version, + GError **error); + +-- +2.45.1 + diff --git a/gimp-2.99.18-gi-fixes.patch b/gimp-2.99.18-gi-fixes.patch new file mode 100644 index 0000000..d21c901 --- /dev/null +++ b/gimp-2.99.18-gi-fixes.patch @@ -0,0 +1,66 @@ +diff -up gimp-2.99.18/libgimp/gimpfont.c.gi-fixes gimp-2.99.18/libgimp/gimpfont.c +--- gimp-2.99.18/libgimp/gimpfont.c.gi-fixes 2024-02-17 18:01:20.000000000 +0100 ++++ gimp-2.99.18/libgimp/gimpfont.c 2024-06-11 12:50:51.003453055 +0200 +@@ -47,7 +47,7 @@ static void gimp_font_init (GimpFont *f + * gimp_font_get_pango_font_description: + * @font: (transfer none): the [class@Gimp.Font] + * +- * Returns a [class@Pango.Font.Description] representing @font. ++ * Returns a [struct@Pango.FontDescription] representing @font. + * + * Returns: (transfer full): a %PangoFontDescription representing @font. + * +diff -up gimp-2.99.18/libgimp/gimpplugin.c.gi-fixes gimp-2.99.18/libgimp/gimpplugin.c +--- gimp-2.99.18/libgimp/gimpplugin.c.gi-fixes 2024-02-17 18:01:20.000000000 +0100 ++++ gimp-2.99.18/libgimp/gimpplugin.c 2024-06-11 12:50:51.003453055 +0200 +@@ -644,7 +644,7 @@ gimp_plug_in_get_temp_procedure (GimpPlu + * must call [method@PlugIn.extension_enable]. + * + * Note that the plug-in does not need to be a +- * [const@PDBProcType.EXTENSION] to register temporary procedures. ++ * [enum@PDBProcType].EXTENSION to register temporary procedures. + * + * See also: [method@PlugIn.add_temp_procedure]. + * +diff -up gimp-2.99.18/libgimp/gimpprocedure.c.gi-fixes gimp-2.99.18/libgimp/gimpprocedure.c +--- gimp-2.99.18/libgimp/gimpprocedure.c.gi-fixes 2024-02-17 18:01:20.000000000 +0100 ++++ gimp-2.99.18/libgimp/gimpprocedure.c 2024-06-11 12:51:53.278032865 +0200 +@@ -1826,7 +1826,7 @@ gimp_procedure_new_return_values (GimpPr + + /** + * gimp_procedure_run: (skip) +- * @procedure: the [class@gimp.Procedure] to run. ++ * @procedure: the [class@Gimp.Procedure] to run. + * @first_arg_name: the name of an argument of @procedure or %NULL to + * run @procedure with default arguments. + * @...: the value of @first_arg_name and any more argument +@@ -1864,7 +1864,7 @@ gimp_procedure_run (GimpProcedure *proce + + /** + * gimp_procedure_run_valist: (skip) +- * @procedure: the [class@gimp.Procedure] to run. ++ * @procedure: the [class@Gimp.Procedure] to run. + * @first_arg_name: the name of an argument of @procedure or %NULL to + * run @procedure with default arguments. + * @args the value of @first_arg_name and any more argument +@@ -1934,7 +1934,7 @@ gimp_procedure_run_valist (GimpProcedure + + /** + * gimp_procedure_run_config: (rename-to gimp_procedure_run) +- * @procedure: the [class@gimp.Procedure] to run. ++ * @procedure: the [class@Gimp.Procedure] to run. + * @config: the @procedure's arguments. + * + * Runs @procedure, calling the run_func given in [ctor@Procedure.new]. +diff -up gimp-2.99.18/libgimp/gimppropwidgets.c.gi-fixes gimp-2.99.18/libgimp/gimppropwidgets.c +--- gimp-2.99.18/libgimp/gimppropwidgets.c.gi-fixes 2024-02-17 18:01:20.000000000 +0100 ++++ gimp-2.99.18/libgimp/gimppropwidgets.c 2024-06-11 12:50:51.003453055 +0200 +@@ -47,7 +47,7 @@ static gchar * gimp_utils_make_cano + * @property_name: Name of a [class@Gimp.Brush] property. + * @chooser_title: (nullable): title for the poppable dialog. + * +- * Creates a [class@Gimp.Brush.Chooser] controlled by the specified property. ++ * Creates a [class@GimpUi.BrushChooser] controlled by the specified property. + * + * Returns: (transfer full): A new [class@GimpUi.BrushChooser]. + * diff --git a/gimp3.spec b/gimp3.spec index 0d0ffa2..d9c07aa 100644 --- a/gimp3.spec +++ b/gimp3.spec @@ -18,6 +18,13 @@ %bcond libunwind 0 %endif
+%ifnarch s390x +%bcond tests 1 +%else +# Tests hang on s390x, skip them. +%bcond tests 0 +%endif + # When building in Koji or mock, networking isn’t available. %bcond skip_networking_tests 1 # Some tests fail under normal user environments, don’t skip them by default. @@ -34,6 +41,9 @@ gimp:app / single-window-mode\ gimp:app / ui
+# luajit isn’t available on all arches +%global plain_lua_arches riscv64 ppc64 ppc64le + %global prerelease 1
Summary: GNU Image Manipulation Program @@ -81,8 +91,13 @@ BuildRequires: glib-networking BuildRequires: libgs-devel BuildRequires: libxml2 BuildRequires: libxslt +%ifnarch %plain_lua_arches BuildRequires: lua-lgi-compat BuildRequires: luajit +%else +BuildRequires: lua >= 5.4 +BuildRequires: lua-lgi +%endif BuildRequires: meson BuildRequires: perl >= 5.10.0 BuildRequires: pkgconfig(alsa) >= 1.0.0 @@ -149,7 +164,13 @@ BuildRequires: xorg-x11-server-Xvfb
Requires: gjs Requires: hicolor-icon-theme +%ifnarch %plain_lua_arches +Requires: lua-lgi-compat Requires: luajit +%else +Requires: lua >= 5.4 +Requires: lua-lgi +%endif Requires: xdg-utils Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: python3dist(pygobject) >= 3.0 @@ -172,6 +193,20 @@ Patch2: gimp3-2.99.18-no-phone-home-default.patch # use external help browser directly if help browser plug-in is not built Patch3: gimp3-2.99.18-external-help-browser.patch
+# Submitted upstream: + +# Fix parameter type in psd_read_len() +# https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1557 +Patch4: 0001-plug-ins-Fix-parameter-type-in-psd_read_len.patch + +# Find current LUA version +# https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1558 +Patch5: 0001-Detect-Lua-5.4-and-fall-back-to-unversioned-name.patch + +# Fix gobject introspection references +# https://gitlab.gnome.org/GNOME/gimp/-/merge_requests/1625 (backported) +Patch6: gimp-2.99.18-gi-fixes.patch + %description GIMP (GNU Image Manipulation Program) is a powerful image composition and editing program, which can be extremely useful for creating logos and other @@ -183,7 +218,7 @@ with multi-level undo.
%package libs Summary: GIMP libraries -License: LGPLv3+ +License: LGPL-3.0-or-later
%description libs The %{name}-libs package contains shared libraries needed for the GNU Image @@ -191,7 +226,7 @@ Manipulation Program (GIMP).
%package devel Summary: GIMP plugin and extension development kit -License: LGPLv3+ +License: LGPL-3.0-or-later Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: %{name}-devel-tools = %{version}-%{release}
@@ -201,7 +236,7 @@ Manipulation Program (GIMP) plug-ins and extensions.
%package devel-tools Summary: GIMP plugin and extension development tools -License: LGPLv3+ +License: LGPL-3.0-or-later Requires: %{name}-devel = %{version}-%{release}
%description devel-tools @@ -220,6 +255,9 @@ EOF %patch 1 -p1 -b .cm-system-monitor-profile-by-default %patch 2 -p1 -b .no-phone-home-default %patch 3 -p1 -b .external-help-browser +%patch 4 -p1 -b .fix-psd_read_len-typing +%patch 5 -p1 -b .detect-lua-5.4 +%patch 6 -p1 -b .gi-fixes
%build # Use hardening compiler/linker flags because gimp is likely to deal with files @@ -234,7 +272,6 @@ EOF %endif -Dilbm=disabled \ -Dbug-report-url="https://bugzilla.redhat.com/" -# -Dbug-report-url="https://bugzilla.redhat.com/enter_bug.cgi?product=Fedora&component=%%7Bn..."
%meson_build
@@ -247,7 +284,7 @@ EOF # %%_gimp_plugindir -- plug-in directory gimp_pc_extract_normalize() { PKG_CONFIG_PATH="$PWD" \ - pkg-config --variable="$1" gimp-%{api_version} | \ + pkg-config --variable="$1" gimp-%{lib_api_version} | \ sed \ -e 's|^%_mandir|%%{_mandir}|' \ -e 's|^%_infodir|%%{_infodir}|' \ @@ -341,6 +378,7 @@ grep -E -rl '^#!\s*/usr/bin/env\s+python' --include=*.py "%{buildroot}" | mv %{buildroot}%{_docdir}/gimp-%{api_version} devel-docs rm -r %{buildroot}%{_datadir}/gimp/%{api_version}/tests
+%if %{with tests} %check # Some tests in the gimp:app suite are known to fail when run in a normal desktop environment, but # they work in isolated builds (mock, koji): save-and-export, single-window-mode, ui @@ -370,6 +408,7 @@ for suite in $suites; do %meson_test --suite "$suite" $suite_tests fi done +%endif
%ldconfig_scriptlets libs
arch-excludes@lists.fedoraproject.org