ports/devel/electron35/files/patch-printing_backend_print__backend__cups.cc
Hiroki Tagato 3fe2f64857 devel/electron35: add port: Build cross-platform desktop apps with JavaScript, HTML, and CSS
Build cross platform desktop apps with JavaScript, HTML, and CSS.

It's easier than you think.

If you can build a website, you can build a desktop app. Electron is a
framework for creating native applications with web technologies like
JavaScript, HTML, and CSS. It takes care of the hard parts so you can
focus on the core of your application.

WWW: https://electronjs.org/
2025-04-08 21:01:02 +09:00

29 lines
1.3 KiB
C++

--- printing/backend/print_backend_cups.cc.orig 2025-03-24 20:50:14 UTC
+++ printing/backend/print_backend_cups.cc
@@ -29,7 +29,7 @@
#include "printing/mojom/print.mojom.h"
#include "url/gurl.h"
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
#include "base/feature_list.h"
#include "printing/backend/cups_connection.h"
#include "printing/backend/print_backend_cups_ipp.h"
@@ -59,7 +59,7 @@ int CaptureCupsDestCallback(void* data, unsigned flags
return 1; // Keep going.
}
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
// This may be removed when Amazon Linux 2 reaches EOL (30 Jun 2025).
bool AreNewerCupsFunctionsAvailable() {
return cupsFindDestDefault && cupsFindDestSupported && cupsUserAgent &&
@@ -292,7 +292,7 @@ scoped_refptr<PrintBackend> PrintBackend::CreateInstan
#if !BUILDFLAG(IS_CHROMEOS)
scoped_refptr<PrintBackend> PrintBackend::CreateInstanceImpl(
const std::string& locale) {
-#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
+#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC) || BUILDFLAG(IS_BSD)
if (AreNewerCupsFunctionsAvailable() &&
base::FeatureList::IsEnabled(features::kCupsIppPrintingBackend)) {
return base::MakeRefCounted<PrintBackendCupsIpp>(CupsConnection::Create());