From a7a435d7ec72e8ce7fa938f771133dfc94c201c8 Mon Sep 17 00:00:00 2001 From: diviocity Date: Sun, 29 Nov 2026 23:19:58 +0100 Subject: [PATCH] pcre2: build the regex libraries and exercise pcre2grep with Vinix musl --- pcre2/PKGBUILD.vile | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 pcre2/PKGBUILD.vile diff --git a/pcre2/PKGBUILD.vile b/pcre2/PKGBUILD.vile new file mode 100644 index 0000000..835fee5 --- /dev/null +++ b/pcre2/PKGBUILD.vile @@ -0,0 +1,33 @@ +defpkgbuild(pcre2, + #:pkgname, "pcre2", + #:pkgver, "10.49", + #:pkgrel, 1, + #:pkgdesc, "Perl-compatible regular expressions with 8, 16 and 32-bit code units", + #:arch, [#:x86-64], + #:license, "BSD-3-Clause", + #:url, "https://www.pcre.org/", + #:depends, ["musl", "zlib"], + #:source, ["https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.49/pcre2-10.49.tar.bz2"], + #:sha256sums, ["53c156e1ba416a20da8e65395daa132da0d80e76910424caca3fcdae7831d384"], + + #:build, fn() { + root := get-environment-variable("VPAC_MAKEPKG_ROOT") + run("env", "-u", "CPATH", "-u", "C_INCLUDE_PATH", "-u", "LIBRARY_PATH", + "CC=vinix-cc", + "PKG_CONFIG_PATH=", string-append("PKG_CONFIG_LIBDIR=", root, "/usr/lib/pkgconfig"), + string-append("PKG_CONFIG_SYSROOT_DIR=", root), + "pcre2-10.49/configure", "--build=x86_64-pc-linux-gnu", "--host=x86_64-linux-musl", + "--prefix=/usr", "--enable-pcre2-16", "--enable-pcre2-32", "--enable-jit", + "--enable-pcre2grep-libz", "--disable-symvers") + run("make") + }, + #:check, fn() { + root := get-environment-variable("VPAC_MAKEPKG_ROOT") + run(string-append(root, "/lib/ld-musl-x86_64.so.1"), "--library-path", + string-append(".libs:", root, "/usr/lib"), ".libs/pcre2grep", "-q", "^defpkgbuild", + string-append(startdir(), "/PKGBUILD.vile")) + }, + #:package, fn() { + run("make", "install", string-append("DESTDIR=", pkgdir())) + run("install", "-Dm644", "pcre2-10.49/LICENCE.md", string-append(pkgdir(), "/usr/share/licenses/pcre2/LICENCE.md")) + }) -- 2.56.1