diff options
author | Barry Grussling <mr.scada@gmail.com> | 2024-07-30 13:33:42 -0700 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2024-08-03 12:12:16 -0400 |
commit | 332fde8f4c92d47c456fe6a4e799bfbc5e48dcf0 (patch) | |
tree | 0c6b37bd105fd7ec7969eff6affdb710f919de64 | |
parent | 889c54aa5796fea87365dc3a07f12d52196038c2 (diff) | |
download | meta-openembedded-332fde8f4c92d47c456fe6a4e799bfbc5e48dcf0.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>
(cherry picked from commit f311f1f01c19924d8cced61fa915f1387f92455b)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-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 e29a5bef77..5e0c0edf5e 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)}" |