summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-dbs/postgresql/postgresql.inc
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-dbs/postgresql/postgresql.inc')
-rw-r--r--meta-oe/recipes-dbs/postgresql/postgresql.inc26
1 files changed, 20 insertions, 6 deletions
diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc
index 2dd7dd6fda..040b3d5e34 100644
--- a/meta-oe/recipes-dbs/postgresql/postgresql.inc
+++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc
@@ -19,7 +19,7 @@ DESCRIPTION = "\
19" 19"
20HOMEPAGE = "http://www.postgresql.com" 20HOMEPAGE = "http://www.postgresql.com"
21LICENSE = "0BSD" 21LICENSE = "0BSD"
22DEPENDS = "libnsl2 readline tzcode-native" 22DEPENDS = "libnsl2 tzcode-native perl bison-native"
23 23
24ARM_INSTRUCTION_SET = "arm" 24ARM_INSTRUCTION_SET = "arm"
25 25
@@ -37,9 +37,9 @@ LEAD_SONAME = "libpq.so"
37export LDFLAGS_SL = "${LDFLAGS}" 37export LDFLAGS_SL = "${LDFLAGS}"
38export LDFLAGS_EX_BE = "-Wl,--export-dynamic" 38export LDFLAGS_EX_BE = "-Wl,--export-dynamic"
39 39
40inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base multilib_header 40inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext perl-version multilib_header
41 41
42CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR} -I${STAGING_INCDIR}/tcl8.6" 42CFLAGS += "-I${STAGING_INCDIR}/${PYTHON_DIR}"
43 43
44SYSTEMD_SERVICE:${PN} = "postgresql.service" 44SYSTEMD_SERVICE:${PN} = "postgresql.service"
45SYSTEMD_AUTO_ENABLE:${PN} = "disable" 45SYSTEMD_AUTO_ENABLE:${PN} = "disable"
@@ -55,7 +55,7 @@ pkg_postinst:${PN} () {
55 55
56PACKAGECONFIG ??= " \ 56PACKAGECONFIG ??= " \
57 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \ 57 ${@bb.utils.filter('DISTRO_FEATURES', 'pam systemd', d)} \
58 openssl python uuid libxml tcl perl zlib icu \ 58 openssl python uuid libxml perl zlib icu readline \
59" 59"
60PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native," 60PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native,"
61PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" 61PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl"
@@ -71,8 +71,9 @@ PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
71PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" 71PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4"
72PACKAGECONFIG[openssl] = "--with-ssl=openssl,ac_cv_file__dev_urandom=yes,openssl" 72PACKAGECONFIG[openssl] = "--with-ssl=openssl,ac_cv_file__dev_urandom=yes,openssl"
73PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu,icu" 73PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu,icu"
74PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
74 75
75EXTRA_OECONF += "--enable-thread-safety --disable-rpath \ 76EXTRA_OECONF += "--disable-rpath \
76 --datadir=${datadir}/${BPN} \ 77 --datadir=${datadir}/${BPN} \
77 --sysconfdir=${sysconfdir}/${BPN} \ 78 --sysconfdir=${sysconfdir}/${BPN} \
78" 79"
@@ -122,10 +123,18 @@ python populate_packages:prepend() {
122 123
123} 124}
124 125
126# Same as the function in cpan-base.bbclass (but without the perl RDEPENDS)
127def is_target(d):
128 if not bb.data.inherits_class('native', d):
129 return "yes"
130 return "no"
131
125# This will make native perl use target settings (for include dirs etc.) 132# This will make native perl use target settings (for include dirs etc.)
126export PERLCONFIGTARGET = "${@is_target(d)}" 133export PERLCONFIGTARGET = "${@is_target(d)}"
127export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}" 134export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}"
128 135
136EXTRA_AUTORECONF += "-I config"
137
129do_configure() { 138do_configure() {
130 # do_configure 139 # do_configure
131 autotools_do_configure 140 autotools_do_configure
@@ -168,6 +177,11 @@ do_configure() {
168 177
169do_compile:append() { 178do_compile:append() {
170 oe_runmake -C contrib all 179 oe_runmake -C contrib all
180
181 for f in `find ${B} -name "*.[c|h]"`;
182 do
183 sed -i -e 's,${B}/../,,' $f
184 done
171} 185}
172 186
173# server needs to configure user and group 187# server needs to configure user and group
@@ -235,7 +249,7 @@ postgresql_fix_sources () {
235 for f in ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/Util.c \ 249 for f in ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/Util.c \
236 ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/SPI.c; do 250 ${PKGD}${TARGET_DBGSRC_DIR}/src/pl/plperl/SPI.c; do
237 if [ -e $f ]; then 251 if [ -e $f ]; then
238 sed -i -e 's#${B}/../${P}#${TARGET_DBGSRC_DIR}#g' $f 252 sed -i -e 's#${B}/../${BP}#${TARGET_DBGSRC_DIR}#g' $f
239 fi 253 fi
240 done 254 done
241} 255}