diff --git a/editors/zettlr/Portfile b/editors/zettlr/Portfile index ec27f0f272111..8f2515e07e77e 100644 --- a/editors/zettlr/Portfile +++ b/editors/zettlr/Portfile @@ -3,7 +3,7 @@ PortSystem 1.0 PortGroup github 1.0 -github.setup Zettlr Zettlr 2.3.0 v +github.setup Zettlr Zettlr 3.2.0 v github.tarball_from archive name zettlr revision 0 @@ -30,11 +30,13 @@ maintainers {gmail.com:herby.gillot @herbygillot} \ openmaintainer supported_archs x86_64 arm64 -checksums rmd160 3e02ad655b229515a4b28d911c79aa956d6e748e \ - sha256 5b9bea09d48f74f0fa8e232cee4b9022d7b9b23d16c23e1acfa7093f6f6971eb \ - size 28392827 +fetch.type git -depends_build port:yarn +patchfiles-append patch-disable-signing-forge.config.js.diff + +depends_build-append \ + bin:git:git \ + port:yarn build.env-append CSC_IDENTITY_AUTO_DISCOVERY=false @@ -42,7 +44,7 @@ use_configure no use_xcode yes build { - switch $build_arch { + switch ${build_arch} { x86_64 { set package_target {mac-x64} } @@ -52,13 +54,7 @@ build { } # Fetch and build JS dependencies - system -W ${worksrcpath} "${build.env} yarn install --frozen-lockfile" - - # We allow Zettlr to download its own Pandoc bin, as: - # a) It seeks a more recent version than the one MacPorts provides - # b) It will be embedded into the .app bundle and not affect the ports - # tree. - system -W ${worksrcpath} "${build.env} ./scripts/get-pandoc.sh darwin" + system -W ${worksrcpath} "${build.env} yarn install --immutable" # Build electron app system -W ${worksrcpath} "${build.env} yarn package:${package_target}" @@ -74,7 +70,8 @@ destroot { } } - copy ${worksrcpath}/out/Zettlr-darwin-${outdir_suffix}/Zettlr.app \ + copy \ + ${worksrcpath}/out/Zettlr-darwin-${outdir_suffix}/Zettlr.app \ ${destroot}${applications_dir} } diff --git a/editors/zettlr/files/patch-disable-signing-forge.config.js.diff b/editors/zettlr/files/patch-disable-signing-forge.config.js.diff new file mode 100644 index 0000000000000..514dbb0dba75f --- /dev/null +++ b/editors/zettlr/files/patch-disable-signing-forge.config.js.diff @@ -0,0 +1,19 @@ +--- forge.config.js 2024-08-28 23:44:48 ++++ forge.config.js 2024-08-28 23:45:12 +@@ -177,16 +177,6 @@ + // with capital Z) we have to explicitly set executableName on the Linux + // target. + name: 'Zettlr', +- // The certificate is written to the default keychain during CI build. +- // See ./scripts/add-osx-cert.sh +- osxSign: { +- identity: 'Developer ID Application: Hendrik Erz (QS52BN8W68)', +- 'hardened-runtime': true, +- 'gatekeeper-assess': false, +- entitlements: 'scripts/assets/entitlements.plist', +- 'entitlements-inherit': 'scripts/assets/entitlements.plist', +- 'signature-flags': 'library' +- }, + // Since electron-notarize 1.1.0 it will throw instead of simply print a + // warning to the console, so we have to actively check if we should + // notarize or not. We do so by checking for the necessary environment