.gitlab-ci.yml | 15 +++---- .gitlab-ci/build.sh | 16 +++---- .gitlab-ci/ci.template | 1 .gitlab-ci/config.yml | 5 +- fc-cache/meson.build | 1 fc-cat/meson.build | 1 fc-conflist/meson.build | 1 fc-list/meson.build | 1 fc-match/meson.build | 1 fc-pattern/meson.build | 1 fc-query/meson.build | 2 fc-scan/meson.build | 2 fc-validate/meson.build | 2 meson-cc-tests/pthread-prio-inherit-test.c | 9 ++++ meson.build | 59 ++++++++++++++++++++++++----- subprojects/libintl/meson.build | 15 +++++++ 16 files changed, 104 insertions(+), 28 deletions(-) New commits: commit 53b76b8a6341fa2391b9378847f81f55f41ad11f Author: Akira TAGOH <akira@xxxxxxxxx> Date: Sat Apr 6 02:56:39 2024 +0900 meson: Fix build fail with NLS enabled on BSD diff --git a/fc-cache/meson.build b/fc-cache/meson.build index 313cfef..d1ee976 100644 --- a/fc-cache/meson.build +++ b/fc-cache/meson.build @@ -1,5 +1,6 @@ fccache = executable('fc-cache', ['fc-cache.c', fcstdint_h, alias_headers, ft_alias_headers], include_directories: [incbase, incsrc], + dependencies: [libintl_dep], link_with: [libfontconfig], c_args: c_args, install: true, diff --git a/fc-cat/meson.build b/fc-cat/meson.build index f26e4b8..7e87309 100644 --- a/fc-cat/meson.build +++ b/fc-cat/meson.build @@ -1,5 +1,6 @@ fccat = executable('fc-cat', ['fc-cat.c', fcstdint_h, alias_headers, ft_alias_headers], include_directories: [incbase, incsrc], + dependencies: [libintl_dep], link_with: [libfontconfig], c_args: c_args, install: true, diff --git a/fc-conflist/meson.build b/fc-conflist/meson.build index f543cf9..87ff4ac 100644 --- a/fc-conflist/meson.build +++ b/fc-conflist/meson.build @@ -1,5 +1,6 @@ fcconflist = executable('fc-conflist', ['fc-conflist.c', fcstdint_h, alias_headers, ft_alias_headers], include_directories: [incbase, incsrc], + dependencies: [libintl_dep], link_with: [libfontconfig], c_args: c_args, install: true, diff --git a/fc-list/meson.build b/fc-list/meson.build index 2f679d5..e760992 100644 --- a/fc-list/meson.build +++ b/fc-list/meson.build @@ -1,5 +1,6 @@ fclist = executable('fc-list', ['fc-list.c', fcstdint_h, alias_headers, ft_alias_headers], include_directories: [incbase, incsrc], + dependencies: [libintl_dep], link_with: [libfontconfig], c_args: c_args, install: true, diff --git a/fc-match/meson.build b/fc-match/meson.build index aca8bc8..41367c4 100644 --- a/fc-match/meson.build +++ b/fc-match/meson.build @@ -1,5 +1,6 @@ fcmatch = executable('fc-match', ['fc-match.c', fcstdint_h, alias_headers, ft_alias_headers], include_directories: [incbase, incsrc], + dependencies: [libintl_dep], link_with: [libfontconfig], c_args: c_args, install: true, diff --git a/fc-pattern/meson.build b/fc-pattern/meson.build index 07de245..a2dac16 100644 --- a/fc-pattern/meson.build +++ b/fc-pattern/meson.build @@ -1,5 +1,6 @@ fcpattern = executable('fc-pattern', ['fc-pattern.c', fcstdint_h, alias_headers, ft_alias_headers], include_directories: [incbase, incsrc], + dependencies: [libintl_dep], link_with: [libfontconfig], c_args: c_args, install: true, diff --git a/fc-query/meson.build b/fc-query/meson.build index d0f2dd4..2e6e538 100644 --- a/fc-query/meson.build +++ b/fc-query/meson.build @@ -1,7 +1,7 @@ fcquery = executable('fc-query', ['fc-query.c', fcstdint_h, alias_headers, ft_alias_headers], include_directories: [incbase, incsrc], + dependencies: [freetype_dep, libintl_dep], link_with: [libfontconfig], - dependencies: [freetype_dep], c_args: c_args, install: true, ) diff --git a/fc-scan/meson.build b/fc-scan/meson.build index 4de2134..1f6a9ac 100644 --- a/fc-scan/meson.build +++ b/fc-scan/meson.build @@ -1,7 +1,7 @@ fcscan = executable('fc-scan', ['fc-scan.c', fcstdint_h, alias_headers, ft_alias_headers], include_directories: [incbase, incsrc], + dependencies: [freetype_dep, libintl_dep], link_with: [libfontconfig], - dependencies: [freetype_dep], c_args: c_args, install: true, ) diff --git a/fc-validate/meson.build b/fc-validate/meson.build index e2b956e..bcb8d14 100644 --- a/fc-validate/meson.build +++ b/fc-validate/meson.build @@ -1,7 +1,7 @@ fcvalidate = executable('fc-validate', ['fc-validate.c', fcstdint_h, alias_headers, ft_alias_headers], include_directories: [incbase, incsrc], + dependencies: [freetype_dep, libintl_dep], link_with: [libfontconfig], - dependencies: [freetype_dep], c_args: c_args, install: true, ) commit 87b1750e2f03410d100088ee72942c74cf2dee85 Author: Akira TAGOH <akira@xxxxxxxxx> Date: Sat Apr 6 02:37:52 2024 +0900 ci: Disable cache update diff --git a/.gitlab-ci/build.sh b/.gitlab-ci/build.sh index 2345dc4..6929af7 100755 --- a/.gitlab-ci/build.sh +++ b/.gitlab-ci/build.sh @@ -93,7 +93,7 @@ if [ x"$buildsys" == "xautotools" ]; then rm -rf "$BUILDDIR" "$PREFIX" || : mkdir "$BUILDDIR" "$PREFIX" cd "$BUILDDIR" - ../autogen.sh --prefix="$PREFIX" ${buildopt[*]} 2>&1 | tee /tmp/fc-build.log || r=$? + ../autogen.sh --prefix="$PREFIX" --disable-cache-build ${buildopt[*]} 2>&1 | tee /tmp/fc-build.log || r=$? $MAKE V=1 2>&1 | tee -a /tmp/fc-build.log || r=$? if [ $disable_check -eq 0 ]; then $MAKE check V=1 2>&1 | tee -a /tmp/fc-build.log || r=$? @@ -128,7 +128,7 @@ elif [ x"$buildsys" == "xmeson" ]; then . .gitlab-ci/$FC_DISTRO_NAME-cross.sh fi buildopt+=(--default-library=$type) - meson setup --prefix="$PREFIX" -Dnls=enabled ${buildopt[*]} "$BUILDDIR" 2>&1 | tee /tmp/fc-build.log || r=$? + meson setup --prefix="$PREFIX" -Dnls=enabled -Dcache-build=disabled ${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=$? commit 66d85290e1b32bb337d19caf16a74c2fc2c7e8e5 Author: Akira TAGOH <akira@xxxxxxxxx> Date: Sat Apr 6 01:55:44 2024 +0900 ci: Add missing dependencies diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index dd3bb5e..f9bc320 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,8 +41,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: '2024-04-06.1-e0cfd2105c81' - FREEBSD_TAG: '2024-04-06.1-bfe06adea2ce' + FEDORA_TAG: '2024-04-06.2-5d3fdc50a3d1' + FREEBSD_TAG: '2024-04-06.2-cc62efaaea62' FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh' FREEBSD_EXEC: 'bash .gitlab-ci/freebsd-install.sh' @@ -96,7 +96,7 @@ fedora:rawhide@container-prep: variables: GIT_STRATEGY: none FDO_DISTRIBUTION_VERSION: 'rawhide' - FDO_DISTRIBUTION_PACKAGES: '@buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel libxml2-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap ninja-build wget python3-pip mingw64-gettext mingw64-freetype mingw64-libxml2 wine' + FDO_DISTRIBUTION_PACKAGES: '@buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel libxml2-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap ninja-build wget python3-pip mingw64-expat mingw64-gcc mingw64-gettext mingw64-freetype mingw64-libxml2 wine' FDO_DISTRIBUTION_TAG: $FEDORA_TAG FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC @@ -106,7 +106,7 @@ fedora:39@container-prep: variables: GIT_STRATEGY: none FDO_DISTRIBUTION_VERSION: '39' - FDO_DISTRIBUTION_PACKAGES: '@buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel libxml2-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap ninja-build wget python3-pip mingw64-gettext mingw64-freetype mingw64-libxml2 wine' + FDO_DISTRIBUTION_PACKAGES: '@buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel libxml2-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap ninja-build wget python3-pip mingw64-expat mingw64-gcc mingw64-gettext mingw64-freetype mingw64-libxml2 wine' FDO_DISTRIBUTION_TAG: $FEDORA_TAG FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC @@ -116,7 +116,7 @@ fedora:38@container-prep: variables: GIT_STRATEGY: none FDO_DISTRIBUTION_VERSION: '38' - FDO_DISTRIBUTION_PACKAGES: '@buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel libxml2-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap ninja-build wget python3-pip mingw64-gettext mingw64-freetype mingw64-libxml2 wine' + FDO_DISTRIBUTION_PACKAGES: '@buildsys-build autoconf automake libtool gettext gettext-devel gperf expat-devel libxml2-devel freetype-devel json-c-devel git docbook-utils docbook-utils-pdf bubblewrap ninja-build wget python3-pip mingw64-expat mingw64-gcc mingw64-gettext mingw64-freetype mingw64-libxml2 wine' FDO_DISTRIBUTION_TAG: $FEDORA_TAG FDO_DISTRIBUTION_EXEC: $FEDORA_EXEC diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index 3ae3e76..8f05bbb 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -1,4 +1,4 @@ -.default_tag: &default_tag "2024-04-06.1" +.default_tag: &default_tag "2024-04-06.2" distributions: - name: fedora @@ -112,6 +112,8 @@ packages: "ninja-build", "wget", "python3-pip", + "mingw64-expat", + "mingw64-gcc", "mingw64-gettext", "mingw64-freetype", "mingw64-libxml2", commit f3875098da4e3f6d4a0e06bb913e568571808d7e Author: Akira TAGOH <akira@xxxxxxxxx> Date: Sat Apr 6 01:39:52 2024 +0900 ci: Add config.log for artifacts diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 714dcd2..dd3bb5e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,8 +41,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: '2024-04-05.1-a4a62e2d0d2f' - FREEBSD_TAG: '2024-04-05.1-cb54b6adc6bf' + FEDORA_TAG: '2024-04-06.1-e0cfd2105c81' + FREEBSD_TAG: '2024-04-06.1-bfe06adea2ce' FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh' FREEBSD_EXEC: 'bash .gitlab-ci/freebsd-install.sh' @@ -329,6 +329,7 @@ freebsd:13.2@container-clean: - build*/doc/fontconfig-user.html - build*/doc/fontconfig-devel/* - build*/fc-build.log + - build*/config.log - build*/fontconfig-*.tar.* - build*/test/*log - build*/fontconfig*/_build diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template index 0b48553..905cd9c 100644 --- a/.gitlab-ci/ci.template +++ b/.gitlab-ci/ci.template @@ -270,6 +270,7 @@ check-ci-script: - build*/doc/fontconfig-user.html - build*/doc/fontconfig-devel/* - build*/fc-build.log + - build*/config.log - build*/fontconfig-*.tar.* - build*/test/*log - build*/fontconfig*/_build diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index 2e1d567..3ae3e76 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -1,4 +1,4 @@ -.default_tag: &default_tag "2024-04-05.1" +.default_tag: &default_tag "2024-04-06.1" distributions: - name: fedora commit 824f7439ab141a44ef8310d65c2ea89b17eaba2b Author: Akira TAGOH <akira@xxxxxxxxx> Date: Sat Apr 6 01:17:58 2024 +0900 ci: Fix a typo in build script diff --git a/.gitlab-ci/build.sh b/.gitlab-ci/build.sh index 1c48c57..2345dc4 100755 --- a/.gitlab-ci/build.sh +++ b/.gitlab-ci/build.sh @@ -82,9 +82,9 @@ if [ x"$buildsys" == "xautotools" ]; then buildopt+=(--enable-static) ;; esac - if [ $cross -eq 1 -a -z "$arch" ]; then + if [ $cross -eq 1 -a -n "$arch" ]; then buildopt+=(--host=$arch) - if [ -f .gitlab-ci/${FC_DISTRO_NAME}-cross.sh ]; then + if [ ! -f .gitlab-ci/${FC_DISTRO_NAME}-cross.sh ]; then echo "No ${FC_DISTRO_NAME}-cross.sh available" exit 1 fi @@ -118,14 +118,14 @@ elif [ x"$buildsys" == "xmeson" ]; then 'xlibxml2') ;; esac - if [ $cross -eq 1 -a -z "$arch" ]; then + if [ $cross -eq 1 -a -n "$arch" ]; then buildopt+=(--cross-file) buildopt+=(.gitlab-ci/$arch.txt) - if [ -f .gitlab-ci/cross-$FC_DISTRO_NAME.sh ]; then - echo "No cross-$FC_DISTRO_NAME.sh available" + if [ ! -f .gitlab-ci/$FC_DISTRO_NAME-cross.sh ]; then + echo "No $FC_DISTRO_NAME-cross.sh available" exit 1 fi - . .gitlab-ci/cross-$FC_DISTRO_NAME.sh + . .gitlab-ci/$FC_DISTRO_NAME-cross.sh fi buildopt+=(--default-library=$type) meson setup --prefix="$PREFIX" -Dnls=enabled ${buildopt[*]} "$BUILDDIR" 2>&1 | tee /tmp/fc-build.log || r=$? commit 2383158739659bc5542854499c4a2d76a1fdee25 Author: Akira TAGOH <akira@xxxxxxxxx> Date: Fri Apr 5 20:24:38 2024 +0900 meson: try to figure out libintl dependency diff --git a/.gitlab-ci/build.sh b/.gitlab-ci/build.sh index 39900a4..1c48c57 100755 --- a/.gitlab-ci/build.sh +++ b/.gitlab-ci/build.sh @@ -128,7 +128,7 @@ elif [ x"$buildsys" == "xmeson" ]; then . .gitlab-ci/cross-$FC_DISTRO_NAME.sh fi buildopt+=(--default-library=$type) - meson setup --prefix="$PREFIX" ${buildopt[*]} "$BUILDDIR" 2>&1 | tee /tmp/fc-build.log || r=$? + meson setup --prefix="$PREFIX" -Dnls=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/meson.build b/meson.build index 9733526..e04b13a 100644 --- a/meson.build +++ b/meson.build @@ -144,11 +144,20 @@ conf.set_quoted('PACKAGE_VERSION', meson.project_version()) conf.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), meson.project_version())) conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new') conf.set_quoted('PACKAGE_URL', '') -conf.set('ENABLE_NLS', get_option('nls').allowed().to_int()) i18n = import('i18n') gettext_args = [ '--msgid-bugs-address=@0@'.format(conf.get('PACKAGE_BUGREPORT')) ] +# Check for libintl.h +opt_nls = get_option('nls') +libintl_dep = dependency('intl', required: false, fallback: ['libintl', 'libintl_dep']) +if libintl_dep.found() + conf.set('ENABLE_NLS', opt_nls.allowed().to_int()) + deps += [libintl_dep] +else + opt_nls = opt_nls.require(false) +endif + # We cannot try compiling against an internal dependency if freetype_dep.type_name() == 'internal' foreach func: check_freetype_funcs @@ -456,7 +465,7 @@ subdir('conf.d') subdir('its') # xgettext is optional (on Windows for instance) -if find_program('xgettext', required : get_option('nls')).found() +if find_program('xgettext', required : opt_nls).found() subdir('po') subdir('po-conf') endif @@ -490,7 +499,7 @@ doc_targets = get_variable('doc_targets', []) summary({ 'Documentation': (doc_targets.length() > 0 ? doc_targets : false), - 'NLS': not get_option('nls').disabled(), + 'NLS': not opt_nls.disabled(), 'Tests': not get_option('tests').disabled(), 'Tools': not get_option('tools').disabled(), 'iconv': found_iconv == 1, diff --git a/subprojects/libintl/meson.build b/subprojects/libintl/meson.build new file mode 100644 index 0000000..3d92589 --- /dev/null +++ b/subprojects/libintl/meson.build @@ -0,0 +1,15 @@ +project('libintl', 'c') + +libintl_cc = meson.get_compiler('c') +libintl_inc = include_directories('/usr/local/include') + +if libintl_cc.has_header('libintl.h', include_directories: libintl_inc) + dep = libintl_cc.find_library('intl', dirs: ['/usr/local/lib'], required: false) + if dep.found() + libintl_dep = declare_dependency(dependencies: dep, include_directories: libintl_inc) + else + libintl_dep = dependency('', required: false) + endif +else + libintl_dep = dependency('', required: false) +endif commit 26588e74d22fa1591b4858dfa4651a918e19c65b Author: Akira TAGOH <akira@xxxxxxxxx> Date: Fri Apr 5 20:02:54 2024 +0900 Add a missing dependency for CI on FreeBSD diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 6d5918e..714dcd2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -41,8 +41,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: '2024-01-11.1-21391676125f' - FREEBSD_TAG: '2024-01-11.1-6ddd7d2cf9ad' + FEDORA_TAG: '2024-04-05.1-a4a62e2d0d2f' + FREEBSD_TAG: '2024-04-05.1-cb54b6adc6bf' FEDORA_EXEC: 'bash .gitlab-ci/fedora-install.sh' FREEBSD_EXEC: 'bash .gitlab-ci/freebsd-install.sh' @@ -128,7 +128,7 @@ freebsd:14.0@container-prep: variables: GIT_STRATEGY: none FDO_DISTRIBUTION_VERSION: '14.0' - FDO_DISTRIBUTION_PACKAGES: 'gcc autoconf automake libtool gettext gperf expat libxml2 freetype2 json-c git ninja wget python3 py39-pip pkgconf gmake' + FDO_DISTRIBUTION_PACKAGES: 'gcc autoconf automake libtool gettext gperf expat libxml2 freetype2 json-c git ninja wget python3 py39-pip pkgconf gmake gettext-runtime' FDO_DISTRIBUTION_TAG: $FREEBSD_TAG FDO_DISTRIBUTION_EXEC: $FREEBSD_EXEC @@ -140,7 +140,7 @@ freebsd:13.2@container-prep: variables: GIT_STRATEGY: none FDO_DISTRIBUTION_VERSION: '13.2' - FDO_DISTRIBUTION_PACKAGES: 'gcc autoconf automake libtool gettext gperf expat libxml2 freetype2 json-c git ninja wget python3 py39-pip pkgconf gmake' + FDO_DISTRIBUTION_PACKAGES: 'gcc autoconf automake libtool gettext gperf expat libxml2 freetype2 json-c git ninja wget python3 py39-pip pkgconf gmake gettext-runtime' FDO_DISTRIBUTION_TAG: $FREEBSD_TAG FDO_DISTRIBUTION_EXEC: $FREEBSD_EXEC diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml index 60d72e0..2e1d567 100644 --- a/.gitlab-ci/config.yml +++ b/.gitlab-ci/config.yml @@ -1,4 +1,4 @@ -.default_tag: &default_tag "2024-01-11.1" +.default_tag: &default_tag "2024-04-05.1" distributions: - name: fedora @@ -137,4 +137,5 @@ packages: "py39-pip", "pkgconf", "gmake", + "gettext-runtime", ] commit 788b5bbfb34981434cb2562e54a23d2d3e6bd16e Author: Akira TAGOH <akira@xxxxxxxxx> Date: Fri Apr 5 19:44:50 2024 +0900 meson: Add missing checkup Fixes https://gitlab.freedesktop.org/fontconfig/fontconfig/-/issues/407 diff --git a/meson-cc-tests/pthread-prio-inherit-test.c b/meson-cc-tests/pthread-prio-inherit-test.c new file mode 100644 index 0000000..770cb57 --- /dev/null +++ b/meson-cc-tests/pthread-prio-inherit-test.c @@ -0,0 +1,9 @@ +#include <pthread.h> + +int +main(void) +{ + int i = PTHREAD_PRIO_INHERIT; + + return 0; +} diff --git a/meson.build b/meson.build index d8955b4..9733526 100644 --- a/meson.build +++ b/meson.build @@ -42,23 +42,29 @@ if not expat_dep.found() endif endif -i18n = import('i18n') -gettext_args = [ '--msgid-bugs-address=https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new' ] - pkgmod = import('pkgconfig') python3 = import('python').find_installation() check_headers = [ ['dirent.h'], + ['dlfcn.h'], ['fcntl.h'], + ['inttypes.h'], + ['stdint.h'], + ['stdio.h'], ['stdlib.h'], + ['strings.h'], ['string.h'], ['unistd.h'], ['sys/statvfs.h'], ['sys/vfs.h'], ['sys/statfs.h'], + ['sys/stat.h'], + ['sys/types.h'], ['sys/param.h'], ['sys/mount.h'], + ['time.h'], + ['wchar.h'], ] check_funcs = [ @@ -80,8 +86,17 @@ check_funcs = [ ['fstatvfs'], ['fstatfs'], ['lstat'], + ['strerror'], + ['strerror_r'], ['mmap'], ['vprintf'], + ['vsnprintf'], + ['vsprintf'], + ['getpagesize'], + ['getpid'], + ['dcgettext'], + ['gettext'], + ['localtime_r'], ] check_freetype_funcs = [ @@ -98,9 +113,10 @@ check_header_symbols = [ check_struct_members = [ ['struct statvfs', 'f_basetype', ['sys/statvfs.h']], - ['struct statvfs', 'f_fstypename', ['sys/statvfs.']], - ['struct statfs', 'f_flags', []], - ['struct statfs', 'f_fstypename', []], + ['struct statvfs', 'f_fstypename', ['sys/statvfs.h']], + ['struct statfs', 'f_flags', ['sys/vfs.h', 'sys/statfs.h', 'sys/param.h', 'sys/mount.h']], + ['struct statfs', 'f_fstypename', ['sys/vfs.h', 'sys/statfs.h', 'sys/param.h', 'sys/mount.h']], + ['struct stat', 'st_mtim', ['sys/stat.h']], ['struct dirent', 'd_type', ['sys/types.h', 'dirent.h']], ] @@ -121,6 +137,18 @@ conf = configuration_data() deps = [freetype_dep, expat_dep] incbase = include_directories('.') +# For compatibility to autoconf (regardless of the usage in fontconfig) +conf.set_quoted('PACKAGE_NAME', meson.project_name()) +conf.set_quoted('PACKAGE_TARNAME', meson.project_name()) +conf.set_quoted('PACKAGE_VERSION', meson.project_version()) +conf.set_quoted('PACKAGE_STRING', '@0@ @1@'.format(meson.project_name(), meson.project_version())) +conf.set_quoted('PACKAGE_BUGREPORT', 'https://gitlab.freedesktop.org/fontconfig/fontconfig/issues/new') +conf.set_quoted('PACKAGE_URL', '') +conf.set('ENABLE_NLS', get_option('nls').allowed().to_int()) + +i18n = import('i18n') +gettext_args = [ '--msgid-bugs-address=@0@'.format(conf.get('PACKAGE_BUGREPORT')) ] + # We cannot try compiling against an internal dependency if freetype_dep.type_name() == 'internal' foreach func: check_freetype_funcs @@ -193,11 +221,15 @@ foreach check : check_alignofs endforeach if cc.compiles(files('meson-cc-tests/flexible-array-member-test.c')) - conf.set('FLEXIBLE_ARRAY_MEMBER', true) + conf.set('FLEXIBLE_ARRAY_MEMBER', '/**/') else conf.set('FLEXIBLE_ARRAY_MEMBER', 1) endif +if cc.compiles(files('meson-cc-tests/pthread-prio-inherit-test.c')) + conf.set('HAVE_PTHREAD_PRIO_INHERIT', 1) +endif + if cc.links(files('meson-cc-tests/stdatomic-primitives-test.c'), name: 'stdatomic.h atomics') conf.set('HAVE_STDATOMIC_PRIMITIVES', 1) endif