zsh: add pcre PACKAGECONFIG

The zsh/pcre module is link=dynamic only, so add a PACKAGECONFIG for it
that conflicts with static.

libpcre2 inherits binconfig-disabled, so pass a small pcre2-config
wrapper using pkg-config via PCRE_CONFIG.

AI-Generated: Uses Claude Code
Signed-off-by: Sean Nyekjaer <sean@geanix.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Sean Nyekjaer authored and Khem Raj committed 2026-11-06 00:15:43 -08:00
1 parent 22c06dfc4f
commit 876538ec6d
2 files changed
+20 -1

No files matched your search

+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
# libpcre2 inherits binconfig-disabled, so answer the queries zsh's
# configure makes of pcre2-config using pkg-config instead.
case "$1" in
--cflags)
exec pkg-config --cflags libpcre2-8
;;
--libs8)
exec pkg-config --libs libpcre2-8
;;
--version)
exec pkg-config --modversion libpcre2-8
;;
esac
echo "pcre2-config: unsupported option $1" >&2
exit 1
+4 -1
View File
@@ -10,7 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENCE;md5=1a4c4cda3e8096d2fd483ff2f4514fec"
DEPENDS = "ncurses bison-native libcap groff-native"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BP}.tar.xz"
SRC_URI = "${SOURCEFORGE_MIRROR}/project/${BPN}/${BPN}/${PV}/${BP}.tar.xz \
file://pcre2-config \
"
SRC_URI[sha256sum] = "36fa734374b44783582cec09bcd67822e2f992c779ec1624ab5596df078d2f81"
# The SourceForge download mirror has no browsable listing; check the per-release
@@ -46,6 +48,7 @@ ALTERNATIVE_PRIORITY = "90"
PACKAGECONFIG ??= "static"
PACKAGECONFIG[static] = "--disable-dynamic,--enable-dynamic zsh_cv_sys_dynamic_rtld_global=yes zsh_cv_sys_dynamic_execsyms=yes"
PACKAGECONFIG[gdbm] = "--enable-gdbm,--disable-gdbm,gdbm,,,static"
PACKAGECONFIG[pcre] = "--enable-pcre PCRE_CONFIG=${UNPACKDIR}/pcre2-config,--disable-pcre,libpcre2 pkgconfig-native,,,static"
# Needed for manpages.bbclass, but they're always installed
PACKAGECONFIG[manpages] = ""