diff options
Diffstat (limited to 'recipes-devtools')
-rw-r--r-- | recipes-devtools/php/php_5.5.21.bbappend | 53 |
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 +} |