Re: [PATCH v5] meson: work around broken system PCRE2 dependency in macOS

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

 



On 7/16/25 3:30 PM, Carlo Marcelo Arenas Belón wrote:

> +if pcre2.found() and pcre2.type_name() != 'internal' and host_machine.system() == 'darwin'
> +  # macOS installs a broken system package, double check
> +  if not compiler.has_header('pcre2.h', dependencies: pcre2)
> +    if pcre2_feature.enabled()
> +      # Attempt to fallback, method can't be pkg-config 
> +      pcre2 = dependency('libpcre2-8', method: 'builtin', default_options: ['default_library=static', 'test=false'])
> +      if not pcre2.found()
> +        error('only a broken pcre2 install found and pcre2 is required')


If you want to override the message from a specific dependency() call,
"required" defaults to true and aborts on the line before
"if not pcre2.found()"


You could do:
https://mesonbuild.com/Reference-manual_functions.html#dependency_not_found_message


not_found_message: 'only a broken pcre2 install found and pcre2 is required'

Alternatively, required: false followed by if not pcre2.found() -->
error(). But you will need "allow_fallback: true" as I responded in a
previous message.


-- 
Eli Schwartz

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux