Skip to content

Commit f375e5e

Browse files
committed
Merge pull request #12 from zelgerj/master
added symlink creation for php version build
2 parents f73cfaf + c4661ec commit f375e5e

File tree

6 files changed

+34
-27
lines changed

6 files changed

+34
-27
lines changed

build.default.properties

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@ release.stability = beta
1515
api.version = 0.1.5
1616
api.stability = beta
1717

18-
php.version = 5.5.8
18+
php.version = 5.5.10
1919
php.configure = --prefix=/opt/appserver \
20+
--enable-debug \
2021
--enable-sockets \
2122
--enable-fpm \
2223
--enable-maintainer-zts \
@@ -39,7 +40,7 @@ php.configure = --prefix=/opt/appserver \
3940
--with-zlib \
4041
4142
zmq.version = dev-master
42-
pthreads.version = dev-master
43+
pthreads.version = 1.0.1
4344
memcached.version = 2.1.0
4445
redis.version = 2.2.3
4546
apcu.version = 4.0.2

build.xml

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -161,52 +161,58 @@
161161
<!-- Prepares the PHP sources for the runtime -->
162162
<!-- ==================================================================== -->
163163
<target name="prepare-source" depends="prepare" description="Prepares the PHP sources for the runtime.">
164-
<!-- prepare PHP sources -->
164+
<!-- prepare PHP sources -->
165165
<antcall target="get-php-src"/>
166166
<untar src="/tmp/php-${php.version}.tar.gz" dest="${c-build.dir}" compression="gzip"/>
167167
<chmod perm="755">
168168
<fileset dir="${c-build.dir}/php-${php.version}/build">
169169
<include name="**/*"/>
170170
</fileset>
171171
</chmod>
172+
173+
<!-- recreate symlink -->
174+
<delete file="${c-build.dir}/php" followsymlinks="false" removenotfollowedsymlinks="true" />
175+
<symlink link="${c-build.dir}/php" resource="${c-build.dir}/php-${php.version}"/>
172176

173-
<!--
174177
<antcall target="get-pthreads-src"/>
175178
<untar src="/tmp/pthreads-${pthreads.version}.tgz" dest="/tmp" compression="gzip"/>
176-
<move todir="${c-build.dir}/php-${php.version}/ext/pthreads">
179+
<move todir="${c-build.dir}/php/ext/pthreads">
177180
<fileset dir="/tmp/pthreads-${pthreads.version}"/>
178181
</move>
179-
-->
180182

181-
<exec executable="git" dir="${c-build.dir}/php-${php.version}/ext">
183+
<!-- pthreads head
184+
<exec executable="git" dir="${c-build.dir}/php/ext">
182185
<arg line="clone https://github.com/krakjoe/pthreads.git"/>
183186
</exec>
187+
-->
184188

185-
<exec executable="git" dir="${c-build.dir}/php-${php.version}/ext">
189+
<!-- zmq head
190+
<exec executable="git" dir="${c-build.dir}/php/ext">
186191
<arg line="clone https://github.com/mkoppanen/php-zmq.git zmq"/>
187192
</exec>
193+
-->
188194

189195
<antcall target="get-memcached-src"/>
190196
<untar src="/tmp/memcached-${memcached.version}.tgz" dest="/tmp" compression="gzip"/>
191-
<move todir="${c-build.dir}/php-${php.version}/ext/memcached">
197+
<move todir="${c-build.dir}/php/ext/memcached">
192198
<fileset dir="/tmp/memcached-${memcached.version}"/>
193199
</move>
194200

195201
<antcall target="get-redis-src"/>
196202
<untar src="/tmp/redis-${redis.version}.tgz" dest="/tmp" compression="gzip"/>
197-
<move todir="${c-build.dir}/php-${php.version}/ext/redis">
203+
<move todir="${c-build.dir}/php/ext/redis">
198204
<fileset dir="/tmp/redis-${redis.version}"/>
199205
</move>
200206

201207
<antcall target="get-apcu-src"/>
202208
<untar src="/tmp/apcu-${apcu.version}.tgz" dest="/tmp" compression="gzip"/>
203-
<move todir="${c-build.dir}/php-${php.version}/ext/apcu">
209+
<move todir="${c-build.dir}/php/ext/apcu">
204210
<fileset dir="/tmp/apcu-${apcu.version}"/>
205211
</move>
206212

207213
<antcall target="get-xdebug-src"/>
208214
<untar src="/tmp/xdebug-${xdebug.version}.tgz" dest="/tmp" compression="gzip"/>
209-
<move todir="${c-build.dir}/php-${php.version}/ext/xdebug">
215+
<move todir="${c-build.dir}/php/ext/xdebug">
210216
<fileset dir="/tmp/xdebug-${xdebug.version}"/>
211217
</move>
212218
</target>
@@ -215,14 +221,14 @@
215221
<!-- Init the PHP source for the build environment -->
216222
<!-- ==================================================================== -->
217223
<target name="configure" description="Configures the php runtime environment.">
218-
<delete file="${c-build.dir}/php-${php.version}/aclocal.m4"/>
219-
<delete file="${c-build.dir}/php-${php.version}/configure"/>
220-
<exec dir="${c-build.dir}/php-${php.version}" executable="sh">
224+
<delete file="${c-build.dir}/php/aclocal.m4"/>
225+
<delete file="${c-build.dir}/php/configure"/>
226+
<exec dir="${c-build.dir}/php" executable="sh">
221227
<arg value="buildconf"/>
222228
<arg line="--force"/>
223229
</exec>
224230
<!-- configure, compile and install PHP binary -->
225-
<exec dir="${c-build.dir}/php-${php.version}" executable="sh">
231+
<exec dir="${c-build.dir}/php" executable="sh">
226232
<!-- <env key="CC" value="${php.cc}"/> -->
227233
<arg line="configure ${php.configure}"/>
228234
</exec>
@@ -232,7 +238,7 @@
232238
<!-- Makes the PHP source for the PHP build runtime -->
233239
<!-- ==================================================================== -->
234240
<target name="make" description="Compiles the php runtime environment.">
235-
<exec dir="${c-build.dir}/php-${php.version}" executable="make"/>
241+
<exec dir="${c-build.dir}/php" executable="make"/>
236242
</target>
237243

238244
<!-- ==================================================================== -->
@@ -259,8 +265,8 @@
259265
<!-- Runs php tests -->
260266
<!-- ==================================================================== -->
261267
<target name="run-tests" description="Runs the php tests">
262-
<exec dir="${c-build.dir}/php-${php.version}" executable="php">
263-
<env key="TEST_PHP_EXECUTABLE" value="${c-build.dir}/php-${php.version}/sapi/cli/php"/>
268+
<exec dir="${c-build.dir}/php" executable="php">
269+
<env key="TEST_PHP_EXECUTABLE" value="${c-build.dir}/php/sapi/cli/php"/>
264270
<arg line="./run-tests.php ${c-php-tests.dir}"/>
265271
</exec>
266272
</target>

appserver.launch renamed to launch/appserver.launch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
1818
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
1919
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
20-
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-d date.timezone=Europe/Berlin -d zend_extension=${project_loc}/build/php-5.5.9/modules/xdebug.so /opt/appserver/server.php"/>
21-
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php-5.5.9/sapi/cli/php"/>
20+
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-d date.timezone=Europe/Berlin -d zend_extension=${project_loc}/build/php/modules/xdebug.so /opt/appserver/server.php"/>
21+
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php/sapi/cli/php"/>
2222
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="php-ext-appserver"/>
2323
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
2424
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.macosx.base.1221491367"/>

php-ext-appserver.launch renamed to launch/php-ext-appserver.launch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
1818
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
1919
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
20-
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="build/php-5.5.9/ext/appserver/appserver.php"/>
21-
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php-5.5.9/sapi/cli/php"/>
20+
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-dappserver.remove_constants=PHP_SAPI, build/php/ext/appserver/appserver.php"/>
21+
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php/sapi/cli/php"/>
2222
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="php-ext-appserver"/>
2323
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="false"/>
2424
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.macosx.base.1221491367"/>

webserver.launch renamed to launch/webserver.launch

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_START_MODE" value="run"/>
1818
<booleanAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN" value="true"/>
1919
<stringAttribute key="org.eclipse.cdt.launch.DEBUGGER_STOP_AT_MAIN_SYMBOL" value="main"/>
20-
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-d date.timezone=Europe/Berlin -d zend_extension=${project_loc}/build/php-5.5.8/modules/xdebug.so /home/zelgerj/Repositories/TechDivision_WebServer/src/bin/webserver"/>
21-
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php-5.5.8/sapi/cli/php"/>
20+
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_ARGUMENTS" value="-d date.timezone=Europe/Berlin -d zend_extension=${project_loc}/build/php/modules/xdebug.so /home/zelgerj/Repositories/TechDivision_WebServer/src/bin/webserver"/>
21+
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="build/php/sapi/cli/php"/>
2222
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_ATTR" value="php-ext-appserver"/>
2323
<booleanAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_AUTO_ATTR" value="true"/>
2424
<stringAttribute key="org.eclipse.cdt.launch.PROJECT_BUILD_CONFIG_ID_ATTR" value="cdt.managedbuild.toolchain.gnu.macosx.base.1221491367"/>

src/appserver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
* @author Johann Zelger <[email protected]>
2020
*/
2121

22-
appserver_redefine('PHP_SAPI', 'appserver');
23-
echo "CALL appserver_redefine('PHP_SAPI', 'appserver'): -> SAPI_TYPE: " . PHP_SAPI;
22+
define('PHP_SAPI', 'appserver');
23+
echo "Constant PHP_SAPI: -> SAPI_TYPE: " . PHP_SAPI;
2424
echo PHP_EOL . "==========================================". PHP_EOL;
2525

2626
appserver_set_headers_sent(true);

0 commit comments

Comments
 (0)