Annotation of parser3/buildall-with-xml, revision 1.19

1.2       paf         1: #!/bin/sh
                      2: 
1.19    ! misha       3: # $Id: buildall-with-xml,v 1.18 2007/09/14 14:40:59 misha Exp $
1.2       paf         4: 
                      5: install_directory=$HOME/parser3install
                      6: sendmail_command="/usr/sbin/sendmail -i -t -f postmaster"
                      7: 
                      8: echo "buildall-with-xml"
                      9: echo "Script author: Alexander Petrosian <paf@design.ru> (http://paf.design.ru)"
                     10: echo
                     11: echo "Building..."
                     12: 
                     13: parser3_directory=`pwd`
                     14: cd ..
                     15: project_directory=`pwd`
                     16: mkdir src >/dev/null 2>&1
                     17: 
                     18: if test ! -f "$project_directory/gc/lib/libgc.a"; then
                     19:   cd $project_directory/src
1.7       misha      20:   libgc="gc6.8"
                     21:   if test ! -f "$libgc.tar.gz"; then
                     22:     echo "Downloading libgc [1 lib of 3]..."
                     23:     wget -c http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$libgc.tar.gz
                     24:   fi
                     25:   echo "Unpacking gc..."
1.9       misha      26:   rm -rf $libgc
1.7       misha      27:   gunzip -c $libgc.tar.gz | tar vxf - >/dev/null
                     28:   cd $libgc
1.2       paf        29:   echo "Configuring libgc..."
1.3       paf        30:   CPPFLAGS="-DUSE_LIBC_PRIVATES -DUSE_MMAP -DUSE_MUNMAP" \
1.14      misha      31:   ./configure --prefix=$project_directory/gc \
                     32:     --disable-threads \
                     33:     --disable-shared \
                     34:     --silent
1.2       paf        35:   echo "Building libgc..."
                     36:   make
                     37:   make install
1.16      misha      38:   cd ..
1.15      misha      39:   rm -rf $libgc
1.2       paf        40: fi
                     41: 
                     42: 
                     43: if test ! -f "$project_directory/gnome/lib/libxml2.a"; then
                     44:   cd $project_directory/src
1.18      misha      45:   libxml2="libxml2-2.6.30"
1.7       misha      46:   if test ! -f "$libxml2.tar.gz"; then
                     47:     echo "Downloading libxml [2 lib of 3]..."
                     48:     wget -c --passive-ftp ftp://xmlsoft.org/libxml2/$libxml2.tar.gz
                     49:   fi
                     50:   echo "Unpacking libxml2... (be patient)"
1.8       misha      51:   rm -rf $libxml2
1.7       misha      52:   gunzip -c $libxml2.tar.gz | tar vxf - >/dev/null
                     53:   cd $libxml2
1.14      misha      54:   #sax1, output, tree, xinclude[in libxslt], html[in libxslt, mode=html?], xptr[xinclude], pattern -- needed!
1.2       paf        55:   echo "Configuring libxml..."
                     56:   ./configure --prefix=$project_directory/gnome \
1.14      misha      57:     --without-iconv \
                     58:     --without-threads \
                     59:     --without-debug \
                     60:     --without-iso8859x \
                     61:     --without-legacy \
                     62:     --without-push \
                     63:     --without-python \
                     64:     --without-reader \
                     65:     --without-writer \
                     66:     --without-readline \
                     67:     --without-regexps \
                     68:     --without-schemas \
                     69:     --without-schematron \
                     70:     --without-modules \
                     71:     --without-ftp \
                     72:     --without-http \
                     73:     --without-docbook \
1.2       paf        74:     --without-zlib \
1.14      misha      75:     --disable-shared \
                     76:     --silent
1.2       paf        77:   echo "int main(){return 0;}">testapi.c
                     78:   echo "int main(){return 0;}">runtest.c
                     79:   echo "Building libxml..."
                     80:   make
                     81:   make install
1.16      misha      82:   cd ..
1.15      misha      83:   rm -rf $libxml2
1.2       paf        84: fi
                     85: 
                     86: if test ! -f "$project_directory/gnome/lib/libxslt.a"; then
                     87:   cd $project_directory/src
1.18      misha      88:   libxslt="libxslt-1.1.22"
1.7       misha      89:   if test ! -f "$libxslt.tar.gz"; then
                     90:     echo "Downloading libxslt [3 lib of 3]..."
                     91:     wget -c --passive-ftp ftp://xmlsoft.org/libxslt/$libxslt.tar.gz
                     92:   fi
                     93:   echo "Unpacking libxslt... (be patient)"
1.8       misha      94:   rm -rf $libxslt
1.7       misha      95:   gunzip -c $libxslt.tar.gz | tar vxf - >/dev/null
                     96:   cd $libxslt
1.2       paf        97:   echo "Configuring libxslt..."
                     98:   ./configure --prefix=$project_directory/gnome \
                     99:      --with-libxml-prefix=$project_directory/gnome \
1.14      misha     100:      --without-debug \
                    101:      --without-debugger \
                    102:      --without-crypto \
                    103:      --without-plugins \
                    104:      --disable-shared \
                    105:      --silent
1.2       paf       106:   echo "Building libxslt..."
                    107:   make
                    108:   make install
1.16      misha     109:   cd ..
1.15      misha     110:   rm -rf $libxslt
1.2       paf       111: fi
                    112: 
                    113: cd $parser3_directory
                    114: 
1.19    ! misha     115: 
1.2       paf       116: if test ! -f "Makefile"; then
1.19    ! misha     117:   options=""
        !           118:   options="$options --with-static-gc=$project_directory/gc/lib"
        !           119:   options="$options --with-static-xml=$project_directory/gnome"
        !           120: #  options="$options --disable-safe-mode"
        !           121: #  options="$options --with-dynamic-stdcpp"
        !           122:   options="$options --silent"
        !           123: 
1.2       paf       124:   echo "Configuring parser3..."
1.19    ! misha     125:   ./configure --prefix=$install_directory "--with-sendmail=$sendmail_command" $options
1.2       paf       126: fi
                    127: echo "Building parser3..."
                    128: make install
1.17      misha     129: 
                    130: # remove debug info
                    131: # strip ${install_directory}/bin/parser3
                    132: 
1.2       paf       133: echo "DONE"
                    134: 
                    135: echo
                    136: echo
                    137: echo "********************************************************************************************************"
                    138: echo "Now you can copy $install_directory with subdirectories"
                    139: echo "  -Parser3 with XML support-"
                    140: echo "to your cgi-bin directory"
                    141: echo "Read more about installing Parser here:"
                    142: echo "  http://www.parser.ru/en/docs/lang/install4apachecgi.htm in English"
                    143: echo "  http://www.parser.ru/docs/lang/install4apachecgi.htm in Russian"
                    144: echo "********************************************************************************************************"

E-mail: