fontconfig: Branch 'main' - 3 commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 22 15:52:55 UTC 2025


 .gitlab-ci.yml         |   32 +++++++++++++++++++++++++++++---
 .gitlab-ci/build.sh    |   49 +++++++++++++++++++++++++++++++++++++++++--------
 .gitlab-ci/ci.template |    4 +++-
 .gitlab-ci/config.yml  |    9 ++++++++-
 test/wrapper-script.sh |    3 +++
 5 files changed, 84 insertions(+), 13 deletions(-)

New commits:
commit 4a64db93d65255a04eb8625ed72385e33542ae53
Merge: 81572e8 9021195
Author: Akira TAGOH <akira at tagoh.org>
Date:   Tue Apr 22 15:52:52 2025 +0000

    Merge branch 'ci-subproject' into 'main'
    
    ci: Add a subproject test case for meson
    
    See merge request fontconfig/fontconfig!388

commit 902119544fa2e500ddabfd480173f541f0bf2521
Author: Akira TAGOH <akira at tagoh.org>
Date:   Tue Apr 22 20:04:10 2025 +0900

    test: Set sys-root to WINEPATH for MinGW

diff --git a/test/wrapper-script.sh b/test/wrapper-script.sh
index 94add1b..94dcb85 100755
--- a/test/wrapper-script.sh
+++ b/test/wrapper-script.sh
@@ -1,7 +1,10 @@
 #! /bin/bash
 
+CC=${CC:-gcc}
+
 case "$1" in
   *.exe)
+    export WINEPATH=$(${CC} -print-sysroot)/mingw/bin
     fccwd=`pwd`
     cd $(IFS=:;for i in $PATH; do echo $i|grep mingw> /dev/null; [ $? -eq 0 ] && echo $i; done)
     if [ "x$(dirname $@)" = "x." ]; then
commit 60599c6781e7e13739fbbd56ab4170821deea6d7
Author: Akira TAGOH <akira at tagoh.org>
Date:   Thu Apr 17 19:15:01 2025 +0900

    ci: Add a subproject test case for meson

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 945f141..efa0fd8 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -42,8 +42,8 @@ variables:
 # changing these will force rebuilding the associated image
 # Note: these tags have no meaning and are not tied to a particular
 # fontconfig version
-  FEDORA_TAG:    '2025-03-26.1-061a0cd0d4b5'
-  FREEBSD_TAG:   '2025-03-26.1-1f1b3be21da5'
+  FEDORA_TAG:    '2025-04-17.1-a21ccc3b8989'
+  FREEBSD_TAG:   '2025-04-17.1-c694c9922fb9'
 
   FEDORA_EXEC:   'bash .gitlab-ci/fedora-install.sh'
   FREEBSD_EXEC:  'bash .gitlab-ci/freebsd-install.sh'
@@ -311,6 +311,7 @@ clang-format:
       [ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
       [ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
       [ $FC_BUILD_NO_CHECK -eq 1 ] && buildopt+=(-C)
+      [ $FC_BUILD_SUBPROJECT -eq 1 ] && buildopt+=(-S)
       buildopt+=(-s $FC_BUILDSYS)
       buildopt+=(-t $FC_BUILD_TYPE)
       buildopt+=(-X $FC_XML_BACKEND)
@@ -322,6 +323,7 @@ clang-format:
     FC_BUILD_DISTCHECK: 0
     FC_BUILD_NO_INSTALL: 0
     FC_BUILD_NO_CHECK: 0
+    FC_BUILD_SUBPROJECT: 0
 
 .fc_artifacts:
   artifacts:
@@ -425,7 +427,7 @@ t_fedora:rawhide:meson shared libxml2:
   needs:
     - 'fedora:rawhide at container-prep'
 
-t_fedora:rawhide:meson shared libxml2:upload:
+upload_asset:t_fedora:rawhide:meson shared libxml2:
   needs:
     - t_fedora:rawhide:meson shared libxml2
   extends:
@@ -436,6 +438,24 @@ t_fedora:rawhide:meson shared libxml2:upload:
     FDO_DISTRIBUTION_TAG: $FEDORA_TAG
 
 
+t_fedora:rawhide:subproject_build:
+  extends:
+    - .build at template
+    - .fdo.distribution-image at fedora
+    - .fc_artifacts
+  variables:
+    FC_DISTRO_NAME: fedora
+    FDO_DISTRIBUTION_VERSION: 'rawhide'
+    FDO_DISTRIBUTION_TAG: $FEDORA_TAG
+    FC_BUILDSYS: meson
+    FC_BUILD_TYPE: shared
+    FC_XML_BACKEND: libxml2
+    FC_BUILD_SUBPROJECT: 1
+  needs:
+    - 'fedora:rawhide at container-prep'
+
+
+
 t_fedora:rawhide:autotools static expat:
   extends:
     - .build at template
@@ -673,6 +693,9 @@ t_fedora:41:meson shared libxml2:
 
 
 
+
+
+
 
 
 
@@ -767,6 +790,9 @@ t_fedora:40:meson shared libxml2:
 
 
 
+
+
+
 
 
 
diff --git a/.gitlab-ci/build.sh b/.gitlab-ci/build.sh
index f58e1c7..dfadf24 100755
--- a/.gitlab-ci/build.sh
+++ b/.gitlab-ci/build.sh
@@ -18,6 +18,8 @@ enable_install=1
 disable_check=0
 clean_build=1
 cross=0
+subproject=0
+subprojectname=""
 buildsys="meson"
 type="shared"
 arch=""
@@ -27,6 +29,7 @@ export MAKE=${MAKE:-make}
 export BUILD_ID=${BUILD_ID:-fontconfig-$$}
 export PREFIX=${PREFIX:-$MyPWD/prefix}
 export BUILDDIR=${BUILDDIR:-$MyPWD/build}
+export CI_PROJECT_URL=${CI_PROJECT_URL:-https://gitlab.freedesktop.org/fontconfig/fontconfig}
 
 if [ "x$FC_DISTRO_NAME" = "x" ]; then
     . /etc/os-release || :
@@ -39,7 +42,7 @@ if [ "x$FC_DISTRO_NAME" = "x" ]; then
     sleep 3
 fi
 
-while getopts a:cCe:d:hINs:t:X: OPT
+while getopts a:cCe:d:hINs:St:X: OPT
 do
     case $OPT in
         'a') arch=$OPTARG ;;
@@ -50,6 +53,7 @@ do
         'I') enable_install=0 ;;
         'N') clean_build=0 ;;
         's') buildsys=$OPTARG ;;
+        'S') subproject=1 ;;
         't') type=$OPTARG ;;
         'X') backend=$OPTARG ;;
         'h')
@@ -65,7 +69,6 @@ case x"$FC_BUILD_PLATFORM" in
 esac
 
 env
-r=0
 
 clean_exit() {
     rc=$?
@@ -80,6 +83,10 @@ clean_exit() {
 trap clean_exit INT TERM ABRT EXIT
 
 if [ x"$buildsys" == "xautotools" ]; then
+    if [ $subproject -eq 1 ]; then
+        echo "Subproject build not supported in autotools"
+        exit 1
+    fi
     for i in "${enable[@]}"; do
         buildopt+=(--enable-$i)
     done
@@ -159,16 +166,38 @@ elif [ x"$buildsys" == "xmeson" ]; then
             fi
         fi
     done
+    if [ $subproject -eq 1 ]; then
+        buildopt+=(--force-fallback-for=fontconfig)
+        if [ -d fc-ci-meson-subproject ]; then
+            rm -rf fc-ci-meson-subproject
+        fi
+        TASK="git clone"
+        git clone https://gitlab.freedesktop.org/fontconfig/fc-ci-meson-subproject.git
+        cd fc-ci-meson-subproject
+        pushd subprojects
+        git clone ${CI_PROJECT_URL}.git
+        if [ "x$CI_COMMIT_REF_NAME" != "x" ]; then
+            pushd fontconfig
+            git fetch origin merge-requests/$CI_MERGE_REQUEST_IID/head:$CI_COMMIT_REF_NAME
+            git switch $CI_COMMIT_REF_NAME
+            popd
+        else
+            # use main branch instead
+            :
+        fi
+        popd
+        subprojectname="fontconfig:"
+    fi
     TASK=
     for i in "${disable[@]}"; do
-        buildopt+=(-D$i=disabled)
+        buildopt+=(-D${subprojectname}$i=disabled)
     done
     case x"$backend" in
         'xexpat')
-            buildopt+=(-Dxml-backend=expat)
+            buildopt+=(-D${subprojectname}xml-backend=expat)
             ;;
         'xlibxml2')
-            buildopt+=(-Dxml-backend=libxml2)
+            buildopt+=(-D${subprojectname}xml-backend=libxml2)
             ;;
     esac
     if [ $cross -eq 1 -a -n "$arch" ]; then
@@ -178,14 +207,18 @@ elif [ x"$buildsys" == "xmeson" ]; then
             echo "No $FC_DISTRO_NAME-cross.sh available"
             exit 1
         fi
-        . .gitlab-ci/$FC_DISTRO_NAME-cross.sh
+        if [ $subproject -eq 1 ]; then
+            . subprojects/fontconfig/.gitlab-ci/$FC_DISTRO_NAME-cross.sh
+        else
+            . .gitlab-ci/$FC_DISTRO_NAME-cross.sh
+        fi
     fi
     buildopt+=(--default-library=$type)
     if [ $clean_build -eq 1 ]; then
         rm -rf $BUILDDIR || :
     fi
     TASK="meson setup"
-    meson setup --prefix="$PREFIX" -Dnls=enabled -Dcache-build=disabled -Diconv=enabled ${buildopt[*]} "$BUILDDIR" 2>&1 | tee /tmp/fc-build.log
+    meson setup --prefix="$PREFIX" -D${subprojectname}nls=enabled -D${subprojectname}cache-build=disabled -D${subprojectname}iconv=enabled ${buildopt[*]} "$BUILDDIR" 2>&1 | tee /tmp/fc-build.log
     TASK="meson compile"
     meson compile -v -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log
     if [ $disable_check -eq 0 ]; then
@@ -202,4 +235,4 @@ elif [ x"$buildsys" == "xmeson" ]; then
     fi
 fi
 TASK=
-exit $r
+exit 0
diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template
index e993695..d357fdb 100644
--- a/.gitlab-ci/ci.template
+++ b/.gitlab-ci/ci.template
@@ -273,6 +273,7 @@ clang-format:
       [ $FC_BUILD_DISTCHECK -eq 1 ] && buildopt+=(-c)
       [ $FC_BUILD_NO_INSTALL -eq 1 ] && buildopt+=(-I)
       [ $FC_BUILD_NO_CHECK -eq 1 ] && buildopt+=(-C)
+      [ $FC_BUILD_SUBPROJECT -eq 1 ] && buildopt+=(-S)
       buildopt+=(-s $FC_BUILDSYS)
       buildopt+=(-t $FC_BUILD_TYPE)
       buildopt+=(-X $FC_XML_BACKEND)
@@ -284,6 +285,7 @@ clang-format:
     FC_BUILD_DISTCHECK: 0
     FC_BUILD_NO_INSTALL: 0
     FC_BUILD_NO_CHECK: 0
+    FC_BUILD_SUBPROJECT: 0
 
 .fc_artifacts:
   artifacts:
@@ -347,7 +349,7 @@ t_{{distro.name}}:{{version}}:{{build.name}}:
 {% endif %}
 
 {% if 'upload' in build and build.upload == version %}
-t_{{distro.name}}:{{version}}:{{build.name}}:upload:
+upload_asset:t_{{distro.name}}:{{version}}:{{build.name}}:
   needs:
     - t_{{distro.name}}:{{version}}:{{build.name}}
   extends:
diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml
index 75a7088..73902b5 100644
--- a/.gitlab-ci/config.yml
+++ b/.gitlab-ci/config.yml
@@ -1,4 +1,4 @@
-.default_tag: &default_tag "2025-03-26.1"
+.default_tag: &default_tag "2025-04-17.1"
 
 distributions:
   - name: fedora
@@ -33,6 +33,13 @@ distributions:
           FC_BUILD_TYPE: shared
           FC_XML_BACKEND: libxml2
           FC_BUILD_DISTCHECK: 1
+      - name: "subproject_build"
+        build_only: "rawhide"
+        variables:
+          FC_BUILDSYS: meson
+          FC_BUILD_TYPE: shared
+          FC_XML_BACKEND: libxml2
+          FC_BUILD_SUBPROJECT: 1
       - name: "autotools static expat"
         build_only: "rawhide"
         variables:


More information about the Fontconfig mailing list