diff --git a/meson.build b/meson.build index f1aa94b3a..aa7e36194 100644 --- a/meson.build +++ b/meson.build @@ -30,21 +30,17 @@ check_freetype_funcs = [ ['FT_Done_MM_Var'], ] -check_alignofs = [ - ['struct{char;}', {'conf-name': 'ALIGNOF_STRUCT_CHAR__'}] -] - -freetype_dep = dependency('freetype2', required: false) -glib_dep = dependency('glib-2.0', required: false) -gobject_dep = dependency('gobject-2.0', required: false) +freetype_dep = dependency('freetype2', required: false, fallback: ['freetype2', 'freetype_dep']) +glib_dep = dependency('glib-2.0', required: false, fallback: ['glib', 'libglib_dep']) +gobject_dep = dependency('gobject-2.0', required: false, fallback: ['glib', 'libgobject_dep']) cairo_dep = dependency('cairo', required: false) cairo_ft_dep = dependency('cairo-ft', required: false) -fontconfig_dep = dependency('fontconfig', required: false) +fontconfig_dep = dependency('fontconfig', required: false, fallback: ['fontconfig', 'fontconfig_dep']) graphite2_dep = dependency('graphite2', required: false) icu_dep = dependency('icu-uc', required: false) -m_dep = cpp.find_library('m') +m_dep = cpp.find_library('m', required: false) -deps = [m_dep] +deps = [] conf = configuration_data() incbase = include_directories('.') @@ -56,6 +52,10 @@ warn_cflags = [ cpp_args += cpp.get_supported_arguments(warn_cflags) +if m_dep.found() + deps += [m_dep] +endif + if glib_dep.found() conf.set('HAVE_GLIB', 1) deps += [glib_dep] @@ -165,15 +165,6 @@ foreach check : check_funcs endif endforeach -foreach check : check_alignofs - type = check[0] - opts = check.length() > 1 ? check[1] : {} - - conf_name = opts.get('conf-name', 'ALIGNOF_@0@'.format(type.to_upper())) - - conf.set(conf_name, cpp.alignment(type)) -endforeach - if cpp.links(files('meson-cc-tests/intel-atomic-primitives-test.c'), name: 'Intel atomics') conf.set('HAVE_INTEL_ATOMIC_PRIMITIVES', 1) endif diff --git a/subprojects/.gitignore b/subprojects/.gitignore new file mode 100644 index 000000000..13602578f --- /dev/null +++ b/subprojects/.gitignore @@ -0,0 +1,6 @@ +/expat-2.2.5 +/freetype2 +/glib +/fontconfig +/libffi +/packagecache diff --git a/subprojects/expat.wrap b/subprojects/expat.wrap new file mode 100644 index 000000000..0b7c53e54 --- /dev/null +++ b/subprojects/expat.wrap @@ -0,0 +1,10 @@ +[wrap-file] +directory = expat-2.2.5 + +source_url = https://github.com/libexpat/libexpat/releases/download/R_2_2_5/expat-2.2.5.tar.bz2 +source_filename = expat-2.2.5.tar.bz2 +source_hash = d9dc32efba7e74f788fcc4f212a43216fc37cf5f23f4c2339664d473353aedf6 + +patch_url = https://wrapdb.mesonbuild.com/v1/projects/expat/2.2.5/4/get_zip +patch_filename = expat-2.2.5-4-wrap.zip +patch_hash = 25748839be2bbdd2ff586d1a05aa6fc37aeada75c78416df6e8347a6321abaac diff --git a/subprojects/fontconfig.wrap b/subprojects/fontconfig.wrap new file mode 100644 index 000000000..083a49d6a --- /dev/null +++ b/subprojects/fontconfig.wrap @@ -0,0 +1,5 @@ +[wrap-git] +directory=fontconfig +url=https://github.com/centricular/fontconfig.git +push-url=git@github.com:centricular/fontconfig.git +revision=meson diff --git a/subprojects/freetype2.wrap b/subprojects/freetype2.wrap new file mode 100644 index 000000000..3151539c8 --- /dev/null +++ b/subprojects/freetype2.wrap @@ -0,0 +1,5 @@ +[wrap-git] +directory=freetype2 +url=https://github.com/centricular/freetype2.git +push-url=git@github.com:centricular/freetype2.git +revision=meson diff --git a/subprojects/glib.wrap b/subprojects/glib.wrap new file mode 100644 index 000000000..c86fea722 --- /dev/null +++ b/subprojects/glib.wrap @@ -0,0 +1,5 @@ +[wrap-git] +directory=glib +url=git://git.gnome.org/glib +push-url=ssh://git.gnome.org/git/glib +revision=master diff --git a/subprojects/libffi.wrap b/subprojects/libffi.wrap new file mode 100644 index 000000000..3d15e2a8a --- /dev/null +++ b/subprojects/libffi.wrap @@ -0,0 +1,4 @@ +[wrap-git] +directory=libffi +url=https://github.com/centricular/libffi.git +revision=meson