An external PCRE library set can now be optionally compiled against and bundled with...
authorIan Silvester <iansilvester@fastmail.fm>
Thu, 29 Mar 2012 00:55:53 +0000 (00:55 +0000)
committerIan Silvester <iansilvester@fastmail.fm>
Thu, 29 Mar 2012 00:55:53 +0000 (00:55 +0000)
build.sh
constructPkgContent.sh

index 0a47551..7fb015f 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -34,8 +34,8 @@
 #
 # must provide target
 #
-if [ $# -eq 0 -o $# -gt 1 ]; then
-  echo "Usage: $0 lion | snowleopard64 | snowleopard | leopardupwards | leopard | tiger | panther"
+if [ $# -eq 0 -o $# -gt 2 ]; then
+  echo "Usage: $0 lion | snowleopard64 | snowleopard | leopardupwards | leopard | tiger | panther  [-pcre]"
   exit 1
 fi
 
@@ -53,9 +53,13 @@ if [ -z ${XCODE_PATH} ]; then
 fi
 
 #
-# use default options
+# set configure options
 #
 OPTS=${OPTS}
+if [ "$2" == "-pcre" ]; then
+       CFLAGS="${CFLAGS} -I/usr/local/include/"
+       LDFLAGS="${LDFLAGS} -L/usr/local/lib"
+fi
 
 #
 # check if privoxy group and user exist?
@@ -79,7 +83,7 @@ echo "Notice: configuring the privoxy software."
 cd ../${SOURCE_DIR}
 /usr/bin/autoheader
 /usr/bin/autoconf
-/usr/bin/env CFLAGS="${CFLAGS} -I/usr/local/include/ ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" LDFLAGS="${LDFLAGS} -L/usr/local/lib ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" ./configure ${OPTS}
+/usr/bin/env CFLAGS="${CFLAGS} ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" LDFLAGS="${LDFLAGS} ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" ./configure ${OPTS}
 
 #
 # clean, then make privoxy
index e9856b2..f7c48a0 100755 (executable)
@@ -108,6 +108,18 @@ echo "Copy the manpage from the '${SOURCE_DIR}' directory"
 echo ""
 cp -v ../${SOURCE_DIR}/privoxy.1 pkg\ content/usr/local/share/man/man1
 
+# Optionally copy the PCRE libraries
+if [ "$1" == "-pcre" ]; then
+       echo ""
+       echo ""
+       echo "Copy the external PCRE libraries"
+       echo ""
+       mkdir pkg\ content/usr/local/lib
+       cp -v /usr/local/lib/libpcre* pkg\ content/usr/local/lib
+       mkdir pkg\ content/usr/local/lib/pkgconfig
+       cp -v /usr/local/lib/pkgconfig/libpcre* pkg\ content/usr/local/lib/pkgconfig
+fi
+
 # Remove CVS administration files
 echo ""
 echo ""