Annotation of parser3/buildall-with-xml, revision 1.48
1.2 paf 1: #!/bin/sh
2:
1.48 ! moko 3: # $Id: buildall-with-xml,v 1.47 2012-06-11 22:21:19 moko Exp $
1.2 paf 4:
5: install_directory=$HOME/parser3install
6: sendmail_command="/usr/sbin/sendmail -i -t -f postmaster"
1.48 ! moko 7: download="wget -c --passive-ftp"
! 8: cflags=""
! 9: cflags="CFLAGS=-fPIC CXXFLAGS=-fPIC" #required for apache module on x64
1.2 paf 10:
11: echo "buildall-with-xml"
12: echo "Script author: Alexander Petrosian <paf@design.ru> (http://paf.design.ru)"
13: echo
14: echo "Building..."
15:
16: parser3_directory=`pwd`
17: cd ..
18: project_directory=`pwd`
19: mkdir src >/dev/null 2>&1
20:
21: if test ! -f "$project_directory/gc/lib/libgc.a"; then
22: cd $project_directory/src
1.33 misha 23: # libgc="gc6.8" # FreeBSD 4.X is not supported in newer gc version
1.27 misha 24: libgc="gc-7.1"
1.7 misha 25: if test ! -f "$libgc.tar.gz"; then
1.24 misha 26: echo "Downloading gc [1 lib of 4]..."
1.48 ! moko 27: $download http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$libgc.tar.gz
1.7 misha 28: fi
29: echo "Unpacking gc..."
1.9 misha 30: rm -rf $libgc
1.7 misha 31: gunzip -c $libgc.tar.gz | tar vxf - >/dev/null
32: cd $libgc
1.24 misha 33: echo "Configuring gc..."
1.29 misha 34: CPPFLAGS="-DUSE_LIBC_PRIVATES -DUSE_MMAP -DDONT_ADD_BYTE_AT_END" \
1.14 misha 35: ./configure --prefix=$project_directory/gc \
36: --disable-threads \
37: --disable-shared \
1.48 ! moko 38: --silent $cflags
1.24 misha 39: echo "Building gc..."
1.2 paf 40: make
41: make install
1.16 misha 42: cd ..
1.15 misha 43: rm -rf $libgc
1.2 paf 44: fi
45:
1.24 misha 46: if test ! -f "$project_directory/pcre/lib/libpcre.a"; then
47: cd $project_directory/src
1.42 misha 48: libpcre="pcre-8.30"
1.24 misha 49: if test ! -f "$libpcre.tar.gz"; then
50: echo "Downloading pcre [2 lib of 4]..."
1.48 ! moko 51: $download ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$libpcre.tar.gz
1.24 misha 52: fi
53: echo "Unpacking pcre..."
54: rm -rf $libpcre
55: gunzip -c $libpcre.tar.gz | tar vxf - >/dev/null
56: cd $libpcre
57: current_dir=`pwd`
58: echo "Configuring pcre..."
59: ./configure --prefix="$project_directory/pcre" \
1.41 misha 60: --with-match-limit=10000 \
61: --with-match-limit-recursion=10000 \
1.24 misha 62: --enable-utf8 \
63: --enable-unicode-properties \
64: --disable-shared \
65: --disable-cpp \
66: --disable-pcregrep-libz \
1.39 misha 67: --disable-pcregrep-libbz2 \
1.48 ! moko 68: --silent $cflags
1.24 misha 69: echo "Building pcre..."
1.48 ! moko 70: make install
1.24 misha 71: cd ..
72: rm -rf $libpcre
73: fi
74:
1.2 paf 75: if test ! -f "$project_directory/gnome/lib/libxml2.a"; then
76: cd $project_directory/src
1.43 misha 77: libxml2="libxml2-2.8.0"
1.7 misha 78: if test ! -f "$libxml2.tar.gz"; then
1.24 misha 79: echo "Downloading libxml [3 lib of 4]..."
1.48 ! moko 80: $download ftp://xmlsoft.org/libxml2/$libxml2.tar.gz
1.7 misha 81: fi
82: echo "Unpacking libxml2... (be patient)"
1.8 misha 83: rm -rf $libxml2
1.7 misha 84: gunzip -c $libxml2.tar.gz | tar vxf - >/dev/null
85: cd $libxml2
1.14 misha 86: #sax1, output, tree, xinclude[in libxslt], html[in libxslt, mode=html?], xptr[xinclude], pattern -- needed!
1.2 paf 87: echo "Configuring libxml..."
88: ./configure --prefix=$project_directory/gnome \
1.31 misha 89: --without-catalog \
1.14 misha 90: --without-iconv \
91: --without-threads \
92: --without-debug \
93: --without-iso8859x \
94: --without-legacy \
95: --without-push \
96: --without-python \
97: --without-reader \
98: --without-writer \
99: --without-readline \
100: --without-regexps \
101: --without-schemas \
102: --without-schematron \
103: --without-modules \
104: --without-ftp \
105: --without-http \
106: --without-docbook \
1.2 paf 107: --without-zlib \
1.44 misha 108: --without-lzma \
1.14 misha 109: --disable-shared \
1.48 ! moko 110: --silent $cflags
1.2 paf 111: echo "int main(){return 0;}">testapi.c
112: echo "int main(){return 0;}">runtest.c
113: echo "Building libxml..."
114: make
115: make install
1.16 misha 116: cd ..
1.15 misha 117: rm -rf $libxml2
1.2 paf 118: fi
119:
120: if test ! -f "$project_directory/gnome/lib/libxslt.a"; then
121: cd $project_directory/src
1.32 misha 122: libxslt="libxslt-1.1.26"
1.7 misha 123: if test ! -f "$libxslt.tar.gz"; then
1.24 misha 124: echo "Downloading libxslt [4 lib of 4]..."
1.48 ! moko 125: $download ftp://xmlsoft.org/libxslt/$libxslt.tar.gz
1.7 misha 126: fi
127: echo "Unpacking libxslt... (be patient)"
1.8 misha 128: rm -rf $libxslt
1.7 misha 129: gunzip -c $libxslt.tar.gz | tar vxf - >/dev/null
130: cd $libxslt
1.2 paf 131: echo "Configuring libxslt..."
132: ./configure --prefix=$project_directory/gnome \
133: --with-libxml-prefix=$project_directory/gnome \
1.14 misha 134: --without-debug \
135: --without-debugger \
136: --without-crypto \
137: --without-plugins \
138: --disable-shared \
1.48 ! moko 139: --silent $cflags
1.2 paf 140: echo "Building libxslt..."
141: make
142: make install
1.16 misha 143: cd ..
1.15 misha 144: rm -rf $libxslt
1.2 paf 145: fi
146:
147: cd $parser3_directory
148:
149: if test ! -f "Makefile"; then
1.45 moko 150: options="$@"
1.19 misha 151: options="$options --with-static-gc=$project_directory/gc/lib"
1.24 misha 152: options="$options --with-static-pcre=$project_directory/pcre"
1.19 misha 153: options="$options --with-static-xml=$project_directory/gnome"
1.38 moko 154: # options="$options --with-apache"
1.19 misha 155: # options="$options --disable-safe-mode"
1.21 misha 156: # options="$options --disable-stringstream"
1.48 ! moko 157: options="$options --with-included-ltdl"
! 158: options="$options --silent $cflags"
1.2 paf 159: echo "Configuring parser3..."
1.19 misha 160: ./configure --prefix=$install_directory "--with-sendmail=$sendmail_command" $options
1.2 paf 161: fi
1.48 ! moko 162:
1.2 paf 163: echo "Building parser3..."
164: make install
1.48 ! moko 165: if test $? -ne 0; then exit 1; fi
1.17 misha 166:
167: # remove debug info
168: # strip ${install_directory}/bin/parser3
169:
1.2 paf 170: echo "DONE"
171:
172: echo
173: echo
174: echo "********************************************************************************************************"
175: echo "Now you can copy $install_directory with subdirectories"
176: echo " -Parser3 with XML support-"
177: echo "to your cgi-bin directory"
178: echo "Read more about installing Parser here:"
179: echo " http://www.parser.ru/en/docs/lang/install4apachecgi.htm in English"
180: echo " http://www.parser.ru/docs/lang/install4apachecgi.htm in Russian"
181: echo "********************************************************************************************************"
E-mail: