diff options
author | Roy Li <rongqing.li@windriver.com> | 2015-06-16 08:51:51 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-06-23 12:41:52 +0200 |
commit | 622c960ea6efb9b38b70e4d8c669a2f90b6b1b60 (patch) | |
tree | dfe3bbc7d3f4d3b3a96f5c729ce19f67b8d2bcd4 | |
parent | ac462c7e58737d7396ed92ad98faba6a3f20bd35 (diff) | |
download | meta-openembedded-622c960ea6efb9b38b70e4d8c669a2f90b6b1b60.tar.gz |
php: fix native php when it is from sstate
the native php is used to install the target pear, and native php
has hard-code path, so make wrapper to override the hard-code path
the configuration format of pear.conf for native php is like:
"type:path length:path", path will be replaced when populate sysroot
setscene, but the path length is not changed, and make php unable to
work, add a task to SSTATEPOSTINSTFUNCS to fix the path length
Signed-off-by: Roy Li <rongqing.li@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r-- | meta-oe/recipes-devtools/php/php_5.5.24.bb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/php/php_5.5.24.bb b/meta-oe/recipes-devtools/php/php_5.5.24.bb index 3e656af46c..4d23341a0d 100644 --- a/meta-oe/recipes-devtools/php/php_5.5.24.bb +++ b/meta-oe/recipes-devtools/php/php_5.5.24.bb | |||
@@ -245,3 +245,21 @@ MODPHP_OLDPACKAGE = "${@bb.utils.contains('PACKAGECONFIG', 'apache2', 'modphp', | |||
245 | RPROVIDES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" | 245 | RPROVIDES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" |
246 | RREPLACES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" | 246 | RREPLACES_${PN}-modphp = "${MODPHP_OLDPACKAGE}" |
247 | RCONFLICTS_${PN}-modphp = "${MODPHP_OLDPACKAGE}" | 247 | RCONFLICTS_${PN}-modphp = "${MODPHP_OLDPACKAGE}" |
248 | |||
249 | do_install_append_class-native() { | ||
250 | create_wrapper ${D}${bindir}/php \ | ||
251 | PHP_PEAR_SYSCONF_DIR=${sysconfdir}/ | ||
252 | } | ||
253 | |||
254 | SSTATEPOSTINSTFUNCS_append_class-native = " php_sstate_postinst " | ||
255 | |||
256 | php_sstate_postinst() { | ||
257 | if [ "${BB_CURRENTTASK}" = "populate_sysroot_setscene" ] | ||
258 | then | ||
259 | head -n1 ${sysconfdir}/pear.conf > ${sysconfdir}/pear.tmp.conf | ||
260 | for p in `tail -n1 ${sysconfdir}/pear.conf | sed -s 's/;/ /g'`; do | ||
261 | echo $p | awk -F: 'BEGIN {OFS = ":"; ORS = ";"}{if(NF==3){print $1, length($3)-2*match($3, /^"/), $3} else {print $0}}'; | ||
262 | done >> ${sysconfdir}/pear.tmp.conf | ||
263 | mv -f ${sysconfdir}/pear.tmp.conf ${sysconfdir}/pear.conf | ||
264 | fi | ||
265 | } | ||