aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorleres <leres@FreeBSD.org>2018-03-13 01:44:37 +0800
committerleres <leres@FreeBSD.org>2018-03-13 01:44:37 +0800
commit027f7fa6d8cbddff4fe995dd9887b27ad34dda5c (patch)
tree13769c9c5faed7ba170ac08439c4096acadfaa44
parent1e9ab7df0d7dd7fd845dc2a22c707aba4072879b (diff)
downloadfreebsd-ports-gnome-027f7fa6d8cbddff4fe995dd9887b27ad34dda5c.tar.gz
freebsd-ports-gnome-027f7fa6d8cbddff4fe995dd9887b27ad34dda5c.tar.zst
freebsd-ports-gnome-027f7fa6d8cbddff4fe995dd9887b27ad34dda5c.zip
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
-rw-r--r--www/chromium/Makefile11
-rw-r--r--www/chromium/files/patch-chrome_service_cloud__print_print__system.cc23
2 files changed, 30 insertions, 4 deletions
diff --git a/www/chromium/Makefile b/www/chromium/Makefile
index bd53289b9119..5c9f33ba5004 100644
--- a/www/chromium/Makefile
+++ b/www/chromium/Makefile
@@ -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 \
diff --git a/www/chromium/files/patch-chrome_service_cloud__print_print__system.cc b/www/chromium/files/patch-chrome_service_cloud__print_print__system.cc
new file mode 100644
index 000000000000..9ace050311f2
--- /dev/null
+++ b/www/chromium/files/patch-chrome_service_cloud__print_print__system.cc
@@ -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
+