X-Git-Url: http://www.privoxy.org/gitweb/misc.html?a=blobdiff_plain;f=build.sh;h=2b0b72ecc23ee98633e3bc53071d1f3e8a2a3312;hb=7ba11e455ab07273c84cf3a07229b78eeac54aae;hp=65dd23b4acb443f71e591470828b539e7e3a8643;hpb=a2d32da683d8ebfa1bc1cb709a625bebfd9099b6;p=OSXPackageBuilder.git diff --git a/build.sh b/build.sh index 65dd23b..2b0b72e 100755 --- a/build.sh +++ b/build.sh @@ -28,14 +28,15 @@ # USA # # Modification : If you modify this file please consider whether your -# changes ought to be passed back to the macsetup module. +# changes ought to be passed back to the OSXPackageBuilder +# module. # # # 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 | snowleopardx64 | snowleopard | snowleopardi386 | leopardupwards | leopard | leopardi386 | leopardppc | tiger | tigeri386 | tigerppc | panther [-pcre]" exit 1 fi @@ -48,14 +49,20 @@ fi # must have Xcode # if [ -z ${XCODE_PATH} ]; then - echo "Error: this release of Mac OS X not supported." + echo "Error: Xcode is not found." exit 1 fi # -# use default options +# set configure options; include the appropriate user/group as discerned by common.sh and set pcre to dynamic (libpcre) or static (bundled) # -OPTS=${OPTS} +if [ "$2" == "-pcre" ]; then + CFLAGS="${CFLAGS} -I/usr/local/include/" + LDFLAGS="${LDFLAGS} -L/usr/local/lib" + OPTS=${OPTS} +else + OPTS="${OPTS} --disable-dynamic-pcre" +fi # # check if privoxy group and user exist? @@ -76,9 +83,10 @@ fi # echo "" echo "Notice: configuring the privoxy software." -cd ../current -/usr/bin/autoheader -/usr/bin/autoconf +cd ../${SOURCE_DIR} +autoheader +autoconf + /usr/bin/env CFLAGS="${CFLAGS} ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" LDFLAGS="${LDFLAGS} ${SYSROOT} ${ARCH} ${MACOSX_VERSION}" ./configure ${OPTS} # @@ -92,6 +100,6 @@ echo "Notice: building the privoxy software." # # modify config file # -/usr/bin/awk '{sub(/logfile.*logfile$/,"logfile logfile.log"); print}' ../current/config > ../current/config.tmp -/bin/mv ../current/config.tmp ../current/config +/usr/bin/awk '{sub(/logfile.*logfile$/,"logfile logfile.log"); print}' ../${SOURCE_DIR}/config > ../${SOURCE_DIR}/config.tmp +/bin/mv ../${SOURCE_DIR}/config.tmp ../${SOURCE_DIR}/config