commit: 99d5902fe44b31d84f75b252f9b8f578d0c39811 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Sep 9 02:58:11 2025 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Sep 9 03:10:08 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=99d5902f
media-libs/freetype: add 2.14.0 (sans harfbuzz<->ft circular dep!) 2.14.0 introduces an option to dlopen() harfbuzz and use a bundled subset of harfbuzz headers to avoid needing harfbuzz installed at build-time. Use that and move harfbuzz to a PDEPEND accordingly. The 'optfeature'-style message in x11-libs/pango can be cleaned up now as well (added for bug #712374). Bug: https://bugs.gentoo.org/504544 Bug: https://bugs.gentoo.org/712374 Bug: https://bugs.gentoo.org/759337 Bug: https://bugs.gentoo.org/815242 Bug: https://bugs.gentoo.org/830966 Bug: https://bugs.gentoo.org/941765 Signed-off-by: Sam James <sam <AT> gentoo.org> media-libs/freetype/Manifest | 3 + .../files/freetype-2.14.0-harfbuzz-call.patch | 30 ++++++++ .../freetype/files/freetype-2.14.0-tt-hint.patch | 87 ++++++++++++++++++++++ ...freetype-9999.ebuild => freetype-2.14.0.ebuild} | 12 ++- media-libs/freetype/freetype-9999.ebuild | 10 ++- 5 files changed, 134 insertions(+), 8 deletions(-) diff --git a/media-libs/freetype/Manifest b/media-libs/freetype/Manifest index 6bcc24940e29..b911d7f6ecd2 100644 --- a/media-libs/freetype/Manifest +++ b/media-libs/freetype/Manifest @@ -1,9 +1,12 @@ DIST freetype-2.13.0.tar.xz 2492440 BLAKE2B 11aac3cddb3e71cc0e6a616ed609294d6641aa0011842aa8230eace826955883aca0063331660025be14582b44aa189718ce21e0e5193a66bb5d7cffa1d0fb7f SHA512 b93a69a92b99f54c4fc4a276066bc7a87597df132e42ef93f6d973f1425e64bebcc568defa511d39fb04ab4d3a2090a6db1e54cf992a80ff57d658fee28a9110 DIST freetype-2.13.2.tar.xz 2501764 BLAKE2B cebc82180d9afaeb112a65ba78903d7bf7a9295a803166a033585ad2325add6023f05066852240c4665e56285345ba503b01ecd461d48f0478a8f3f56136988e SHA512 a5917edaa45cb9f75786f8a4f9d12fdf07529247e09dfdb6c0cf7feb08f7588bb24f7b5b11425fb47f8fd62fcb426e731c944658f6d5a59ce4458ad5b0a50194 DIST freetype-2.13.3.tar.xz 2617564 BLAKE2B f9591c6998df02b072adaf38a968e91deae8ed4d53ea0cb74d08982c4f0e48b1a98c1378a698164e4f730f07a3b0bea308a94fcc2e2b8ce9967dbf9478b599bd SHA512 600828d7756c8cfa974448ef34ee0db573fb8cfdb2dc1e0358b63c44a03bfd7e3d4384424b9cc5e4749034f60231a550c4b7fcb46694fcacea218787ce305504 +DIST freetype-2.14.0.tar.xz 2665548 BLAKE2B 70b79290b16bc05e156032dc8a9136bddb21c1f9fc84692959c65f2bc3dc51df681587aee672de9eb393ec77edae05f8e4fdab642a9938dade9eb1186f6d010e SHA512 287661121fc52d609bb74a46c2ebba83af384f760ce737b2dc616326a36fa39ab651f279ca08b6ebb3b2d2c7d39e11438f8b1b676afe452acc9fe1499b8646bc DIST freetype-doc-2.13.0.tar.xz 2084016 BLAKE2B aa88eb5a30223a683348902624827bd7df218129fad0dcbb0f2453b9acf3930da634e9c67eda31191e868ca68db92059ed37cc0bd0287dc4458743538fdfe126 SHA512 d4367513e1ca48691aa6d64c36bf53603f67a67214378a2ae3810b2227084647743ee0d7137453f31c966ccb9ce19c2a72b3b5445d4accbce9a63d71f6b6800e DIST freetype-doc-2.13.2.tar.xz 2173920 BLAKE2B 273ab405b6c7097ace9c7882fddb22d2a0cf8cc1594e9d141ca18d13a3745ee2e481bd2ee214cba6d99224ef0d67fdcba1b08aa06e3556a80cda29f3b6026f97 SHA512 ca3438dcf6f995af556d8db3cb3cfdcabb81ab5a7dd88464ff757e3e418b3219b0011857cde8a338372e30d8375486ac8e50914da2ea948dc874f70010bce60c DIST freetype-doc-2.13.3.tar.xz 2173852 BLAKE2B 84244e28ace43929387052954b92089f570300dc8a9cb77e0ceb53001f081f6d6e5785ad081448ceb58254f8102e3ccf64d1fd323b02fb0a8232a0ba3eb9f3a8 SHA512 54ef9e3a4f0c298893268ed409f59aa1620a60c656ee3f8bdddbb91ffb2e70eea2f016a85c0a02eef699de362abee4aabae4482f0fa1cbf42967b5873fc84f2d +DIST freetype-doc-2.14.0.tar.xz 2175416 BLAKE2B f8bdca0a1ef0c43e7b75f8ed0ee43cfca2a2d95427c585b8b849c42dfdf02af22348007d49b9a207b0f2cc8133227699a08dcdf552f2361755df62e57af256de SHA512 5f69e8a53b8fe20e968ffe60d911df89f116c55fee604971c2f552b32e4c25046777221d33145369c6bbcabff6efcd2ef9905d7f13386bcbf2cdeb88aec801c1 DIST ft2demos-2.13.0.tar.xz 333952 BLAKE2B 34155615eb967dda2b62e47bb4095a6bf367dd79b7bd93dfc4dc172476b3bf704af4039623d55ee08d2d6a5365b4783e86a570e34b70af2e543bac64d40833b0 SHA512 7d686e9febdda587b74647cc38fa22f0722d0306ecb05430e319e05b6132c999d20728bcd7a6506b8d8ad45a6859443e2b69d766802497357a8f0ba3352404ba DIST ft2demos-2.13.2.tar.xz 341140 BLAKE2B 5e2c3eb2fccb359d03e154b94d349baab27aa465e40274ea99be1e19c8519ec9c434749c78a41743540bd38064a7c68e5389ff99443b8e320e617c4fe7f4558b SHA512 aa83ba4212ff7c4453b72f036136cb9b04cacf7d196388a3e4752613e000b3bb45a4dcf63d3d1d5b3d6ada10720304b532fb6e33ed6a5b399dcce45c27af9ade DIST ft2demos-2.13.3.tar.xz 342404 BLAKE2B 5f5a48e0ad839ece97ea2bd451bd819ccbf9347425dc323a368e5fed91cfddeffd61b1dfea2e7cc7d65e30e6ebb932dd142430998039eb4a8f91758a3690ddef SHA512 e662a20ad2ff80534e8ea0df2f299e8f61350f13d279f80f8257b18352e863dd2c266791b85d3410b0c83966cb12e3ff49cf398b83a651dc73772df9fcf5936c +DIST ft2demos-2.14.0.tar.xz 344120 BLAKE2B ec4552644ea652f2d562126e24f45ff6d45dac9ae7b0c7dd232bf533059e6558e8654d207dc1c41a928fe351655d8c6abf691ba339f06d09f955796d95d037da SHA512 93d663c3eccd5313fa69cfa284d05e192ffed59cadfc0978f94ca7d720e5961ca707626d38e36dd5d4d7a1a08df7d503e12fb3423c8b4861a42ef8826b996dd1 diff --git a/media-libs/freetype/files/freetype-2.14.0-harfbuzz-call.patch b/media-libs/freetype/files/freetype-2.14.0-harfbuzz-call.patch new file mode 100644 index 000000000000..5468a89ac111 --- /dev/null +++ b/media-libs/freetype/files/freetype-2.14.0-harfbuzz-call.patch @@ -0,0 +1,30 @@ +https://cgit.git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=e969f52986ce38e7082f7efc1957ef5b145ac81e +https://gitlab.freedesktop.org/freetype/freetype/-/issues/1354 + +From e969f52986ce38e7082f7efc1957ef5b145ac81e Mon Sep 17 00:00:00 2001 +From: Behdad Esfahbod <[email protected]> +Date: Mon, 8 Sep 2025 05:57:19 +0200 +Subject: [autofit] Fix HarfBuzz calling. + +* src/autofit/afadjust.c (af_reverse_character_map_new) + [FT_CONFIG_OPTION_USE_HARFBUZZ]: Use `ft_hb_enabled`. + +Fixes issue #1354. +--- + src/autofit/afadjust.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/src/autofit/afadjust.c b/src/autofit/afadjust.c +index f55317bcf..6637cacfc 100644 +--- a/src/autofit/afadjust.c ++++ b/src/autofit/afadjust.c +@@ -1355,6 +1355,7 @@ + + #ifdef FT_CONFIG_OPTION_USE_HARFBUZZ + ++ if ( ft_hb_enabled( globals ) ) + { + hb_font_t *hb_font; + hb_face_t *hb_face; +-- +cgit v1.2.3 diff --git a/media-libs/freetype/files/freetype-2.14.0-tt-hint.patch b/media-libs/freetype/files/freetype-2.14.0-tt-hint.patch new file mode 100644 index 000000000000..e4989ff59223 --- /dev/null +++ b/media-libs/freetype/files/freetype-2.14.0-tt-hint.patch @@ -0,0 +1,87 @@ +https://cgit.git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=89eba38e62981d7a6f0dd4995c603a23e00c113d +https://cgit.git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=3ac49075459074d35bfd295f9384041e7a53d701 +https://cgit.git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=36f917cc6ac8b3b0c9cbc549fab2f839f6f5680b + +https://gitlab.freedesktop.org/freetype/freetype/-/issues/1353 +https://gitlab.freedesktop.org/freetype/freetype/-/issues/1349 + +From 89eba38e62981d7a6f0dd4995c603a23e00c113d Mon Sep 17 00:00:00 2001 +From: Alexei Podtelezhnikov <[email protected]> +Date: Mon, 8 Sep 2025 10:43:35 -0400 +Subject: * src/truetype/ttinterp.c (TT_Run_Context): Reset IUP tracking bits. + +Fixes #1353. +--- + src/truetype/ttinterp.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index 378342bbb..bf440936c 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -7521,6 +7521,12 @@ + exec->func_round = (TT_Round_Func)Round_To_Grid; + Compute_Funcs( exec ); + ++#ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL ++ /* Reset IUP tracking bits in the backward compatibility mode. */ ++ /* See `ttinterp.h' for details. */ ++ exc->backward_compatibility &= ~0x6; ++#endif ++ + /* some glyphs leave something on the stack, */ + /* so we clean it before a new execution. */ + exec->top = 0; +-- +cgit v1.2.3 + +From 3ac49075459074d35bfd295f9384041e7a53d701 Mon Sep 17 00:00:00 2001 +From: Alexei Podtelezhnikov <[email protected]> +Date: Mon, 8 Sep 2025 10:45:16 -0400 +Subject: Typo! + +--- + src/truetype/ttinterp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index bf440936c..9ae90c769 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -7524,7 +7524,7 @@ + #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL + /* Reset IUP tracking bits in the backward compatibility mode. */ + /* See `ttinterp.h' for details. */ +- exc->backward_compatibility &= ~0x6; ++ exec->backward_compatibility &= ~0x6; + #endif + + /* some glyphs leave something on the stack, */ +-- +cgit v1.2.3 + +From 36f917cc6ac8b3b0c9cbc549fab2f839f6f5680b Mon Sep 17 00:00:00 2001 +From: Alexei Podtelezhnikov <[email protected]> +Date: Mon, 8 Sep 2025 11:03:24 -0400 +Subject: * src/truetype/ttinterp.c (TT_Run_Context): Fix IUP tracking bits. + +Correctly fixes #1353 and #1349. +--- + src/truetype/ttinterp.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c +index 9ae90c769..7b26c9a9d 100644 +--- a/src/truetype/ttinterp.c ++++ b/src/truetype/ttinterp.c +@@ -7524,7 +7524,7 @@ + #ifdef TT_SUPPORT_SUBPIXEL_HINTING_MINIMAL + /* Reset IUP tracking bits in the backward compatibility mode. */ + /* See `ttinterp.h' for details. */ +- exec->backward_compatibility &= ~0x6; ++ exec->backward_compatibility &= ~0x3; + #endif + + /* some glyphs leave something on the stack, */ +-- +cgit v1.2.3 diff --git a/media-libs/freetype/freetype-9999.ebuild b/media-libs/freetype/freetype-2.14.0.ebuild similarity index 93% copy from media-libs/freetype/freetype-9999.ebuild copy to media-libs/freetype/freetype-2.14.0.ebuild index 527b1807eefa..a672b264d3ff 100644 --- a/media-libs/freetype/freetype-9999.ebuild +++ b/media-libs/freetype/freetype-2.14.0.ebuild @@ -34,8 +34,7 @@ RDEPEND=" >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] brotli? ( app-arch/brotli[${MULTILIB_USEDEP}] ) bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) - harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] ) - png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] ) + png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] ) utils? ( svg? ( >=gnome-base/librsvg-2.46.0[${MULTILIB_USEDEP}] ) X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] ) @@ -45,8 +44,11 @@ DEPEND="${RDEPEND}" BDEPEND=" virtual/pkgconfig " +PDEPEND="harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] )" PATCHES=( + "${FILESDIR}"/${P}-harfbuzz-call.patch + "${FILESDIR}"/${P}-tt-hint.patch ) _egit_repo_handler() { @@ -187,7 +189,9 @@ multilib_src_configure() { --with-zlib $(use_with brotli) $(use_with bzip2) - $(use_with harfbuzz) + # As of 2.14.0, FT bundles its own copies of the needed headers and dlopen()s + # harfbuzz instead, which breaks an insidious circular dependency. + $(use_with harfbuzz harfbuzz dynamic) $(use_with png) $(use_enable static-libs static) $(usex utils $(use_with svg librsvg) --without-librsvg) @@ -199,7 +203,7 @@ multilib_src_configure() { case ${CHOST} in mingw*|*-mingw*) ;; - # Workaround windows mis-detection: bug #654712 + # Workaround windows misdetection: bug #654712 # Have to do it for both ${CHOST}-windres and windres *) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;; esac diff --git a/media-libs/freetype/freetype-9999.ebuild b/media-libs/freetype/freetype-9999.ebuild index 527b1807eefa..87c99381cd82 100644 --- a/media-libs/freetype/freetype-9999.ebuild +++ b/media-libs/freetype/freetype-9999.ebuild @@ -34,8 +34,7 @@ RDEPEND=" >=sys-libs/zlib-1.2.8-r1[${MULTILIB_USEDEP}] brotli? ( app-arch/brotli[${MULTILIB_USEDEP}] ) bzip2? ( >=app-arch/bzip2-1.0.6-r4[${MULTILIB_USEDEP}] ) - harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] ) - png? ( >=media-libs/libpng-1.2.51:0=[${MULTILIB_USEDEP}] ) + png? ( >=media-libs/libpng-1.2.51:=[${MULTILIB_USEDEP}] ) utils? ( svg? ( >=gnome-base/librsvg-2.46.0[${MULTILIB_USEDEP}] ) X? ( >=x11-libs/libX11-1.6.2[${MULTILIB_USEDEP}] ) @@ -45,6 +44,7 @@ DEPEND="${RDEPEND}" BDEPEND=" virtual/pkgconfig " +PDEPEND="harfbuzz? ( >=media-libs/harfbuzz-1.3.0[truetype,${MULTILIB_USEDEP}] )" PATCHES=( ) @@ -187,7 +187,9 @@ multilib_src_configure() { --with-zlib $(use_with brotli) $(use_with bzip2) - $(use_with harfbuzz) + # As of 2.14.0, FT bundles its own copies of the needed headers and dlopen()s + # harfbuzz instead, which breaks an insidious circular dependency. + $(use_with harfbuzz harfbuzz dynamic) $(use_with png) $(use_enable static-libs static) $(usex utils $(use_with svg librsvg) --without-librsvg) @@ -199,7 +201,7 @@ multilib_src_configure() { case ${CHOST} in mingw*|*-mingw*) ;; - # Workaround windows mis-detection: bug #654712 + # Workaround windows misdetection: bug #654712 # Have to do it for both ${CHOST}-windres and windres *) myeconfargs+=( ac_cv_prog_RC= ac_cv_prog_ac_ct_RC= ) ;; esac
