|
|
| version 1.42, 2012/04/27 02:37:57 | version 1.49, 2012/06/13 10:28:56 |
|---|---|
| Line 4 | Line 4 |
| install_directory=$HOME/parser3install | install_directory=$HOME/parser3install |
| sendmail_command="/usr/sbin/sendmail -i -t -f postmaster" | sendmail_command="/usr/sbin/sendmail -i -t -f postmaster" |
| download="wget -c --passive-ftp" | |
| cflags="" | |
| #cflags="--with-pic" #required for apache module on x64 | |
| echo "buildall-with-xml" | echo "buildall-with-xml" |
| echo "Script author: Alexander Petrosian <paf@design.ru> (http://paf.design.ru)" | echo "Script author: Alexander Petrosian <paf@design.ru> (http://paf.design.ru)" |
| Line 21 if test ! -f "$project_directory/gc/lib/ | Line 24 if test ! -f "$project_directory/gc/lib/ |
| libgc="gc-7.1" | libgc="gc-7.1" |
| if test ! -f "$libgc.tar.gz"; then | if test ! -f "$libgc.tar.gz"; then |
| echo "Downloading gc [1 lib of 4]..." | echo "Downloading gc [1 lib of 4]..." |
| wget -c http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$libgc.tar.gz | $download http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$libgc.tar.gz |
| fi | fi |
| echo "Unpacking gc..." | echo "Unpacking gc..." |
| rm -rf $libgc | rm -rf $libgc |
| Line 32 if test ! -f "$project_directory/gc/lib/ | Line 35 if test ! -f "$project_directory/gc/lib/ |
| ./configure --prefix=$project_directory/gc \ | ./configure --prefix=$project_directory/gc \ |
| --disable-threads \ | --disable-threads \ |
| --disable-shared \ | --disable-shared \ |
| --silent | --silent $cflags |
| echo "Building gc..." | echo "Building gc..." |
| make | make |
| make install | make install |
| Line 40 if test ! -f "$project_directory/gc/lib/ | Line 43 if test ! -f "$project_directory/gc/lib/ |
| rm -rf $libgc | rm -rf $libgc |
| fi | fi |
| if test ! -f "$project_directory/pcre/lib/libpcre.a"; then | if test ! -f "$project_directory/pcre/lib/libpcre.a"; then |
| cd $project_directory/src | cd $project_directory/src |
| libpcre="pcre-8.30" | libpcre="pcre-8.30" |
| if test ! -f "$libpcre.tar.gz"; then | if test ! -f "$libpcre.tar.gz"; then |
| echo "Downloading pcre [2 lib of 4]..." | echo "Downloading pcre [2 lib of 4]..." |
| wget -c --passive-ftp ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$libpcre.tar.gz | $download ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$libpcre.tar.gz |
| fi | fi |
| echo "Unpacking pcre..." | echo "Unpacking pcre..." |
| rm -rf $libpcre | rm -rf $libpcre |
| Line 63 if test ! -f "$project_directory/pcre/li | Line 65 if test ! -f "$project_directory/pcre/li |
| --disable-cpp \ | --disable-cpp \ |
| --disable-pcregrep-libz \ | --disable-pcregrep-libz \ |
| --disable-pcregrep-libbz2 \ | --disable-pcregrep-libbz2 \ |
| --silent | --silent $cflags |
| echo "Building pcre..." | echo "Building pcre..." |
| make | |
| make install | make install |
| echo "Copying required files (Parser3 uses some PCRE internals)..." | |
| cp pcre_internal.h ucp.h $project_directory/pcre/include | |
| cd .. | cd .. |
| rm -rf $libpcre | rm -rf $libpcre |
| fi | fi |
| if test ! -f "$project_directory/gnome/lib/libxml2.a"; then | if test ! -f "$project_directory/gnome/lib/libxml2.a"; then |
| cd $project_directory/src | cd $project_directory/src |
| libxml2="libxml2-2.7.8" | libxml2="libxml2-2.8.0" |
| if test ! -f "$libxml2.tar.gz"; then | if test ! -f "$libxml2.tar.gz"; then |
| echo "Downloading libxml [3 lib of 4]..." | echo "Downloading libxml [3 lib of 4]..." |
| wget -c --passive-ftp ftp://xmlsoft.org/libxml2/$libxml2.tar.gz | $download ftp://xmlsoft.org/libxml2/$libxml2.tar.gz |
| fi | fi |
| echo "Unpacking libxml2... (be patient)" | echo "Unpacking libxml2... (be patient)" |
| rm -rf $libxml2 | rm -rf $libxml2 |
| Line 107 if test ! -f "$project_directory/gnome/l | Line 105 if test ! -f "$project_directory/gnome/l |
| --without-http \ | --without-http \ |
| --without-docbook \ | --without-docbook \ |
| --without-zlib \ | --without-zlib \ |
| --without-lzma \ | |
| --disable-shared \ | --disable-shared \ |
| --silent | --silent $cflags |
| echo "int main(){return 0;}">testapi.c | echo "int main(){return 0;}">testapi.c |
| echo "int main(){return 0;}">runtest.c | echo "int main(){return 0;}">runtest.c |
| echo "Building libxml..." | echo "Building libxml..." |
| Line 123 if test ! -f "$project_directory/gnome/l | Line 122 if test ! -f "$project_directory/gnome/l |
| libxslt="libxslt-1.1.26" | libxslt="libxslt-1.1.26" |
| if test ! -f "$libxslt.tar.gz"; then | if test ! -f "$libxslt.tar.gz"; then |
| echo "Downloading libxslt [4 lib of 4]..." | echo "Downloading libxslt [4 lib of 4]..." |
| wget -c --passive-ftp ftp://xmlsoft.org/libxslt/$libxslt.tar.gz | $download ftp://xmlsoft.org/libxslt/$libxslt.tar.gz |
| fi | fi |
| echo "Unpacking libxslt... (be patient)" | echo "Unpacking libxslt... (be patient)" |
| rm -rf $libxslt | rm -rf $libxslt |
| Line 137 if test ! -f "$project_directory/gnome/l | Line 136 if test ! -f "$project_directory/gnome/l |
| --without-crypto \ | --without-crypto \ |
| --without-plugins \ | --without-plugins \ |
| --disable-shared \ | --disable-shared \ |
| --silent | --silent $cflags |
| echo "Building libxslt..." | echo "Building libxslt..." |
| make | make |
| make install | make install |
| Line 145 if test ! -f "$project_directory/gnome/l | Line 144 if test ! -f "$project_directory/gnome/l |
| rm -rf $libxslt | rm -rf $libxslt |
| fi | fi |
| cd $parser3_directory | cd $parser3_directory |
| if test ! -f "Makefile"; then | if test ! -f "Makefile"; then |
| options="" | options="$@" |
| options="$options --with-static-gc=$project_directory/gc/lib" | options="$options --with-static-gc=$project_directory/gc/lib" |
| options="$options --with-static-pcre=$project_directory/pcre" | options="$options --with-static-pcre=$project_directory/pcre" |
| options="$options --with-static-xml=$project_directory/gnome" | options="$options --with-static-xml=$project_directory/gnome" |
| # options="$options --with-curl=/usr/include/curl" | |
| # options="$options --with-apache" | # options="$options --with-apache" |
| # options="$options --disable-safe-mode" | # options="$options --disable-safe-mode" |
| # options="$options --with-dynamic-stdcpp" | |
| # options="$options --disable-stringstream" | # options="$options --disable-stringstream" |
| options="$options --silent" | options="$options --with-included-ltdl" |
| options="$options --silent $cflags" | |
| echo "Configuring parser3..." | echo "Configuring parser3..." |
| ./configure --prefix=$install_directory "--with-sendmail=$sendmail_command" $options | ./configure --prefix=$install_directory "--with-sendmail=$sendmail_command" $options |
| fi | fi |
| echo "Building parser3..." | echo "Building parser3..." |
| make install | make install |
| if test $? -ne 0; then exit 1; fi | |
| # remove debug info | # remove debug info |
| # strip ${install_directory}/bin/parser3 | # strip ${install_directory}/bin/parser3 |