Add patches for Doxygen and GObject introspection to improve compatibility with Yacc

This commit is contained in:
2026-07-17 07:45:45 -05:00
parent 4f914253b7
commit 94aeb45fa6
3 changed files with 122 additions and 33 deletions
@@ -1,30 +1,3 @@
diff --git a/test/run-test.sh b/test/run-test.sh
index 9b3c91c..73c0d3e 100644
--- a/test/run-test.sh
+++ b/test/run-test.sh
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# fontconfig/test/run-test.sh
#
# Copyright © 2000 Keith Packard
@@ -84,11 +84,11 @@ fstat() {
ret=$(stat -c "$fmt" "$fn")
else
# BSD
- if [ "x$fmt" == "x%Y" ]; then
+ if [ "x$fmt" = "x%Y" ]; then
ret=$(stat -f "%m" "$fn")
- elif [ "x$fmt" == "x%y" ]; then
+ elif [ "x$fmt" = "x%y" ]; then
ret=$(stat -f "%Sm" -t "%F %T %z" "$fn")
- elif [ "x$fmt" == "x%n %s %y %z" ]; then
+ elif [ "x$fmt" = "x%n %s %y %z" ]; then
ret=$(stat -f "%SN %z %Sm %Sc" -t "%F %T %z" "$fn")
else
echo "E: Unknown format"
diff --git a/test/run-test-map.sh b/test/run-test-map.sh
index 869d7b2..c634bb8 100755
--- a/test/run-test-map.sh
+++ b/test/run-test-map.sh
@@ -1,4 +1,4 @@
@@ -33,7 +6,7 @@ index 869d7b2..c634bb8 100755
# fontconfig/test/run-test-cache-map.sh
#
# Copyright © 2018 Keith Packard
@@ -41,9 +41,8 @@ EXPECTED="out-map.expected"
@@ -41,9 +41,8 @@
FCLIST=../fc-list/fc-list$EXEEXT
FCCACHE=../fc-cache/fc-cache$EXEEXT
@@ -45,16 +18,33 @@ index 869d7b2..c634bb8 100755
fi
FONT1=$TESTDIR/4x6.pcf
diff --git a/test/wrapper-script.sh b/test/wrapper-script.sh
index 94dcb85..ae68c6d 100755
--- a/test/run-test.d/remap-flatpak.sh
+++ b/test/run-test.d/remap-flatpak.sh
@@ -83,13 +83,13 @@
$BWRAP --bind / / --ro-bind "$TESTCACHE2DIR" /usr/lib/fontconfig/cache --ro-bind "$TESTFONT2DIR" /usr/share/fonts --bind "$TESTBUILD2DIR" /usr/share/fontconfig --ro-bind "$TESTRUNDIR" "$TESTRUNDIR" --ro-bind "$TESTCACHE1DIR" "$TESTRUNDIR"/fonts-cache --ro-bind "$TESTFONT1DIR" "$TESTRUNDIR"/fonts --dev-bind /dev /dev --setenv FONTCONFIG_FILE "$TESTBUILD2DIR"/bind-fonts.conf ls $(sed 's/:file=//' "$TESTRESULT3") > /dev/null
# Check the amount of cache files
-if [ $(ls "$TESTCACHE1DIR"|wc -l) == 2 ]; then : ; else
+if [ "$(ls "$TESTCACHE1DIR" | wc -l)" -eq 2 ]; then : ; else
echo "*** Test failed: $TEST"
echo "Too much cache files created at host cache dir."
ls "$TESTCACHE1DIR"
exit 1
fi
-if [ $(ls "$TESTCACHE2DIR"|wc -l) == 2 ]; then : ; else
+if [ "$(ls "$TESTCACHE2DIR" | wc -l)" -eq 2 ]; then : ; else
echo "*** Test failed: $TEST"
echo "Too much cache files created at runtime cache dir."
ls "$TESTCACHE2DIR"
--- a/test/wrapper-script.sh
+++ b/test/wrapper-script.sh
@@ -1,20 +1,24 @@
@@ -1,4 +1,4 @@
-#! /bin/bash
+#! /bin/sh
CC=${CC:-gcc}
set -e
@@ -7,16 +7,20 @@
case "$1" in
*.exe)
export WINEPATH=$(${CC} -print-sysroot)/mingw/bin
@@ -69,7 +59,7 @@ index 94dcb85..ae68c6d 100755
+ esac
+ done)
+ cd "$mingw_path" || exit 1
+ if [ "$(dirname -- "$1")" = "." ]; then
+ if [ "$(dirname "$1")" = "." ]; then
+ /usr/bin/env wine "$fccwd/$1"
else
- /usr/bin/env wine $@