diff mbox series

[7/7] freetype: use meson instead of autotools

Message ID 20251216133603.1003572-7-ross.burton@arm.com
State New
Headers show
Series [1/7] acpica: upgrade 20250807 -> 20251212 | expand

Commit Message

Ross Burton Dec. 16, 2025, 1:36 p.m. UTC
Port the options to Meson, and drop all of the autoconf tweaking.

Enable Harfbuzz support using dynamic loading by default. If Harfbuzz is
present at runtime then FreeType will use it for improved hinting. Do
not RDEPENDS on harfbuzz so that it's only used if already present in
the rendering stack.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 .../freetype/freetype_2.14.1.bb               | 25 ++++++-------------
 1 file changed, 7 insertions(+), 18 deletions(-)
diff mbox series

Patch

diff --git a/meta/recipes-graphics/freetype/freetype_2.14.1.bb b/meta/recipes-graphics/freetype/freetype_2.14.1.bb
index 97344c4c5ee..dc59e5656b5 100644
--- a/meta/recipes-graphics/freetype/freetype_2.14.1.bb
+++ b/meta/recipes-graphics/freetype/freetype_2.14.1.bb
@@ -18,26 +18,15 @@  SRC_URI[sha256sum] = "32427e8c471ac095853212a37aef816c60b42052d4d9e48230bab3bdf2
 
 UPSTREAM_CHECK_REGEX = "freetype-(?P<pver>\d+(\.\d+)+)"
 
-inherit autotools pkgconfig multilib_header
+inherit meson pkgconfig multilib_header
 
-# Adapt autotools to work with the minimal autoconf usage in freetype
-AUTOTOOLS_SCRIPT_PATH = "${S}/builds/unix"
-CONFIGURE_SCRIPT = "${S}/configure"
-EXTRA_AUTORECONF += "--exclude=autoheader --exclude=automake -I ."
+PACKAGECONFIG ??= "harfbuzz pixmap zlib"
 
-PACKAGECONFIG ??= "zlib pixmap"
-
-PACKAGECONFIG[brotli] = "--with-brotli,--without-brotli,brotli"
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
-# harfbuzz results in a circular dependency so enabling is non-trivial
-PACKAGECONFIG[harfbuzz] = "--with-harfbuzz,--without-harfbuzz,harfbuzz"
-PACKAGECONFIG[pixmap] = "--with-png,--without-png,libpng"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-PACKAGECONFIG[freetypeconfig] = "--enable-freetype-config=yes,--enable-freetype-config=no,"
-
-EXTRA_OECONF = "CC_BUILD='${BUILD_CC}'"
-
-TARGET_CPPFLAGS += "-D_FILE_OFFSET_BITS=64"
+PACKAGECONFIG[brotli] = "-Dbrotli=enabled,-Dbrotli=disabled,brotli"
+PACKAGECONFIG[bzip2] = "-Dbzip2=enabled,-Dbzip2=disabled,bzip2"
+PACKAGECONFIG[harfbuzz] = "-Dharfbuzz=dynamic,-Dharfbuzz=disabled"
+PACKAGECONFIG[pixmap] = "-Dpng=enabled,-Dpng=disabled,libpng"
+PACKAGECONFIG[zlib] = "-Dzlib=system,-Dzlib=disabled,zlib"
 
 do_install:append() {
 	oe_multilib_header freetype2/freetype/config/ftconfig.h