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