From owner-freebsd-ports Thu Jun 27 14:59:53 2002 Delivered-To: freebsd-ports@freebsd.org Received: from pris.polaris.ca (pris.polaris.ca [199.247.156.218]) by hub.freebsd.org (Postfix) with SMTP id D19C637B407 for ; Thu, 27 Jun 2002 14:59:22 -0700 (PDT) Received: (qmail 91174 invoked by uid 1001); 27 Jun 2002 21:59:28 -0000 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 27 Jun 2002 21:59:28 -0000 Date: Thu, 27 Jun 2002 14:59:28 -0700 (PDT) From: "Seamus.Venasse" To: svenasse@polaris.ca, , Subject: Re: ports/33453: New port: Apache module that can record traffic statistics Message-ID: <20020627145350.K89115-100000@pris.polaris.ca> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org I've removed the entire scripts directory and any calls made to the script in the Makefile. I created two variables, WITH_MYSQL and WITH_POSTGRESQL to specify which database to use. Below is the diff file I created. As I stated earlier, the scripts directory has been removed. Seamus diff -ruN mod_accounting-old/Makefile mod_accounting/Makefile --- mod_accounting-old/Makefile Thu Jun 27 12:36:57 2002 +++ mod_accounting/Makefile Thu Jun 27 13:34:12 2002 @@ -23,14 +23,33 @@ WRKDIRPREFIX="${WRKDIRPREFIX}" \ MKDIR="${MKDIR}" -pre-fetch: - @${SETENV} ${SCRIPTS_ENV} ${SH} ${SCRIPTDIR}/configure.mod_accounting +.if defined(WITH_MYSQL) +MA_DEF= -DNEED_MYSQL +MA_INC= -I/usr/local/include/ +MA_LIB= -L/usr/local/lib/mysql/ -lmysqlclient +MA_DB= mysql.c +LIB_DEPENDS+= mysqlclient.10:${PORTSDIR}/databases/mysql323-client +.endif + +.if defined(WITH_POSTGRESQL) +MA_DEF= -DNEED_POSTGRES +MA_INC= -I/usr/local/include/pgsql +MA_LIB= -L/usr/local/lib -lpq +MA_DB= postgres.c +LIB_DEPENDS+= pq.2:${PORTSDIR}/databases/postgresql7 +.endif -.if exists(${WRKDIRPREFIX}${.CURDIR}/Makefile.inc) -.include "${WRKDIRPREFIX}${.CURDIR}/Makefile.inc" +.if defined(WITH_MYSQL) && defined(WITH_POSTGRESQL) + @echo "*** ERROR: Cannot specify both MySQL and PostgreSQL support." + exit 1 .endif do-build: +.if !defined(WITH_MYSQL) && !defined(WITH_POSTGRESQL) + @echo "*** ERROR: Must specify a database using WITH_MYSQL or WITH_POSTGRESQL" + exit 1 +.endif + @cd ${WRKSRC} && \ ${APXS} -c ${MA_DEF} ${MA_INC} ${MA_LIB} mod_accounting.c ${MA_DB} diff -ruN mod_accounting-old/scripts/configure.mod_accounting mod_accounting/scripts/configure.mod_accounting --- mod_accounting-old/scripts/configure.mod_accounting Thu Jun 27 12:36:57 2002 +++ mod_accounting/scripts/configure.mod_accounting Wed Dec 31 16:00:00 1969 @@ -1,89 +0,0 @@ -#!/bin/sh - -if [ -f ${WRKDIRPREFIX}${CURDIR}/Makefile.inc ]; then - echo "Already configured. Do a \"make clean\" first to reconfigure." - exit -fi - - -# get use input using dialog inputbox -# returns $value -dialogInputBox() { - prompt=$1 - default_value=$2 - - tempfile=`mktemp -t input` - - /usr/bin/dialog --inputbox "$prompt" 8 60 "$default_value" 2> $tempfile - retval=$? - if [ -s $tempfile ]; then - value=`cat $tempfile` - fi - rm -f $tempfile - - case $retval in - 0) if [ -z $value ]; then - echo "Using default: ${default_value}" - value=${default_value} - fi - ;; - 1) echo "Cancel pressed" - exit 1 - ;; - esac -} - - -# writes entry into the Makefile.inc file -logEntry() { - entry=$1 - - makefileinc="${WRKDIRPREFIX}${CURDIR}/Makefile.inc" - echo "$entry" >> $makefileinc -} - - -tempfile=`mktemp -t input` -/usr/bin/dialog --title "Database Selection" --clear \ - --menu "\n\ -Please select desired options:" -1 -1 4 \ -MYSQL "MySQL 3.23" \ -PG "PostgreSQL 7" \ -2> $tempfile - -retval=$? - -if [ -s $tempfile ]; then - set `cat $tempfile` -fi -rm -f $tempfile - -case $retval in - 0) if [ -z "$*" ]; then - echo "Nothing selected" - exit 1 - fi - ;; - 1) echo "Cancel pressed" - exit 1 - ;; -esac - -${MKDIR} ${WRKDIRPREFIX}${CURDIR} - -case $1 in - MYSQL) - logEntry "MA_DEF=-DNEED_MYSQL" - logEntry "MA_INC=-I/usr/local/include/" - logEntry "MA_LIB=-L/usr/local/lib/mysql/ -lmysqlclient" - logEntry "MA_DB=mysql.c" - logEntry "LIB_DEPENDS+=mysqlclient.10:\${PORTSDIR}/databases/mysql323-client" - ;; - PG) - logEntry "MA_DEF=-DNEED_POSTGRES" - logEntry "MA_INC=-I/usr/local/include/pgsql" - logEntry "MA_LIB=-L/usr/local/lib -lpq" - logEntry "MA_DB=postgres.c" - logEntry "LIB_DEPENDS+=pq.2:${PORTSDIR}/databases/postgresql7" - ;; -esac To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message