blob: 8d94a83902f2126339f886e10fdf51fb15577315 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
# 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 SDK image seeks *-dev packages and if we do not provide one for
#php-cli then it will revert to trying to install php-dev, which in turn
#depends on package php that is empty due to pear being disabled. As a
#workaround we provide a dev package for php-cli that contains all that is
#in php-dev (since php-cli contains the php binary anyway)
PACKAGES += "${PN}-cli-dev"
FILES_${PN}-cli-dev = "${includedir}/php ${PHP_LIBDIR}/build ${bindir}/phpize \
${bindir}/php-config ${PHP_LIBDIR}/php/.depdb \
${PHP_LIBDIR}/php/.depdblock ${PHP_LIBDIR}/php/.filemap \
${PHP_LIBDIR}/php/.lock ${PHP_LIBDIR}/php/test"
FILES_${PN}-dev = ""
# 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
}
|