]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
freetype: use meson instead of autotools
authorRoss Burton <ross.burton@arm.com>
Tue, 16 Dec 2025 13:36:00 +0000 (13:36 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 18 Dec 2025 13:53:50 +0000 (13:53 +0000)
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>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/freetype/freetype_2.14.1.bb

index 97344c4c5ee7e379e9463dc54e6fe610bdc9a83c..dc59e5656b5ed89e736811bc4e195ebd2c73e557 100644 (file)
@@ -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