summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2019-02-04 15:46:58 +0100
committerAvatar Marc-Antoine Perennou <keruspe@exherbo.org> 2019-02-04 15:46:58 +0100
commitdb48424a256303a2969bd52678c491f5e5dc9881 (patch)
treefb5b516a263cc84c91456cbb81b621af90aab04d
parentb2336638dd5ec6396317a1bd30172c5de591ac3c (diff)
downloadgnome-db48424a256303a2969bd52678c491f5e5dc9881.tar.gz
gnome-db48424a256303a2969bd52678c491f5e5dc9881.tar.xz
gnome-control-center: fix build without cups
Signed-off-by: Marc-Antoine Perennou <keruspe@exherbo.org>
-rw-r--r--packages/gnome-desktop/gnome-control-center/files/3.30/0001-optionalise-kerberos-based-authentication.patch4
-rw-r--r--packages/gnome-desktop/gnome-control-center/files/3.30/0002-optionalise-cups-support.patch67
2 files changed, 54 insertions, 17 deletions
diff --git a/packages/gnome-desktop/gnome-control-center/files/3.30/0001-optionalise-kerberos-based-authentication.patch b/packages/gnome-desktop/gnome-control-center/files/3.30/0001-optionalise-kerberos-based-authentication.patch
index 98501ae..10a0f7a 100644
--- a/packages/gnome-desktop/gnome-control-center/files/3.30/0001-optionalise-kerberos-based-authentication.patch
+++ b/packages/gnome-desktop/gnome-control-center/files/3.30/0001-optionalise-kerberos-based-authentication.patch
@@ -1,4 +1,4 @@
-From cd61608575351b7391de91759dfdc900f887c75f Mon Sep 17 00:00:00 2001
+From 5fcc2ddcbb7efe6a53f2cf6a1086dd10bd6a0553 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Sun, 19 Feb 2017 11:18:52 +0100
Subject: [PATCH 1/2] optionalise kerberos based authentication
@@ -120,5 +120,5 @@ index 8f7292909..9188ab4ac 100644
#define UM_REALM_ERROR (um_realm_error_get_quark ())
--
-2.18.0
+2.20.1
diff --git a/packages/gnome-desktop/gnome-control-center/files/3.30/0002-optionalise-cups-support.patch b/packages/gnome-desktop/gnome-control-center/files/3.30/0002-optionalise-cups-support.patch
index 5bb32de..be09a63 100644
--- a/packages/gnome-desktop/gnome-control-center/files/3.30/0002-optionalise-cups-support.patch
+++ b/packages/gnome-desktop/gnome-control-center/files/3.30/0002-optionalise-cups-support.patch
@@ -1,34 +1,71 @@
-From 371d34e5b7b11182f5f80f6b4b022bdf51349ca4 Mon Sep 17 00:00:00 2001
+From 2009600383627555570e03138a4e698082fb0490 Mon Sep 17 00:00:00 2001
From: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
Date: Sun, 19 Feb 2017 11:45:23 +0100
Subject: [PATCH 2/2] optionalise cups support
-Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
---
- meson.build | 7 +-
+ meson.build | 44 +++++++-----
meson_options.txt | 1 +
panels/printers/meson.build | 139 ++++++++++++++++++------------------
shell/cc-panel-loader.c | 4 ++
tests/printers/meson.build | 38 +++++-----
- 5 files changed, 100 insertions(+), 89 deletions(-)
+ 5 files changed, 119 insertions(+), 107 deletions(-)
diff --git a/meson.build b/meson.build
-index 49816d185..1768526b0 100644
+index d6f11783c..526c05a03 100644
--- a/meson.build
+++ b/meson.build
-@@ -250,6 +250,11 @@ top_inc = include_directories('.')
- shell_inc = include_directories('shell')
+@@ -128,25 +128,31 @@ common_deps = [
+ dependency('gtk+-3.0', version: '>= 3.22.20')
+ ]
- subdir('build-aux')
-+
+-# Check for CUPS 1.4 or newer
+-cups_dep = dependency('cups', version : '>= 1.4', required: false)
+-assert(cups_dep.found(), 'CUPS 1.4 or newer not found')
+-
+-# https://bugzilla.gnome.org/show_bug.cgi?id=696766
+-cups_cflags = []
+-if cups_dep.version().version_compare('>= 1.6')
+- cups_cflags += '-D_PPD_DEPRECATED=""'
+-endif
+-
+-# cups headers
+-check_headers = [
+- ['HAVE_CUPS_CUPS_H', 'cups/cups.h'],
+- ['HAVE_CUPS_PPD_H', 'cups/ppd.h']
+-]
++# Optional dependency for the printers panel
+enable_cups = get_option('cups')
++if enable_cups
++ # Check for CUPS 1.4 or newer
++ cups_dep = dependency('cups', version : '>= 1.4', required: false)
++ assert(cups_dep.found(), 'CUPS 1.4 or newer not found')
++
++ # https://bugzilla.gnome.org/show_bug.cgi?id=696766
++ cups_cflags = []
++ if cups_dep.version().version_compare('>= 1.6')
++ cups_cflags += '-D_PPD_DEPRECATED=""'
++ endif
++
++ # cups headers
++ check_headers = [
++ ['HAVE_CUPS_CUPS_H', 'cups/cups.h'],
++ ['HAVE_CUPS_PPD_H', 'cups/ppd.h']
++ ]
+
+-foreach header: check_headers
+- assert(cc.has_header(header[1], args: cups_cflags), 'CUPS headers not found: ' + header[1])
+-endforeach
++ foreach header: check_headers
++ assert(cc.has_header(header[1], args: cups_cflags), 'CUPS headers not found: ' + header[1])
++ endforeach
++endif
+config_h.set('BUILD_PRINTERS', enable_cups,
+ description: 'Define to 1 to enable printers support')
-+
- subdir('data/icons')
- subdir('po')
- subdir('panels')
-@@ -282,4 +287,4 @@ output += ' NetworkManager (Network panel) ............. ' + host_is_linux.t
+
+ # Optional dependency for the user accounts panel
+ enable_cheese = get_option('cheese')
+@@ -287,4 +293,4 @@ output += ' NetworkManager (Network panel) ............. ' + host_is_linux.t
output += ' Wacom (Wacom tablet panel) ................. ' + host_is_linux_not_s390.to_string() + '\n'
output += ' Wayland .................................... ' + enable_wayland.to_string() + '\n'
@@ -267,5 +304,5 @@ index bbf43ab0c..a6e03234f 100644
+ endforeach
+endif
--
-2.18.0
+2.20.1