git: 9234242213a2 - main - textproc/quarto: Fix "Unsupported platform" error in "quarto check"

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 08 Sep 2024 02:13:08 UTC
The branch main has been updated by yuri:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9234242213a238adf97bfaf176bc64f6be40f9cd

commit 9234242213a238adf97bfaf176bc64f6be40f9cd
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2024-09-07 16:59:26 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2024-09-07 19:10:44 +0000

    textproc/quarto: Fix "Unsupported platform" error in "quarto check"
---
 textproc/quarto/Makefile                              |  2 +-
 ...-land_x_puppeteer_9-0-2_src_deno_BrowserFetcher.ts | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/textproc/quarto/Makefile b/textproc/quarto/Makefile
index e3e7d7d46c27..b115a0383df2 100644
--- a/textproc/quarto/Makefile
+++ b/textproc/quarto/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	quarto
 DISTVERSION=	1.6.9
-PORTREVISION=	2
+PORTREVISION=	3
 CATEGORIES=	textproc
 MASTER_SITES=	https://github.com/quarto-dev/quarto-cli/releases/download/v${DISTVERSION}/
 DISTFILES=	quarto-${DISTVERSION}-linux-amd64.tar.gz # same for all architectures
diff --git a/textproc/quarto/files/patch-bin_vendor_deno-land_x_puppeteer_9-0-2_src_deno_BrowserFetcher.ts b/textproc/quarto/files/patch-bin_vendor_deno-land_x_puppeteer_9-0-2_src_deno_BrowserFetcher.ts
new file mode 100644
index 000000000000..7035e319e365
--- /dev/null
+++ b/textproc/quarto/files/patch-bin_vendor_deno-land_x_puppeteer_9-0-2_src_deno_BrowserFetcher.ts
@@ -0,0 +1,19 @@
+--- bin/vendor/deno-land/x/puppeteer@9-0-2/src/deno/BrowserFetcher.ts.orig	2024-09-07 16:50:53 UTC
++++ bin/vendor/deno-land/x/puppeteer@9-0-2/src/deno/BrowserFetcher.ts
+@@ -197,6 +197,7 @@ export class BrowserFetcher {
+     const platform = Deno.build.os;
+     if (platform === "darwin") this._platform = "mac";
+     else if (platform === "linux") this._platform = "linux";
++    else if (platform === "freebsd") this._platform = "linux"; // use _platform=linux for now
+     else if (platform === "windows") {
+       this._platform = Deno.build.arch === "x86_64" ? "win64" : "win32";
+     } else assert(this._platform, "Unsupported platform: " + Deno.build.os);
+@@ -370,6 +371,8 @@ export class BrowserFetcher {
+           "firefox"
+         );
+       } else if (this._platform === "linux") {
++        executablePath = pathJoin(folderPath, "firefox", "firefox");
++      } else if (this._platform === "freebsd") {
+         executablePath = pathJoin(folderPath, "firefox", "firefox");
+       } else if (this._platform === "win32" || this._platform === "win64") {
+         executablePath = pathJoin(folderPath, "firefox", "firefox.exe");