summaryrefslogtreecommitdiffstats
path: root/recipes-devtools
diff options
context:
space:
mode:
authorReinette Chatre <reinette.chatre@intel.com>2015-02-19 16:39:52 -0800
committerDarren Hart <dvhart@linux.intel.com>2015-02-20 14:02:02 -0800
commit59f150115e3dc7143b3abf071a0cef3723fc16af (patch)
tree65e0adec6045a30e3a896738fa4448e1db4ee4bb /recipes-devtools
parent77135a307d51c0620f8e04abbe74e0463e1b53a8 (diff)
downloadmeta-systemdev-59f150115e3dc7143b3abf071a0cef3723fc16af.tar.gz
meta-systemdev-59f150115e3dc7143b3abf071a0cef3723fc16af.tar.bz2
meta-systemdev-59f150115e3dc7143b3abf071a0cef3723fc16af.zip
php: fix build breakage
The build of php is currently failing. We find that the pear PHP package is currently installing a configuration file in an unexpected location. Digging into the pear installation scripts did not reveal a clear cause so we disable the inclusion of pear because we do not currently have dependencies on it. The php recipe assumed pear is installed so we expand the do_install task with additional prepend and append tasks that will set up environment for main recipe to succeed and clean up afterwards. The recipe also tries to remove some temporary files that cannot exist and we work around this by temporarily creating those files so that recipe can remove them and succeed. Signed-off-by: Reinette Chatre <reinette.chatre@intel.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Diffstat (limited to 'recipes-devtools')
-rw-r--r--recipes-devtools/php/php_5.5.21.bbappend53
1 files changed, 53 insertions, 0 deletions
diff --git a/recipes-devtools/php/php_5.5.21.bbappend b/recipes-devtools/php/php_5.5.21.bbappend
index 1c927bd..b556e19 100644
--- a/recipes-devtools/php/php_5.5.21.bbappend
+++ b/recipes-devtools/php/php_5.5.21.bbappend
@@ -1,2 +1,55 @@
# we do not need imap or pam support that is enabled by default
PACKAGECONFIG = "mysql sqlite3"
+
+#We find that the pear PHP package is currently installing a configuration
+#file in a wrong location. Digging into the pear installation scripts did
+#not reveal a clear cause so we disable the inclusion of pear because we do
+#not currently have dependencies on it.
+EXTRA_OECONF += " --without-pear"
+
+#the files needed by the php package are actually installed through the
+#pear configuration which is disabled above. Since we are only interested
+#in the php-cli package, remove its runtime dependency on the php package
+#for its installation to succeed
+RDEPENDS_${PN}-cli_remove = "${PN}"
+
+# the do_install_append and do_install_prepend tasks are cumulative so we
+# cannot overwrite the do_install_append_ph-php() task that is already in
+# the main recipe (meta-openembedded/meta-oe/recipes-devtools/php/php.inc).
+# Instead we add a do_install_prepend_pn-php() task that
+# will set up the environment for the existing do_install_pn-php() task to
+# succeed and then we follow that up with a do_install_append_pn-php() that
+# will clean up afterwards.
+
+do_install_prepend_pn-php() {
+ #in the EXTRA_OECONF above we disable pear support. The main recipe
+ #expects this file to exist since it wants to do some post processing
+ #on it, we make an empty file available so this command will succeed.
+ #This file will be removed in the do_install_append_pn-php() below.
+ install -d ${D}/${sysconfdir}/
+ touch ${D}/${sysconfdir}/pear.conf
+
+ #The main recipe (php.inc) has a code snippet in its
+ #do_install_append_pn-php() that removes some temporary files. This
+ #code snippet is:
+ #TMP=`dirname ${D}/${TMPDIR}`
+ #while test ${TMP} != ${D}; do
+ # rmdir ${TMP}
+ # TMP=`dirname ${TMP}`;
+ #done
+ #
+ # The problem with the above snippet is that TMPDIR has value of the
+ # main build temporary directory. For example ${HOME}/poky/build/tmp,
+ # if poky was installed in ${HOME}
+ # The code snippet is thus trying to remove some directories that
+ # cannot exist.
+ # Here we create those directories so that they can be removed in the
+ # main recipe and result in the do_install task passing.
+ install -d ${D}/${TMPDIR}
+}
+
+do_install_append_pn-php() {
+ #Remove the temporary file created that will make the main recipe
+ #install succeed.
+ rm -f ${D}/${sysconfdir}/pear.conf
+}