Add a CUPS option to disable cups support and remove the

dependency on print/cups. This includes a patch from cpm@ that
solves an undefined linker reference that occurs when cups is
disabled. Since chromium does not support printing without cups
enabling this option also disables printing and print previews.

PR:		226505
Reviewed by:	cpm, matthew (mentor)
Approved by:	cpm, matthew (mentor)
Differential Revision:	https://reviews.freebsd.org/D14659
This commit is contained in:
Craig Leres 2018-03-12 17:44:37 +00:00
parent f62ddd233d
commit cd0cba289e
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=464264
2 changed files with 30 additions and 4 deletions

View File

@ -3,6 +3,7 @@
PORTNAME= chromium
PORTVERSION= 64.0.3282.186
PORTREVISION= 1
CATEGORIES?= www
MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/
DISTFILES= ${DISTNAME}${EXTRACT_SUFX}
@ -50,7 +51,6 @@ LIB_DEPENDS= libatk-bridge-2.0.so:accessibility/at-spi2-atk \
libwebp.so:graphics/webp \
libavcodec.so:multimedia/ffmpeg \
libopenh264.so:multimedia/openh264 \
libcups.so:print/cups \
libfreetype.so:print/freetype2 \
libharfbuzz.so:print/harfbuzz \
libharfbuzz-icu.so:print/harfbuzz-icu \
@ -118,7 +118,6 @@ GN_ARGS+= clang_use_chrome_plugins=false \
use_allocator_shim=false \
use_aura=true \
use_bundled_fontconfig=false \
use_cups=true \
use_custom_libcxx=false \
use_gtk3=true \
use_lld=true \
@ -145,13 +144,13 @@ GN_ARGS+= google_api_key="AIzaSyBsp9n41JLW8jCokwn7vhoaMejDFRd1mp8" \
SUB_FILES= chromium-browser.desktop chrome
SUB_LIST+= COMMENT="${COMMENT}"
OPTIONS_DEFINE= CODECS DEBUG DRIVER GCONF KERBEROS TEST
OPTIONS_DEFINE= CODECS CUPS DEBUG DRIVER GCONF KERBEROS TEST
CODECS_DESC= Compile and enable patented codecs like H.264
DRIVER_DESC= Install chromedriver
OPTIONS_GROUP= AUDIO
OPTIONS_GROUP_AUDIO= ALSA PULSEAUDIO SNDIO
OPTIONS_DEFAULT= ALSA CODECS DRIVER GCONF KERBEROS
OPTIONS_DEFAULT= ALSA CODECS CUPS DRIVER GCONF KERBEROS
OPTIONS_SUB= yes
ALSA_LIB_DEPENDS= libasound.so:audio/alsa-lib
@ -167,6 +166,10 @@ CODECS_VARS_OFF= GN_ARGS+=ffmpeg_branding="Chromium" \
GN_ARGS+=proprietary_codecs=false \
GN_ARGS+=enable_hevc_demuxing=false
CUPS_LIB_DEPENDS= libcups.so:print/cups
CUPS_VARS= GN_ARGS+=use_cups=true
CUPS_VARS_OFF= GN_ARGS+=use_cups=false
DEBUG_VARS= BUILDTYPE=Debug \
GN_ARGS+=is_debug=true \
GN_ARGS+=is_component_build=false \

View File

@ -0,0 +1,23 @@
--- chrome/service/cloud_print/print_system.cc.orig 2018-02-24 15:25:11 UTC
+++ chrome/service/cloud_print/print_system.cc
@@ -5,6 +5,7 @@
#include "chrome/service/cloud_print/print_system.h"
#include "base/guid.h"
+#include "build/build_config.h"
namespace cloud_print {
@@ -35,5 +36,12 @@ std::string PrintSystem::GenerateProxyId
return base::GenerateGUID();
}
+#if (defined(OS_LINUX) || defined(OS_BSD)) && !defined(USE_CUPS)
+scoped_refptr<PrintSystem> PrintSystem::CreateInstance(
+ const base::DictionaryValue*) {
+ return nullptr;
+}
+#endif
+
} // namespace cloud_print