Gentoo Archives: gentoo-commits

From: "Ole Markus With (olemarkus)" <olemarkus@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in dev-lang/php/files/eblits: src_configure-v3.eblit src_install-v3.eblit
Date: Thu, 30 Jun 2011 07:30:21
Message-Id: 20110630073011.ADE4120054@flycatcher.gentoo.org
1 olemarkus 11/06/30 07:30:11
2
3 Modified: src_configure-v3.eblit
4 Added: src_install-v3.eblit
5 Log:
6 Removed support for sqlite and sharedext in php 5.4. Also removed reference to birdstep
7
8 (Portage version: 2.1.10.3/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.2 dev-lang/php/files/eblits/src_configure-v3.eblit
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_configure-v3.eblit?rev=1.2&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_configure-v3.eblit?rev=1.2&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_configure-v3.eblit?r1=1.1&r2=1.2
16
17 Index: src_configure-v3.eblit
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v3.eblit,v
20 retrieving revision 1.1
21 retrieving revision 1.2
22 diff -u -r1.1 -r1.2
23 --- src_configure-v3.eblit 29 Jun 2011 06:38:38 -0000 1.1
24 +++ src_configure-v3.eblit 30 Jun 2011 07:30:11 -0000 1.2
25 @@ -1,6 +1,6 @@
26 # Copyright 1999-2011 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v3.eblit,v 1.1 2011/06/29 06:38:38 olemarkus Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_configure-v3.eblit,v 1.2 2011/06/30 07:30:11 olemarkus Exp $
30
31 eblit-php-src_configure() {
32 PHP_DESTDIR="/usr/$(get_libdir)/php${SLOT}"
33 @@ -183,14 +183,6 @@
34 phpconfutils_extension_disable "session" "session" 0
35 fi
36
37 - # SQLite support
38 - if use sqlite ; then
39 - phpconfutils_extension_with "sqlite" "sqlite" 0 "/usr"
40 - phpconfutils_extension_enable "sqlite-utf8" "unicode" 0
41 - else
42 - phpconfutils_extension_without "sqlite" "sqlite" 0
43 - fi
44 -
45 if use pic ; then
46 my_conf="${my_conf} --with-pic"
47 fi
48
49
50
51 1.1 dev-lang/php/files/eblits/src_install-v3.eblit
52
53 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_install-v3.eblit?rev=1.1&view=markup
54 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-lang/php/files/eblits/src_install-v3.eblit?rev=1.1&content-type=text/plain
55
56 Index: src_install-v3.eblit
57 ===================================================================
58 # Copyright 1999-2011 Gentoo Foundation
59 # Distributed under the terms of the GNU General Public License v2
60 # $Header: /var/cvsroot/gentoo-x86/dev-lang/php/files/eblits/src_install-v3.eblit,v 1.1 2011/06/30 07:30:11 olemarkus Exp $
61
62 eblit-php-src_install() {
63 # see bug #324739 for what happens when we don't have that
64 addpredict /usr/share/snmp/mibs/.index
65
66 # grab the first SAPI that got built and install common files from there
67 local first_sapi=""
68 for sapi in $SAPIS ; do
69 if use $sapi ; then
70 first_sapi=$sapi
71 break
72 fi
73 done
74
75 # Makefile forgets to create this before trying to write to it...
76 dodir "${PHP_DESTDIR}/bin"
77
78 # Install php environment (without any sapis)
79 cd "${WORKDIR}/sapis-build/$first_sapi"
80 emake INSTALL_ROOT="${D}" \
81 install-build install-headers install-programs \
82 || die "emake install failed"
83
84 local extension_dir="$("${D}/${PHP_DESTDIR}/bin/php-config" --extension-dir)"
85
86 # Generate the USE file for PHP
87 phpconfutils_generate_usefile
88
89 # Create the directory where we'll put version-specific php scripts
90 keepdir /usr/share/php${PHP_MV}
91
92 local sapi="", file=""
93 local sapi_list=""
94
95 for sapi in ${SAPIS}; do
96 if use "${sapi}" ; then
97 einfo "Installing SAPI: ${sapi}"
98 cd "${WORKDIR}/sapis-build/${sapi}"
99 # needed each time, php_install_ini would reset it
100 into "${PHP_DESTDIR}"
101 file=$(find "${SAPI_DIR}/${sapi}/" -type f | head -n 1)
102
103 if [[ "${file: -3}" == ".so" ]]; then
104 if [[ "${sapi}" == "apache2" ]]; then
105 insinto "${PHP_DESTDIR}/apache2/"
106 newins "${file}" "${file/*\/}"
107 keepdir "/usr/$(get_libdir)/apache2/modules"
108 else
109 dolib.so "${file}" || die "Unable to install ${sapi} sapi"
110 fi
111 else
112 dobin "${file}" || die "Unable to install ${sapi} sapi"
113 fi
114
115 php_install_ini "${sapi}"
116
117 # construct correct SAPI string for php-config
118 # thanks to ferringb for the bash voodoo
119 if [[ "${sapi}" == "apache2" ]]; then
120 sapi_list="${sapi_list:+${sapi_list} }apache2handler"
121 else
122 sapi_list="${sapi_list:+${sapi_list} }${sapi}"
123 fi
124 fi
125 done
126
127 # Install env.d files
128 newenvd "${FILESDIR}/20php5-envd" \
129 "20php${SLOT}"
130 sed -e "s|/lib/|/$(get_libdir)/|g" -i \
131 "${D}/etc/env.d/20php${SLOT}"
132 sed -e "s|php5|php${SLOT}|g" -i \
133 "${D}/etc/env.d/20php${SLOT}"
134
135 # set php-config variable correctly (bug #278439)
136 sed -e "s:^\(php_sapis=\)\".*\"$:\1\"${sapi_list}\":" -i \
137 "${D}/usr/$(get_libdir)/php${SLOT}/bin/php-config"
138 }
139
140 php_install_ini() {
141 local phpsapi="${1}"
142
143 # work out where we are installing the ini file
144 php_set_ini_dir "${phpsapi}"
145
146 local phpinisrc="${PHP_INI_UPSTREAM}-${phpsapi}"
147 cp "${PHP_INI_UPSTREAM}" "${phpinisrc}"
148
149 # default to allow_url_open=Off, bug 332763
150 sed -e 's|^allow_url_fopen .*|allow_url_fopen = Off|g' -i "${phpinisrc}"
151
152 # default to expose_php=Off, bug 300695
153 sed -e 's|^expose_php .*|expose_php = Off|g' -i "${phpinisrc}"
154
155 # default to /tmp for save_path, bug #282768
156 sed -e 's|^;session.save_path .*$|session.save_path = "/tmp"|g' -i "${phpinisrc}"
157
158 # Set the extension dir
159 sed -e "s|^extension_dir .*$|extension_dir = ${extension_dir}|g" -i "${phpinisrc}"
160
161 # Set the include path to point to where we want to find PEAR packages
162 sed -e 's|^;include_path = ".:/php/includes".*|include_path = ".:/usr/share/php'${PHP_MV}':/usr/share/php"|' -i "${phpinisrc}"
163
164 dodir "${PHP_INI_DIR}"
165 insinto "${PHP_INI_DIR}"
166 newins "${phpinisrc}" "${PHP_INI_FILE}"
167
168 elog "Installing php.ini for ${phpsapi} into ${PHP_INI_DIR}"
169 elog
170
171 dodir "${PHP_EXT_INI_DIR}"
172 dodir "${PHP_EXT_INI_DIR_ACTIVE}"
173
174 # SAPI-specific handling
175 if [[ "${sapi}" == "apache2" ]] ; then
176 insinto "${APACHE_MODULES_CONFDIR}"
177 newins "${FILESDIR}/70_mod_php${PHP_MV}.conf-apache2" \
178 "70_mod_php${PHP_MV}.conf"
179 fi
180
181 if [[ "${sapi}" == "fpm" ]] ; then
182 einfo "Installing FPM CGI config file php-fpm.conf"
183 insinto ${PHP_INI_DIR}
184 doins "${FILESDIR}/php-fpm.conf"
185 dodir "/etc/init.d"
186 insinto "/etc/init.d"
187 newinitd "${FILESDIR}/php-fpm-r3.init" "php-fpm"
188 #dosym "${PHP_DESTDIR}/bin/php-fpm" "/usr/bin/php-fpm"
189
190 # Remove bogus /etc/php-fpm.conf.default (bug 359906)
191 [[ -f "${D}/etc/php-fpm.conf.default" ]] && rm "${D}/etc/php-fpm.conf.default"
192 fi
193
194 # Install PHP ini files into /usr/share/php
195 if [[ ${SLOT} == '5.2' ]]; then
196 newdoc php.ini-dist php.ini-development
197 newdoc php.ini-recommended php.ini-production
198 fi
199
200 if [[ ${SLOT} == '5.3' ]]; then
201 dodoc php.ini-development
202 dodoc php.ini-production
203 fi
204
205 }