diff --git a/.gitignore b/.gitignore index 147974fd44..7143eefa90 100644 --- a/.gitignore +++ b/.gitignore @@ -36,7 +36,6 @@ subprojects/gvdb.wrap subprojects/libepoxy.wrap subprojects/libsass.wrap subprojects/libtiff.wrap -subprojects/pcre2.wrap subprojects/sassc.wrap subprojects/abseil-cpp.wrap @@ -67,4 +66,4 @@ subprojects/*/ .vscode/* # clangd integration -.cache/* \ No newline at end of file +.cache/* diff --git a/meson.build b/meson.build index 125439ef5d..ae93209646 100644 --- a/meson.build +++ b/meson.build @@ -118,6 +118,13 @@ if get_option('build-tools-source') == 'subproject' subproject('win-nasm') elif build_system == 'darwin' subproject('macos-bison-binary') + # Newer macOS provides /usr/lib/pkgconfig/libpcre2-8.pc which is broken + # because it says headers are in /usr/include but that directory doesn't + # exist. It can only be used to find the library, which only exists on + # newer macOS at /usr/lib/libpcre2-8.dylib, so it's also unusable. + # + # jit support requires macOS 11.0 or newer, so disable it by default + subproject('pcre2', default_options: ['default_library=static', 'jit=disabled']) endif endif diff --git a/subprojects/pcre2.wrap b/subprojects/pcre2.wrap new file mode 100644 index 0000000000..6bfef6f3f1 --- /dev/null +++ b/subprojects/pcre2.wrap @@ -0,0 +1,16 @@ +[wrap-file] +directory = pcre2-10.42 +source_url = https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.42/pcre2-10.42.tar.bz2 +source_filename = pcre2-10.42.tar.bz2 +source_hash = 8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840 +patch_filename = pcre2_10.42-5_patch.zip +patch_url = https://wrapdb.mesonbuild.com/v2/pcre2_10.42-5/get_patch +patch_hash = 7ba1730a3786c46f41735658a9884b09bc592af3840716e0ccc552e7ddf5630c +source_fallback_url = https://github.com/mesonbuild/wrapdb/releases/download/pcre2_10.42-5/pcre2-10.42.tar.bz2 +wrapdb_version = 10.42-5 + +[provide] +libpcre2-8 = libpcre2_8 +libpcre2-16 = libpcre2_16 +libpcre2-32 = libpcre2_32 +libpcre2-posix = libpcre2_posix