You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ro...@apache.org on 2007/07/26 08:37:04 UTC
svn commit: r559714 - in /incubator/tuscany/cpp/sca: antscripts/
runtime/core/src/ runtime/extensions/ runtime/extensions/cpp/
runtime/extensions/php/ runtime/extensions/php/src/tuscany/sca/php/
Author: robbinspg
Date: Wed Jul 25 23:37:02 2007
New Revision: 559714
URL: http://svn.apache.org/viewvc?view=rev&rev=559714
Log:
TUSCANY-1438 Apply Brady's patch update 5
Added:
incubator/tuscany/cpp/sca/runtime/extensions/php/build.xml (with props)
Modified:
incubator/tuscany/cpp/sca/antscripts/compile-targets.xml
incubator/tuscany/cpp/sca/antscripts/platform.properties
incubator/tuscany/cpp/sca/antscripts/system.xml
incubator/tuscany/cpp/sca/runtime/core/src/build.xml
incubator/tuscany/cpp/sca/runtime/extensions/build.xml
incubator/tuscany/cpp/sca/runtime/extensions/cpp/build.xml
incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp
Modified: incubator/tuscany/cpp/sca/antscripts/compile-targets.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/antscripts/compile-targets.xml?view=diff&rev=559714&r1=559713&r2=559714
==============================================================================
--- incubator/tuscany/cpp/sca/antscripts/compile-targets.xml (original)
+++ incubator/tuscany/cpp/sca/antscripts/compile-targets.xml Wed Jul 25 23:37:02 2007
@@ -54,13 +54,14 @@
Do a cpp link which results in either a library (linktype of plugin, shared, or static)
or an executable (linktype of executable).
Inherits from "Tuscany-BaseLinker"
+ cpp-link-core does not link in libtuscany_sca.so, whereas cpp-link does
@param outfile - name of the library to create, OS prefixes and suffixes will be added
@param destdir - directory where the library will be written
@param infiles - a space seperated list of the object files to link
@param linktype - executable, plugin, shared, static
@param custom-ld-elements - any extra cpp elements, may also be extra <libset> elements
-->
- <macrodef name="cpp-link">
+ <macrodef name="cpp-link-core">
<attribute name="outfile" default="out"/>
<attribute name="outdir" default="."/>
<attribute name="indir" default="."/>
@@ -76,7 +77,26 @@
<fileset dir='@{indir}' includes='@{infiles}'/>
<custom-ld-elements/>
</cc>
+ </sequential>
+ </macrodef>
+ <macrodef name="cpp-link">
+ <attribute name="outfile" default="out"/>
+ <attribute name="outdir" default="."/>
+ <attribute name="indir" default="."/>
+ <attribute name="infiles" default="*${object.ext}"/>
+ <attribute name="linktype" default="shared"/>
+ <element name="custom-ld-elements" optional="true"/>
+ <sequential>
+ <mkdir dir='@{outdir}'/>
+ <cc link='@{linktype}'
+ subsystem='console'
+ outfile='@{outdir}/@{outfile}'>
+ <linker refid='${compiler.name}-Linker'/>
+ <fileset dir='@{indir}' includes='@{infiles}'/>
+ <libset dir="${tuscanySCA.install.dir}/lib" libs="tuscany_sca"/>
+ <custom-ld-elements/>
+ </cc>
</sequential>
</macrodef>
Modified: incubator/tuscany/cpp/sca/antscripts/platform.properties
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/antscripts/platform.properties?view=diff&rev=559714&r1=559713&r2=559714
==============================================================================
--- incubator/tuscany/cpp/sca/antscripts/platform.properties (original)
+++ incubator/tuscany/cpp/sca/antscripts/platform.properties Wed Jul 25 23:37:02 2007
@@ -25,6 +25,10 @@
platform.tuscanySDO.install.dir=
platform.axis2c.home.dir=
+platform.php.include.dir=
+platform.php.lib.dir=
+platform.php.sca.sdo.include.dir=
+platform.php.sca.sdo.lib.dir=
platform.python.include.dir=
platform.python.lib.dir=
platform.python.version=
Modified: incubator/tuscany/cpp/sca/antscripts/system.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/antscripts/system.xml?view=diff&rev=559714&r1=559713&r2=559714
==============================================================================
--- incubator/tuscany/cpp/sca/antscripts/system.xml (original)
+++ incubator/tuscany/cpp/sca/antscripts/system.xml Wed Jul 25 23:37:02 2007
@@ -210,8 +210,8 @@
-->
<if>
<and>
- <isset property="platform.ruby.include.dir"/>
- <isset property="platform.ruby.lib.dir"/>
+ <isset property="platform.rest.include.dir"/>
+ <isset property="platform.rest.lib.dir"/>
</and>
<then>
<property name="enable_rest" value="true"/>
@@ -237,6 +237,46 @@
</elseif>
<else>
<property name="enable_rest" value="false"/>
+ </else>
+ </if>
+
+ <!--
+ Configure ${enable_php} and related php properties, which are needed
+ to compile the php extension
+ Take the override value from platform.properties if set
+ Else check env vars CURL_LIB, CURL_INCLUDE, HTTPD_INCLUDE, and APR_INCLUDE
+ -->
+ <if>
+ <and>
+ <isset property="platform.php.include.dir"/>
+ <isset property="platform.php.lib.dir"/>
+ <isset property="platform.php.sca.sdo.include.dir"/>
+ <isset property="platform.php.sca.sdo.lib.dir"/>
+ </and>
+ <then>
+ <property name="enable_php" value="true"/>
+ <property name="php.include.dir" location="${platform.php.include.dir}"/>
+ <property name="php.lib.dir" location="${platform.php.lib.dir}"/>
+ <property name="php.sca.sdo.include.dir" location="${platform.php.sca.sdo.include.dir}"/>
+ <property name="php.sca.sdo.lib.dir" location="${platform.php.sca.sdo.lib.dir}"/>
+ </then>
+ <elseif>
+ <and>
+ <isset property="env.PHP_LIB"/>
+ <isset property="env.PHP_INCLUDE"/>
+ <isset property="env.PHP_SCA_SDO_LIB"/>
+ <isset property="env.PHP_SCA_SDO_INCLUDE"/>
+ </and>
+ <then>
+ <property name="enable_php" value="true"/>
+ <property name="php.include.dir" location="${env.PHP_INCLUDE}"/>
+ <property name="php.lib.dir" location="${env.PHP_LIB}"/>
+ <property name="php.sca.sdo.include.dir" location="${env.PHP_SCA_SDO_INCLUDE}"/>
+ <property name="php.sca.sdo.lib.dir" location="${env.PHP_SCA_SDO_LIB}"/>
+ </then>
+ </elseif>
+ <else>
+ <property name="enable_php" value="false"/>
</else>
</if>
Modified: incubator/tuscany/cpp/sca/runtime/core/src/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/core/src/build.xml?view=diff&rev=559714&r1=559713&r2=559714
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/core/src/build.xml (original)
+++ incubator/tuscany/cpp/sca/runtime/core/src/build.xml Wed Jul 25 23:37:02 2007
@@ -172,7 +172,7 @@
</target>
<target name="link" description="Link all TuscanyScaNative core source code">
- <cpp-link
+ <cpp-link-core
outfile="${tuscany.core.lib}"
outdir="${lib.dir}"
indir="${lib.dir}"
Modified: incubator/tuscany/cpp/sca/runtime/extensions/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/build.xml?view=diff&rev=559714&r1=559713&r2=559714
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/build.xml (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/build.xml Wed Jul 25 23:37:02 2007
@@ -75,6 +75,7 @@
<!--
Internal targets
They can still be called, they're just not described, so wont show up in "ant -p"
+ Using antfile and inheritAll="false" to maintain the subdir build.xml basedir settings
-->
<!-- build -->
@@ -84,9 +85,7 @@
</target>
<target name="build.extension.php">
- <!-- TODO PHP build.xml not ready yet
<ant target="build" antfile="${php.dir}/build.xml" inheritAll="false"/>
- -->
</target>
<target name="build.extension.python">
@@ -116,9 +115,7 @@
</target>
<target name="install.extension.php">
- <!-- TODO PHP build.xml not ready yet
<ant target="install" antfile="${php.dir}/build.xml" inheritAll="false"/>
- -->
</target>
<target name="install.extension.python">
@@ -148,9 +145,7 @@
</target>
<target name="clean.extension.php">
- <!-- TODO PHP build.xml not ready yet
<ant target="clean" antfile="${php.dir}/build.xml" inheritAll="false"/>
- -->
</target>
<target name="clean.extension.python">
Modified: incubator/tuscany/cpp/sca/runtime/extensions/cpp/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/cpp/build.xml?view=diff&rev=559714&r1=559713&r2=559714
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/cpp/build.xml (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/cpp/build.xml Wed Jul 25 23:37:02 2007
@@ -179,6 +179,7 @@
infiles="${osoa.cpp.files}">
<custom-cc-elements>
<includepath path="${this.src.dir}"/>
+ <defineset if="windows" define="TUSCANY_SCA_CPP_EXPORTS"/>
</custom-cc-elements>
</cpp-compile>
</target>
@@ -190,6 +191,7 @@
infiles="${cpp.core.cpp.files}">
<custom-cc-elements>
<includepath path="${this.src.dir}"/>
+ <defineset if="windows" define="TUSCANY_SCA_CPP_EXPORTS"/>
</custom-cc-elements>
</cpp-compile>
</target>
@@ -201,6 +203,7 @@
infiles="${cpp.model.cpp.files}">
<custom-cc-elements>
<includepath path="${this.src.dir}"/>
+ <defineset if="windows" define="TUSCANY_SCA_CPP_EXPORTS"/>
</custom-cc-elements>
</cpp-compile>
</target>
Added: incubator/tuscany/cpp/sca/runtime/extensions/php/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/php/build.xml?view=auto&rev=559714
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/php/build.xml (added)
+++ incubator/tuscany/cpp/sca/runtime/extensions/php/build.xml Wed Jul 25 23:37:02 2007
@@ -0,0 +1,209 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements. See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership. The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied. See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
+<project name="TuscanyScaNative_extension_php" default="all" basedir="../../..">
+
+ <import file="${basedir}/antscripts/system.xml"/>
+ <import file="${basedir}/antscripts/compile-targets.xml"/>
+
+ <!--
+ Notice that the basedir for this project is set to the TuscanySCA root dir
+ This makes path setting in system.xml much simpler, but we'll just have to
+ set a property here to this directory.
+ -->
+ <property name="this.dir" location="${basedir}/runtime/extensions/php"/>
+ <property name="xsd.dir" location="${this.dir}/xsd"/>
+ <property name="php.core.dir" location="${this.dir}/src/tuscany/sca/php"/>
+ <property name="php.model.dir" location="${this.dir}/src/tuscany/sca/php/model"/>
+ <property name="lib.dir" location="${this.dir}/src/.libs"/>
+
+ <property name="php.extension.lib" value="tuscany_sca_php"/>
+ <property name="php.extension.install.dir" location="${tuscanySCA.install.dir}/extensions/php"/>
+
+ <!--
+ All the cpp files per subdirectory
+ New classes should be added to these properties
+ -->
+
+ <property
+ name="php.core.cpp.files"
+ value="PHPExtension.cpp
+ PHPImplementationExtension.cpp
+ PHPInterfaceExtension.cpp
+ PHPServiceProxy.cpp
+ PHPServiceWrapper.cpp
+ sca.cpp"/>
+
+ <property
+ name="php.model.cpp.files"
+ value="PHPImplementation.cpp
+ PHPInterface.cpp
+ PHPReferenceBinding.cpp
+ PHPServiceBinding.cpp"/>
+
+ <property
+ name="xsd.files"
+ value="sca-implementation-php.xsd"/>
+
+ <!--
+ Public targets
+ -->
+ <target name="all" description="Compile, link, and install all TuscanyScaNative php extension source code">
+ <antcall target="compile"/>
+ <antcall target="link"/>
+ <antcall target="install"/>
+ </target>
+
+ <target name="build" description="Compile and link all TuscanyScaNative php extension source code">
+ <antcall target="compile"/>
+ <antcall target="link"/>
+ </target>
+
+ <target name="compile" description="Compile all TuscanyScaNative php extension source code">
+ <antcall target="compile.php.core"/>
+ <antcall target="compile.php.model"/>
+ </target>
+
+ <target name="link" description="Link all TuscanyScaNative php extension source code">
+ <cpp-link
+ outfile="${php.extension.lib}"
+ outdir="${lib.dir}"
+ indir="${lib.dir}"
+ infiles="*${object.ext}">
+ <custom-ld-elements>
+ <libset dir="${php.lib.dir}" libs="php5"/>
+ <libset dir="${php.sca.sdo.lib.dir}" libs="sdo"/>
+ </custom-ld-elements>
+ </cpp-link>
+ </target>
+
+ <target name="install" description="Install TuscanyScaNative php extension libraries and headers">
+ <antcall target="install.php.core"/>
+ <antcall target="install.php.xsd"/>
+ </target>
+
+ <target name="clean" description="Clean all TuscanyScaNative php extension compiled source code">
+ <antcall target="clean.php.core"/>
+ <antcall target="clean.php.xsd"/>
+ </target>
+
+ <!--
+ Internal targets
+ They can still be called, they're just not described, so wont show up in "ant -p"
+ -->
+
+ <!-- compile -->
+
+ <target name="compile.php.core">
+ <if>
+ <equals arg1="${enable_php}" arg2="true"/>
+ <then>
+ <cpp-compile
+ srcdir="${php.core.dir}"
+ objdir="${lib.dir}"
+ infiles="${php.core.cpp.files}">
+ <custom-cc-elements>
+ <includepath path="${this.dir}/src"/>
+ <includepath path="${php.include.dir}"/>
+ <includepath path="${php.include.dir}/main"/>
+ <includepath path="${php.include.dir}/sapi/embed"/>
+ <includepath path="${php.include.dir}/TSRM"/>
+ <includepath path="${php.include.dir}/Zend"/>
+ <includepath path="${php.sca.sdo.include.dir}"/>
+ <defineset if="windows" define="TUSCANY_SCA_PHP_EXPORTS"/>
+ </custom-cc-elements>
+ </cpp-compile>
+ </then>
+ <else>
+ <echo
+ message="TuscanySCA php extension is not enabled"
+ level="warning"/>
+ </else>
+ </if>
+ </target>
+
+ <target name="compile.php.model">
+ <if>
+ <equals arg1="${enable_php}" arg2="true"/>
+ <then>
+ <cpp-compile
+ srcdir="${php.model.dir}"
+ objdir="${lib.dir}"
+ infiles="${php.model.cpp.files}">
+ <custom-cc-elements>
+ <includepath path="${this.dir}/src"/>
+ <includepath path="${php.include.dir}"/>
+ <includepath path="${php.include.dir}/TSRM"/>
+ <defineset if="windows" define="TUSCANY_SCA_PHP_EXPORTS"/>
+ </custom-cc-elements>
+ </cpp-compile>
+ </then>
+ <else>
+ <echo
+ message="TuscanySCA php extension is not enabled"
+ level="warning"/>
+ </else>
+ </if>
+ </target>
+
+ <!-- install -->
+
+ <target name="install.php.core">
+ <cpp-install-file
+ srcfile="${lib.prefix}${php.extension.lib}${lib.ext}"
+ destfile="${lib.prefix}${php.extension.lib}${lib.ext}${tuscanySCA.library.version}"
+ srcdir="${lib.dir}"
+ destdir="${php.extension.install.dir}/lib"/>
+ <cpp-symlink
+ linkdir="${php.extension.install.dir}/lib"
+ link="${lib.prefix}${php.extension.lib}${lib.ext}"
+ resource="${lib.prefix}${php.extension.lib}${lib.ext}${tuscanySCA.library.version}"/>
+ <cpp-symlink
+ linkdir="${php.extension.install.dir}/module"
+ link="${lib.prefix}${php.extension.lib}${lib.ext}"
+ resourcedir="${php.extension.install.dir}/lib"
+ resource="${lib.prefix}${php.extension.lib}${lib.ext}"/>
+ </target>
+
+ <target name="install.php.xsd">
+ <cpp-install-files
+ files="${xsd.files}"
+ srcdir="${xsd.dir}"
+ destdir="${php.extension.install.dir}/xsd"/>
+ </target>
+
+ <!-- clean -->
+
+ <target name="clean.php.core">
+ <cpp-clean-files
+ dir="${php.extension.install.dir}/lib"
+ rmdir="true"/>
+ <cpp-clean-files
+ dir="${php.extension.install.dir}/module"
+ rmdir="true"/>
+ <delete dir="${lib.dir}" quiet="true"/>
+ </target>
+
+ <target name="clean.php.xsd">
+ <cpp-clean-files
+ dir="${php.extension.install.dir}/xsd"
+ rmdir="true"/>
+ </target>
+
+</project>
Propchange: incubator/tuscany/cpp/sca/runtime/extensions/php/build.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/cpp/sca/runtime/extensions/php/build.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp?view=diff&rev=559714&r1=559713&r2=559714
==============================================================================
--- incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp (original)
+++ incubator/tuscany/cpp/sca/runtime/extensions/php/src/tuscany/sca/php/PHPServiceWrapper.cpp Wed Jul 25 23:37:02 2007
@@ -193,9 +193,10 @@
#ifdef ZTS
static void ***tsrm_ls;
loginfo("ZTS enabled");
-#endif
+
printf("tsrm_ls = %x, embedSAPIInitializeCount = %d\n",
tsrm_ls, embedSAPIInitializeCount);
+#endif
if ( embedSAPIInitializeCount == 0 )
{
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org