conan-io / conan-center-index

Recipes for the ConanCenter repository
https://conan.io/center
MIT License
950 stars 1.73k forks source link

pcre2: Add support for PCRE2_LINK_SIZE #24408

Closed keef-cognitiv closed 3 months ago

keef-cognitiv commented 3 months ago

Summary

Changes to recipe: pcre2/10.XX

Motivation

Add support for passing a configurable PCRE2_LINK_SIZE.

This directly translates to LINK_SIZE here https://github.com/PCRE2Project/pcre2/blob/9a51f31da1c2d45e1f31d6a0d6b2f62975fed373/src/config.h.generic#L167.

In short, the default size of 2 creates a hard limit of 65535 bytes to be used by the compiled regular expression. This creates a hard upper limit for the size of regular expressions that can be compiled. Using a link size of 4 expands this to 4GB. For most use cases, 64KB is more than enough. But in some edge cases, it's not:

https://github.com/PCRE2Project/pcre2/issues/271

https://github.com/PCRE2Project/pcre2/issues/406

This adds support for the flag in the conan package to support the users in those edge cases.

Details

This just adds an option (link_size to the package that gets passed through as PCRE2_LINK_SIZE to cmake which passes LINK_SIZE to the compiler.

I am not well versed on the CI system that conan-center-index uses to know whether I'm missing a step to add this to all of the test builds of the package, and where to add it.


CLAassistant commented 3 months ago

CLA assistant check
All committers have signed the CLA.

conan-center-bot commented 3 months ago

Conan v1 pipeline :x:

Sorry, the build is only launched for Access Request users. You can request access writing in this issue.

Conan v2 pipeline :x:

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

The v2 pipeline failed. Please, review the errors and note this is required for pull requests to be merged. In case this recipe is still not ported to Conan 2.x, please, ping @conan-io/barbarians on the PR and we will help you.

Sorry, the build is only launched for Access Request users. You can request access writing in this issue.

conan-center-bot commented 3 months ago

Conan v1 pipeline :heavy_check_mark:

All green in build 2 (e80aa35f3a1100e2e8d6077c8a7b01e98f7f274f):


Conan v2 pipeline :heavy_check_mark:

Note: Conan v2 builds are now mandatory. Please read our discussion about it.

All green in build 2 (e80aa35f3a1100e2e8d6077c8a7b01e98f7f274f):