From owner-dev-commits-ports-main@freebsd.org Sat Sep 18 22:05:21 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E67C967D7D9; Sat, 18 Sep 2021 22:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HBlHj5cKyz3C8b; Sat, 18 Sep 2021 22:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9CC7B11BE5; Sat, 18 Sep 2021 22:05:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 18IM5LFx011576; Sat, 18 Sep 2021 22:05:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 18IM5LW5011575; Sat, 18 Sep 2021 22:05:21 GMT (envelope-from git) Date: Sat, 18 Sep 2021 22:05:21 GMT Message-Id: <202109182205.18IM5LW5011575@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Jan Beich Subject: git: 3e693f24a78f - main - devel/electron12: unbreak after dbc5f433f858 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jbeich X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3e693f24a78f51cbb7daf258bd727961b3bec046 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 18 Sep 2021 22:05:22 -0000 The branch main has been updated by jbeich: URL: https://cgit.FreeBSD.org/ports/commit/?id=3e693f24a78f51cbb7daf258bd727961b3bec046 commit 3e693f24a78f51cbb7daf258bd727961b3bec046 Author: Jan Beich AuthorDate: 2021-09-18 17:23:51 +0000 Commit: Jan Beich CommitDate: 2021-09-18 22:04:57 +0000 devel/electron12: unbreak after dbc5f433f858 ../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:74:5: error: use of undeclared identifier 'hb_subset_input_set_retain_gids'; did you mean 'hb_subset_input_set_flags'? hb_subset_input_set_retain_gids(input.get(), true); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ hb_subset_input_set_flags /usr/local/include/harfbuzz/hb-subset.h:142:1: note: 'hb_subset_input_set_flags' declared here hb_subset_input_set_flags (hb_subset_input_t *input, ^ ../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:77:5: error: use of undeclared identifier 'hb_subset_input_set_drop_hints' hb_subset_input_set_drop_hints(input.get(), false); ^ ../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:78:19: error: use of undeclared identifier 'hb_subset'; did you mean 'hb_set_set'? HBFace subset(hb_subset(face.get(), input.get())); ^~~~~~~~~ hb_set_set /usr/local/include/harfbuzz/hb-set.h:131:1: note: 'hb_set_set' declared here hb_set_set (hb_set_t *set, ^ ../../third_party/skia/src/pdf/SkPDFSubsetFont.cpp:78:29: error: cannot initialize a parameter of type 'hb_set_t *' with an rvalue of type 'std::__1::unique_ptr>::pointer' (aka 'hb_face_t *') HBFace subset(hb_subset(face.get(), input.get())); ^~~~~~~~~~ /usr/local/include/harfbuzz/hb-set.h:131:29: note: passing argument to parameter 'set' here hb_set_set (hb_set_t *set, ^ PR: 258576 Reported by: pkg-fallout Obtained from: Arch Linux --- devel/electron12/Makefile | 2 +- devel/electron12/files/patch-harfbuzz-3.0.0 | 98 +++++++++++++++++++++++++++++ 2 files changed, 99 insertions(+), 1 deletion(-) diff --git a/devel/electron12/Makefile b/devel/electron12/Makefile index c78a7e038e3c..68c14d7abd54 100644 --- a/devel/electron12/Makefile +++ b/devel/electron12/Makefile @@ -1,7 +1,7 @@ PORTNAME= electron DISTVERSIONPREFIX= v DISTVERSION= ${ELECTRON_VER:S/-beta./.b/} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= devel java MASTER_SITES= https://commondatastorage.googleapis.com/chromium-browser-official/:chromium \ https://commondatastorage.googleapis.com/chromium-fonts/:chromium_testfonts diff --git a/devel/electron12/files/patch-harfbuzz-3.0.0 b/devel/electron12/files/patch-harfbuzz-3.0.0 new file mode 100644 index 000000000000..a4b74cbfe796 --- /dev/null +++ b/devel/electron12/files/patch-harfbuzz-3.0.0 @@ -0,0 +1,98 @@ +https://github.com/chromium/chromium/commit/b289f6f3fcbc +https://github.com/google/skia/commit/66684b17b382 +https://github.com/google/skia/commit/51d83abcd24a + +--- components/paint_preview/common/subset_font.cc.orig 2021-08-17 00:16:02 UTC ++++ components/paint_preview/common/subset_font.cc +@@ -71,9 +71,11 @@ sk_sp SubsetFont(SkTypeface* typeface, const G + hb_set_t* glyphs = + hb_subset_input_glyph_set(input.get()); // Owned by |input|. + usage.ForEach(base::BindRepeating(&AddGlyphs, base::Unretained(glyphs))); +- hb_subset_input_set_retain_gids(input.get(), true); ++ hb_subset_input_set_flags(input.get(), HB_SUBSET_FLAGS_RETAIN_GIDS); + +- HbScoped subset_face(hb_subset(face.get(), input.get())); ++ HbScoped subset_face(hb_subset_or_fail(face.get(), input.get())); ++ if (!subset_face) ++ return nullptr; + HbScoped subset_blob(hb_face_reference_blob(subset_face.get())); + if (!subset_blob) + return nullptr; +--- third_party/skia/gn/skia.gni.orig 2021-08-17 00:18:55 UTC ++++ third_party/skia/gn/skia.gni +@@ -33,8 +33,6 @@ declare_args() { + skia_include_multiframe_procs = false + skia_lex = false + skia_libgifcodec_path = "third_party/externals/libgifcodec" +- skia_pdf_subset_harfbuzz = +- false # TODO: set skia_pdf_subset_harfbuzz to skia_use_harfbuzz. + skia_qt_path = getenv("QT_PATH") + skia_skqp_global_error_tolerance = 0 + skia_tools_require_resources = false +@@ -97,6 +95,10 @@ declare_args() { + + skia_build_fuzzers = is_clang && is_linux && target_cpu == "x64" + skia_use_libfuzzer_defaults = true ++} ++ ++declare_args() { ++ skia_pdf_subset_harfbuzz = skia_use_harfbuzz + } + + declare_args() { +--- third_party/skia/src/pdf/SkPDFSubsetFont.cpp.orig 2021-08-17 00:18:56 UTC ++++ third_party/skia/src/pdf/SkPDFSubsetFont.cpp +@@ -49,6 +49,37 @@ static sk_sp to_data(HBBlob blob) { + blob.release()); + } + ++template using void_t = void; ++template ++struct SkPDFHarfBuzzSubset { ++ // This is the HarfBuzz 3.0 interface. ++ // hb_subset_flags_t does not exist in 2.0. It isn't dependent on T, so inline the value of ++ // HB_SUBSET_FLAGS_RETAIN_GIDS until 2.0 is no longer supported. ++ static HBFace Make(T input, hb_face_t* face) { ++ // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY. ++ // If it isn't known if a font is 'tricky', retain the hints. ++ hb_subset_input_set_flags(input, 2/*HB_SUBSET_FLAGS_RETAIN_GIDS*/); ++ return HBFace(hb_subset_or_fail(face, input)); ++ } ++}; ++template ++struct SkPDFHarfBuzzSubset(), std::declval())), ++ decltype(hb_subset_input_set_drop_hints(std::declval(), std::declval())), ++ decltype(hb_subset(std::declval(), std::declval())) ++ >> ++{ ++ // This is the HarfBuzz 2.0 (non-public) interface, used if it exists. ++ // This code should be removed as soon as all users are migrated to the newer API. ++ static HBFace Make(T input, hb_face_t* face) { ++ hb_subset_input_set_retain_gids(input, true); ++ // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY. ++ // If it isn't known if a font is 'tricky', retain the hints. ++ hb_subset_input_set_drop_hints(input, false); ++ return HBFace(hb_subset(face, input)); ++ } ++}; ++ + static sk_sp subset_harfbuzz(sk_sp fontData, + const SkPDFGlyphUse& glyphUsage, + int ttcIndex) { +@@ -71,11 +102,10 @@ static sk_sp subset_harfbuzz(sk_sp fon + hb_set_t* glyphs = hb_subset_input_glyph_set(input.get()); + glyphUsage.getSetValues([&glyphs](unsigned gid) { hb_set_add(glyphs, gid);}); + +- hb_subset_input_set_retain_gids(input.get(), true); +- // TODO: When possible, check if a font is 'tricky' with FT_IS_TRICKY. +- // If it isn't known if a font is 'tricky', retain the hints. +- hb_subset_input_set_drop_hints(input.get(), false); +- HBFace subset(hb_subset(face.get(), input.get())); ++ HBFace subset = SkPDFHarfBuzzSubset::Make(input.get(), face.get()); ++ if (!subset) { ++ return nullptr; ++ } + HBBlob result(hb_face_reference_blob(subset.get())); + return to_data(std::move(result)); + }