new file mode 100755
@@ -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
@@ -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] = ""
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> --- meta-oe/recipes-shells/zsh/zsh/pcre2-config | 16 ++++++++++++++++ meta-oe/recipes-shells/zsh/zsh_5.9.2.bb | 5 ++++- 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100755 meta-oe/recipes-shells/zsh/zsh/pcre2-config