|
From: <jbo...@li...> - 2006-06-02 14:14:46
|
Author: jfr...@jb... Date: 2006-06-02 10:14:38 -0400 (Fri, 02 Jun 2006) New Revision: 4565 Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh Log: Add the build of mysql. Modified: labs/jbossweb/trunk/src/share/native/build/buildphp.sh =================================================================== --- labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-06-02 13:39:05 UTC (rev 4564) +++ labs/jbossweb/trunk/src/share/native/build/buildphp.sh 2006-06-02 14:14:38 UTC (rev 4565) @@ -34,7 +34,9 @@ KRB5URL=http://web.mit.edu/kerberos/dist/krb5/1.4/krb5-${KRB5VER}-signed.tar MSQLVER="4.1.20" -MSQLURL="Can't need to register" +MSQLVER=http://dev.mysql.com/get/Downloads/MySQL-4.1/mysql-4.1.20.tar.gz/from/http://mirror.switch.ch/ftp/mirror/mysql/ +#MSQLVER="5.0.22" +#MSQLURL="http://dev.mysql.com/get/Downloads/MySQL-5.0/mysql-5.0.22.tar.gz/from/http://mirror.switch.ch/ftp/mirror/mysql/" # Platfrom directory and cache TOOLS=$HOME/`uname -s`_`uname -p`_tools @@ -51,6 +53,7 @@ BUILDMSQL=false CC=gcc COMPILER="" +ADDCONF="" # # Fonctions @@ -79,6 +82,12 @@ tar xvf ${FILE} gzip -dc ${BASE}-${VER}.tar.gz | tar xvf - ;; + *) + # something else... (mysql) + FILE=`echo $URL | awk -F '/from/' ' { print $1 } '` + FILE=`basename ${FILE}` + gzip -dc ${FILE} | tar xvf - + ;; esac # Check if patches available. if [ -f patch/${BASE}-${VER}.patch ] @@ -158,6 +167,7 @@ PR=`uname -p` # try to find mysql +MYSQLDIR= case ${OS} in SunOS) MSQLSY=solaris @@ -189,6 +199,26 @@ fi done +# overwrite the result when we force the build +if ${BUILDMSQL} +then + MYSQLDIR=${TOOLS}/MSQL +fi +if [ -z "${MYSQLDIR}" ] +then + ADDCONF="$ADDCONF \ + --with-mysqli \ + --with-mysql \ + --with-pdo-mysql \ + " +else + ADDCONF="$ADDCONF \ + --with-mysqli \ + --with-mysql=${MYSQLDIR} \ + --with-pdo-mysql \ + " +fi + case `uname -n` in dev12) BUILDXML2=true @@ -266,11 +296,7 @@ Linux) EXTTYPE=static ADDFLAGS="-I $JAVA_HOME/include/linux" - ADDCONF="$ADDCONF --with-freetype-dir \ - --with-mysqli \ - --with-mysql \ - --with-pdo-mysql \ - " + ADDCONF="$ADDCONF --with-freetype-dir" ;; SunOS) pkginfo | grep SPROcc @@ -280,12 +306,8 @@ export CC fi # SUNWfreetype2 /usr/sfw - # SMCmysql /usr/local/mysql - ADDCONF="$ADDCONF --with-freetype-dir=/usr/sfw \ - --with-mysqli \ - --with-mysql=${MYSQLDIR} \ - --with-pdo-mysql \ - " + # don't use SMCmysql too old: /usr/local/mysql + ADDCONF="$ADDCONF --with-freetype-dir=/usr/sfw" EXTTYPE=shared ADDFLAGS="-I $JAVA_HOME/include/solaris" ;; @@ -313,6 +335,15 @@ esac # +# build mysql if required. +# Note the trick ADDCONF is filled before. +if ${BUILDMSQL} +then + Extract mysql ${MSQLURL} ${MSQLVER} + Build mysql-${MSQLVER} ${TOOLS}/MSQL "--enable-shared" "" "" +fi + +# # build kerberos if required. if ${BUILDKRB5} then |