Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 May 2013 14:07:15 GMT
From:      Spil <spil.oss@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/178508: [mail/dspam] Fix for MariaDB/Percona and OptionsNG overhaul
Message-ID:  <201305111407.r4BE7Fkh023165@oldred.FreeBSD.org>
Resent-Message-ID: <201305111410.r4BEA0cr021591@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         178508
>Category:       ports
>Synopsis:       [mail/dspam] Fix for MariaDB/Percona and OptionsNG overhaul
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat May 11 14:10:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Spil
>Release:        9.1-RELEASE
>Organization:
n.a.
>Environment:
FreeBSD gw.example.org 9.1-RELEASE FreeBSD 9.1-RELEASE #1 r243787: Mon Dec  3 18:52:28 CET 2012     root@gw.example.org:/usr/obj/usr/src/sys/BEASTIE  i386

>Description:
Recently I replaced mysql51-* with mariadb55-* ports, during cleanup I found dspam to depend on the old libmysql and rebuilding dspam with MYSQL55 failed.

Added OPTIONS
MARIADB
PERCONA
MYSQL56

Converted to OptionsNG
Relevant mutually-exclusive options to OPTIONS_RADIO
No longer needs to check for multiple LDA's 
No longer needs to check for multiple MySQL or SQLite versions
 
>How-To-Repeat:
Compile dspam with databases/mariadb55-client installed
>Fix:
Patch Makefile (attached)

Patch attached with submission follows:

--- Makefile.orig	2013-04-26 21:52:01.000000000 +0200
+++ Makefile	2013-05-11 15:34:22.000000000 +0200
@@ -24,55 +24,99 @@
 MIN_OPTIONS_VER=	${PORTNAME}-3.9.0
 
 ## debug / log / admin options
-OPTIONS=	SYSLOG "Logs via syslog" on
-OPTIONS+=	DEBUG "Enable debugging logging" on
-OPTIONS+=	VERBOSE_DEBUG "Enable debug in LOGDIR/dspam.debug" off
-OPTIONS+=	BNR_DEBUG "Enable debug for BNR" off
-OPTIONS+=	PREF_EXT "Preferences in database not in files" off
-OPTIONS+=	DAEMON "Daemonize dspam; speaks LMTP or DLMTP" on
-
-#
-OPTIONS+=	CLAMAV "Enable clamav support" on
-OPTIONS+=	CLAMAV_DEVEL "Enable clamav support" off
-OPTIONS+=	CLAMAV_LOCAL "RUN_DEPEND on selected clamav" on
-#
-OPTIONS+=	MYSQL50 "Use MySQL 5.0.x as back-end" on
-OPTIONS+=	MYSQL51 "Use MySQL 5.1.x as back-end" off
-OPTIONS+=	MYSQL55 "Use MySQL 5.5.x as back-end" off
-OPTIONS+=	MYSQL_COMPRESS "Compress dspam <--> MySQL" off
-OPTIONS+=	MYSQL_LOCAL "RUN_DEPEND on selected MySQL server ver." off
-OPTIONS+=	POSTGRESQL "Use PostgreSQL as back-end" on
-OPTIONS+=	POSTGRESQL_LOCAL "RUN_DEPEND on PostgreSQL server" off
-OPTIONS+=	SQLITE2 "Use SQLite v2.x as back-end" off
-OPTIONS+=	SQLITE3 "Use SQLite v3.x as back-end" on
-OPTIONS+=	HASH "Use hash driver" on
-#
-OPTIONS+=	EXTERNAL_LOOKUP "Enable rcpt verification via extlookup" off
-
-# layout
-OPTIONS+=	USER_HOMEDIR "Store user data in ~/.dspam" off
-OPTIONS+=	TRUSTED_USERS "Disable trusted user security" off
-OPTIONS+=	VIRT_USERS "Enable virtual users (needs SQL back-end)" off
-OPTIONS+=	LONG_USERNAMES "Usernames longer that OS supports" off
-OPTIONS+=	LARGE_SCALE "File structure for large scale" off
-OPTIONS+=	DOMAIN_SCALE "File structure for multiple domains" off
 
-## MTA and LDA
-OPTIONS+=	CYRUS21_LDA "Use Cyrus's 2.1 deliver as LDA" off
-OPTIONS+=	CYRUS22_LDA "Use Cyrus's 2.2 deliver as LDA" off
-OPTIONS+=	CYRUS23_LDA "Use Cyrus's 2.3 deliver as LDA" off
-OPTIONS+=	EXIM_LDA "Use Exim as local delivery agent" off
-OPTIONS+=	MAILDROP_LDA "Use Maildrop as local delivery agent" off
-OPTIONS+=	PROCMAIL_LDA "Use Procmail as local delivery agent" off
-OPTIONS+=	SAFECAT_LDA "Use Safecat as local delivery agent" off
-OPTIONS+=	SENDMAIL_LDA "Use Sendmail as local delivery agent" off
-
-OPTIONS+=	SENDMAIL "Play nice with sendmail server" off
-OPTIONS+=	POSTFIX_MBC "Dspam as mailbox_command in Postfix" off
-OPTIONS+=	QMAIL "Play nice with Qmail mail server" off
+OPTIONS_DEFINE= 	SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON
+SYSLOG_DESC=		Logs via syslog
+DEBUG_DESC=		Enable debugging logging
+VERBOSE_DEBUG_DESC=	Enable debug in LOGDIR/dspam.debug
+BNR_DEBUG_DESC=		Enable debug for BNR
+PREF_EXT_DESC=		Preferences in database not in files
+DAEMON_DESC=		Daemonize dspam; speaks LMTP or DLMTP
+
+OPTIONS_DEFAULT=	SYSLOG DEBUG DAEMON
+
+# ClamAV options
+OPTIONS_DEFINE+=	CLAMAV_LOCAL
+CLAMAV_DESC=		Enable ClamAV support
+CLAMAV_DEVEL_DESC=	Enable ClamAV support from -devel port
+CLAMAV_LOCAL_DESC=	RUN_DEPEND on selected clamav
+
+OPTIONS_DEFAULT+=	CLAMAV CLAMAV_LOCAL
+OPTIONS_RADIO=		CLAMAVG
+OPTIONS_RADIO_CLAMAVG=	CLAMAV CLAMAV_DEVEL
+CLAMAVG_DESC=		ClamAV version
+
+# Database backend options
+OPTIONS_DEFINE+=        MYSQL_COMPRESS MYSQL_LOCAL
+MYSQL50_DESC=		Use MySQL 5.0.x as back-end
+MYSQL51_DESC=	 	Use MySQL 5.1.x as back-end
+MYSQL55_DESC=	 	Use MySQL 5.5.x as back-end
+MYSQL56_DESC=		Use MySQL 5.6.x as back-end
+MYSQL_COMPRESS_DESC=	Compress dspam <--> MySQL
+MYSQL_LOCAL_DESC=	RUN_DEPEND on selected MySQL server ver.
+MARIADB_DESC=	 	Use MariaDB as MySQL drop-in replacement
+PERCONA_DESC=	 	Use Percona as MySQL drop-in replacement
+
+OPTIONS_DEFAULT+=	MYSQL55
+OPTIONS_RADIO+=		MYSQL_VERSG
+OPTIONS_RADIO_MYSQL_VERSG=	MYSQL50 MYSQL51 MYSQL55 MYSQL56
+MYSQL_VERSG_DESC=	MySQL version
+
+OPTIONS_RADIO+=		MYSQL_TYPEG
+OPTIONS_RADIO_MYSQL_TYPEG= MARIADB PERCONA
+MYSQL_TYPEG_DESC=	MySQL implementation
+
+OPTIONS_DEFINE+=	POSTGRESQL POSTGRESQL_LOCAL HASH
+POSTGRESQL_DESC=	Use PostgreSQL as back-end
+POSTGRESQL_LOCAL_DESC=	RUN_DEPEND on PostgreSQL server
+SQLITE2_DESC=		Use SQLite v2.x as back-end
+SQLITE3_DESC=		Use SQLite v3.x as back-end
+HASH_DESC= 		Use hash driver
+
+OPTIONS_DEFAULT+=	POSTGRESQL SQLITE3 HASH
+OPTIONS_RADIO+=		SQLITEG
+SQLITEG_DES=		SQLite version
+OPTIONS_RADIO_SQLITEG=	SQLITE2	SQLITE3
+SQLITEG_DESC=		SQLite version
+
+OPTIONS_DEFINE+=	EXTERNAL_LOOKUP
+EXTERNAL_LOOKUP_DESC=	Enable rcpt verification via extlookup
+
+# Layout
+OPTIONS_DEFINE+= 	USER_HOMEDIR TRUSTED_USERS VIRT_USERS LONG_USERNAMES LARGE_SCALE DOMAIN_SCALE
+USER_HOMEDIR_DESC=	Store user data in ~/.dspam
+TRUSTED_USERS_DESC=	Disable trusted user security
+VIRT_USERS_DESC=	Enable virtual users (needs SQL back-end)
+LONG_USERNAMES_DESC=	Usernames longer that OS supports
+LARGE_SCALE_DESC=	File structure for large scale
+DOMAIN_SCALE_DESC=	File structure for multiple domains
+
+OPTIONS_RADIO+=		LAYOUTG
+OPTIONS_RADIO_LAYOUTG=	LARGE_SCALE DOMAIN_SCALE
+LAYOUTG_DESC=		File structure
 
-OPTIONS+=	WebUI "Install WebUI, pulls in Apache or see below" off
-OPTIONS+=	LIGHTTPD "RUN_DEPEND on LightHTTPD, not Apache" off
+## MTA and LDA
+CYRUS21_LDA_DESC=	Use Cyrus's 2.1 deliver as LDA
+CYRUS22_LDA_DESC=	Use Cyrus's 2.2 deliver as LDA
+CYRUS23_LDA_DESC=	Use Cyrus's 2.3 deliver as LDA
+EXIM_LDA_DESC=		Use Exim as local delivery agent
+MAILDROP_LDA_DESC=	Use Maildrop as local delivery agent
+PROCMAIL_LDA_DESC=	Use Procmail as local delivery agent
+SAFECAT_LDA_DESC=	Use Safecat as local delivery agent
+SENDMAIL_LDA_DESC=	Use Sendmail as local delivery agent
+
+OPTIONS_RADIO+=		LDAG
+OPTIONS_RADIO_LDAG=	CYRUS21_LDA CYRUS22_LDA CYRUS23_LDA EXIM_LDA MAILDROP_LDA PROCMAIL_LDA SAFECAT_LDA SENDMAIL_LDA
+LDAG_DESC=		Local Delivery Agent
+
+OPTIONS_DEFINE+=	SENDMAIL POSTFIX_MBC QMAIL
+SENDMAIL_DESC=		Play nice with sendmail server
+POSTFIX_MBC_DESC=	Dspam as mailbox_command in Postfix
+QMAIL_DESC=		Play nice with Qmail mail server
+
+OPTIONS_DEFINE+=	WebUI LIGHTTPD
+WebUI_DESC=	 	Install WebUI, pulls in Apache or LigHTTPd
+LIGHTTPD_DESC=		RUN_DEPEND on LigHTTPd, not Apache
 
 USE_PERL5=	yes
 USE_AUTOTOOLS=	libtool
@@ -133,30 +177,30 @@
 		-e '/^%%FreeBSD/D' \
 		-e '/^%%Tecnik%%/D'
 
-.ifndef(WITHOUT_SYSLOG)
+.if ! ${PORT_OPTIONS:MSYSLOG}
 CONFIGURE_ARGS+=	--enable-syslog
 .else
 CONFIGURE_ARGS+=	--disable-syslog
 CONFIGURE_ARGS+=	--with-logfile=${LOGFILE}
 .endif
 
-.ifndef(WITHOUT_DEBUG)
+.if ! ${PORT_OPTIONS:MDEBUG}
 CONFIGURE_ARGS+=	--enable-debug
 .endif
 
-.ifdef(WITH_VERBOSE_DEBUG)
+.if ${PORT_OPTIONS:MVERBOSE_DEBUG}
 CONFIGURE_ARGS+=	--enable-verbose-debug
 .endif
 
-.ifdef(WITH_BNR_DEBUG)
+.if ${PORT_OPTIONS:MBNR_DEBUG}
 CONFIGURE_ARGS+=	--enable-bnr-debug
 .endif
 
-.ifdef(WITH_PREF_EXT)
+.if ${PORT_OPTIONS:MPREF_EXT}
 CONFIGURE_ARGS+=	--enable-preferences-extension
 .endif
 
-.ifndef(WITHOUT_DAEMON)
+.if ${PORT_OPTIONS:MDAEMON}
 CONFIGURE_ARGS+=	--enable-daemon
 USE_RC_SUBR=	${PORTNAME}
 _SED_SCRIPT+=	-e 's,%%DAEMON%%,,g'
@@ -165,18 +209,18 @@
 _SED_SCRIPT+=	-e '/%%DAEMON%%/D'
 .endif
 
-.ifndef(WITHOUT_CLAMAV)
+.if ${PORT_OPTIONS:MCLAMAV}
 CONFIGURE_ARGS+=	--enable-clamav
-.	ifndef(WITHOUT_CLAMAV_LOCAL)
+.	if ${PORT_OPTIONS:MCLAMAV_LOCAL}
 RUN_DEPENDS+=	clamav>=0:${PORTSDIR}/security/clamav
 SUB_LIST+=	CLAMD=clamd
 .	else
 SUB_LIST+=	CLAMD=
 .	endif
 .endif
-.ifdef(WITH_CLAMAV_DEVEL)
+.if ${PORT_OPTIONS:MCLAMAV_DEVEL}
 CONFIGURE_ARGS+=	--enable-clamav
-.	ifndef(WITHOUT_CLAMAV_LOCAL)
+.	if ${PORT_OPTIONS:MCLAMAV_LOCAL}
 RUN_DEPENDS+=	clamav-devel>=0:${PORTSDIR}/security/clamav-devel
 SUB_LIST+=	CLAMD=clamd
 .	else
@@ -189,14 +233,14 @@
 #_DBDRV_ALL=	pgsql_drv,sqlite3_drv,sqlite_drv,hash_drv,mysql_drv
 _DBDRV=		pgsql_drv,sqlite3_drv,sqlite_drv,hash_drv,mysql_drv,
 
-.ifndef(WITHOUT_POSTGRESQL)
+.if ${PORT_OPTIONS:MPOSTGRESQL}
 USE_PGSQL=	yes
 CONFIGURE_ARGS+=	--with-pgsql-includes=${LOCALBASE}/include \
 		--with-pgsql-libraries=${LOCALBASE}/lib
 PLIST_SUB+=	PGSQL=""
 #PKGNAMESUFFIX=	-pgsql
 _DBDRV_COUNT:=	${_DBDRV_COUNT}o
-.	if defined(WITH_POSTGRESQL_LOCAL)
+.	if ${PORT_OPTIONS:MPOSTGRESQL_LOCAL}
 RUN_DEPENDS+=	postgresql-server>=0:${PORTSDIR}/databases/postgresql${PGSQL_VER}-server
 SUB_LIST+=	PGSQL=postgresql
 .	else
@@ -207,14 +251,14 @@
 _DBDRV:=	${_DBDRV:S/pgsql_drv,//}
 .endif
 
-.ifndef(WITHOUT_SQLITE3)
+.if ${PORT_OPTIONS:MSQLITE3}
 USE_SQLITE=	3
 _DBDRV_COUNT:=	${_DBDRV_COUNT}o
 .else
 _DBDRV:=	${_DBDRV:S/sqlite3_drv,//}
 .endif
 
-.if defined(WITH_SQLITE2)
+.if ${PORT_OPTIONS:MSQLITE2}
 USE_SQLITE=	2
 _DBDRV_COUNT:=	${_DBDRV_COUNT}o
 .else
@@ -229,7 +273,7 @@
 PLIST_SUB+=	SQLITE="@comment "
 .endif
 
-.ifndef(WITHOUT_HASH)
+.if ${PORT_OPTIONS:MHASH}
 PLIST_SUB+=	HASH=""
 #PKGNAMESUFFIX=	-css
 _DBDRV_COUNT:=	${_DBDRV_COUNT}o
@@ -238,28 +282,35 @@
 PLIST_SUB+=	HASH="@comment "
 .endif
 
-.ifndef(WITHOUT_MYSQL50)
-WANT_MYSQL_VER=	50
-#PKGNAMESUFFIX=	-mysql50
-.elifdef(WITH_MYSQL51)
-WANT_MYSQL_VER=	51
-#PKGNAMESUFFIX=	-mysql51
-.elifdef(WITH_MYSQL55)
-WANT_MYSQL_VER=	55
-#PKGNAMESUFFIX=	-mysql55
+.if ${PORT_OPTIONS:MMARIADB}
+MYSQL_VER_SUFFX=m
 .endif
 
-.if !defined(WITHOUT_MYSQL50) || defined(WITH_MYSQL51) || defined(WITH_MYSQL55)
+.if ${PORT_OPTIONS:MPERCONA}
+MYSQL_VER_SUFFX=p
+.endif
+
+.if ${PORT_OPTIONS:MMYSQL50}
+WANT_MYSQL_VER=	50${MYSQL_VER_SUFFX}
+.elif ${PORT_OPTIONS:MMYSQL51}
+WANT_MYSQL_VER=	51${MYSQL_VER_SUFFX}
+.elif ${PORT_OPTIONS:MMYSQL55}
+WANT_MYSQL_VER=	55${MYSQL_VER_SUFFX}
+.elif ${PORT_OPTIONS:MMYSQL56}
+WANT_MYSQL_VER= 56${MYSQL_VER_SUFFX}
+.endif
+
+.if ${PORT_OPTIONS:MMYSQL50} || ${PORT_OPTIONS:MMYSQL51} || ${PORT_OPTIONS:MMYSQL55} || ${PORT_OPTIONS:MMYSQL56}
 USE_MYSQL=	yes
 CONFIGURE_ARGS+=	--with-mysql-includes=${LOCALBASE}/include/mysql \
 		--with-mysql-libraries=${LOCALBASE}/lib/mysql
 PLIST_SUB+=	MYSQL=""
 _DBDRV_COUNT:=	${_DBDRV_COUNT}o
-.	if defined(WITH_MYSQL_COMPRESS)
+.	if ${PORT_OPTIONS:MMYSQL_COMPRESS}
 CONFIGURE_ARGS+=	--enable-client-compression
 .	endif
-.	if defined(WITH_MYSQL_LOCAL)
-RUN_DEPENDS+=	mysql-server>=0:${PORTSDIR}/databases/mysql${WANT_MYSQL_VER}-server
+.	if ${PORT_OPTIONS:MYSQL_LOCAL}
+RUN_DEPENDS+=	mysql-server>=0:${PORTSDIR}/databases/mysql${WANT_MYSQL_VER}${MYSQL_VER_SUFFX}-server
 SUB_LIST+=	MYSQL=mysql
 .	else
 SUB_LIST+=	MYSQL=
@@ -278,7 +329,7 @@
 PLIST_SUB+=	DYNAMIC="@comment "
 .endif
 
-.ifdef(WITH_EXTERNAL_LOOKUP)
+.if ${PORT_OPTIONS:MEXTERNAL_LOOKUP}
 CONFIGURE_ARGS+=	--enable-external-lookup
 USE_OPENLDAP=	YES
 #CPPFLAGS+=	-I${LOCALBASE}/include
@@ -286,107 +337,94 @@
 #CONFIGURE_ENV+=	CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}"
 .endif
 
-.ifdef(WITH_USER_HOMEDIR)
+.if ${PORT_OPTIONS:MUSER_HOMEDIR}
 CONFIGURE_ARGS+=	--enable-homedir
 .endif
 
-.ifdef(WITH_TRUSTED_USERS)
+.if ${PORT_OPTIONS:MTRUSTED_USERS}
 CONFIGURE_ARGS+=	--disable-trusted-user-security
 .endif
 
-.ifdef(WITH_VIRT_USERS)
+.if ${PORT_OPTIONS:MVIRT_USERS}
 CONFIGURE_ARGS+=	--enable-virtual-users
 .endif
 
-.ifdef(WITH_LONG_USERNAMES)
+.if ${PORT_OPTIONS:MLONG_USERNAMES}
 CONFIGURE_ARGS+=	--enable-long-usernames
 .endif
-.ifdef(WITH_LARGE_SCALE)
+.if ${PORT_OPTIONS:MLARGE_SCALE}
 CONFIGURE_ARGS+=	--enable-large-scale
 .endif
-.ifdef(WITH_DOMAIN_SCALE)
+.if ${PORT_OPTIONS:MDOMAIN_SCALE}
 CONFIGURE_ARGS+=	--enable-domain-scale
 .endif
 
-# add one 'o' here for each new LDA
-LDA_TOTAL_COUNT=	ooooooooo	# 9
-LDA_COUNT=	${LDA_TOTAL_COUNT}
-
-.if defined(WITH_CYRUS21_LDA)
+.if ${PORT_OPTIONS:MCYRUS21_LDA}
 RUN_DEPENDS+=	${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd2
 CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver'
-LDA_COUNT:=	${LDA_COUNT:S/o//}
 .endif
 
-.if defined(WITH_CYRUS22_LDA)
+.if ${PORT_OPTIONS:MCYRUS22_LDA}
 RUN_DEPENDS+=	${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd22
 CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver'
-LDA_COUNT:=	${LDA_COUNT:S/o//}
 .endif
 
-.if defined(WITH_CYRUS23_LDA)
+.if ${PORT_OPTIONS:MCYRUS23_LDA}
 RUN_DEPENDS+=	${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd23
 CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver'
-LDA_COUNT:=	${LDA_COUNT:S/o//}
 .endif
 
-.ifdef(WITH_EXIM_LDA)
-.	ifdef(WITH_MYSQL50) || (WITH_MYSQL51) || (WITH_MYSQL55)
+.if ${PORT_OPTIONS:MEXIM_LDA}
+.	if ${PORT_OPTIONS:MMYSQL50} || ${PORT_OPTIONS:MMYSQL51} || ${PORT_OPTIONS:MMYSQL55}
 _EXIM_EXT=	-mysql
-.	elifdef(WITH_POSTGRESQL)
+.	elif ${PORT_OPTIONS:MPOSTGRESQL}
 _EXIM_EXT=	-postgresql
 .	endif
 RUN_DEPENDS+=	exim:${PORTSDIR}/mail/exim${_EXIM_EXT}
 CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/sbin/exim'
-LDA_COUNT:=	${LDA_COUNT:S/o//}
 .endif
 
-.ifdef(WITH_MAILDROP_LDA)
+.if ${PORT_OPTIONS:MMAILDROP_LDA}
 RUN_DEPENDS+=	maildrop:${PORTSDIR}/mail/maildrop
 CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/bin/maildrop'
-LDA_COUNT:=	${LDA_COUNT:S/o//}
 .endif
 
-.ifdef(WITH_PROCMAIL_LDA)
+.if ${PORT_OPTIONS:MPROCMAIL_LDA}
 RUN_DEPENDS+=	procmail:${PORTSDIR}/mail/procmail
 CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/bin/procmail'
-LDA_COUNT:=	${LDA_COUNT:S/o//}
 .endif
 
-.ifdef(WITH_SAFECAT_LDA)
+.if ${PORT_OPTIONS:MSAFECAT_LDA}
 RUN_DEPENDS+=	safecat:${PORTSDIR}/sysutils/safecat
 CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/safecat tmp new'
-LDA_COUNT:=	${LDA_COUNT:S/o//}
 .endif
 
-.ifdef(WITH_SENDMAIL_LDA) && exists(/usr/sbin/sendmail)
+.if ${PORT_OPTIONS:MSENDMAIL_LDA} && exists(/usr/sbin/sendmail)
 CONFIGURE_ARGS+=	--with-delivery-agent=/usr/sbin/sendmail
-LDA_COUNT:=	${LDA_COUNT:S/o//}
 .else
-.	ifdef(WITH_SENDMAIL_LDA) && exists(${LOCALBASE}/sbin/sendmail)
+.	if ${PORT_OPTIONS:MSENDMAIL_LDA} && exists(${LOCALBASE}/sbin/sendmail)
 CONFIGURE_ARGS+=	--with-delivery-agent='${LOCALBASE}/sbin/sendmail'
-LDA_COUNT:=	${LDA_COUNT:S/o//}
 .	endif
 .endif
 
-.ifdef(WITH_SENDMAIL)
+.if ${PORT_OPTIONS:MSENDMAIL}
 DSPAM_MODE=	4511
 .endif
 
-.ifdef(WITH_POSTFIX_MBC)
+.if ${PORT_OPTIONS:MPOSTFIX_MBC}
 DSPAM_MODE=	4511
 .endif
 
-.ifdef(WITH_QMAIL)
+.if ${PORT_OPTIONS:MQMAIL}
 DSPAM_MODE=	4511
 .endif
 
-.ifdef(DSPAM_MODE)
+.if ${PORT_OPTIONS:MDSPAM_MODE}
 CONFIGURE_ARGS+=	--with-dspam-mode=${DSPAM_MODE}
 .endif
 
-.ifdef(WITH_WebUI)
-.	if defined(WITH_LIGHTTPD)
+.if ${PORT_OPTIONS:MWebUI}
+.	if ${PORT_OPTIONS:MLIGHTTPD}
 RUN_DEPENDS+=	${LOCALBASE}/sbin/lighttpd:${PORTSDIR}/www/lighttpd
 .	else
 USE_APACHE_RUN=	22+
@@ -450,10 +488,10 @@
 	@${ECHO_CMD} "DSPAM_HOME_GROUP=${DSPAM_HOME_GROUP}"
 	@${ECHO_CMD} "DSPAM_HOME_MODE=${DSPAM_HOME_MODE} (default: 0770)"
 	@${ECHO_CMD} "LOG_DIR=${LOG_DIR} (default: ${_VAR_DIR}/log/dspam)"
-.	ifdef(WITHOUT_SYSLOG)
+.	if ! ${PORT_OPTIONS:MSYSLOG}
 	@${ECHO_CMD} "LOGFILE=${LOGFILE} (default: ${_VAR_DIR}/log/dspam/dspam.log)"
 .	endif
-.	ifdef(WITH_WebUI)
+.	if ${PORT_OPTIONS:MWebUI}
 		@${ECHO_CMD} "Define WWWDIR before making if you need the WebUI files"
 		@${ECHO_CMD} "installed in other place that this installation's default"
 		@${ECHO_CMD} "${WWWDIR}"
@@ -462,7 +500,7 @@
 	@sleep 5
 .endif
 
-post-patch:
+Post-patch:
 	@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' \
 		${WRKSRC}/src/tools.mysql_drv/purge.sql
 	@${REINPLACE_CMD} -e 's|where @a-14 > to_days(created_on);|where @a-${SIGNATURE_LIFE} > to_days(created_on);|' \
@@ -477,49 +515,45 @@
 
 pre-configure:
 	@${ECHO_CMD}
-.if !( ${LDA_TOTAL_COUNT:S/o//}==${LDA_COUNT} || ${LDA_TOTAL_COUNT}==${LDA_COUNT} )
-	@${ECHO_CMD} "You can only use one local delivery agent at once."
-	@${ECHO_CMD} "See ${DSPAM_ETC}/dspam.conf for how to change it at run time."
-	@${FALSE}
-.endif
 .if ${_DBDRV}==""
-	@${ECHO_CMD}
 	@${ECHO_CMD} "You need to enable at least one database back-end."
 	@${FALSE}
 .endif
-.if defined(WITH_VIRT_USERS) && !(defined(USE_MYSQL) || \
-	!defined(WITHOUT_POSTGRESQL) || !defined(WITHOUT_HASH) )
+.if ${PORT_OPTIONS:MMARIADB} && ( ${PORT_OPTIONS:MMYSQL50} || \
+	${PORT_OPTIONS:MMYSQL51} || ${PORT_OPTIONS:MMYSQL56} )
+	@${ECHO_CMD} "MariaDB versions 5.0, 5.1 and 5.6 are not in ports."
+	@${FALSE}
+.endif
+.if ${PORT_OPTIONS:MPERCONA} && ( ${PORT_OPTIONS:MMYSQL50} || \
+        ${PORT_OPTIONS:MMYSQL51} )
+        @${ECHO_CMD} "Percona versions 5.0 and 5.1 are not in ports."
+        @${FALSE}
+.endif
+.if ${PORT_OPTIONS:MVIRT_USERS} && !( defined(USE_MYSQL) || \
+	defined(USE_PGSQL) || !defined(WITHOUT_HASH) )
 	@${ECHO_CMD} "You need MySQL, POSTGRESQL or HASH for virtual users."
 	@${FALSE}
 .endif
-.if defined(WITH_PREF_EXT) && !( defined(USE_MYSQL) || \
-	!defined(WITHOUT_POSTGRESQL) )
+.if ${PORT_OPTIONS:MPREF_EXT} && !( defined(USE_MYSQL) || \
+	defined(USE_PGSQL) )
 	@${ECHO_CMD} "You need MySQL or Postgres for preferences extension"
 	@${FALSE}
 .endif
-.ifndef(WITHOUT_DAEMON) && !( defined(USE_MYSQL) || \
-	!defined(WITHOUT_POSTGRESQL) || !defined(WITHOUT_HASH) )
+.if ${PORT_OPTIONS:MDAEMON} && !( defined(USE_MYSQL) || \
+	defined(USE_PQSQL) || ${PORT_OPTIONS:MHASH} )
 	@${ECHO_CMD} "You need MySQL, PostgreSQL or Hash for Daemon mode, because multithreading support is needed"
 	@${FALSE}
 .endif
-.if (!defined(WITHOUT_MYSQL50) && defined(WITH_MYSQL51))
-	@${ECHO_CMD} "You can compile with only one MySQL version driver."
-	@${FALSE}
-.endif
-.if defined(WITH_EXTERNAL_LOOKUP) && !( defined(USE_MYSQL) || \
-	!defined(WITHOUT_POSTGRESQL) || defined(USE_SQLITE) )
+.if ${PORT_OPTIONS:MEXTERNAL_LOOKUP} && !( defined(USE_MYSQL) || \
+	defined(USE_PGSQL) || defined(USE_SQLITE) )
 	@${ECHO_CMD} "You need MySQL, Postgres or SQLITE for EXTERNAL_LOOKUP."
 	@${FALSE}
 .endif
-.if defined(WITH_USER_HOMEDIR) && defined(WITH_WebUI)
+.if ${PORT_OPTIONS:MUSER_HOMEDIR} && defined(WITH_WebUI)
 	@${ECHO_CMD} "USER_HOMEDIR and WebUI are incopatible"
 	@${FALSE}
 .endif
-.if defined(WITH_DOMAIN_SCALE) && defined(WITH_LARGE_SCALE)
-	@${ECHO_CMD} "DOMAIN_SCALE and LARGE_SCALE are incopatible"
-	@${FALSE}
-.endif
-.if defined(WITH_LIGHTHTTPD) && !defined(WITH_WebUI)
+.if ${PORT_OPTIONS:MLIGHTHTTPD} && ! ${PORT_OPTIONS:MWebUI}
 	@${ECHO_CMD} "There's no reason to depend on LightHTTPD if you're not using WebUI"
 	@${FALSE}
 .endif
@@ -548,7 +582,7 @@
 			virtual_user_aliases.sql \
 			virtual_users.sql ${EXAMPLESDIR}/mysql
 .endif
-.ifndef(WITHOUT_POSTGRESQL)
+.ifdef(USE_PGSQL)
 	@${MKDIR} ${EXAMPLESDIR}/pgsql
 	@cd  ${WRKSRC}/src/tools.pgsql_drv && \
 		${INSTALL_DATA} *.sql ${EXAMPLESDIR}/pgsql
@@ -560,7 +594,7 @@
 .endif
 .endif	# NOPORTEXAMPLES
 
-.ifdef(WITH_WebUI)
+.if ${PORT_OPTIONS:MWebUI}
 .	for I in admin.cgi admingraph.cgi configure.pl dspam.cgi graph.cgi templates/strings.pl
 		${REINPLACE_CMD} -e "s,/usr/bin/perl,${PERL},g" ${WRKSRC}/webui/cgi-bin/${I}
 .	endfor


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201305111407.r4BE7Fkh023165>