ports/188870: [patch] mail/dovecot2 cleanup and pkg-plist fixes
Olli Hauer
ohauer at FreeBSD.org
Mon Apr 21 21:30:01 UTC 2014
>Number: 188870
>Category: ports
>Synopsis: [patch] mail/dovecot2 cleanup and pkg-plist fixes
>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: Mon Apr 21 21:30:00 UTC 2014
>Closed-Date:
>Last-Modified:
>Originator: Olli Hauer
>Release:
>Organization:
>Environment:
>Description:
- cleanup Makefile, (leftovers from copy dovecot e.g PLIST_SUB+= SQL)
- use new OPTIONS features
- use explicit username for USERS (instead ${PORTNAME})
- fix pkg-plist (add missing files + sort)
In case the patch is mangled it can be optained from:
http://people.freebsd.org/~ohauer/diffs/stage/dovecot2_cleanup.diff
>How-To-Repeat:
>Fix:
--- dovecot2_cleanup.diff begins here ---
Index: Makefile
===================================================================
--- Makefile (revision 351703)
+++ Makefile (working copy)
@@ -34,11 +34,10 @@
CONFIGURE_ARGS= --localstatedir=/var \
--with-statedir=/var/db/dovecot \
--without-shadow
-CPPFLAGS+= -I${LOCALBASE}/include
-LDFLAGS+= -L${LOCALBASE}/lib
+
USE_LDCONFIG= ${PREFIX}/lib/dovecot
-USERS= ${PORTNAME} dovenull
+USERS= dovecot dovenull
GROUPS= ${USERS}
PROTOCOLS= imap pop3
@@ -55,148 +54,69 @@
LUCENE_DESC= CLucene FTS support
SOLR_DESC= Solr FTS support
-.include <bsd.port.pre.mk>
+OPTIONS_SUB= yes
+DOCS_CONFIGURE_WITH= docs
+GSSAPI_CONFIGURE_WITH= gssapi
+GSSAPI_LDFLAGS= -lgssapi_krb5
+KQUEUE_CONFIGURE_OFF= --with-ioloop=poll
+KQUEUE_CONFIGURE_ON= --with-ioloop=kqueue
+LDAP_CONFIGURE_WITH= ldap
+LDAP_USE= OPENLDAP=yes
+LIBWRAP_CONFIGURE_WITH= libwrap
+LUCENE_CONFIGURE_WITH= lucene
+LUCENE_LIB_DEPENDS= libclucene-core.so:${PORTSDIR}/textproc/clucene
+MYSQL_CONFIGURE_WITH= mysql
+MYSQL_USE= MYSQL=yes
+PGSQL_CONFIGURE_WITH= pgsql
+PGSQL_USE= PGSQL=yes
+SOLR_BUILD_DEPENDS= curl:${PORTSDIR}/ftp/curl
+SOLR_CONFIGURE_WITH= solr
+SOLR_LIB_DEPENDS= libexpat.so:${PORTSDIR}/textproc/expat2
+SQLITE_CONFIGURE_WITH= sqlite
+SQLITE_USE= SQLITE=3
+SSL_CONFIGURE_OFF= --without-ssl
+SSL_CONFIGURE_ON= --with-ssl=openssl
+VPOPMAIL_BUILD_DEPENDS= ${LOCALBASE}/vpopmail/bin/vchkpw:${PORTSDIR}/mail/vpopmail
+VPOPMAIL_CONFIGURE_WITH=vpopmail
+.include <bsd.port.options.mk>
+
.if ${ARCH} == "arm"
BROKEN= Does not build on arm
.endif
-# sed script for dovecot.conf
-REINPLACE= s!%%PROTOCOLS%%!${PROTOCOLS}!g;\
- s!/usr/!${PREFIX}/!g;\
- s!=/usr!=${PREFIX}!g;\
- s!=/etc !=${PREFIX}/etc !g;\
- s!/etc/dovecot!${PREFIX}&!g;\
- s![[:<:]]doc/(dovecot-[^-]+)-example.conf[[:>:]]!${EXAMPLESDIR}/\1.conf!g;\
- s!\#sendmail_path = /usr/.*!sendmail_path = /usr/sbin/sendmail!g;
-
-.if ${PORT_OPTIONS:MDOCS}
DOCS= AUTHORS COPYING COPYING.LGPL COPYING.MIT INSTALL NEWS TODO README
PORTDOCS= *
-.else
-CONFIGURE_ARGS+= --without-docs
-.endif
-
PORTEXAMPLES= *
-## kqueue(2) support
-#
-.if ${PORT_OPTIONS:MKQUEUE}
-CONFIGURE_ARGS+=--with-ioloop=kqueue
-.else
-CONFIGURE_ARGS+=--with-ioloop=poll
-.endif
-
-## SSL support
-#
.if ${PORT_OPTIONS:MSSL}
PROTOCOLS+= imaps pop3s
-PLIST_SUB+= SSL=""
-.else
-PLIST_SUB+= SSL="@comment "
-CONFIGURE_ARGS+=--without-ssl
.endif
-## GSSAPI support
-#
-.if ${PORT_OPTIONS:MGSSAPI}
-CONFIGURE_ARGS+=--with-gssapi
-LDFLAGS+= -lgssapi_krb5
-.else
-CONFIGURE_ARGS+=--without-gssapi
-.endif
-
-## VPopMail Support
-#
-.if ${PORT_OPTIONS:MVPOPMAIL}
-BUILD_DEPENDS+= ${LOCALBASE}/vpopmail/bin/vchkpw:${PORTSDIR}/mail/vpopmail
-CONFIGURE_ARGS+=--with-vpopmail
-.else
-CONFIGURE_ARGS+=--without-vpopmail
-.endif
-
-## OpenLDAP Support
-#
.if ${PORT_OPTIONS:MLDAP}
-USE_OPENLDAP= yes
-CONFIGURE_ARGS+=--with-ldap
-PLIST_SUB+= LDAP=""
_REQUIRE+= slapd
-.else
-CONFIGURE_ARGS+=--without-ldap
-PLIST_SUB+= LDAP="@comment "
.endif
-## CLucene FTS support
-#
-.if ${PORT_OPTIONS:MLUCENE}
-CONFIGURE_ARGS+=--with-lucene
-LIB_DEPENDS+= libclucene-core.so:${PORTSDIR}/textproc/clucene
-PLIST_SUB+= LUCENE=""
-.else
-PLIST_SUB+= LUCENE="@comment "
-.endif
-
-## PostgreSQL Support
-#
.if ${PORT_OPTIONS:MPGSQL}
-USE_PGSQL= yes
-CONFIGURE_ARGS+=--with-pgsql
-PLIST_SUB+= SQL=""
_REQUIRE+= postgresql
-.else
-CONFIGURE_ARGS+=--without-pgsql
-PLIST_SUB+= SQL="@comment "
.endif
-## MySQL Support
-#
.if ${PORT_OPTIONS:MMYSQL}
-USE_MYSQL= yes
-CONFIGURE_ARGS+=--with-mysql
-PLIST_SUB+= SQL=""
_REQUIRE+= mysql
-.else
-CONFIGURE_ARGS+=--without-mysql
-PLIST_SUB+= SQL="@comment "
.endif
-## SQLite Support
-#
-.if ${PORT_OPTIONS:MSQLITE}
-USE_SQLITE= 3
-CONFIGURE_ARGS+=--with-sqlite
-PLIST_SUB+= SQL=""
-.else
-CONFIGURE_ARGS+=--without-sqlite
-PLIST_SUB+= SQL="@comment "
-.endif
+SUB_LIST+= REQUIRE="${_REQUIRE}"
+SUB_FILES+= pkg-deinstall pkg-message
-## SOLR support
-#
-.if ${PORT_OPTIONS:MSOLR}
-CONFIGURE_ARGS+=--with-solr
-BUILD_DEPENDS+= curl:${PORTSDIR}/ftp/curl
-LIB_DEPENDS+= libexpat.so:${PORTSDIR}/textproc/expat2
-PLIST_SUB+= SOLR=""
-.else
-CONFIGURE_ARGS+=--without-solr
-PLIST_SUB+= SOLR="@comment "
-.endif
+# sed script for dovecot.conf
+REINPLACE= s!%%PROTOCOLS%%!${PROTOCOLS}!g;\
+ s!/usr/!${PREFIX}/!g;\
+ s!=/usr!=${PREFIX}!g;\
+ s!=/etc !=${PREFIX}/etc !g;\
+ s!/etc/dovecot!${PREFIX}&!g;\
+ s![[:<:]]doc/(dovecot-[^-]+)-example.conf[[:>:]]!${EXAMPLESDIR}/\1.conf!g;\
+ s!\#sendmail_path = /usr/.*!sendmail_path = /usr/sbin/sendmail!g;
-## libwrap support
-#
-.if ${PORT_OPTIONS:MLIBWRAP}
-CONFIGURE_ARGS+=--with-libwrap
-PLIST_SUB+= LIBWRAP=""
-.else
-CONFIGURE_ARGS+=--without-libwrap
-PLIST_SUB+= LIBWRAP="@comment "
-.endif
-
-SUB_LIST= REQUIRE="${_REQUIRE}"
-SUB_FILES= pkg-deinstall pkg-message
-
post-patch:
@${REINPLACE_CMD} -E -e '${REINPLACE}' \
${WRKSRC}/doc/example-config/dovecot.conf
@@ -207,9 +127,9 @@
post-install:
@${MKDIR} ${STAGEDIR}${EXAMPLESDIR}
- cd ${WRKSRC}/doc && ${INSTALL_SCRIPT} dovecot-openssl.cnf mkcert.sh ${STAGEDIR}${EXAMPLESDIR}
+ (cd ${WRKSRC}/doc && ${INSTALL_SCRIPT} dovecot-openssl.cnf mkcert.sh ${STAGEDIR}${EXAMPLESDIR})
.if ${PORT_OPTIONS:MDOCS}
- cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
+ ${INSTALL_DATA} ${DOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR}
.endif
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
Index: pkg-plist
===================================================================
--- pkg-plist (revision 351703)
+++ pkg-plist (working copy)
@@ -111,14 +111,14 @@
include/dovecot/http-client-private.h
include/dovecot/http-client.h
include/dovecot/http-date.h
+include/dovecot/http-header-parser.h
include/dovecot/http-header.h
-include/dovecot/http-header-parser.h
include/dovecot/http-message-parser.h
include/dovecot/http-parser.h
+include/dovecot/http-request-parser.h
include/dovecot/http-request.h
-include/dovecot/http-request-parser.h
+include/dovecot/http-response-parser.h
include/dovecot/http-response.h
-include/dovecot/http-response-parser.h
include/dovecot/http-transfer.h
include/dovecot/http-url.h
include/dovecot/imap-arg.h
@@ -135,6 +135,7 @@
include/dovecot/imap-id.h
include/dovecot/imap-list.h
include/dovecot/imap-match.h
+include/dovecot/imap-metadata.h
include/dovecot/imap-msgpart-url.h
include/dovecot/imap-msgpart.h
include/dovecot/imap-notify.h
@@ -199,6 +200,7 @@
include/dovecot/istream-concat.h
include/dovecot/istream-crlf.h
include/dovecot/istream-dot.h
+include/dovecot/istream-fs-file.h
include/dovecot/istream-hash.h
include/dovecot/istream-header-filter.h
include/dovecot/istream-jsonstr.h
@@ -453,6 +455,9 @@
lib/dovecot/lib05_snarf_plugin.a
lib/dovecot/lib05_snarf_plugin.la
lib/dovecot/lib05_snarf_plugin.so
+lib/dovecot/lib10_mail_filter_plugin.a
+lib/dovecot/lib10_mail_filter_plugin.la
+lib/dovecot/lib10_mail_filter_plugin.so
lib/dovecot/lib10_quota_plugin.a
lib/dovecot/lib10_quota_plugin.la
lib/dovecot/lib10_quota_plugin.so
@@ -575,7 +580,9 @@
man/man1/deliver.1.gz
man/man1/doveadm-altmove.1.gz
man/man1/doveadm-auth.1.gz
+man/man1/doveadm-batch.1.gz
man/man1/doveadm-config.1.gz
+man/man1/doveadm-copy.1.gz
man/man1/doveadm-deduplicate.1.gz
man/man1/doveadm-director.1.gz
man/man1/doveadm-dump.1.gz
--- dovecot2_cleanup.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list