Fix calibration when using new versions of ArgyllCMS
This commit is contained in:
parent
4a2214e041
commit
7fc2b820ff
70
0001-Make-it-work-with-dispcal-using-stderr.patch
Normal file
70
0001-Make-it-work-with-dispcal-using-stderr.patch
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
From cdf512e4748ba6279e8e5585ad6fd8296f1baa3e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Patryk Zawadzki <patrys@room-303.com>
|
||||||
|
Date: Thu, 5 Dec 2013 16:41:41 +0100
|
||||||
|
Subject: [PATCH] Make it work with dispcal using stderr
|
||||||
|
|
||||||
|
Signed-off-by: Richard Hughes <richard@hughsie.com>
|
||||||
|
---
|
||||||
|
src/gcm-calibrate-argyll.c | 26 +++++++++++++++++++++-----
|
||||||
|
1 file changed, 21 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/gcm-calibrate-argyll.c b/src/gcm-calibrate-argyll.c
|
||||||
|
index 52a4b64..52b8eeb 100644
|
||||||
|
--- a/src/gcm-calibrate-argyll.c
|
||||||
|
+++ b/src/gcm-calibrate-argyll.c
|
||||||
|
@@ -160,7 +160,9 @@ gcm_calibrate_argyll_get_display (const gchar *output_name,
|
||||||
|
{
|
||||||
|
gboolean ret = FALSE;
|
||||||
|
gchar *command = NULL;
|
||||||
|
- gchar *data = NULL;
|
||||||
|
+ const gchar *data;
|
||||||
|
+ gchar *data_stderr = NULL;
|
||||||
|
+ gchar *data_stdout = NULL;
|
||||||
|
gchar *name;
|
||||||
|
gchar **split = NULL;
|
||||||
|
gint exit_status;
|
||||||
|
@@ -178,15 +180,28 @@ gcm_calibrate_argyll_get_display (const gchar *output_name,
|
||||||
|
ret = g_spawn_sync (NULL,
|
||||||
|
(gchar **) argv,
|
||||||
|
NULL,
|
||||||
|
- G_SPAWN_STDERR_TO_DEV_NULL,
|
||||||
|
+ 0,
|
||||||
|
NULL, NULL,
|
||||||
|
- &data,
|
||||||
|
- NULL,
|
||||||
|
+ &data_stdout,
|
||||||
|
+ &data_stderr,
|
||||||
|
&exit_status,
|
||||||
|
error);
|
||||||
|
if (!ret)
|
||||||
|
goto out;
|
||||||
|
|
||||||
|
+ /* recent versions of dispcal switched to stderr output */
|
||||||
|
+ if (data_stdout != NULL && data_stdout[0] != '\0') {
|
||||||
|
+ data = data_stdout;
|
||||||
|
+ } else if (data_stderr != NULL && data_stderr[0] != '\0') {
|
||||||
|
+ data = data_stderr;
|
||||||
|
+ } else {
|
||||||
|
+ g_set_error_literal (error,
|
||||||
|
+ GCM_CALIBRATE_ERROR,
|
||||||
|
+ GCM_CALIBRATE_ERROR_INTERNAL,
|
||||||
|
+ "no sensible output from dispcal");
|
||||||
|
+ goto out;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
/* split it into lines */
|
||||||
|
split = g_strsplit (data, "\n", -1);
|
||||||
|
for (i=0; split[i] != NULL; i++) {
|
||||||
|
@@ -216,7 +231,8 @@ gcm_calibrate_argyll_get_display (const gchar *output_name,
|
||||||
|
}
|
||||||
|
out:
|
||||||
|
g_free (command);
|
||||||
|
- g_free (data);
|
||||||
|
+ g_free (data_stdout);
|
||||||
|
+ g_free (data_stderr);
|
||||||
|
g_strfreev (split);
|
||||||
|
return display;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
1.8.4.2
|
||||||
|
|
@ -1,12 +1,15 @@
|
|||||||
Summary: Color management tools for GNOME
|
Summary: Color management tools for GNOME
|
||||||
Name: gnome-color-manager
|
Name: gnome-color-manager
|
||||||
Version: 3.10.1
|
Version: 3.10.1
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
URL: http://projects.gnome.org/gnome-color-manager/
|
URL: http://projects.gnome.org/gnome-color-manager/
|
||||||
Source0: http://download.gnome.org/sources/gnome-color-manager/3.5/%{name}-%{version}.tar.xz
|
Source0: http://download.gnome.org/sources/gnome-color-manager/3.5/%{name}-%{version}.tar.xz
|
||||||
|
|
||||||
|
# Upstream already
|
||||||
|
Patch0: 0001-Make-it-work-with-dispcal-using-stderr.patch
|
||||||
|
|
||||||
Requires: color-filesystem >= 1-7
|
Requires: color-filesystem >= 1-7
|
||||||
Requires: gnome-icon-theme
|
Requires: gnome-icon-theme
|
||||||
Requires: shared-mime-info
|
Requires: shared-mime-info
|
||||||
@ -54,6 +57,7 @@ and generate color profiles in the GNOME desktop.
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1 -b .fix-with-new-argyllcms
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%configure --disable-schemas-install
|
%configure --disable-schemas-install
|
||||||
@ -109,6 +113,9 @@ glib-compile-schemas %{_datadir}/glib-2.0/schemas &> /dev/null || :
|
|||||||
%{_datadir}/applications/gcm-*.desktop
|
%{_datadir}/applications/gcm-*.desktop
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Dec 05 2013 Richard Hughes <rhughes@redhat.com> - 3.10.1-3
|
||||||
|
- Fix calibration when using new versions of ArgyllCMS
|
||||||
|
|
||||||
* Tue Dec 03 2013 Rex Dieter <rdieter@fedoraproject.org> - 3.10.1-2
|
* Tue Dec 03 2013 Rex Dieter <rdieter@fedoraproject.org> - 3.10.1-2
|
||||||
- rebuild (exiv2)
|
- rebuild (exiv2)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user