From 332fde8f4c92d47c456fe6a4e799bfbc5e48dcf0 Mon Sep 17 00:00:00 2001 From: Barry Grussling Date: Tue, 30 Jul 2024 13:33:42 -0700 Subject: postgresql: Break perl RDEPENDS Currently, any non-native recipes that inherits cpan-base ends up with an image RDEPENDS on perl (via https://git.yoctoproject.org/poky/tree/meta/classes-recipe/cpan-base.bbclass?h=scarthgap#n14) If you are building an image and desire to have Postgresql installed but NOT perl, this creates a problem. This changeset attempts to fix this shortcoming by not inheriting cpan-base directly. Note this work is a continuation of attempts to change cpan-base: https://bugzilla.yoctoproject.org/show_bug.cgi?id=15563 The Postgresql build system uses perl, so add it as a DEPENDS. This happened previously via the "inherit cpan-base" directive. I've validated this recipe successfully packages with and without the perl PACKAGECONFIG in Scarthgap. Signed-off-by: Barry Grussling Signed-off-by: Khem Raj (cherry picked from commit f311f1f01c19924d8cced61fa915f1387f92455b) Signed-off-by: Armin Kuster --- meta-oe/recipes-dbs/postgresql/postgresql.inc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc index e29a5bef77..5e0c0edf5e 100644 --- a/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc @@ -19,7 +19,7 @@ DESCRIPTION = "\ " HOMEPAGE = "http://www.postgresql.com" LICENSE = "0BSD" -DEPENDS = "libnsl2 readline tzcode-native" +DEPENDS = "libnsl2 readline tzcode-native perl" ARM_INSTRUCTION_SET = "arm" @@ -37,7 +37,7 @@ LEAD_SONAME = "libpq.so" export LDFLAGS_SL = "${LDFLAGS}" export LDFLAGS_EX_BE = "-Wl,--export-dynamic" -inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base multilib_header +inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext perl-version multilib_header CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" @@ -122,6 +122,12 @@ python populate_packages:prepend() { } +# Same as the function in cpan-base.bbclass (but without the perl RDEPENDS) +def is_target(d): + if not bb.data.inherits_class('native', d): + return "yes" + return "no" + # This will make native perl use target settings (for include dirs etc.) export PERLCONFIGTARGET = "${@is_target(d)}" export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}" -- cgit v1.2.3-54-g00ecf