Accepting request 867528 from graphics

fix bsc#1180614

OBS-URL: https://build.opensuse.org/request/show/867528
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gimp?expand=0&rev=124
This commit is contained in:
Dominique Leuenberger 2021-02-01 12:26:02 +00:00 committed by Git OBS Bridge
commit 3007cc08a2
3 changed files with 60 additions and 26 deletions

View File

@ -0,0 +1,46 @@
From aa135ac1f814bf6197b2951ec0796547907a08ed Mon Sep 17 00:00:00 2001
From: Jehan <jehan@girinstud.io>
Date: Mon, 14 Dec 2020 19:53:38 +0100
Subject: [PATCH] app: make "gegl:introspect" an optional operation dependency.
Check at runtime for the operation availability and set the "Show Image
Graph" action active depending on this check.
This goes with discussions to make this operation optional with a
runtime check for the tool `dot`.
See: https://gitlab.gnome.org/GNOME/gegl/-/merge_requests/84
---
app/actions/debug-actions.c | 6 ++++++
app/sanity.c | 1 -
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/app/actions/debug-actions.c b/app/actions/debug-actions.c
index 98a2f07..70ceb0d 100644
--- a/app/actions/debug-actions.c
+++ b/app/actions/debug-actions.c
@@ -98,4 +98,10 @@ void
debug_actions_update (GimpActionGroup *group,
gpointer data)
{
+#define SET_SENSITIVE(action,condition) \
+ gimp_action_group_set_action_sensitive (group, action, (condition) != 0)
+
+ SET_SENSITIVE ("debug-show-image-graph", gegl_has_operation ("gegl:introspect"));
+
+#undef SET_SENSITIVE
}
diff --git a/app/sanity.c b/app/sanity.c
index 0ad044a..81120bb 100644
--- a/app/sanity.c
+++ b/app/sanity.c
@@ -650,7 +650,6 @@ sanity_check_gegl_ops (void)
"gegl:hue-chroma",
"gegl:illusion",
"gegl:image-gradient",
- "gegl:introspect",
"gegl:invert-gamma",
"gegl:invert-linear",
"gegl:lens-blur",
--
2.30.0

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Jan 25 08:33:24 UTC 2021 - Stefan Brüns <stefan.bruens@rwth-aachen.de>
- Make graphviz/dot only required for runtime debugging an
optional dependency, fixes bsc#1180614:
* 0001-app-make-gegl-introspect-an-optional-operation-depen.patch
- Cleanup spec file, remove Leap 42.x parts
-------------------------------------------------------------------
Thu Jan 7 06:43:45 UTC 2021 - Alynx Zhou <alynx.zhou@suse.com>

View File

@ -1,7 +1,7 @@
#
# spec file for package gimp
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@ -44,17 +44,14 @@ Source2: openSUSE.gpl
Source99: baselibs.conf
# PATCH-FIX-UPSTREAM git diff GIMP_2_10_22..gimp-2-10 -- plug-ins/common/file-heif.c > libheif-avif-only.patch mrueckert@suse.de -- only offer the fileformats that our current libheif actually supports
Patch: libheif-avif-only.patch
# PATCH-FIX-UPSTREAM Make graphviz/dot dependency optional -- https://github.com/GNOME/gimp/commit/2cae9b9acf9da98c4c9990819ffbd5aabe23017e.patch
Patch1: 0001-app-make-gegl-introspect-an-optional-operation-depen.patch
BuildRequires: aalib-devel
BuildRequires: alsa-devel >= 1.0.0
BuildRequires: fdupes
BuildRequires: fontconfig-devel >= 2.12.4
%if 0%{?suse_version} < 1500
BuildRequires: gcc7
BuildRequires: gcc7-c++
%else
BuildRequires: gcc-c++
%endif
BuildRequires: gdk-pixbuf-loader-rsvg
# For some odd reason build needs gegl executable.
BuildRequires: gegl
@ -221,6 +218,7 @@ applications that want to make use of the GIMP libraries.
%prep
%setup -q
%patch -p1
%patch1 -p1
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
@ -246,10 +244,6 @@ if test "x${vapi}" != "x%{apiver}"; then
fi
%build
%if 0%{?suse_version} < 1500
test -x "$(type -p %{_bindir}/gcc-7)" && export CC="%{_bindir}/gcc-7"
test -x "$(type -p %{_bindir}/g++-7)" && export CXX="%{_bindir}/g++-7"
%endif
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export CFLAGS="%{optflags} -fno-strict-aliasing"
@ -257,17 +251,15 @@ export LDFLAGS="%{optflags} -lm"
%configure \
--disable-silent-rules \
--disable-static\
%if 0%{?suse_version} >= 1330
--without-webkit\
--with-lcms=lcms2\
%endif
%{!?with_python_plugin:--disable-python} \
--libexecdir=%{_libexecdir}\
--enable-default-binary\
--disable-check-update\
--enable-mp
make %{?_smp_mflags}
%make_build
%install
%make_install
@ -300,18 +292,6 @@ install -m 644 -c macros.gimp \
%fdupes %{buildroot}%{_libdir}/gimp/2.0/python/
%fdupes %{buildroot}%{_datadir}/gimp/2.0/
%if 0%{?suse_version} < 1500
%post
%desktop_database_post
%icon_theme_cache_post
%endif
%if 0%{?suse_version} < 1500
%postun
%desktop_database_postun
%icon_theme_cache_postun
%endif
%post -n libgimp-2_0-0 -p /sbin/ldconfig
%postun -n libgimp-2_0-0 -p /sbin/ldconfig
%post -n libgimpui-2_0-0 -p /sbin/ldconfig