fontconfig: Branch 'main' - 2 commits

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

 



 .gitlab-ci/build.sh  |    2 +-
 .gitlab-ci/other.yml |   14 +++++++-------
 meson.build          |   32 ++++++++++++++++++--------------
 src/fcfreetype.c     |   14 ++++++++++++--
 4 files changed, 38 insertions(+), 24 deletions(-)

New commits:
commit 30bf86404b8c7c74198562d872155eeef1c61220
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Wed Apr 10 01:47:17 2024 +0900

    Fix incompatible pointer type on MinGW

diff --git a/src/fcfreetype.c b/src/fcfreetype.c
index c4c2637..a3ddf99 100644
--- a/src/fcfreetype.c
+++ b/src/fcfreetype.c
@@ -666,6 +666,16 @@ static const FcChar16 fcMacRomanNonASCIIToUnicode[128] = {
 
 #if USE_ICONV
 #include <iconv.h>
+
+#ifdef _WIN32
+#  ifdef WINICONV_CONST
+#    define FC_ICONV_CONST WINICONV_CONST
+#  endif
+#endif
+#ifndef FC_ICONV_CONST
+#  define FC_ICONV_CONST
+#endif
+
 #endif
 
 /*
@@ -858,8 +868,8 @@ retry:
 	while (in_bytes_left)
 	{
 	    size_t	did = iconv (cd,
-				 &inbuf, &in_bytes_left,
-				 &outbuf, &out_bytes_left);
+				     (FC_ICONV_CONST char **)&inbuf, &in_bytes_left,
+				     &outbuf, &out_bytes_left);
 	    if (did == (size_t) (-1))
 	    {
 		iconv_close (cd);
commit e22b8b5290034fdc8463296c76f5503549f548c6
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Tue Apr 9 12:29:31 2024 +0900

    meson: Add iconv checkup for all platforms
    
    Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/408

diff --git a/.gitlab-ci/build.sh b/.gitlab-ci/build.sh
index d3b2c1b..d568644 100755
--- a/.gitlab-ci/build.sh
+++ b/.gitlab-ci/build.sh
@@ -130,7 +130,7 @@ elif [ x"$buildsys" == "xmeson" ]; then
         . .gitlab-ci/$FC_DISTRO_NAME-cross.sh
     fi
     buildopt+=(--default-library=$type)
-    meson setup --prefix="$PREFIX" -Dnls=enabled -Dcache-build=disabled ${buildopt[*]} "$BUILDDIR" 2>&1 | tee /tmp/fc-build.log || r=$?
+    meson setup --prefix="$PREFIX" -Dnls=enabled -Dcache-build=disabled -Diconv=enabled ${buildopt[*]} "$BUILDDIR" 2>&1 | tee /tmp/fc-build.log || r=$?
     meson compile -v -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
     if [ $disable_check -eq 0 ]; then
         meson test -v -C "$BUILDDIR" 2>&1 | tee -a /tmp/fc-build.log || r=$?
diff --git a/.gitlab-ci/other.yml b/.gitlab-ci/other.yml
index 59cae9c..e72835c 100644
--- a/.gitlab-ci/other.yml
+++ b/.gitlab-ci/other.yml
@@ -31,9 +31,9 @@
       SET CERT_PATH=$(python -m certifi) &&
       SET SSL_CERT_FILE=$(python -m certifi) &&
       SET REQUESTS_CA_BUNDLE=$(python -m certifi) &&
-      meson build $env:MESON_ARGS &&
-      ninja -C build &&
-      ninja -C build test"
+      meson setup -Diconv=enabled $env:MESON_ARGS build &&
+      meson compile --verbose -C build &&
+      meson test -C build
   artifacts:
     name: fontconfig-$CI_COMMIT_SHA-$CI_JOB_ID
     when: always
@@ -74,9 +74,9 @@ meson macos:
     - unzip ninja-mac.zip
     - sudo cp ninja /usr/local/bin
   script:
-    - CERT_PATH=$(python3 -m certifi) && export SSL_CERT_FILE=${CERT_PATH} && export REQUESTS_CA_BUNDLE=${CERT_PATH} && meson build
-    - ninja -C build
-    - ninja -C build test
+    - CERT_PATH=$(python3 -m certifi) && export SSL_CERT_FILE=${CERT_PATH} && export REQUESTS_CA_BUNDLE=${CERT_PATH} && meson setup -Diconv=enabled build
+    - meson compile --verbose -C build
+    - meson test -C build
 
 # msys infrastructure is a bit broken, disable for now
 meson msys2:
@@ -138,5 +138,5 @@ meson android arm64 fedora:
       ar          = toolchain + '-ar'
       strip       = toolchain + '-strip'
       EOF
-    - meson setup --werror -Dxml-backend=expat --cross-file android-cross-file.txt build
+    - meson setup --werror -Dxml-backend=expat -Diconv=enabled --cross-file android-cross-file.txt build
     - meson compile --verbose -C build
diff --git a/meson.build b/meson.build
index 42feb13..8d7a6e1 100644
--- a/meson.build
+++ b/meson.build
@@ -173,6 +173,24 @@ else
   opt_nls = opt_nls.require(false)
 endif
 
+# Check iconv support
+iconv = get_option('iconv')
+iconv_dep = dependency('', required: false)
+found_iconv = 0
+if iconv.allowed()
+  iconv_dep = cc.find_library('iconv', required: false)
+  if cc.has_header_symbol('iconv.h', 'libiconv_open', dependencies: libintl_dep)
+    conf.set('LIBICONV_PLUG', 1)
+    found_iconv = 1
+  elif cc.has_header('iconv.h') and cc.has_function('iconv_open', dependencies: iconv_dep)
+    found_iconv = 1
+  else
+    iconv.require(false)
+  endif
+endif
+conf.set('USE_ICONV', found_iconv)
+deps += [iconv_dep]
+
 # We cannot try compiling against an internal dependency
 if freetype_dep.type_name() == 'internal'
   foreach func: check_freetype_funcs
@@ -267,20 +285,6 @@ if cc.links(files('meson-cc-tests/solaris-atomic-operations.c'), name: 'Solaris
 endif
 
 
-# Check iconv support
-iconv_dep = []
-found_iconv = 0
-if host_machine.system() != 'windows'
-  iconv_dep = dependency('iconv', required: get_option('iconv'))
-  found_iconv = iconv_dep.found().to_int()
-else
-  if get_option('iconv').enabled()
-    warning('-Diconv was set but this is not functional on Windows.')
-  endif
-endif
-conf.set('USE_ICONV', found_iconv)
-deps += [iconv_dep]
-
 prefix = get_option('prefix')
 
 fonts_conf = configuration_data()



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux