diff --git a/textproc/quarto/Makefile b/textproc/quarto/Makefile index e3e7d7d46c27..b115a0383df2 100644 --- a/textproc/quarto/Makefile +++ b/textproc/quarto/Makefile @@ -1,78 +1,78 @@ 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 MAINTAINER= yuri@FreeBSD.org COMMENT= Scientific and technical publishing system WWW= https://quarto.org/ LICENSE= MIT LICENSE_FILE= ${WRKSRC}/repo/COPYRIGHT RUN_DEPENDS= bash:shells/bash \ deno:www/deno \ esbuild:devel/esbuild \ hs-pandoc32>0:textproc/hs-pandoc32 \ typst:textproc/typst \ deno-dom>0:www/deno-dom \ tex-xetex>0:print/tex-xetex \ ${LOCALBASE}/lib/ruby/gems/3.2/gems/dartsass-1.49.8/exe/linux/sass:textproc/rubygem-dartsass \ ${PYTHON_PKGNAMEPREFIX}jupyter>0:devel/py-jupyter@${PY_FLAVOR} USES= python USE_GITHUB= nodefault GH_TUPLE= quarto-dev:quarto-cli:v${DISTVERSION}:repo/repo # only for tests XARCH!= uname -m PLIST_SUB+= XARCH=${XARCH} NO_BUILD= yes post-patch: # replace tokens in the quarto executable and in run-tests.sh ${REINPLACE_CMD} -i '' \ -e 's|%%SCRIPT_PATH%%|${DATADIR}/bin|; s|%%ARCH_DIR%%|${XARCH}|' \ ${WRKSRC}/bin/quarto ${REINPLACE_CMD} \ -e 's|%%SCRIPT_PATH%%|${STAGEDIR}${DATADIR}/bin|; s|%%ARCH_DIR%%|${XARCH}|; s|%%REPO%%|${WRKSRC}/repo|; s|$$DENO_DIR|${LOCALBASE}/bin|' \ ${WRKSRC}/repo/tests/run-tests.sh do-install: # copy files from the tarball @cd ${WRKSRC} && \ ${COPYTREE_SHARE} bin ${STAGEDIR}${DATADIR} && \ ${COPYTREE_SHARE} share ${STAGEDIR}${DATADIR} # remove unnecessary files ${RM} ${STAGEDIR}${DATADIR}/bin/quarto.orig # adjust architecture ${MV} ${STAGEDIR}${DATADIR}/bin/tools/x86_64 ${STAGEDIR}${DATADIR}/bin/tools/${XARCH} cd ${STAGEDIR}${DATADIR}/bin/tools && ${LN} -s amd64 x86_64 # create symlink ${RLN} ${STAGEDIR}${DATADIR}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME} # substitute linux binaries with native ones .for exe in deno esbuild pandoc typst ${TOUCH} ${STAGEDIR}${PREFIX}/bin/${exe} ${RM} ${STAGEDIR}${DATADIR}/bin/tools/${XARCH}/${exe} ${RLN} ${STAGEDIR}${PREFIX}/bin/${exe} ${STAGEDIR}${DATADIR}/bin/tools/${XARCH}/${exe} ${RM} ${STAGEDIR}${PREFIX}/bin/${exe} .endfor ${RM} ${STAGEDIR}${DATADIR}/bin/tools/${XARCH}/deno_dom/libplugin.so ${RMDIR} ${STAGEDIR}${DATADIR}/bin/tools/${XARCH}/deno_dom ${REINPLACE_CMD} -i '' \ -e 's|export DENO_DOM_PLUGIN=.*|export DENO_DOM_PLUGIN=${LOCALBASE}/lib/deno-plugins/deno_dom.so|' \ ${STAGEDIR}${DATADIR}/bin/quarto # make quarto an executable ${CHMOD} +x ${STAGEDIR}${DATADIR}/bin/quarto # replace Linux binary for dart-sass with the binary provided by the rubygem-dartsass package ${RM} -r ${STAGEDIR}${DATADIR}/bin/tools/${XARCH}/dart-sass ${MKDIR} ${STAGEDIR}${DATADIR}/bin/tools/${XARCH}/dart-sass ${LN} -s \ ${LOCALBASE}/lib/ruby/gems/3.2/gems/dartsass-1.49.8/exe/linux/sass \ ${STAGEDIR}${DATADIR}/bin/tools/${XARCH}/dart-sass/sass .include 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");