Annotation of parser3/buildall-without-xml, revision 1.28
1.2 paf 1: #!/bin/sh
2:
1.28 ! moko 3: # $Id: buildall-without-xml,v 1.27 2012-04-27 02:37:57 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-without-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.20 misha 20: # libgc="gc6.8" # FreeBSD 4.X is not supported in newer gc version
1.17 misha 21: libgc="gc-7.1"
1.5 misha 22: if test ! -f "$libgc.tar.gz"; then
1.14 misha 23: echo "Downloading libgc [1 lib of 2]..."
1.5 misha 24: wget -c http://www.hpl.hp.com/personal/Hans_Boehm/gc/gc_source/$libgc.tar.gz
25: fi
26: echo "Unpacking gc..."
1.7 misha 27: rm -rf $libgc
1.5 misha 28: gunzip -c $libgc.tar.gz | tar vxf - >/dev/null
29: cd $libgc
1.2 paf 30: echo "Configuring libgc..."
1.19 misha 31: CPPFLAGS="-DUSE_LIBC_PRIVATES -DUSE_MMAP -DDONT_ADD_BYTE_AT_END" \
1.8 misha 32: ./configure --prefix=$project_directory/gc \
33: --disable-threads \
34: --disable-shared \
35: --silent
1.2 paf 36: echo "Building libgc..."
37: make
38: make install
1.10 misha 39: cd ..
1.9 misha 40: rm -rf $libgc
1.2 paf 41: fi
42:
1.7 misha 43:
1.14 misha 44: if test ! -f "$project_directory/pcre/lib/libpcre.a"; then
45: cd $project_directory/src
1.27 misha 46: libpcre="pcre-8.30"
1.14 misha 47: if test ! -f "$libpcre.tar.gz"; then
48: echo "Downloading pcre [2 lib of 2]..."
1.21 misha 49: wget -c --passive-ftp ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/$libpcre.tar.gz
1.14 misha 50: fi
51: echo "Unpacking pcre..."
52: rm -rf $libpcre
53: gunzip -c $libpcre.tar.gz | tar vxf - >/dev/null
54: cd $libpcre
55: current_dir=`pwd`
56: echo "Configuring pcre..."
57: ./configure --prefix="$project_directory/pcre" \
1.26 misha 58: --with-match-limit=10000 \
59: --with-match-limit-recursion=10000 \
1.14 misha 60: --enable-utf8 \
61: --enable-unicode-properties \
62: --disable-shared \
63: --disable-cpp \
64: --disable-pcregrep-libz \
1.24 misha 65: --disable-pcregrep-libbz2 \
1.14 misha 66: --silent
67: echo "Building pcre..."
68: make
69: make install
70: echo "Copying required files (Parser3 uses some PCRE internals)..."
71: cp pcre_internal.h ucp.h $project_directory/pcre/include
72: cd ..
73: rm -rf $libpcre
74: fi
75:
76:
1.2 paf 77: cd $parser3_directory
78:
79: if test ! -f "Makefile"; then
1.28 ! moko 80: options="$@"
1.12 misha 81: options="$options --with-static-gc=$project_directory/gc/lib"
1.14 misha 82: options="$options --with-static-pcre=$project_directory/pcre"
1.12 misha 83: # options="$options --disable-safe-mode"
84: # options="$options --with-dynamic-stdcpp"
1.13 misha 85: # options="$options --disable-stringstream"
1.12 misha 86: options="$options --silent"
87:
1.2 paf 88: echo "Configuring parser3..."
1.12 misha 89: ./configure --prefix=$install_directory "--with-sendmail=$sendmail_command" $options
1.2 paf 90: fi
91: echo "Building parser3..."
92: make install
1.11 misha 93:
94: # remove debug info
95: # strip ${install_directory}/bin/parser3
96:
1.2 paf 97: echo "DONE"
98:
99: echo
100: echo
101: echo "********************************************************************************************************"
102: echo "Now you can copy $install_directory with subdirectories"
103: echo " -Parser3 WITHOUT XML support-"
104: echo "to your cgi-bin directory"
105: echo "Read more about installing Parser here:"
106: echo " http://www.parser.ru/en/docs/lang/install4apachecgi.htm in English"
107: echo " http://www.parser.ru/docs/lang/install4apachecgi.htm in Russian"
108: echo "********************************************************************************************************"
E-mail: