diff --git a/.fmf/version b/.fmf/version new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/.fmf/version @@ -0,0 +1 @@ +1 diff --git a/.gitignore b/.gitignore index f153c22..8ea9665 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,17 @@ fontconfig-2.8.0.tar.gz /fontconfig-2.12.93.tar.bz2 /fontconfig-2.13.0.tar.bz2 /fontconfig-2.13.1.tar.bz2 +/fontconfig-2.13.91.tar.xz +/fontconfig-2.13.92.tar.xz +/fontconfig-2.13.93.tar.xz +/fontconfig-2.13.94.tar.xz +/fontconfig-2.13.95.tar.xz +/fontconfig-2.13.96.tar.xz +/fontconfig-2.14.0.tar.xz +/fontconfig-2.14.1.tar.xz +/fontconfig-2.14.2.tar.xz +/fontconfig-2.15.0.tar.xz +/fontconfig-2.16.0.tar.xz +/fontconfig-2.16.1.tar.xz +/fontconfig-2.16.2.tar.xz +/fontconfig-2.17.0.tar.xz diff --git a/fontconfig-disable-network-required-test.patch b/fontconfig-disable-network-required-test.patch new file mode 100644 index 0000000..e048b49 --- /dev/null +++ b/fontconfig-disable-network-required-test.patch @@ -0,0 +1,113 @@ +diff -pruN fontconfig-2.17.0.orig/test/meson.build fontconfig-2.17.0/test/meson.build +--- fontconfig-2.17.0.orig/test/meson.build 2025-06-27 12:12:04.000000000 +0900 ++++ fontconfig-2.17.0/test/meson.build 2025-06-27 14:41:08.843726446 +0900 +@@ -1,16 +1,16 @@ +-fetch_test_fonts = custom_target( +- 'fetch_test_fonts', +- output: 'testfonts', +- command: [ +- python3, +- join_paths(meson.project_source_root(), 'build-aux', 'fetch-testfonts.py'), +- '--target-dir', +- '@BUILD_ROOT@/testfonts', +- '--try-symlink', +- ], +- build_by_default: false, +- build_always_stale: true, +-) ++#fetch_test_fonts = custom_target( ++# 'fetch_test_fonts', ++# output: 'testfonts', ++# command: [ ++# python3, ++# join_paths(meson.project_source_root(), 'build-aux', 'fetch-testfonts.py'), ++# '--target-dir', ++# '@BUILD_ROOT@/testfonts', ++# '--try-symlink', ++# ], ++# build_by_default: false, ++# build_always_stale: true, ++#) + + tests = [ + ['test-bz89617.c', {'c_args': ['-DSRCDIR="@0@"'.format(meson.current_source_dir())]}], +@@ -33,7 +33,7 @@ if host_machine.system() != 'windows' + ] + tests_not_parallel += [ + # FIXME: this needs NotoSans-hinted.zip font downloaded and unpacked into test build directory! see run-test.sh +- ['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread ++ # ['test-crbug1004254.c', {'dependencies': dependency('threads')}], # for pthread + ['test-mt-fccfg.c', {'include_directories': include_directories('../src'), 'dependencies': dependency('threads')}], + ] + +@@ -74,10 +74,10 @@ foreach test_data : tests + tests_not_pa + endforeach + + +-if get_option('fontations').enabled() +- rust = import('rust') +- rust.test('fc_fontations_rust_tests', fc_fontations, link_with: [libfontconfig_internal], depends: fetch_test_fonts, env: ['builddir=@0@'.format(meson.project_build_root())],) +-endif ++#if get_option('fontations').enabled() ++# rust = import('rust') ++# rust.test('fc_fontations_rust_tests', fc_fontations, link_with: [libfontconfig_internal], depends: fetch_test_fonts, env: ['builddir=@0@'.format(meson.project_build_root())],) ++#endif + + fs = import('fs') + +@@ -92,14 +92,14 @@ if host_machine.system() != 'windows' + + test('run_test_sh', find_program('run-test.sh'), timeout: 600, env: ['srcdir=@0@'.format(meson.current_source_dir()), 'builddir=@0@'.format(meson.current_build_dir()), 'EXEEXT=@0@'.format(conf.get('EXEEXT')), 'VERBOSE=1']) + +- if pytest.found() +- test('pytest', pytest, args: ['--tap'], +- workdir: meson.current_source_dir(), +- env: ['builddir=@0@'.format(meson.project_build_root())], +- protocol: 'tap', +- timeout: 600, +- depends: fetch_test_fonts) +- endif ++# if pytest.found() ++# test('pytest', pytest, args: ['--tap'], ++# workdir: meson.current_source_dir(), ++# env: ['builddir=@0@'.format(meson.project_build_root())], ++# protocol: 'tap', ++# timeout: 600, ++# depends: fetch_test_fonts) ++# endif + endif + + if jsonc_dep.found() +diff -pruN fontconfig-2.17.0.orig/test/run-test.sh fontconfig-2.17.0/test/run-test.sh +--- fontconfig-2.17.0.orig/test/run-test.sh 2025-06-27 12:12:04.000000000 +0900 ++++ fontconfig-2.17.0/test/run-test.sh 2025-06-27 14:39:19.098581228 +0900 +@@ -521,18 +521,18 @@ rm -rf "$MYCACHEBASEDIR" "$MYCONFIG" "$B + + fi # if [ "x$EXEEXT" = "x" ] + +-if [ -x "$BUILDTESTDIR"/test-crbug1004254 ]; then +- dotest "MT-safe global config" +- prep +- curl -s -o "$FONTDIR"/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip +- (cd "$FONTDIR"; unzip noto.zip) +- if [ -n "${SOURCE_DATE_EPOCH:-}" ] && [ ${#SOURCE_DATE_EPOCH} -gt 0 ]; then +- touch -m -t "$(fdate ${SOURCE_DATE_EPOCH})" "$FONTDIR" +- fi +- "$BUILDTESTDIR"/test-crbug1004254 +-else ++#if [ -x "$BUILDTESTDIR"/test-crbug1004254 ]; then ++# dotest "MT-safe global config" ++# prep ++# curl -s -o "$FONTDIR"/noto.zip https://noto-website-2.storage.googleapis.com/pkgs/NotoSans-hinted.zip ++# (cd "$FONTDIR"; unzip noto.zip) ++# if [ -n "${SOURCE_DATE_EPOCH:-}" ] && [ ${#SOURCE_DATE_EPOCH} -gt 0 ]; then ++# touch -m -t "$(fdate ${SOURCE_DATE_EPOCH})" "$FONTDIR" ++# fi ++# "$BUILDTESTDIR"/test-crbug1004254 ++#else + echo "No test-crbug1004254: skipped" +-fi ++#fi + + if [ "x$EXEEXT" = "x" ]; then + diff --git a/fontconfig-drop-lang-from-pkgkit-format.patch b/fontconfig-drop-lang-from-pkgkit-format.patch new file mode 100644 index 0000000..abece6d --- /dev/null +++ b/fontconfig-drop-lang-from-pkgkit-format.patch @@ -0,0 +1,12 @@ +diff -pruN fontconfig-2.16.1.orig/src/fcformat.c fontconfig-2.16.1/src/fcformat.c +--- fontconfig-2.16.1.orig/src/fcformat.c 2025-03-13 20:16:47.000000000 +0900 ++++ fontconfig-2.16.1/src/fcformat.c 2025-03-13 20:42:03.633324643 +0900 +@@ -77,7 +77,7 @@ + #define FCCAT_FORMAT "\"%{file|basename|cescape}\" %{index} \"%{-file{%{=unparse|cescape}}}\"" + #define FCMATCH_FORMAT "%{file:-|basename}: \"%{family[0]:-}\" \"%{style[0]:-}\"" + #define FCLIST_FORMAT "%{?file{%{file}: }}%{-file{%{=unparse}}}" +-#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}%{[]lang{font(:lang=%{lang|downcase|translate(_,-)})\n}}" ++#define PKGKIT_FORMAT "%{[]family{font(%{family|downcase|delete( )})\n}}" + + static void + message (const char *fmt, ...) diff --git a/fontconfig-fix-crash.patch b/fontconfig-fix-crash.patch new file mode 100644 index 0000000..c52b33d --- /dev/null +++ b/fontconfig-fix-crash.patch @@ -0,0 +1,28 @@ +From b9bec06d73340f1b5727302d13ac3df307b7febc Mon Sep 17 00:00:00 2001 +From: Akira TAGOH +Date: Mon, 30 Jun 2025 09:05:18 +0900 +Subject: [PATCH] Fix a heap buffer overflow + +https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/481 + +Changelog: fixed +--- + src/fcfreetype.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/fcfreetype.c b/src/fcfreetype.c +index 7a4d9811..0a87d27a 100644 +--- a/src/fcfreetype.c ++++ b/src/fcfreetype.c +@@ -2661,7 +2661,7 @@ FcFontCapabilities (FT_Face face) + goto bail; + + maxsize = (((FT_ULong)gpos_count + (FT_ULong)gsub_count) * OTLAYOUT_LEN + +- (issilgraphitefont ? strlen(fcSilfCapability) : 0)); ++ (issilgraphitefont ? strlen(fcSilfCapability) + 1: 0)); + complex_ = malloc (sizeof (FcChar8) * maxsize); + if (!complex_) + goto bail; +-- +2.50.0 + diff --git a/fontconfig-lower-nonlatin-conf.patch b/fontconfig-lower-nonlatin-conf.patch new file mode 100644 index 0000000..3ff373a --- /dev/null +++ b/fontconfig-lower-nonlatin-conf.patch @@ -0,0 +1,42 @@ +diff -pruN fontconfig-2.16.0.orig/conf.d/Makefile.am fontconfig-2.16.0/conf.d/Makefile.am +--- fontconfig-2.16.0.orig/conf.d/Makefile.am 2025-01-18 00:15:05.000000000 +0900 ++++ fontconfig-2.16.0/conf.d/Makefile.am 2025-01-18 00:38:32.245398277 +0900 +@@ -47,7 +47,7 @@ CONF_LINKS = \ + 60-generic.conf \ + 60-latin.conf \ + 65-fonts-persian.conf \ +- 65-nonlatin.conf \ ++ 69-nonlatin.conf \ + 69-unifont.conf \ + 80-delicious.conf \ + 90-synthetic.conf +@@ -95,7 +95,7 @@ template_DATA = \ + 60-latin.conf \ + 65-fonts-persian.conf \ + 65-khmer.conf \ +- 65-nonlatin.conf \ ++ 69-nonlatin.conf \ + 69-unifont.conf \ + 70-no-bitmaps.conf \ + 70-no-bitmaps-and-emoji.conf \ +diff -pruN fontconfig-2.16.0.orig/conf.d/meson.build fontconfig-2.16.0/conf.d/meson.build +--- fontconfig-2.16.0.orig/conf.d/meson.build 2025-01-18 00:15:05.000000000 +0900 ++++ fontconfig-2.16.0/conf.d/meson.build 2025-01-18 00:38:43.243595743 +0900 +@@ -33,7 +33,7 @@ conf_files = [ + '60-latin.conf', + '65-fonts-persian.conf', + '65-khmer.conf', +- '65-nonlatin.conf', ++ '69-nonlatin.conf', + '69-unifont.conf', + '70-no-bitmaps.conf', + '70-no-bitmaps-and-emoji.conf', +@@ -64,7 +64,7 @@ conf_links = [ + '60-generic.conf', + '60-latin.conf', + '65-fonts-persian.conf', +- '65-nonlatin.conf', ++ '69-nonlatin.conf', + '69-unifont.conf', + '80-delicious.conf', + '90-synthetic.conf', diff --git a/fontconfig-required-freetype-version.patch b/fontconfig-required-freetype-version.patch deleted file mode 100644 index 6f7aae3..0000000 --- a/fontconfig-required-freetype-version.patch +++ /dev/null @@ -1,14 +0,0 @@ -diff -pruN fontconfig-2.12.93.orig/configure.ac fontconfig-2.12.93/configure.ac ---- fontconfig-2.12.93.orig/configure.ac 2018-02-15 22:01:54.000000000 +0900 -+++ fontconfig-2.12.93/configure.ac 2018-02-15 22:33:42.353941393 +0900 -@@ -308,8 +308,8 @@ AC_DEFINE_UNQUOTED(USE_ICONV,$use_iconv, - # Checks for FreeType - # - dnl See http://git.savannah.gnu.org/cgit/freetype/freetype2.git/tree/docs/VERSIONS.TXT for versioning in freetype --PKG_CHECK_MODULES(FREETYPE, freetype2 >= 21.0.15) --PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2 >= 21.0.15" -+PKG_CHECK_MODULES(FREETYPE, freetype2 >= 20.0.14) -+PKGCONFIG_REQUIRES="$PKGCONFIG_REQUIRES freetype2 >= 20.0.14" - - AC_SUBST(FREETYPE_LIBS) - AC_SUBST(FREETYPE_CFLAGS) diff --git a/fontconfig-stop-cleanup-uuid.patch b/fontconfig-stop-cleanup-uuid.patch deleted file mode 100644 index 9972cd2..0000000 --- a/fontconfig-stop-cleanup-uuid.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 5f12f564f8748deaa603adb7a4b8f616b6390ad4 Mon Sep 17 00:00:00 2001 -From: Keith Packard -Date: Wed, 17 Oct 2018 21:15:47 -0700 -Subject: [PATCH 1/2] Do not remove UUID file when a scanned directory is empty - -Because FcDirCacheDeleteUUID does not reset the modification time on -the directory, and because FcDirCacheRead unconditionally creates the -UUID file each time it is run, any empty directory in the cache will -get its timestamp changed each time the cache for that directory is -read. - -Instead, just leave the UUID file around as it is harmless. - -The alternative would be to only create the UUID file after the cache -has been created and the directory has been discovered to be -non-empty, but that would delay the creation of the UUID file. - -Signed-off-by: Keith Packard ---- - src/fcdir.c | 7 ------- - 1 file changed, 7 deletions(-) - -diff --git a/src/fcdir.c b/src/fcdir.c -index 93f220c..bfcdf95 100644 ---- a/src/fcdir.c -+++ b/src/fcdir.c -@@ -421,13 +421,6 @@ FcDirCacheRead (const FcChar8 *dir, FcBool force, FcConfig *config) - /* Not using existing cache file, construct new cache */ - if (!cache) - cache = FcDirCacheScan (dir, config); -- if (cache) -- { -- FcFontSet *fs = FcCacheSet (cache); -- -- if (cache->dirs_count == 0 && (!fs || fs->nfont == 0)) -- FcDirCacheDeleteUUID (dir, config); -- } - - return cache; - } --- -2.19.1 - -From e9113a764a1001165711022aceb45aa2765feb8b Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Thu, 25 Oct 2018 07:16:32 +0000 -Subject: [PATCH 2/2] Do not run a test case for .uuid deletion - ---- - test/run-test.sh | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - -diff --git a/test/run-test.sh b/test/run-test.sh -index e76e39b..ed41456 100644 ---- a/test/run-test.sh -+++ b/test/run-test.sh -@@ -239,19 +239,19 @@ fi - - rm -rf $MyPWD/sysroot - --dotest "deleting .uuid file on empty dir" --prep --cp $FONT1 $FONT2 $FONTDIR --$FCCACHE $FONTDIR --sleep 1 --rm -f $FONTDIR/*pcf --$FCCACHE $FONTDIR --rmdir $FONTDIR > /dev/null 2>&1 --if [ $? != 0 ]; then -- echo "*** Test failed: $TEST" -- echo "$FONTDIR isn't empty" -- ls -al $FONTDIR -- exit 1 --fi -+# dotest "deleting .uuid file on empty dir" -+# prep -+# cp $FONT1 $FONT2 $FONTDIR -+# $FCCACHE $FONTDIR -+# sleep 1 -+# rm -f $FONTDIR/*pcf -+# $FCCACHE $FONTDIR -+# rmdir $FONTDIR > /dev/null 2>&1 -+# if [ $? != 0 ]; then -+# echo "*** Test failed: $TEST" -+# echo "$FONTDIR isn't empty" -+# ls -al $FONTDIR -+# exit 1 -+# fi - - rm -rf $FONTDIR $CACHEFILE $CACHEDIR $FONTCONFIG_FILE out --- -2.19.1 - diff --git a/fontconfig-test-delay.patch b/fontconfig-test-delay.patch deleted file mode 100644 index 2a344cb..0000000 --- a/fontconfig-test-delay.patch +++ /dev/null @@ -1,56 +0,0 @@ -diff -pruN fontconfig-2.13.1.orig/test/test-bz106632.c fontconfig-2.13.1/test/test-bz106632.c ---- fontconfig-2.13.1.orig/test/test-bz106632.c 2018-08-29 09:55:14.000000000 +0000 -+++ fontconfig-2.13.1/test/test-bz106632.c 2018-11-13 11:57:37.822142424 +0000 -@@ -197,7 +197,7 @@ main (void) - mkdir_p (cachedir); - - fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir); -- snprintf (cmd, 512, "cp -a %s %s", FONTFILE, fontdir); -+ snprintf (cmd, 512, "sleep 1; cp -a %s %s; sleep 1", FONTFILE, fontdir); - system (cmd); - - fprintf (stderr, "D: Loading a config\n"); -@@ -226,15 +226,21 @@ main (void) - goto bail; - } - fprintf (stderr, "D: Removing %s\n", fontdir); -- snprintf (cmd, 512, "rm -f %s%s*", fontdir, FC_DIR_SEPARATOR_S); -+ snprintf (cmd, 512, "sleep 1; rm -f %s%s*; sleep 1", fontdir, FC_DIR_SEPARATOR_S); - system (cmd); - fprintf (stderr, "D: Reinitializing\n"); -- if (!FcConfigUptoDate (config) || !FcInitReinitialize ()) -+ if (FcConfigUptoDate (config)) - { -- fprintf (stderr, "E: Unable to reinitialize\n"); -+ fprintf (stderr, "E: Config reports up-to-date\n"); - ret = 2; - goto bail; - } -+ if (!FcInitReinitialize ()) -+ { -+ fprintf (stderr, "E: Unable to reinitialize\n"); -+ ret = 3; -+ goto bail; -+ } - if (FcConfigGetCurrent () == config) - { - fprintf (stderr, "E: config wasn't reloaded\n"); -@@ -265,10 +271,16 @@ main (void) - goto bail; - } - fprintf (stderr, "D: Copying %s to %s\n", FONTFILE, fontdir); -- snprintf (cmd, 512, "cp -a %s %s", FONTFILE, fontdir); -+ snprintf (cmd, 512, "sleep 1; cp -a %s %s; sleep 1", FONTFILE, fontdir); - system (cmd); - fprintf (stderr, "D: Reinitializing\n"); -- if (!FcConfigUptoDate (config) || !FcInitReinitialize ()) -+ if (FcConfigUptoDate (config)) -+ { -+ fprintf (stderr, "E: Config up-to-date after addition\n"); -+ ret = 3; -+ goto bail; -+ } -+ if (!FcInitReinitialize ()) - { - fprintf (stderr, "E: Unable to reinitialize\n"); - ret = 2; diff --git a/fontconfig-use-rachana.patch b/fontconfig-use-rachana.patch deleted file mode 100644 index e4fadcc..0000000 --- a/fontconfig-use-rachana.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 13b4ba91353a4ead4623d0133f6eb0283e91b15a Mon Sep 17 00:00:00 2001 -From: Akira TAGOH -Date: Tue, 13 Nov 2018 06:34:11 +0000 -Subject: [PATCH] Use Rachana instead of Meera for Malayalam - -Meera is a sans-serif font for Malayalam. that should be substituted for serif. ---- - conf.d/65-nonlatin.conf | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/conf.d/65-nonlatin.conf b/conf.d/65-nonlatin.conf -index 54fb974f..1b9de316 100644 ---- a/conf.d/65-nonlatin.conf -+++ b/conf.d/65-nonlatin.conf -@@ -63,7 +63,7 @@ - Lohit Sindhi - Lohit Punjabi - Lohit Tamil -- Meera -+ Rachana - Lohit Malayalam - Lohit Kannada - Lohit Telugu --- -2.19.1 - diff --git a/fontconfig.spec b/fontconfig.spec index 993c90c..1bc63c7 100644 --- a/fontconfig.spec +++ b/fontconfig.spec @@ -4,38 +4,43 @@ Summary: Font configuration and customization library Name: fontconfig -Version: 2.13.1 -Release: 6%{?dist} +Version: 2.17.0 +Release: 3%{?dist} # src/ftglue.[ch] is in Public Domain # src/fccache.c contains Public Domain code +## https://gitlab.com/fedora/legal/fedora-license-data/-/issues/177 # fc-case/CaseFolding.txt is in the UCD # otherwise MIT -License: MIT and Public Domain and UCD -Source: http://fontconfig.org/release/%{name}-%{version}.tar.bz2 +License: HPND AND LicenseRef-Fedora-Public-Domain AND Unicode-DFS-2016 +Source: http://fontconfig.org/release/%{name}-%{version}.tar.xz URL: http://fontconfig.org Source1: 25-no-bitmap-fedora.conf Source2: fc-cache # https://bugzilla.redhat.com/show_bug.cgi?id=140335 Patch0: %{name}-sleep-less.patch -Patch1: %{name}-required-freetype-version.patch -Patch2: %{name}-stop-cleanup-uuid.patch -Patch3: %{name}-use-rachana.patch -Patch4: %{name}-test-delay.patch +Patch4: %{name}-drop-lang-from-pkgkit-format.patch +Patch5: %{name}-disable-network-required-test.patch +Patch6: %{name}-lower-nonlatin-conf.patch +Patch7: %{name}-fix-crash.patch -BuildRequires: expat-devel +BuildRequires: libxml2-devel BuildRequires: freetype-devel >= %{freetype_version} BuildRequires: fontpackages-devel -BuildRequires: libuuid-devel -BuildRequires: autoconf automake libtool gettext +BuildRequires: gettext BuildRequires: gperf +BuildRequires: docbook-utils docbook-utils-pdf +BuildRequires: meson ninja-build gcc -Requires: fontpackages-filesystem freetype -Requires(pre): freetype >= 2.9.1-6 +Requires: fonts-filesystem freetype +# Register DTD system-wide to make validation work by default +# (used by fonts-rpm-macros) +Requires(pre): xml-common +Requires(postun): xml-common +PreReq: freetype >= 2.9.1-6 Requires(post): grep coreutils -Requires(postun): /sbin/ldconfig Requires: font(:lang=en) -Suggests: dejavu-sans-fonts +Suggests: font(notosans) %description Fontconfig is designed to locate fonts within the @@ -67,29 +72,50 @@ which is useful for developing applications that uses fontconfig. %prep %autosetup -p1 +# To reduce a maintenance cost of fontconfig-lower-nonlatin-conf.patch +mv conf.d/65-nonlatin.conf conf.d/69-nonlatin.conf %build -# We don't want to rebuild the docs, but we want to install the included ones. -export HASDOCBOOK=no - -autoreconf -%configure --with-add-fonts=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ - --disable-static --with-cache-dir=/usr/lib/fontconfig/cache - -make %{?_smp_mflags} +%meson -Ddoc=disabled -Dcache-build=disabled -Dxml-backend=libxml2 \ + -Dadditional-fonts-dirs=/usr/share/X11/fonts/Type1,/usr/share/X11/fonts/TTF,/usr/local/share/fonts \ + -Dcache-dir=/usr/lib/fontconfig/cache \ + --default-library=shared +%meson_build %install -make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p" - -find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' +%meson_install install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d ln -s %{_fontconfig_templatedir}/25-unhint-nonlatin.conf $RPM_BUILD_ROOT%{_fontconfig_confdir}/ -# move installed doc files back to build directory to package them -# in the right place -mv $RPM_BUILD_ROOT%{_docdir}/fontconfig/* . -rmdir $RPM_BUILD_ROOT%{_docdir}/fontconfig/ +# Use implied value to allow the use of conditional conf +rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/10-sub-pixel-*.conf + +# Do not enable bitmap-related conf +rm $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d/70-*bitmaps*.conf + +# Install docs manually +install -d $RPM_BUILD_ROOT%{_mandir}/man1 +install -d $RPM_BUILD_ROOT%{_mandir}/man3 +install -d $RPM_BUILD_ROOT%{_mandir}/man5 +for f in doc/*.1; do + install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man1 +done +for f in doc/*.3; do + install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man3 +done +for f in doc/*.5; do + install -p -m 0644 $f $RPM_BUILD_ROOT%{_mandir}/man5 +done +for f in doc/*.txt doc/*.pdf doc/*.html; do + install -p -m 0644 $f . +done + +# adjust the timestamp to avoid conflicts for multilib +touch -r doc/fontconfig-user.sgml fontconfig-user.txt +touch -r doc/fontconfig-user.sgml fontconfig-user.html +touch -r doc/fontconfig-devel.sgml fontconfig-devel.txt +touch -r doc/fontconfig-devel.sgml fontconfig-devel.html # rename fc-cache binary mv $RPM_BUILD_ROOT%{_bindir}/fc-cache $RPM_BUILD_ROOT%{_bindir}/fc-cache-%{__isa_bits} @@ -104,11 +130,9 @@ install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_bindir}/fc-cache cat %{name}-conf.lang >> %{name}.lang %check -make check +%meson_test %post -%{?ldconfig} - umask 0022 mkdir -p /usr/lib/fontconfig/cache @@ -123,16 +147,27 @@ if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{vers HOME=/root /usr/bin/fc-cache -f fi -%ldconfig_postun - %transfiletriggerin -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts HOME=/root /usr/bin/fc-cache -s %transfiletriggerpostun -- /usr/share/fonts /usr/share/X11/fonts/Type1 /usr/share/X11/fonts/TTF /usr/local/share/fonts HOME=/root /usr/bin/fc-cache -s +%posttrans +if [ -e %{_sysconfdir}/xml/catalog ]; then + %{_bindir}/xmlcatalog --noout --add system \ + "urn:fontconfig:fonts.dtd" \ + "file://%{_datadir}/xml/fontconfig/fonts.dtd" \ + %{_sysconfdir}/xml/catalog +fi + +%postun +if [ $1 == 0 ] && [ -e %{_sysconfdir}/xml/catalog ]; then + %{_bindir}/xmlcatalog --noout --del "urn:fontconfig:fonts.dtd" %{_sysconfdir}/xml/catalog +fi + %files -f %{name}.lang -%doc README AUTHORS +%doc README.md AUTHORS %doc fontconfig-user.txt fontconfig-user.html %doc %{_fontconfig_confdir}/README %license COPYING @@ -152,6 +187,7 @@ HOME=/root /usr/bin/fc-cache -s # If you want to do so, you should use local.conf instead. %config %{_fontconfig_masterdir}/fonts.conf %config(noreplace) %{_fontconfig_confdir}/*.conf +%dir /usr/lib/fontconfig %dir /usr/lib/fontconfig/cache %{_mandir}/man1/* %{_mandir}/man5/* @@ -165,9 +201,211 @@ HOME=/root /usr/bin/fc-cache -s %{_datadir}/gettext/its/fontconfig.loc %files devel-doc -%doc fontconfig-devel.txt fontconfig-devel +%doc fontconfig-devel.txt fontconfig-devel.html %changelog +* Wed Jul 23 2025 Fedora Release Engineering - 2.17.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Mon Jun 30 2025 Akira TAGOH - 2.17.0-2 +- Backport a patch to fix a crash with Graphite fonts +- Drop 70-*bitmaps*.conf from /etc/fonts/conf.d so far. + Resolves: rhbz#2375426 + +* Fri Jun 27 2025 Akira TAGOH - 2.17.0-1 +- New upstream release. + Resolves: rhbz#2375126 + +* Fri Apr 11 2025 Akira TAGOH - 2.16.2-1 +- New upstream release. + +* Thu Mar 13 2025 Akira TAGOH - 2.16.1-1 +- New upstream release. + +* Mon Jan 27 2025 Akira TAGOH - 2.16.0-2 +- Fix endian detection. + Resolves: rhbz#2341757 + +* Sat Jan 18 2025 Akira TAGOH - 2.16.0-1 +- New upstream release. + Resolves: rhbz#2338618 +- Use meson instead of autotools to build. +- Disable meson test on s390x temporarily. + +* Thu Jan 16 2025 Fedora Release Engineering - 2.15.0-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Aug 1 2024 Akira TAGOH - 2.15.0-8 +- Fix a memory leak and potentially uninitialized values. + +* Wed Jul 17 2024 Fedora Release Engineering - 2.15.0-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 7 2024 Akira TAGOH - 2.15.0-6 +- Own /usr/lib/fontconfig + Resolves: rhbz#2284076 + +* Mon Apr 29 2024 Michael Kuhn - 2.15.0-5 +- Fix emoji fonts being disabled when bitmap fonts were disabled + +* Sat Feb 10 2024 Akira TAGOH - 2.15.0-4 +- Delete .uuid with fc-cache -f. + Resolves: rhbz#1761885 + +* Wed Jan 24 2024 Fedora Release Engineering - 2.15.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jan 19 2024 Fedora Release Engineering - 2.15.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Dec 22 2023 Akira TAGOH - 2.15.0-1 +- New upstream release. + Resolves: rhbz#2255623 + +* Thu Aug 17 2023 Akira TAGOH - 2.14.2-5 +- Update 65-nonlatin.conf to 69-nonlatin.conf + This basically provides substitutes for certain languages and is helpful + to determine default behavior though, we have per-package config for similar purpose. + Since 65 is mostly used for default fonts and this config prevents some behavior for + packages named something coming later than "nonlatin" in the alphabetical order. + So moving this to the safer priority. + This would fixes an issue, particularly Lohit Marathi vs Lohit Devanagari after + updating their priorities from 65 to 66. + +* Wed Jul 19 2023 Fedora Release Engineering - 2.14.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Fri Jun 16 2023 Akira TAGOH - 2.14.2-3 +- Drop 10-sub-pixel-rgb-for-kde.conf + Resolves: rhbz#2212512 + +* Tue Apr 4 2023 Akira TAGOH - 2.14.2-2 +- Migrated license tag to SPDX. + +* Fri Jan 27 2023 Akira TAGOH - 2.14.2-1 +- New upstream release. + +* Thu Jan 19 2023 Fedora Release Engineering - 2.14.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Nov 26 2022 Akira TAGOH - 2.14.1-2 +- Enable RGB stripes layout for sub-pixel rendering on KDE only. + Resolves: rhbz#2137825 + +* Fri Oct 21 2022 Akira TAGOH - 2.14.1-1 +- New upstream release. + +* Wed Sep 28 2022 Akira TAGOH - 2.14.0-3 +- Remap font paths to other place properly. + +* Thu Jul 21 2022 Fedora Release Engineering - 2.14.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Thu Mar 31 2022 Akira TAGOH - 2.14.0-1 +- New upstream release. + +* Fri Feb 4 2022 Akira TAGOH - 2.13.96-1 +- New upstream release. +- Fix missing a file in the archive. + Resolves: rhbz#2050478 + +* Tue Feb 1 2022 Akira TAGOH - 2.13.95-1 +- New upstream release. +- Update deps to font(notosans) + https://fedoraproject.org/wiki/Changes/DefaultToNotoFonts + +* Thu Jan 20 2022 Fedora Release Engineering - 2.13.94-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Wed Jul 21 2021 Fedora Release Engineering - 2.13.94-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Tue Jul 20 2021 Akira TAGOH - 2.13.94-2 +- Fix the score calculation on matching for multiple values. +- Enable 11-lcdfilter-default.conf. + Resolves: rhbz#1965684 + +* Tue Jun 29 2021 Akira TAGOH - 2.13.94-1 +- New upstream release. + +* Thu Mar 25 2021 Akira TAGOH - 2.13.93-6 +- Fix postun scriptlet to remove the entry from xml catalog. + +* Tue Jan 26 2021 Fedora Release Engineering - 2.13.93-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Dec 23 2020 Akira TAGOH - 2.13.93-4 +- cherry pick some upstream patches + - Skip leading white space in style. + - Remove abort from FcCompareSize. + - Fix memory leaks + - Check qual and compare for family tests. +- +* Thu Dec 3 2020 Akira TAGOH - 2.13.93-3 +- Add back fullname property at the scan matching phase for the backward compatibility. + Resolves: rhbz#1902881 + +* Mon Nov 30 2020 Akira TAGOH - 2.13.93-2 +- Fix file conflicts. + +* Sat Nov 28 2020 Akira TAGOH - 2.13.93-1 +- New upstream release. + +* Mon Jul 27 2020 Fedora Release Engineering - 2.13.92-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Thu Apr 23 2020 Akira TAGOH - 2.13.92-11 +- deal with system caches as always latest on Silverblue. (#1750891) + +* Thu Apr 02 2020 Akira TAGOH - 2.13.92-10 +- Build against libxml2 instead of expat. + +* Sat Mar 28 2020 Nicolas Mailhot - 2.13.92-9 +- Fix DTD declaration and registration so users and Fedora automation can + easily validate new configuration files + +* Mon Mar 23 2020 Akira TAGOH - 2.13.92-8 +- Fix assertion in FcCacheFini() again. + Resolves: rhbz#1815684 + +* Wed Feb 26 2020 Akira TAGOH - 2.13.92-7 +- Fix assertion in FcCacheFini(). + +* Thu Jan 30 2020 Akira TAGOH - 2.13.92-6 +- Fix some wrong behavior with sysroot option. +- Fix reading the outdated caches. +- Apply a patch to make it MT-safe more. + +* Tue Jan 28 2020 Fedora Release Engineering - 2.13.92-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Mon Jan 20 2020 Akira TAGOH - 2.13.92-4 +- Drop font(:lang=...) from %%{=pkgkit} format. + Reference: rhbz#1792463 + +* Wed Aug 28 2019 Akira TAGOH - 2.13.92-3 +- Do not return false on FcConfigParseAndLoad*() if complain is set to false. + Resolves: rhbz#1744377 + +* Fri Aug 9 2019 Akira TAGOH - 2.13.92-2 +- Fix to affect fonthashint property for score on match. + +* Fri Aug 9 2019 Akira TAGOH - 2.13.92-1 +- New upstream release. + +* Wed Jul 31 2019 Akira TAGOH - 2.13.91-4 +- Fix make check fails. + +* Thu Jul 25 2019 Fedora Release Engineering - 2.13.91-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Jun 16 2019 Tim Landscheidt - 2.13.91-2 +- Remove calls to ldconfig from scriptlets +- Use "PreReq" instead of "Requires(pre)" for freetype + +* Mon Jun 10 2019 Akira TAGOH - 2.13.91-1 +- New upstream release. + * Fri Feb 22 2019 Akira TAGOH - 2.13.1-6 - Update freetype version for runtime dependency to ensure they have FT_Done_MM_Var symbol certainly. (#1679619) diff --git a/plans/basic.fmf b/plans/basic.fmf new file mode 100644 index 0000000..c1627f9 --- /dev/null +++ b/plans/basic.fmf @@ -0,0 +1,5 @@ +summary: Basic smoke test +discover: + how: fmf +execute: + how: tmt diff --git a/sources b/sources index 61cde62..9a3bb99 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fontconfig-2.13.1.tar.bz2) = f97f2a9db294fd72d416a7d76dd7db5934ade2cf76903764b09e7decc33e0e2eed1a1d35c5f1c7fd9ea39e2c7653b9e65365f0c6205e047e95e38ba5000dd100 +SHA512 (fontconfig-2.17.0.tar.xz) = dd64905c3e0e5c5881df505b8f0bea594bbac5ce145f57aedcd7130978cd285491497198d8f2d6ed26f7b2abb31268dc3ff97aa75ce998b8e57f2d5c75b240b4 diff --git a/tests/basic/main.fmf b/tests/basic/main.fmf new file mode 100644 index 0000000..d6c06ec --- /dev/null +++ b/tests/basic/main.fmf @@ -0,0 +1,3 @@ +summary: Concise summary describing what the test does +test: ./test.sh +framework: beakerlib diff --git a/tests/basic/test.sh b/tests/basic/test.sh new file mode 100755 index 0000000..10de1b4 --- /dev/null +++ b/tests/basic/test.sh @@ -0,0 +1,22 @@ +#!/bin/bash +# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k +. /usr/share/beakerlib/beakerlib.sh || exit 1 + +rlJournalStart + rlPhaseStartSetup + rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" + rlRun "pushd $tmp" + rlRun "set -o pipefail" + rlPhaseEnd + + rlPhaseStartTest + rlRun "fc-match" 0 "Check fc-match" + rlRun "fc-list" 0 "Check fc-list" + rlRun "fc-scan /usr/share/fonts" 0 "Check fc-scan" + rlPhaseEnd + + rlPhaseStartCleanup + rlRun "popd" + rlRun "rm -r $tmp" 0 "Remove tmp directory" + rlPhaseEnd +rlJournalEnd