pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/fonts/fcft



Module Name:    pkgsrc
Committed By:   kikadf
Date:           Tue Apr 14 12:06:06 UTC 2026

Added Files:
        pkgsrc/fonts/fcft: DESCR Makefile PLIST buildlink3.mk distinfo
        pkgsrc/fonts/fcft/patches: patch-fcft.c patch-meson.build

Log Message:
fcft: new package

cft is a small font loading and glyph rasterization library built on-top of
FontConfig, FreeType2 and pixman.

It can load and cache fonts from a fontconfig-formatted name string,
e.g. Monospace:size=12, optionally with user configured fallback fonts.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/fonts/fcft/DESCR pkgsrc/fonts/fcft/Makefile \
    pkgsrc/fonts/fcft/PLIST pkgsrc/fonts/fcft/buildlink3.mk \
    pkgsrc/fonts/fcft/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/fonts/fcft/patches/patch-fcft.c \
    pkgsrc/fonts/fcft/patches/patch-meson.build

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/fonts/fcft/DESCR
diff -u /dev/null pkgsrc/fonts/fcft/DESCR:1.1
--- /dev/null   Tue Apr 14 12:06:06 2026
+++ pkgsrc/fonts/fcft/DESCR     Tue Apr 14 12:06:06 2026
@@ -0,0 +1,5 @@
+fcft is a small font loading and glyph rasterization library built on-top of
+FontConfig, FreeType2 and pixman.
+
+It can load and cache fonts from a fontconfig-formatted name string,
+e.g. Monospace:size=12, optionally with user configured fallback fonts.
Index: pkgsrc/fonts/fcft/Makefile
diff -u /dev/null pkgsrc/fonts/fcft/Makefile:1.1
--- /dev/null   Tue Apr 14 12:06:06 2026
+++ pkgsrc/fonts/fcft/Makefile  Tue Apr 14 12:06:06 2026
@@ -0,0 +1,21 @@
+# $NetBSD: Makefile,v 1.1 2026/04/14 12:06:06 kikadf Exp $
+
+DISTNAME=      fcft-3.3.3
+CATEGORIES=    fonts
+MASTER_SITES=  https://codeberg.org/dnkl/fcft/releases/download/${PKGVERSION_NOREV}/
+
+MAINTAINER=    bsiegert%NetBSD.org@localhost
+HOMEPAGE=      https://codeberg.org/dnkl/fcft/
+COMMENT=       Simple library for font loading and glyph rasterization
+LICENSE=       mit
+
+USE_TOOLS+=    pkg-config
+
+.include "../../fonts/fontconfig/buildlink3.mk"
+.include "../../fonts/harfbuzz/buildlink3.mk"
+.include "../../converters/utf8proc/buildlink3.mk"
+.include "../../x11/pixman/buildlink3.mk"
+.include "../../devel/tllist/buildlink3.mk"
+.include "../../devel/meson/build.mk"
+.include "../../textproc/scdoc/tool.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/fonts/fcft/PLIST
diff -u /dev/null pkgsrc/fonts/fcft/PLIST:1.1
--- /dev/null   Tue Apr 14 12:06:06 2026
+++ pkgsrc/fonts/fcft/PLIST     Tue Apr 14 12:06:06 2026
@@ -0,0 +1,28 @@
+@comment $NetBSD: PLIST,v 1.1 2026/04/14 12:06:06 kikadf Exp $
+include/fcft/fcft.h
+include/fcft/stride.h
+lib/libfcft.so
+lib/libfcft.so.4
+lib/libfcft.so.4.3.3
+lib/pkgconfig/fcft.pc
+man/man3/fcft_capabilities.3
+man/man3/fcft_clone.3
+man/man3/fcft_destroy.3
+man/man3/fcft_fini.3
+man/man3/fcft_font_options_create.3
+man/man3/fcft_font_options_destroy.3
+man/man3/fcft_from_name.3
+man/man3/fcft_from_name2.3
+man/man3/fcft_init.3
+man/man3/fcft_kerning.3
+man/man3/fcft_log_init.3
+man/man3/fcft_precompose.3
+man/man3/fcft_rasterize_char_utf32.3
+man/man3/fcft_rasterize_grapheme_utf32.3
+man/man3/fcft_rasterize_text_run_utf32.3
+man/man3/fcft_set_emoji_presentation.3
+man/man3/fcft_set_scaling_filter.3
+man/man3/fcft_text_run_destroy.3
+share/doc/fcft/CHANGELOG.md
+share/doc/fcft/LICENSE
+share/doc/fcft/README.md
Index: pkgsrc/fonts/fcft/buildlink3.mk
diff -u /dev/null pkgsrc/fonts/fcft/buildlink3.mk:1.1
--- /dev/null   Tue Apr 14 12:06:06 2026
+++ pkgsrc/fonts/fcft/buildlink3.mk     Tue Apr 14 12:06:06 2026
@@ -0,0 +1,18 @@
+# $NetBSD: buildlink3.mk,v 1.1 2026/04/14 12:06:06 kikadf Exp $
+
+BUILDLINK_TREE+=       fcft
+
+.if !defined(FCFT_BUILDLINK3_MK)
+FCFT_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.fcft+=   fcft>=3.1.8
+BUILDLINK_PKGSRCDIR.fcft?=     ../../fonts/fcft
+
+.include "../../converters/utf8proc/buildlink3.mk"
+.include "../../fonts/fontconfig/buildlink3.mk"
+.include "../../fonts/harfbuzz/buildlink3.mk"
+.include "../../x11/pixman/buildlink3.mk"
+.include "../../devel/tllist/buildlink3.mk"
+.endif # FCFT_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -fcft
Index: pkgsrc/fonts/fcft/distinfo
diff -u /dev/null pkgsrc/fonts/fcft/distinfo:1.1
--- /dev/null   Tue Apr 14 12:06:06 2026
+++ pkgsrc/fonts/fcft/distinfo  Tue Apr 14 12:06:06 2026
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1 2026/04/14 12:06:06 kikadf Exp $
+
+BLAKE2s (fcft-3.3.3.tar.gz) = 545e5bfb82c493722002178d9b29ba8356ade84936400052c7bda03dff993e26
+SHA512 (fcft-3.3.3.tar.gz) = b1d0264d490ba95872301a949e8a79da947f77e3196c8299bfddb01e9931cce4100ebcd53930e73c9fa830cc3b52f04ff555777fc17d7bbdd0445a2c924d8c20
+Size (fcft-3.3.3.tar.gz) = 741107 bytes
+SHA1 (patch-fcft.c) = c6cae286f4a581326b9b575e0f70e62834689122
+SHA1 (patch-meson.build) = baf72b1fca5508a886b7451c5a20a50197275f31

Index: pkgsrc/fonts/fcft/patches/patch-fcft.c
diff -u /dev/null pkgsrc/fonts/fcft/patches/patch-fcft.c:1.1
--- /dev/null   Tue Apr 14 12:06:07 2026
+++ pkgsrc/fonts/fcft/patches/patch-fcft.c      Tue Apr 14 12:06:06 2026
@@ -0,0 +1,45 @@
+$NetBSD: patch-fcft.c,v 1.1 2026/04/14 12:06:06 kikadf Exp $
+
+* Define bswap_16 on NetBSD
+* Check for uselocale before using it
+
+--- fcft.c.orig        2025-12-27 11:27:58.000000000 +0000
++++ fcft.c
+@@ -1,7 +1,12 @@
+ #include "fcft/fcft.h"
+ 
+ #include <assert.h>
++#if defined(__NetBSD__)
++#include <endian.h>
++#define bswap_16(X) htole16(X)
++#else
+ #include <byteswap.h>
++#endif
+ #include <locale.h>
+ #include <math.h>
+ #include <stdbool.h>
+@@ -533,7 +538,7 @@ base_pattern_from_name(const char *name,
+ {
+     /* Fontconfig fails to parse floating point values unless locale
+      * (LC_NUMERIC) is e.g C, or en_US.UTF-8 */
+-
++#if FCFT_HAVE_USELOCALE
+     locale_t c_locale = newlocale(LC_NUMERIC_MASK, "C", (locale_t)0);
+     if (c_locale == (locale_t)0) {
+         LOG_ERRNO("%s: failed to create temporary locale", name);
+@@ -546,12 +551,14 @@ base_pattern_from_name(const char *name,
+         freelocale(c_locale);
+         return NULL;
+     }
+-
++#endif
+     FcPattern *pattern = FcNameParse((const unsigned char *)name);
+ 
++#if FCFT_HAVE_USELOCALE
+     /* Restore locale */
+     uselocale(old_locale);
+     freelocale(c_locale);
++#endif
+ 
+     if (pattern == NULL) {
+         LOG_ERR("%s: failed to lookup font", name);
Index: pkgsrc/fonts/fcft/patches/patch-meson.build
diff -u /dev/null pkgsrc/fonts/fcft/patches/patch-meson.build:1.1
--- /dev/null   Tue Apr 14 12:06:07 2026
+++ pkgsrc/fonts/fcft/patches/patch-meson.build Tue Apr 14 12:06:06 2026
@@ -0,0 +1,24 @@
+$NetBSD: patch-meson.build,v 1.1 2026/04/14 12:06:06 kikadf Exp $
+
+* Check for uselocale before using it
+
+--- meson.build.orig   2025-12-27 11:27:58.000000000 +0000
++++ meson.build
+@@ -79,6 +79,7 @@ pixman = dependency('pixman-1')
+ stdthreads = cc.find_library('stdthreads', required: false)
+ system_nanosvg = cc.find_library('nanosvg', required: get_option('system-nanosvg'))
+ system_nanosvgrast = cc.find_library('nanosvgrast', required: get_option('system-nanosvg'))
++uselocale = cc.has_function('uselocale')
+ 
+ tllist = dependency('tllist', version: '>=1.0.1', fallback: 'tllist')
+ 
+@@ -88,6 +89,9 @@ endif
+ if utf8proc.found()
+   add_project_arguments('-DFCFT_HAVE_UTF8PROC', language: 'c')
+ endif
++if uselocale
++  add_project_arguments('-DFCFT_HAVE_USELOCALE', language: 'c')
++endif
+ 
+ if freetype.version().version_compare('>=24.2.18')  # 2.12.0, TODO: double-check...
+   if get_option('svg-backend') == 'librsvg'



Home | Main Index | Thread Index | Old Index