[packages/chromium-browser] - fix building with cups 2.2

baggins baggins at pld-linux.org
Mon Apr 3 07:32:49 CEST 2017


commit 72cf1a312b0466cf10dcd768b450de4681b6bc26
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Mon Apr 3 07:31:44 2017 +0200

    - fix building with cups 2.2

 chromium-browser.spec | 46 ++++++++++++++++++++++++----------------------
 cups22.patch          | 47 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 71 insertions(+), 22 deletions(-)
---
diff --git a/chromium-browser.spec b/chromium-browser.spec
index 8a66ab7..a10fa62 100644
--- a/chromium-browser.spec
+++ b/chromium-browser.spec
@@ -5,39 +5,39 @@
 %bcond_with	dev			# with dev optimizations (skip clean source)
 %bcond_without	gconf			# with GConf
 %bcond_without	kerberos		# build with kerberos support (dlopened if support compiled, library names in net/http/http_auth_gssapi_posix.cc)
-%bcond_without	keyring 		# with keyring support (gnome-keyring dlopened, kwalletd via dbus)
-%bcond_with		gps 			# with gps support (linked), if enabled must use exactly same gpsd as shm structures may change leading to unexpected results (crash)
-%bcond_without	libjpegturbo	# use libjpeg-turbo features
+%bcond_without	keyring			# with keyring support (gnome-keyring dlopened, kwalletd via dbus)
+%bcond_with	gps			# with gps support (linked), if enabled must use exactly same gpsd as shm structures may change leading to unexpected results (crash)
+%bcond_without	libjpegturbo		# use libjpeg-turbo features
 %bcond_with	nacl			# build Native Client support, disabled: http://crbug.com/269560
 %bcond_without	ninja			# use Ninja instead of make to build
 %bcond_without	pulseaudio		# with pulseaudio
 %bcond_without	sandboxing		# with sandboxing
-%bcond_with		selinux			# with SELinux (need policy first)
-%bcond_with		shared_libs		# with shared libs
-%bcond_with		sse2			# use SSE2 instructions
+%bcond_with	selinux			# with SELinux (need policy first)
+%bcond_with	shared_libs		# with shared libs
+%bcond_with	sse2			# use SSE2 instructions
 %bcond_without	system_flac		# system flac
-%bcond_without	system_ffmpeg	# system ffmpeg
-%bcond_without	system_harfbuzz	# system harfbuzz
+%bcond_without	system_ffmpeg		# system ffmpeg
+%bcond_without	system_harfbuzz		# system harfbuzz
 # http://bugs.gentoo.org/576370
-%bcond_with	system_icu	# system icu
-%bcond_without	system_jsoncpp	# system jsoncpp
-%bcond_without	system_libexif	# system libexif
-%bcond_without	system_libmtp	# system libmtp
-%bcond_with	system_libusb	# system libusb-1, disabled: http://crbug.com/266149
-%bcond_without	system_libwebp	# system libwebp
+%bcond_with	system_icu		# system icu
+%bcond_without	system_jsoncpp		# system jsoncpp
+%bcond_without	system_libexif		# system libexif
+%bcond_without	system_libmtp		# system libmtp
+%bcond_with	system_libusb		# system libusb-1, disabled: http://crbug.com/266149
+%bcond_without	system_libwebp		# system libwebp
 %bcond_without	system_libxnvctrl	# system libxnvctrl
 %bcond_with	system_mesa		# system Mesa
-%bcond_without	system_minizip	# system minizip
+%bcond_without	system_minizip		# system minizip
 %bcond_without	system_opus		# system opus codec support, http://www.opus-codec.org/examples/
 # protobuf broken: https://bugs.gentoo.org/show_bug.cgi?id=525560
-%bcond_with	system_protobuf	# system protobuf
+%bcond_with	system_protobuf		# system protobuf
 %bcond_with	system_re2		# system re2
-%bcond_without	system_snappy	# system snappy
-%bcond_without	system_speex	# system speex
-%bcond_with	system_sqlite	# system sqlite WebSQL (http://www.w3.org/TR/webdatabase/) will not work
-%bcond_without	system_libsrtp	# system srtp (can be used if using bundled libjingle), http://bugs.gentoo.org/459932
-%bcond_with		system_v8		# system v8
-%bcond_with	system_libvpx	# system libvpx, http://crbug.com/494939
+%bcond_without	system_snappy		# system snappy
+%bcond_without	system_speex		# system speex
+%bcond_with	system_sqlite		# system sqlite WebSQL (http://www.w3.org/TR/webdatabase/) will not work
+%bcond_without	system_libsrtp		# system srtp (can be used if using bundled libjingle), http://bugs.gentoo.org/459932
+%bcond_with	system_v8		# system v8
+%bcond_with	system_libvpx		# system libvpx, http://crbug.com/494939
 %bcond_without	system_yasm		# system yasm
 %bcond_without	system_zlib		# system zlib
 %bcond_with	tcmalloc		# use tcmalloc
@@ -126,6 +126,7 @@ Patch39:	libsecret.patch
 Patch40:	ffmpeg-generate-errors.patch
 Patch41:	ffmpeg-generate.patch
 Patch42:	system-ffmpeg.patch
+Patch43:	cups22.patch
 URL:		http://www.chromium.org/Home
 %{?with_gconf:BuildRequires:	GConf2-devel}
 %{?with_system_mesa:BuildRequires:	Mesa-libGL-devel >= 9.1}
@@ -339,6 +340,7 @@ ln -s %{SOURCE7} .
 #%patch40 -p1 UPDATE
 #%patch41 -p1 CHECK
 %patch42 -p1
+%patch43 -p1
 
 # https://groups.google.com/a/chromium.org/forum/#!topic/chromium-packagers/9JX1N2nf4PU
 install -d chrome/test/data/webui
diff --git a/cups22.patch b/cups22.patch
new file mode 100644
index 0000000..fd09375
--- /dev/null
+++ b/cups22.patch
@@ -0,0 +1,47 @@
+diff -up chromium-52.0.2743.82/printing/backend/print_backend_cups.cc.cups22 chromium-52.0.2743.82/printing/backend/print_backend_cups.cc
+--- chromium-52.0.2743.82/printing/backend/print_backend_cups.cc.cups22	2016-07-22 09:20:15.794340886 -0400
++++ chromium-52.0.2743.82/printing/backend/print_backend_cups.cc	2016-07-22 09:20:26.338261197 -0400
+@@ -16,6 +16,7 @@
+ #include "base/synchronization/lock.h"
+ #include "base/values.h"
+ #include "printing/backend/cups_helper.h"
++#include <cups/ppd.h>
+ #include "printing/backend/print_backend_consts.h"
+ #include "url/gurl.h"
+ 
+diff -up chromium-52.0.2743.82/printing/BUILD.gn.cups22 chromium-52.0.2743.82/printing/BUILD.gn
+--- chromium-52.0.2743.82/printing/BUILD.gn.cups22	2016-07-21 11:27:05.597507544 -0400
++++ chromium-52.0.2743.82/printing/BUILD.gn	2016-07-21 14:36:45.574137758 -0400
+@@ -147,12 +147,13 @@ component("printing") {
+                                  ],
+                                  "trim string")
+ 
+-      if (cups_version == "1.6" || cups_version == "1.7") {
++      if (cups_version == "1.6" || cups_version == "1.7" || cups_version == "2.2") {
+         cflags += [
+           # CUPS 1.6 deprecated the PPD APIs, but we will stay with this
+           # API for now as supported Linux and Mac OS'es are still using
+           # older versions of CUPS. More info: crbug.com/226176
+           "-Wno-deprecated-declarations",
++          "-D_PPD_DEPRECATED=",
+           # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section
+           # below.
+         ]
+diff -up chromium-52.0.2743.82/printing/printing.gyp.cups22 chromium-52.0.2743.82/printing/printing.gyp
+--- chromium-52.0.2743.82/printing/printing.gyp.cups22	2016-07-21 11:26:26.622746918 -0400
++++ chromium-52.0.2743.82/printing/printing.gyp	2016-07-21 14:36:07.390373060 -0400
+@@ -142,12 +142,13 @@
+             'cups_version': '<!(python cups_config_helper.py --api-version <(sysroot))',
+           },
+           'conditions': [
+-            ['cups_version in ["1.6", "1.7"]', {
++            ['cups_version in ["1.6", "1.7", "2.2"]', {
+               'cflags': [
+                 # CUPS 1.6 deprecated the PPD APIs, but we will stay with this
+                 # API for now as supported Linux and Mac OS'es are still using
+                 # older versions of CUPS. More info: crbug.com/226176
+                 '-Wno-deprecated-declarations',
++                '-D_PPD_DEPRECATED=""',
+                 # CUPS 1.7 deprecates httpConnectEncrypt(), see the mac section
+                 # below.
+               ],
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/chromium-browser.git/commitdiff/72cf1a312b0466cf10dcd768b450de4681b6bc26



More information about the pld-cvs-commit mailing list