From 876538ec6dbc8ef12faa732f88d687e559e76ad5 Mon Sep 17 00:00:00 2001 From: Sean Nyekjaer Date: Thu, 5 Nov 2026 14:06:40 +0100 Subject: [PATCH] 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 Signed-off-by: Khem Raj --- 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 diff --git a/meta-oe/recipes-shells/zsh/zsh/pcre2-config b/meta-oe/recipes-shells/zsh/zsh/pcre2-config new file mode 100755 index 0000000000..13df7b39a7 --- /dev/null +++ b/meta-oe/recipes-shells/zsh/zsh/pcre2-config @@ -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 diff --git a/meta-oe/recipes-shells/zsh/zsh_5.9.2.bb b/meta-oe/recipes-shells/zsh/zsh_5.9.2.bb index 32c59fb6bc..7f6b0e7511 100644 --- a/meta-oe/recipes-shells/zsh/zsh_5.9.2.bb +++ b/meta-oe/recipes-shells/zsh/zsh_5.9.2.bb @@ -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] = ""