From de5a82755d11ebd2f351a7c8f9250838542fce43 Mon Sep 17 00:00:00 2001 From: Adam Duskett Date: Mon, 18 Dec 2023 12:39:50 -0700 Subject: [PATCH] package/fcft: new package Signed-off-by: Adam Duskett Signed-off-by: Thomas Petazzoni --- DEVELOPERS | 1 + package/Config.in | 1 + package/fcft/Config.in | 52 ++++++++++++++++++++++++++++++++++++++++++ package/fcft/fcft.hash | 3 +++ package/fcft/fcft.mk | 44 +++++++++++++++++++++++++++++++++++ 5 files changed, 101 insertions(+) create mode 100644 package/fcft/Config.in create mode 100644 package/fcft/fcft.hash create mode 100644 package/fcft/fcft.mk diff --git a/DEVELOPERS b/DEVELOPERS index 4c8a94ebb6..6e5bebeea6 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -33,6 +33,7 @@ F: package/vulkan-tools/ N: Adam Duskett F: package/depot-tools/ +F: package/fcft/ F: package/flutter-engine/ F: package/flutter-gallery/ F: package/flutter-pi/ diff --git a/package/Config.in b/package/Config.in index ccef66e1ea..ce8b8a610e 100644 --- a/package/Config.in +++ b/package/Config.in @@ -2225,6 +2225,7 @@ menu "Text and terminal handling" source "package/cli11/Config.in" source "package/docopt-cpp/Config.in" source "package/enchant/Config.in" + source "package/fcft/Config.in" source "package/fmt/Config.in" source "package/fstrcmp/Config.in" source "package/icu/Config.in" diff --git a/package/fcft/Config.in b/package/fcft/Config.in new file mode 100644 index 0000000000..b65515a3f1 --- /dev/null +++ b/package/fcft/Config.in @@ -0,0 +1,52 @@ +config BR2_PACKAGE_FCFT + bool "fcft" + depends on BR2_TOOLCHAIN_HAS_THREADS + select BR2_PACKAGE_FONTCONFIG + select BR2_PACKAGE_FREETYPE + select BR2_PACKAGE_PIXMAN + select BR2_PACKAGE_TLLIST + help + A simple library for font loading and glyph rasterization + using FontConfig, FreeType and pixman. + + https://codeberg.org/dnkl/fcft + +if BR2_PACKAGE_FCFT + +config BR2_PACKAGE_FCFT_GRAPHEME_SHAPING + bool "grapheme-shaping" + depends on BR2_INSTALL_LIBSTDCPP # harfbuzz + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # harfbuzz + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # harfbuzz + select BR2_PACKAGE_HARFBUZZ + help + Enables shaping of individual grapheme clusters + +comment "grapheme-shaping needs a toolchain w/ C++, gcc >= 4.9" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_PACKAGE_FCFT_RUN_SHAPING + bool "run-shaping" + depends on BR2_INSTALL_LIBSTDCPP # harfbuzz + depends on BR2_TOOLCHAIN_HAS_SYNC_4 # harfbuzz + depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # harfbuzz + select BR2_PACKAGE_HARFBUZZ + select BR2_PACKAGE_UTF8PROC + help + Enables shaping of whole text runs. + +comment "run-shaping needs a toolchain w/ C++, gcc >= 4.9" + depends on BR2_TOOLCHAIN_HAS_SYNC_4 + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 + +config BR2_PACKAGE_FCFT_SVG_SUPPORT + bool "svg support" + help + Enables svg support. This option increases the size of the + library by approximately 55KB. + +endif # BR2_PACKAGE_FCFT + +comment "fcft needs a toolchain w/ threads" + depends on !BR2_TOOLCHAIN_HAS_THREADS diff --git a/package/fcft/fcft.hash b/package/fcft/fcft.hash new file mode 100644 index 0000000000..96d885db1d --- /dev/null +++ b/package/fcft/fcft.hash @@ -0,0 +1,3 @@ +# Locally computed +sha256 904f40d749d198d97c46c5a459cd3c53fe92f008cf1e3e61949f6cf3036a78b7 3.1.6.tar.gz +sha256 d534a23a31500a0ac958d9634b84f532bd73ff1aca1bb8f7debbcbebc16ff39a LICENSE diff --git a/package/fcft/fcft.mk b/package/fcft/fcft.mk new file mode 100644 index 0000000000..538d8a0748 --- /dev/null +++ b/package/fcft/fcft.mk @@ -0,0 +1,44 @@ +################################################################################ +# +# fcft +# +################################################################################ + +FCFT_VERSION = 3.1.6 +FCFT_SOURCE = $(FCFT_VERSION).tar.gz +FCFT_SITE = https://codeberg.org/dnkl/fcft/archive +FCFT_LICENSE = MIT +FCFT_LICENSE_FILES = LICENSE +FCFT_INSTALL_STAGING = YES + +FCFT_DEPENDENCIES = \ + fontconfig \ + freetype \ + pixman \ + tllist + +FCFT_CONF_OPTS = \ + -Ddocs=disabled \ + -Dexamples=false + +ifeq ($(BR2_PACKAGE_FCFT_GRAPHEME_SHAPING),y) +FCFT_DEPENDENCIES += harfbuzz +FCFT_CONF_OPTS += -Dgrapheme-shaping=enabled +else +FCFT_CONF_OPTS += -Dgrapheme-shaping=disabled +endif + +ifeq ($(BR2_PACKAGE_FCFT_RUN_SHAPING),y) +FCFT_DEPENDENCIES += harfbuzz utf8proc +FCFT_CONF_OPTS += -Drun-shaping=enabled +else +FCFT_CONF_OPTS += -Drun-shaping=disabled +endif + +ifeq ($(BR2_PACKAGE_FCFT_SVG_SUPPORT),y) +FCFT_CONF_OPTS += -Dsvg-backend='nanosvg' +else +FCFT_CONF_OPTS += -Dsvg-backend='none' +endif + +$(eval $(meson-package))