diff options
author | Barry Grussling <mr.scada@gmail.com> | 2024-07-30 13:33:42 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2024-07-31 08:29:23 -0700 |
commit | f311f1f01c19924d8cced61fa915f1387f92455b (patch) | |
tree | b8f27994160745fbb3ffde08f20175eda5482df5 /meta-oe | |
parent | 8106cfe769aa3f0ebdff7a1caed018f9ab49a090 (diff) | |
download | meta-openembedded-f311f1f01c19924d8cced61fa915f1387f92455b.tar.gz |
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 <mr.scada@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
-rw-r--r-- | meta-oe/recipes-dbs/postgresql/postgresql.inc | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc index 2dd7dd6fd..d2d3225be 100644 --- a/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc | |||
@@ -19,7 +19,7 @@ DESCRIPTION = "\ | |||
19 | " | 19 | " |
20 | HOMEPAGE = "http://www.postgresql.com" | 20 | HOMEPAGE = "http://www.postgresql.com" |
21 | LICENSE = "0BSD" | 21 | LICENSE = "0BSD" |
22 | DEPENDS = "libnsl2 readline tzcode-native" | 22 | DEPENDS = "libnsl2 readline tzcode-native perl" |
23 | 23 | ||
24 | ARM_INSTRUCTION_SET = "arm" | 24 | ARM_INSTRUCTION_SET = "arm" |
25 | 25 | ||
@@ -37,7 +37,7 @@ LEAD_SONAME = "libpq.so" | |||
37 | export LDFLAGS_SL = "${LDFLAGS}" | 37 | export LDFLAGS_SL = "${LDFLAGS}" |
38 | export LDFLAGS_EX_BE = "-Wl,--export-dynamic" | 38 | export LDFLAGS_EX_BE = "-Wl,--export-dynamic" |
39 | 39 | ||
40 | inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base multilib_header | 40 | inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext perl-version multilib_header |
41 | 41 | ||
42 | CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" | 42 | CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" |
43 | 43 | ||
@@ -122,6 +122,12 @@ python populate_packages:prepend() { | |||
122 | 122 | ||
123 | } | 123 | } |
124 | 124 | ||
125 | # Same as the function in cpan-base.bbclass (but without the perl RDEPENDS) | ||
126 | def is_target(d): | ||
127 | if not bb.data.inherits_class('native', d): | ||
128 | return "yes" | ||
129 | return "no" | ||
130 | |||
125 | # This will make native perl use target settings (for include dirs etc.) | 131 | # This will make native perl use target settings (for include dirs etc.) |
126 | export PERLCONFIGTARGET = "${@is_target(d)}" | 132 | export PERLCONFIGTARGET = "${@is_target(d)}" |
127 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}" | 133 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}" |