diff options
Diffstat (limited to 'meta-oe/recipes-dbs/postgresql/postgresql.inc')
-rw-r--r-- | meta-oe/recipes-dbs/postgresql/postgresql.inc | 26 |
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 | " |
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 tzcode-native perl bison-native" |
23 | 23 | ||
24 | ARM_INSTRUCTION_SET = "arm" | 24 | ARM_INSTRUCTION_SET = "arm" |
25 | 25 | ||
@@ -37,9 +37,9 @@ 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}" |
43 | 43 | ||
44 | SYSTEMD_SERVICE:${PN} = "postgresql.service" | 44 | SYSTEMD_SERVICE:${PN} = "postgresql.service" |
45 | SYSTEMD_AUTO_ENABLE:${PN} = "disable" | 45 | SYSTEMD_AUTO_ENABLE:${PN} = "disable" |
@@ -55,7 +55,7 @@ pkg_postinst:${PN} () { | |||
55 | 55 | ||
56 | PACKAGECONFIG ??= " \ | 56 | PACKAGECONFIG ??= " \ |
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 | " |
60 | PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native," | 60 | PACKAGECONFIG[tcl] = "--with-tcl --with-tclconfig=${STAGING_BINDIR_CROSS},--without-tcl,tcl tcl-native," |
61 | PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" | 61 | PACKAGECONFIG[perl] = "--with-perl,--without-perl,perl,perl" |
@@ -71,8 +71,9 @@ PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib" | |||
71 | PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" | 71 | PACKAGECONFIG[lz4] = "--with-lz4,--without-lz4,lz4" |
72 | PACKAGECONFIG[openssl] = "--with-ssl=openssl,ac_cv_file__dev_urandom=yes,openssl" | 72 | PACKAGECONFIG[openssl] = "--with-ssl=openssl,ac_cv_file__dev_urandom=yes,openssl" |
73 | PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu,icu" | 73 | PACKAGECONFIG[icu] = "--with-icu,--without-icu,icu,icu" |
74 | PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline" | ||
74 | 75 | ||
75 | EXTRA_OECONF += "--enable-thread-safety --disable-rpath \ | 76 | EXTRA_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) | ||
127 | def 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.) |
126 | export PERLCONFIGTARGET = "${@is_target(d)}" | 133 | export PERLCONFIGTARGET = "${@is_target(d)}" |
127 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}" | 134 | export PERL_ARCHLIB = "${STAGING_LIBDIR}${PERL_OWN_DIR}/perl5/${@get_perl_version(d)}/${@get_perl_arch(d)}" |
128 | 135 | ||
136 | EXTRA_AUTORECONF += "-I config" | ||
137 | |||
129 | do_configure() { | 138 | do_configure() { |
130 | # do_configure | 139 | # do_configure |
131 | autotools_do_configure | 140 | autotools_do_configure |
@@ -168,6 +177,11 @@ do_configure() { | |||
168 | 177 | ||
169 | do_compile:append() { | 178 | do_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 | } |