--- parser3/buildall 2020/12/16 20:37:16 1.34 +++ parser3/buildall 2024/12/09 01:05:49 1.39 @@ -1,5 +1,5 @@ #!/bin/sh -# $Id: buildall,v 1.34 2020/12/16 20:37:16 moko Exp $ +# $Id: buildall,v 1.39 2024/12/09 01:05:49 moko Exp $ install_directory=$HOME/parser3install sendmail_command="/usr/sbin/sendmail -i -t -f postmaster" @@ -9,6 +9,7 @@ cd .. project_dir=`pwd` build_xml="yes" +build_pcre2="yes" build_gmime="" build_apache="" build_stripped="" @@ -16,7 +17,6 @@ direct_download="" options="--with-included-ltdl" options="$options --with-gc=$project_dir/gc/lib" -options="$options --with-pcre=$project_dir/pcre" #options="$options --disable-stringstream" printf "Building statically linked parser3" @@ -26,6 +26,10 @@ for PARAM in "$@"; do printf ", without xml" build_xml="" ;; + "--without-pcre2") + printf ", without pcre2 library" + build_pcre2="" + ;; "--with-apache") printf ", with apache module" options="$options --with-apache" @@ -50,7 +54,7 @@ for PARAM in "$@"; do ;; "--help") echo - echo "Usage: buildall [--without-xml] [--with-apache] [--with-mailreceive] [--with-system-mailreceive] [--strip] [--direct-download] [--disable-safe-mode] [other configure options ...]" + echo "Usage: buildall [--without-xml] [--without-pcre2] [--with-apache] [--with-mailreceive] [--with-system-mailreceive] [--strip] [--direct-download] [--disable-safe-mode] [other configure options ...]" exit 1 ;; *) @@ -135,15 +139,38 @@ if test ! -f "$project_dir/gc/lib/libgc. CPPFLAGS="-DUSE_MMAP -DDONT_ADD_BYTE_AT_END" \ ./configure --prefix=$project_dir/gc \ --disable-shared \ + --disable-parallel-mark \ + --silent $cflags + echo "Building $lib..." + make install + cleanup +fi + +if test "$build_pcre2" = "yes"; then + +options="$options --with-pcre=$project_dir/pcre2" + +if test ! -f "$project_dir/pcre2/lib/libpcre2-8.a"; then + lib="pcre2-10.44" + prepare_gz $lib.tar.gz https://github.com/PCRE2Project/pcre2/releases/download/pcre2-10.44/ + echo "Configuring $lib..." + ./configure --prefix="$project_dir/pcre2" \ + --enable-jit \ + --with-match-limit-depth=10000 \ + --disable-shared \ --silent $cflags echo "Building $lib..." make install cleanup fi +else + +options="$options --with-pcre=$project_dir/pcre" + if test ! -f "$project_dir/pcre/lib/libpcre.a"; then - lib="pcre-8.43" - prepare_gz $lib.tar.gz https://ftp.pcre.org/pub/pcre/ + lib="pcre-8.45" + prepare_gz $lib.tar.gz https://sourceforge.net/projects/pcre/files/pcre/8.45/ echo "Configuring $lib..." ./configure --prefix="$project_dir/pcre" \ --with-match-limit-recursion=10000 \ @@ -159,9 +186,11 @@ if test ! -f "$project_dir/pcre/lib/libp cleanup fi +fi + if test "$build_xml" = "yes" -a ! -f "$project_dir/gnome/lib/libxml2.a"; then lib="libxml2-2.9.9" - prepare_gz $lib.tar.gz ftp://xmlsoft.org/libxml2/ + prepare_gz $lib.tar.gz http://xmlsoft.org/download/ #sax1, output, tree, xinclude[in libxslt], html[in libxslt, mode=html?], xptr[xinclude], pattern -- needed! echo "Configuring $lib..." ./configure --prefix=$project_dir/gnome \ @@ -192,7 +221,7 @@ fi if test "$build_xml" = "yes" -a ! -f "$project_dir/gnome/lib/libxslt.a"; then lib="libxslt-1.1.34" - prepare_gz $lib.tar.gz ftp://xmlsoft.org/libxslt/ + prepare_gz $lib.tar.gz http://xmlsoft.org/download/ echo "Configuring $lib..." CFLAGS="$CFLAGS -D__stub_clock_gettime -Dclock_gettime=choke_me" \ ./configure --prefix=$project_dir/gnome \ @@ -263,6 +292,8 @@ if test ! -f "Makefile"; then ./configure --prefix=$install_directory \ --sysconfdir=$install_directory/bin \ --datadir=$install_directory/bin \ + --datarootdir="\$confdir" \ + --libdir="\$confdir/lib" \ --with-sendmail="$sendmail_command" \ $options $cflags $gmime_cflags fi