From: <jbo...@li...> - 2006-05-17 07:13:19
|
Author: jfr...@jb... Date: 2006-05-17 03:13:17 -0400 (Wed, 17 May 2006) New Revision: 4279 Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh Log: Add patch logic. Make sure that Sun Studio compiler are used on Solaris. Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-17 06:57:16 UTC (rev 4278) +++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-05-17 07:13:17 UTC (rev 4279) @@ -20,8 +20,11 @@ # Platfrom directory and cache TOOLS=$HOME/`uname -s`_`uname -p`_tools CACHE=`uname -s`_`uname -p`_cache + +# default value for variables. BUILDXML2=false BUILDPSQL=false +CC=gcc # # Fonctions @@ -41,6 +44,11 @@ if [ ! -d ${BASE}-${VER} ] then gzip -dc ${BASE}-${VER}.tar.gz | tar xvf - + # Check if patches available. + if [ -f patch/${BASE}-${VER}.patch ] + then + patch -p0 < patch/${BASE}-${VER}.patch + fi fi } @@ -55,7 +63,13 @@ INSDIR=$2 ADDCON=$3 (cd ${SRCDIR} - ./configure --prefix=${INSDIR} ${ADDCON} + if [ ${CC} = "cc" ] + then + # Sun Studio + CC=cc CPPFLAGS="-I/opt/SUNWspro/prod/include/CC/Cstd/rw -I/opt/SUNWspro/prod/include/CC/Cstd" ./configure --prefix=${INSDIR} ${ADDCON} + else + ./configure --prefix=${INSDIR} ${ADDCON} + fi if [ $? -ne 0 ] then echo "configure in ${SRCDIR} failed" @@ -88,6 +102,8 @@ dev12) BUILDXML2=true BUILDPSQL=true + CC=cc + export CC # -with-libxml-dir=/usr/local but 2.6.11 needed. # Solaris dynamic ld exports the symbols so build shared extensions. EXTTYPE=shared @@ -177,6 +193,25 @@ " ADDFLAGS="-I $JAVA_HOME/include/linux" ;; + dev13*) + BUILDXML2=true + BUILDPSQL=true + CC=cc + export CC + ADDCONF="\ + --enable-all=$EXTTYPE \ + --with-libxml-dir=$TOOLS/LIBXML2 \ + --with-jpeg-dir \ + --with-png-dir \ + --with-freetype-dir \ + --with-t1lib \ + \ + --with-xpm-dir=no \ + --with-t1lib=no \ + --with-pgsql=$EXTTYPE,$TOOLS/POSTGRESQL \ + --with-pdo-pgsql=$EXTTYPE,$TOOLS/POSTGRESQL \ + " + ;; *) EXTTYPE=static ADDCONF="\ @@ -193,7 +228,7 @@ if ${BUILDXML2} then Extract libxml2 ${XML2URL} ${XML2VER} - Build libxml2-${XML2VER} $TOOLS/LIBXML2 "" + Build libxml2-${XML2VER} ${TOOLS}/LIBXML2 "" fi # @@ -201,7 +236,7 @@ if ${BUILDPSQL} then Extract postgresql ${PSQLURL} ${PSQLVER} - Build postgresql-${PSQLVER} $TOOLS/POSTGRESQL --without-readline + Build postgresql-${PSQLVER} ${TOOLS}/POSTGRESQL --without-readline fi # |