diff options
author | Koen Kooi <koen.kooi@linaro.org> | 2014-10-06 11:54:59 +0200 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2014-10-10 12:47:34 +0200 |
commit | 26043cbe2d9add3ab1f6464e647d04f0e077aede (patch) | |
tree | 4bd0ad0b815867f78a0d2f785e70dd15bcbfa2df /meta-oe/recipes-devtools/php/php_5.4.14.bb | |
parent | 3f0c898617248f18facd949b8ffdb39e5abbd21f (diff) | |
download | meta-openembedded-26043cbe2d9add3ab1f6464e647d04f0e077aede.tar.gz |
php 5.4.14: merge .inc and .bb
There's only one version of the recipe in the repo and the split makes it harder to debug and fix problems.
Also fix target overrides and style issues.
Signed-off-by: Koen Kooi <koen.kooi@linaro.org>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/php/php_5.4.14.bb')
-rw-r--r-- | meta-oe/recipes-devtools/php/php_5.4.14.bb | 146 |
1 files changed, 138 insertions, 8 deletions
diff --git a/meta-oe/recipes-devtools/php/php_5.4.14.bb b/meta-oe/recipes-devtools/php/php_5.4.14.bb index 3c9d3c0e8..98a8cdc6a 100644 --- a/meta-oe/recipes-devtools/php/php_5.4.14.bb +++ b/meta-oe/recipes-devtools/php/php_5.4.14.bb | |||
@@ -1,15 +1,29 @@ | |||
1 | require php.inc | 1 | DESCRIPTION = "A server-side, HTML-embedded scripting language. This package provides the CGI." |
2 | HOMEPAGE = "http://www.php.net" | ||
3 | SECTION = "console/network" | ||
2 | 4 | ||
5 | LICENSE = "PHP-3.0" | ||
3 | LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97" | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=cb564efdf78cce8ea6e4b5a4f7c05d97" |
4 | 7 | ||
5 | PR = "${INC_PR}.0" | 8 | BBCLASSEXTEND = "native" |
9 | DEPENDS = "zlib libxml2 virtual/libiconv php-native lemon-native \ | ||
10 | libc-client openssl" | ||
11 | DEPENDS_virtclass-native = "zlib-native libxml2-native" | ||
6 | 12 | ||
7 | SRC_URI += "file://acinclude-xml2-config.patch \ | 13 | PR = "r6" |
8 | file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ | ||
9 | file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ | ||
10 | " | ||
11 | 14 | ||
12 | SRC_URI_append_pn-php += "file://iconv.patch \ | 15 | # The new PHP downloads server groups PHP releases by major version so find |
16 | # the major version of the PHP recipe. | ||
17 | PHP_MAJVER = "${@d.getVar('PV',1).split('.')[0]}" | ||
18 | |||
19 | SRC_URI = "http://museum.php.net/php${PHP_MAJVER}/php-${PV}.tar.bz2 \ | ||
20 | file://acinclude-xml2-config.patch \ | ||
21 | file://0001-php-don-t-use-broken-wrapper-for-mkdir.patch \ | ||
22 | file://0001-acinclude-use-pkgconfig-for-libxml2-config.patch \ | ||
23 | " | ||
24 | |||
25 | SRC_URI_append_class-target += " \ | ||
26 | file://iconv.patch \ | ||
13 | file://imap-fix-autofoo.patch \ | 27 | file://imap-fix-autofoo.patch \ |
14 | file://pear-makefile.patch \ | 28 | file://pear-makefile.patch \ |
15 | file://phar-makefile.patch \ | 29 | file://phar-makefile.patch \ |
@@ -17,7 +31,123 @@ SRC_URI_append_pn-php += "file://iconv.patch \ | |||
17 | file://fix-fpm-cross-compile.patch \ | 31 | file://fix-fpm-cross-compile.patch \ |
18 | file://php-fpm.conf \ | 32 | file://php-fpm.conf \ |
19 | file://php-fpm-apache.conf \ | 33 | file://php-fpm-apache.conf \ |
20 | " | 34 | " |
21 | 35 | ||
22 | SRC_URI[md5sum] = "cfdc044be2c582991a1fe0967898fa38" | 36 | SRC_URI[md5sum] = "cfdc044be2c582991a1fe0967898fa38" |
23 | SRC_URI[sha256sum] = "5450f3843bc651eb3fb00601f0cce1930aaaf65c7c966c02fe4a46f9c81be20a" | 37 | SRC_URI[sha256sum] = "5450f3843bc651eb3fb00601f0cce1930aaaf65c7c966c02fe4a46f9c81be20a" |
38 | |||
39 | S = "${WORKDIR}/php-${PV}" | ||
40 | |||
41 | inherit autotools pkgconfig pythonnative gettext | ||
42 | |||
43 | SSTATE_SCAN_FILES += "build-defs.h" | ||
44 | |||
45 | # Common EXTRA_OECONF | ||
46 | COMMON_EXTRA_OECONF = "--enable-sockets --enable-pcntl --enable-shared" | ||
47 | EXTRA_OECONF = "--enable-mbstring \ | ||
48 | --enable-wddx \ | ||
49 | --enable-fpm \ | ||
50 | --with-imap=${STAGING_DIR_HOST} \ | ||
51 | --with-gettext=${STAGING_LIBDIR}/.. \ | ||
52 | --with-imap-ssl=${STAGING_DIR_HOST} \ | ||
53 | --with-zlib=${STAGING_LIBDIR}/.. \ | ||
54 | --with-iconv=${STAGING_LIBDIR}/.. \ | ||
55 | ${COMMON_EXTRA_OECONF} \ | ||
56 | " | ||
57 | EXTRA_OECONF_virtclass-native = " \ | ||
58 | --with-zlib=${STAGING_LIBDIR_NATIVE}/.. \ | ||
59 | --without-iconv \ | ||
60 | ${COMMON_EXTRA_OECONF} \ | ||
61 | " | ||
62 | |||
63 | PACKAGECONFIG ??= "mysql sqlite3" | ||
64 | PACKAGECONFIG_class-native = "" | ||
65 | |||
66 | PACKAGECONFIG[mysql] = "--with-mysql=${STAGING_DIR_TARGET}${prefix} \ | ||
67 | --with-mysqli=${STAGING_BINDIR_CROSS}/mysql_config \ | ||
68 | --with-pdo-mysql=${STAGING_BINDIR_CROSS}/mysql_config \ | ||
69 | , \ | ||
70 | ,mysql5" | ||
71 | |||
72 | PACKAGECONFIG[sqlite3] = "--with-sqlite3=${STAGING_LIBDIR}/.. \ | ||
73 | --with-pdo-sqlite=${STAGING_LIBDIR}/.. \ | ||
74 | , \ | ||
75 | ,sqlite3" | ||
76 | |||
77 | export PHP_NATIVE_DIR = "${STAGING_BINDIR_NATIVE}" | ||
78 | export PHP_PEAR_PHP_BIN = "${STAGING_BINDIR_NATIVE}/php" | ||
79 | CFLAGS += " -D_GNU_SOURCE" | ||
80 | |||
81 | EXTRA_OEMAKE = "INSTALL_ROOT=${D}" | ||
82 | |||
83 | acpaths = "" | ||
84 | |||
85 | do_install_append_class-native() { | ||
86 | rm -rf ${D}/${libdir}/php/.registry | ||
87 | rm -rf ${D}/${libdir}/php/.channels | ||
88 | rm -rf ${D}/${libdir}/php/.[a-z]* | ||
89 | } | ||
90 | |||
91 | # fixme | ||
92 | do_install_append_class-target() { | ||
93 | install -d ${D}/${sysconfdir}/ | ||
94 | if [ -d ${D}/${STAGING_DIR_NATIVE}/${sysconfdir} ];then | ||
95 | mv ${D}/${STAGING_DIR_NATIVE}/${sysconfdir}/* ${D}/${sysconfdir}/ | ||
96 | fi | ||
97 | rm -rf ${D}/${TMPDIR} | ||
98 | rm -rf ${D}/.registry | ||
99 | rm -rf ${D}/.channels | ||
100 | rm -rf ${D}/.[a-z]* | ||
101 | rm -rf ${D}/var | ||
102 | rm -f ${D}/${sysconfdir}/php-fpm.conf.default | ||
103 | sed -i 's:${STAGING_DIR_NATIVE}::g' ${D}/${sysconfdir}/pear.conf | ||
104 | install -m 0644 ${WORKDIR}/php-fpm.conf ${D}/${sysconfdir}/php-fpm.conf | ||
105 | install -d ${D}/${sysconfdir}/apache2/conf.d | ||
106 | install -m 0644 ${WORKDIR}/php-fpm-apache.conf ${D}/${sysconfdir}/apache2/conf.d/php-fpm.conf | ||
107 | install -d ${D}${sysconfdir}/init.d | ||
108 | sed -i 's:=/usr/sbin:=${sbindir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
109 | sed -i 's:=/etc:=${sysconfdir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
110 | sed -i 's:=/var:=${localstatedir}:g' ${B}/sapi/fpm/init.d.php-fpm | ||
111 | install -m 0755 ${B}/sapi/fpm/init.d.php-fpm ${D}${sysconfdir}/init.d/php-fpm | ||
112 | TMP=`dirname ${D}/${TMPDIR}` | ||
113 | while test ${TMP} != ${D}; do | ||
114 | rmdir ${TMP} | ||
115 | TMP=`dirname ${TMP}`; | ||
116 | done | ||
117 | } | ||
118 | |||
119 | PACKAGES = "${PN}-dbg ${PN}-cli ${PN}-cgi ${PN}-fpm ${PN}-fpm-apache2 ${PN}-pear ${PN}-dev ${PN}-staticdev ${PN}-doc ${PN}" | ||
120 | |||
121 | RDEPENDS_${PN}-pear = "${PN}" | ||
122 | RDEPENDS_${PN}-cli = "${PN}" | ||
123 | RDEPENDS_${PN}-dev = "${PN}" | ||
124 | |||
125 | INITSCRIPT_PACKAGES = "${PN}-fpm" | ||
126 | inherit update-rc.d | ||
127 | |||
128 | FILES_${PN}-dbg =+ "${bindir}/.debug" | ||
129 | FILES_${PN}-doc += "${libdir}/php/doc" | ||
130 | FILES_${PN}-cli = "${bindir}/php" | ||
131 | FILES_${PN}-cgi = "${bindir}/php-cgi" | ||
132 | FILES_${PN}-fpm = "${sbindir}/php-fpm ${sysconfdir}/php-fpm.conf ${datadir}/fpm ${sysconfdir}/init.d/php-fpm" | ||
133 | FILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | ||
134 | CONFFILES_${PN}-fpm = "${sysconfdir}/php-fpm.conf" | ||
135 | CONFFILES_${PN}-fpm-apache2 = "${sysconfdir}/apache2/conf.d/php-fpm.conf" | ||
136 | INITSCRIPT_NAME_${PN}-fpm = "php-fpm" | ||
137 | INITSCRIPT_PARAMS_${PN}-fpm = "defaults 60" | ||
138 | FILES_${PN}-pear = "${bindir}/pear* ${bindir}/pecl ${libdir}/php/PEAR \ | ||
139 | ${libdir}/php/PEAR.php ${libdir}/php/System.php \ | ||
140 | ${libdir}php/peclcmd.php ${libdir}/php/pearcmd.php \ | ||
141 | ${libdir}/php/.channels ${libdir}/php/.channels/.alias \ | ||
142 | ${libdir}/php/.channels\__uri.reg \ | ||
143 | ${libdir}/php/.channels\pear.php.net.reg \ | ||
144 | ${libdir}/php/.channels/pecl.php.net.reg \ | ||
145 | ${libdir}/php/.registry ${libdir}/php/Archive/Tar.php \ | ||
146 | ${libdir}/php/Console/Getopt.php ${libdir}/php/OS/Guess.php \ | ||
147 | ${sysconfdir}/pear.conf" | ||
148 | FILES_${PN}-dev = "${includedir}/php ${libdir}/build ${bindir}/phpize \ | ||
149 | ${bindir}/php-config ${libdir}/php/.depdb \ | ||
150 | ${libdir}/php/.depdblock ${libdir}/php/.filemap \ | ||
151 | ${libdir}/php/.lock ${libdir}/php/test" | ||
152 | FILES_${PN} = "${libdir}/php" | ||
153 | FILES_${PN} += "${bindir}" | ||