Skip to content

Add native Linux Meson build support - #988

Draft
NWilson with Copilot wants to merge 3 commits into
mainfrom
copilot/create-native-grade-wrapper
Draft

NWilson with Copilot wants to merge 3 commits into
mainfrom
copilot/create-native-grade-wrapper

Conversation

Copilot AI commented Sep 13, 2026

Copy link
Copy Markdown

PCRE2 lacks an upstream-native Meson build, leaving Meson consumers dependent on an external adapter that can drift from the CMake configuration. This introduces a Linux-first Meson port aligned with CMake’s option names, defaults, ordering, and feature set.

Changes

  • Configuration

    • Mirrors CMake build options and validation rules.
    • Parses project and ABI versions from configure.ac.
    • Adds platform, compiler, JIT, visibility, and linker probes.
    • Generates config.h, public headers, character tables, and symbol maps.
  • Targets

    • Builds independent static/shared 8-, 16-, and 32-bit libraries.
    • Adds the POSIX wrapper, pcre2grep, test executables, and fuzz targets.
    • Exposes canonical Meson dependencies such as libpcre2-8.
  • Packaging

    • Installs headers, libraries, tools, manpages, and HTML/text documentation.
    • Generates pkg-config files, pcre2-config, and CMake package metadata.
  • Documentation

    • Adds Meson setup and subproject integration guidance.
    • Records Linux-first limitations and design choices for review.
meson setup build-meson \
  -DBUILD_SHARED_LIBS=true \
  -DPCRE2_BUILD_PCRE2_16=true \
  -DPCRE2_SUPPORT_JIT=AUTO
meson compile -C build-meson
meson test -C build-meson

Copilot AI and others added 3 commits September 13, 2026 11:12
Co-authored-by: NWilson <363415+NWilson@users.noreply.github.com>
Co-authored-by: NWilson <363415+NWilson@users.noreply.github.com>
Co-authored-by: NWilson <363415+NWilson@users.noreply.github.com>
@NWilson

NWilson commented Sep 13, 2026

Copy link
Copy Markdown
Member

!!!! I am not planning on doing this immediately.

However - writing a build script is a sort of task that AI can (sometimes) be quite good at.

I asked GPT Sol to have a go. This is what it produced.

It won't be merged anytime soon, but potentially it's an option.

See #853

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants