From owner-freebsd-ports-bugs@FreeBSD.ORG Sat Jul 20 18:20:00 2013 Return-Path: Delivered-To: freebsd-ports-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9CDE86A5 for ; Sat, 20 Jul 2013 18:20:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 7A9BCF1D for ; Sat, 20 Jul 2013 18:20:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r6KIK07M003229 for ; Sat, 20 Jul 2013 18:20:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r6KIK0LV003228; Sat, 20 Jul 2013 18:20:00 GMT (envelope-from gnats) Resent-Date: Sat, 20 Jul 2013 18:20:00 GMT Resent-Message-Id: <201307201820.r6KIK0LV003228@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Yarema Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 610E2F06 for ; Sat, 20 Jul 2013 18:11:49 +0000 (UTC) (envelope-from yds@dppl.com) Received: from ozark.dppl.com (gateway.dppl.com [96.47.66.197]) by mx1.freebsd.org (Postfix) with ESMTP id 38366E7F for ; Sat, 20 Jul 2013 18:11:49 +0000 (UTC) Received: by ozark.dppl.com (Postfix, from userid 1001) id 3E5908B28; Sat, 20 Jul 2013 14:04:07 -0400 (EDT) Message-Id: <20130720180407.3E5908B28@ozark.dppl.com> Date: Sat, 20 Jul 2013 14:04:07 -0400 (EDT) From: Yarema To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.114 Subject: ports/180704: Refactor mail/dspam/Makefile Cc: Ion-Mihai IOnut Tetcu X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Yarema List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Jul 2013 18:20:00 -0000 >Number: 180704 >Category: ports >Synopsis: Refactor mail/dspam/Makefile >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Jul 20 18:20:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Yarema >Release: FreeBSD 9.1-STABLE amd64 >Organization: NYCBUG.org >Environment: System: FreeBSD 9.1-STABLE amd64 >Description: Clean up the Makefile and OPTIONS. Remove multiple MySQL version selection and leave it to the global system settings. This implicitly enables support for MariaDB and Percona in addition to all the versions of MySQL while simplifying the Makefile at the same time. Add Cyrus24 and Dovecot LDA options. Regroup OPTIONS so all the DB related choices appear together. Otherwise the resulting build should remain the same as before. Similar mail/dspam-devel patch also submitted. The two patches syncronise both ports, other than the minor Makefile differences specific to each version. This ought to make it easier to perhaps eliminate the mail/dspam-devel port altogether and bring mail/dspam up to the latest version, currently 3.10.2 >How-To-Repeat: make -C /usr/ports/mail/dspam install >Fix: diff -u -r -N dspam~/Makefile dspam/Makefile --- dspam~/Makefile 2013-07-20 12:05:19.000000000 -0400 +++ dspam/Makefile 2013-07-20 12:56:37.758736287 -0400 @@ -2,36 +2,36 @@ # $Tecnik: ports/mail/dspam/Makefile,v 1.18 2006/06/07 23:40:55 itetcu Exp $ # $FreeBSD$ -# Note to commiters: If don't commit a maintainer patch and as a result PKGNAME -# or user variables (WITH*) changes please add an entry in ${FILESDIR}/UPDATING -# Thanks. +# Note to commiters: If not committing a maintainer patch and PKGNAME or +# user variables (WITH*) change please add an entry in ${FILESDIR}/UPDATING +# Otherwise the port will be broken. Thanks. PORTNAME= dspam PORTVERSION= 3.9.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= mail MASTER_SITES= SF \ http://T32.TecNik93.com/FreeBSD/ports/${PORTNAME}/sources/ MASTER_SITE_SUBDIR=${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION} MAINTAINER= itetcu@FreeBSD.org -COMMENT= Bayesian spam filter - stable maintenance version +COMMENT= Bayesian spam filter MIN_OPTIONS_VER= ${PORTNAME}-3.9.0 OPTIONS_DEFINE= SYSLOG DEBUG VERBOSE_DEBUG BNR_DEBUG PREF_EXT DAEMON \ - CLAMAV CLAMAV_DEVEL CLAMAV_LOCAL MYSQL_COMPRESS \ - MYSQL_LOCAL PGSQL_LOCAL HASH EXTERNAL_LOOKUP \ + CLAMAV CLAMAV_DEVEL CLAMAV_LOCAL EXTERNAL_LOOKUP \ USER_HOMEDIR TRUSTED_USERS VIRT_USERS LONG_USERNAMES \ LARGE_SCALE DOMAIN_SCALE NICESENDMAIL POSTFIX_MBC \ QMAIL WEBUI LIGHTTPD OPTIONS_MULTI= DB -OPTIONS_MULTI_DB= MYSQL51 MYSQL55 PGSQL SQLITE2 SQLITE3 +OPTIONS_MULTI_DB= HASH MYSQL MYSQL_COMPRESS MYSQL_LOCAL \ + PGSQL PGSQL_LOCAL SQLITE2 SQLITE3 OPTIONS_RADIO= LDA -OPTIONS_RADIO_LDA= CYRUS21 CYRUS22 CYRUS23 EXIM \ - MAILDROP PROCMAIL SAFECAT SENDMAIL +OPTIONS_RADIO_LDA= CYRUS21 CYRUS22 CYRUS23 CYRUS24 DOVECOT1 \ + DOVECOT2 EXIM MAILDROP PROCMAIL SAFECAT SENDMAIL VERBOSE_DEBUG_DESC= Debug in LOGDIR/dspam.debug BNR_DEBUG_DESC= Debug for BNR @@ -40,10 +40,9 @@ CLAMAV_DESC= ClamAV support CLAMAV_DEVEL_DESC= ClamAV support CLAMAV_LOCAL_DESC= RUN_DEPEND on selected ClamAV -MYSQL51_DESC= MySQL 5.1.x as back-end -MYSQL55_DESC= MySQL 5.5.x as back-end +MYSQL_DESC= MySQL 5.X.x as back-end MYSQL_COMPRESS_DESC= Compress dspam <--> MySQL -MYSQL_LOCAL_DESC= RUN_DEPEND on selected MySQL server ver. +MYSQL_LOCAL_DESC= RUN_DEPEND on MySQL server PGSQL_DESC= PostgreSQL as back-end PGSQL_LOCAL_DESC= RUN_DEPEND on PostgreSQL server SQLITE2_DESC= SQLite v2.x as back-end @@ -59,6 +58,9 @@ CYRUS21_DESC= Cyrus's 2.1 deliver as LDA CYRUS22_DESC= Cyrus's 2.2 deliver as LDA CYRUS23_DESC= Cyrus's 2.3 deliver as LDA +CYRUS24_DESC= Cyrus's 2.4 deliver as LDA +DOVECOT1_DESC= Dovecot 1.2 deliver as LDA +DOVECOT2_DESC= Dovecot 2.2 dovecot-lda as LDA EXIM_DESC= Exim as local delivery agent MAILDROP_DESC= Maildrop as local delivery agent PROCMAIL_DESC= Procmail as local delivery agent @@ -70,14 +72,13 @@ WEBUI_DESC= Install WebUI, pulls in Apache or see below OPTIONS_DEFAULT= SYSLOG DEBUG DAEMON CLAMAV CLAMAV_LOCAL \ - PGSQL SQLITE3 HASH + HASH MYSQL MYSQL_COMPRESS PGSQL SQLITE3 MAKE_JOBS_UNSAFE= yes USE_PERL5= yes USE_AUTOTOOLS= libtool USE_LDCONFIG= yes GNU_CONFIGURE= yes -#CONFIGURE_ENV= LDFLAGS="-L${LOCALBASE}/lib" CONFIGURE_ENV= LIBS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}" CPPFLAGS+= -I${LOCALBASE}/include LDFLAGS+= -L${LOCALBASE}/lib @@ -185,13 +186,12 @@ # we need to know if we are building statically or dynamicaly for the plist _DBDRV_COUNT= # blank, but defined so we can check against it -#_DBDRV_ALL= pgsql_drv,sqlite3_drv,sqlite_drv,hash_drv,mysql_drv _DBDRV= pgsql_drv,sqlite3_drv,sqlite_drv,hash_drv,mysql_drv, .if ${PORT_OPTIONS:MPGSQL} USE_PGSQL= yes CONFIGURE_ARGS+= --with-pgsql-includes=${LOCALBASE}/include \ - --with-pgsql-libraries=${LOCALBASE}/lib + --with-pgsql-libraries=${LOCALBASE}/lib PLIST_SUB+= PGSQL="" #PKGNAMESUFFIX= -pgsql _DBDRV_COUNT:= ${_DBDRV_COUNT}o @@ -237,25 +237,17 @@ PLIST_SUB+= HASH="@comment " .endif -.if ${PORT_OPTIONS:MMYSQL51} -WANT_MYSQL_VER= 51 -#PKGNAMESUFFIX= -mysql51 -.elif ${PORT_OPTIONS:MMYSQL55} -WANT_MYSQL_VER= 55 -#PKGNAMESUFFIX= -mysql55 -.endif - -.if ${PORT_OPTIONS:MMYSQL51} || ${PORT_OPTIONS:MMYSQL55} +.if ${PORT_OPTIONS:MMYSQL} USE_MYSQL= yes CONFIGURE_ARGS+= --with-mysql-includes=${LOCALBASE}/include/mysql \ - --with-mysql-libraries=${LOCALBASE}/lib/mysql + --with-mysql-libraries=${LOCALBASE}/lib/mysql PLIST_SUB+= MYSQL="" _DBDRV_COUNT:= ${_DBDRV_COUNT}o . if ${PORT_OPTIONS:MMYSQL_COMPRESS} CONFIGURE_ARGS+= --enable-client-compression . endif . if ${PORT_OPTIONS:MMYSQL_LOCAL} -RUN_DEPENDS+= mysql-server>=0:${PORTSDIR}/databases/mysql${WANT_MYSQL_VER}-server +USE_MYSQL= server SUB_LIST+= MYSQL=mysql . else SUB_LIST+= MYSQL= @@ -282,7 +274,7 @@ #CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" .endif -.if ${PORT_OPTIONS:MUSER_HOMEDIR} +.if ${PORT_OPTIONS:MUSER_HOMEDIR} CONFIGURE_ARGS+= --enable-homedir .endif @@ -319,8 +311,23 @@ CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver' .endif +.if ${PORT_OPTIONS:MCYRUS24} +RUN_DEPENDS+= ${LOCALBASE}/cyrus/bin/deliver:${PORTSDIR}/mail/cyrus-imapd24 +CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/cyrus/bin/deliver' +.endif + +.if ${PORT_OPTIONS:MDOVECOT1} +RUN_DEPENDS+= ${LOCALBASE}/libexec/dovecot/deliver:${PORTSDIR}/mail/dovecot +CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/libexec/dovecot/deliver' +.endif + +.if ${PORT_OPTIONS:MDOVECOT2} +RUN_DEPENDS+= ${LOCALBASE}/libexec/dovecot/dovecot-lda:${PORTSDIR}/mail/dovecot2 +CONFIGURE_ARGS+= --with-delivery-agent='${LOCALBASE}/libexec/dovecot/dovecot-lda' +.endif + .if ${PORT_OPTIONS:MEXIM} -. if ${PORT_OPTIONS:MMYSQL51} || ${PORT_OPTIONS:MMYSQL55} +. if ${PORT_OPTIONS:MMYSQL} _EXIM_EXT= -mysql . elif ${PORT_OPTIONS:MPGSQL} _EXIM_EXT= -postgresql @@ -456,10 +463,10 @@ ${WRKSRC}/src/tools.sqlite_drv/purge-2.sql @${REINPLACE_CMD} -e "s|where julianday('now')-julianday(created_on) > 14;|where julianday('now')-julianday(created_on) > ${SIGNATURE_LIFE};|" \ ${WRKSRC}/src/tools.sqlite_drv/purge-3.sql - @${REINPLACE_CMD} -e "s^%%PERL%%^${PERL}^; s^%%DSPAM_PATH%%^${PREFIX}/bin^" ${WRKSRC}/scripts/train.pl + @${REINPLACE_CMD} -e "s|%%PERL%%|${PERL}|; s|%%DSPAM_PATH%%|${PREFIX}/bin|" ${WRKSRC}/scripts/train.pl pre-configure: -.if ${PORT_OPTIONS:MVIRT_USERS} && !(defined(USE_MYSQL) || \ +.if ${PORT_OPTIONS:MVIRT_USERS} && !( defined(USE_MYSQL) || \ ${PORT_OPTIONS:MPGSQL} || ${PORT_OPTIONS:MHASH} ) @${ECHO_CMD} "You need MySQL, POSTGRESQL or HASH for virtual users." @${FALSE} @@ -474,10 +481,6 @@ @${ECHO_CMD} "You need MySQL, PostgreSQL or Hash for Daemon mode, because multithreading support is needed" @${FALSE} .endif -.if ${PORT_OPTIONS:MMYSQL51} && ${PORT_OPTIONS:MMYSQL55} - @${ECHO_CMD} "You can compile with only one MySQL version driver." - @${FALSE} -.endif .if ${PORT_OPTIONS:MEXTERNAL_LOOKUP} && !( defined(USE_MYSQL) || \ ${PORT_OPTIONS:MPGSQL} || defined(USE_SQLITE) ) @${ECHO_CMD} "You need MySQL, Postgres or SQLITE for EXTERNAL_LOOKUP." diff -u -r -N dspam~/pkg-plist dspam/pkg-plist --- dspam~/pkg-plist 2013-06-08 15:05:55.000000000 -0400 +++ dspam/pkg-plist 2013-07-20 03:24:41.305737234 -0400 @@ -72,23 +72,23 @@ %%PORTDOCS%%%%DOCSDIR%%/UPDATING %%PORTDOCS%%%%DOCSDIR%%/UPGRADING %%PORTDOCS%%@dirrm %%DOCSDIR%% -%%MYSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mysql/mysql_objects-4.1.sql -%%MYSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mysql/mysql_objects-space.sql -%%MYSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mysql/mysql_objects-speed.sql -%%MYSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mysql/purge-4.1.sql -%%MYSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mysql/purge.sql -%%MYSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mysql/virtual_user_aliases.sql -%%MYSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/mysql/virtual_users.sql -%%MYSQL%%%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/mysql -%%PGSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/pgsql_objects.sql -%%PGSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/purge.sql -%%PGSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/purge-pe.sql -%%PGSQL%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/pgsql/virtual_users.sql -%%PGSQL%%%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/pgsql -%%SQLITE%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sqlite/purge-2.sql -%%SQLITE%%%%PORTEXAMPLES%%%%EXAMPLESDIR%%/sqlite/purge-3.sql -%%SQLITE%%%%PORTEXAMPLES%%@dirrm %%EXAMPLESDIR%%/sqlite -@dirrmtry %%PORTEXAMPLES%%%%EXAMPLESDIR%% +%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-4.1.sql +%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-space.sql +%%MYSQL%%%%EXAMPLESDIR%%/mysql/mysql_objects-speed.sql +%%MYSQL%%%%EXAMPLESDIR%%/mysql/purge-4.1.sql +%%MYSQL%%%%EXAMPLESDIR%%/mysql/purge.sql +%%MYSQL%%%%EXAMPLESDIR%%/mysql/virtual_user_aliases.sql +%%MYSQL%%%%EXAMPLESDIR%%/mysql/virtual_users.sql +%%MYSQL%%@dirrm %%EXAMPLESDIR%%/mysql +%%PGSQL%%%%EXAMPLESDIR%%/pgsql/pgsql_objects.sql +%%PGSQL%%%%EXAMPLESDIR%%/pgsql/purge.sql +%%PGSQL%%%%EXAMPLESDIR%%/pgsql/purge-pe.sql +%%PGSQL%%%%EXAMPLESDIR%%/pgsql/virtual_users.sql +%%PGSQL%%@dirrm %%EXAMPLESDIR%%/pgsql +%%SQLITE%%%%EXAMPLESDIR%%/sqlite/purge-2.sql +%%SQLITE%%%%EXAMPLESDIR%%/sqlite/purge-3.sql +%%SQLITE%%@dirrm %%EXAMPLESDIR%%/sqlite +@dirrmtry %%EXAMPLESDIR%% %%WebUI%%%%WWWDIR%%/admins.sample %%WebUI%%%%WWWDIR%%/admin.cgi %%WebUI%%%%WWWDIR%%/admingraph.cgi >Release-Note: >Audit-Trail: >Unformatted: