- Try to unbreak parallel (-jX) builds

- Improve knobs sort order within Makefile

Reported by:	crees, marino
Approved by:	ume (maintainer timeout, 3 weeks)
This commit is contained in:
Alexey Dokuchaev 2013-09-24 02:16:35 +00:00
parent 913a7da22a
commit 27f024e3d5
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=328083

View file

@ -15,8 +15,26 @@ LICENSE_FILE= ${WRKSRC}/COPYING
LATEST_LINK= ${PORTNAME}2 LATEST_LINK= ${PORTNAME}2
USES= perl5
USE_PERL5= patch
USE_AUTOTOOLS= libtool USE_AUTOTOOLS= libtool
GNU_CONFIGURE= yes
USE_LDCONFIG= yes USE_LDCONFIG= yes
USE_OPENSSL= yes
NO_STAGE= yes
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc \
--with-configdir=${PREFIX}/lib/sasl2:${PREFIX}/etc/sasl2 \
--with-plugindir=${PREFIX}/lib/sasl2 \
--with-dbpath=${PREFIX}/etc/sasldb2 \
--with-lib-subdir=lib \
--with-pkgconfigdir=${PREFIX}/libdata/pkgconfig \
--includedir=${PREFIX}/include \
--enable-static \
--enable-auth-sasldb \
--with-rc4=openssl \
--with-saslauthd=${SASLAUTHD_RUNPATH} \
--disable-krb4
DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}2 DOCSDIR= ${PREFIX}/share/doc/${PORTNAME}2
@ -37,24 +55,6 @@ MAN3= sasl.3 sasl_authorize_t.3 sasl_auxprop.3 \
sasl_user_exists.3 sasl_verifyfile_t.3 sasl_user_exists.3 sasl_verifyfile_t.3
MAN8= pluginviewer.8 sasldblistusers2.8 saslpasswd2.8 MAN8= pluginviewer.8 sasldblistusers2.8 saslpasswd2.8
USE_OPENSSL= yes
GNU_CONFIGURE= yes
CONFIGURE_ARGS= --sysconfdir=${PREFIX}/etc \
--with-configdir=${PREFIX}/lib/sasl2:${PREFIX}/etc/sasl2 \
--with-plugindir=${PREFIX}/lib/sasl2 \
--with-dbpath=${PREFIX}/etc/sasldb2 \
--with-lib-subdir=lib \
--with-pkgconfigdir=${PREFIX}/libdata/pkgconfig \
--includedir=${PREFIX}/include \
--enable-static \
--enable-auth-sasldb \
--with-rc4=openssl \
--with-saslauthd=${SASLAUTHD_RUNPATH} \
--disable-krb4
MAKE_JOBS_UNSAFE= yes
NO_OPTIONS_SORT= yes NO_OPTIONS_SORT= yes
OPTIONS_DEFINE= ALWAYSTRUE AUTHDAEMOND KEEP_DB_OPEN \ OPTIONS_DEFINE= ALWAYSTRUE AUTHDAEMOND KEEP_DB_OPEN \
OBSOLETE_CRAM_ATTR BDB MYSQL PGSQL OBSOLETE_CRAM_ATTR BDB MYSQL PGSQL
@ -77,7 +77,6 @@ OTP_DESC= OTP authentication
PLAIN_DESC= PLAIN authentication PLAIN_DESC= PLAIN authentication
SCRAM_DESC= SCRAM authentication SCRAM_DESC= SCRAM authentication
NO_STAGE= yes
.include <bsd.port.pre.mk> .include <bsd.port.pre.mk>
.if ${PORT_OPTIONS:MBDB} .if ${PORT_OPTIONS:MBDB}
@ -243,8 +242,8 @@ PKGDEINSTALL= ${WRKDIR}/pkg-deinstall
PKGINSTALL= ${WRKDIR}/pkg-install PKGINSTALL= ${WRKDIR}/pkg-install
PKGMESSAGE= ${WRKDIR}/pkg-message PKGMESSAGE= ${WRKDIR}/pkg-message
# Fix sasldb name in pkg-install/deinstall scripts
post-patch: post-patch:
# Fix sasldb name in pkg-install/deinstall scripts
@${SED} -e "s;%%SASLDB%%;${SASLDB_NAME};g" \ @${SED} -e "s;%%SASLDB%%;${SASLDB_NAME};g" \
-e "s;%%CYRUS_USER%%;${CYRUS_USER};g" \ -e "s;%%CYRUS_USER%%;${CYRUS_USER};g" \
-e "s;%%CYRUS_GROUP%%;${CYRUS_GROUP};g" \ -e "s;%%CYRUS_GROUP%%;${CYRUS_GROUP};g" \
@ -255,6 +254,13 @@ post-patch:
${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL} ${.CURDIR}/pkg-deinstall > ${PKGDEINSTALL}
@${SED} -e "s;%%PREFIX%%;${PREFIX};g" \ @${SED} -e "s;%%PREFIX%%;${PREFIX};g" \
${.CURDIR}/pkg-message > ${PKGMESSAGE} ${.CURDIR}/pkg-message > ${PKGMESSAGE}
# Try to unbreak parallel (-jX) builds, part 1: make build commands atomic
@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${PERL} -w0pi.bak \
-e 's/(^\@am__fastdepCC_TRUE\@.*?) \
\n\@am__fastdepCC_TRUE\@\s+(.*?)$$/$$1 && $$2/mgx'
# Part 2: prevent intermediate *.Tpo output files clash (use unique names)
@${FIND} ${WRKSRC} -name Makefile.in | ${XARGS} ${PERL} -wpi.bak \
-e 's/\$$\*\.Tpo/$$&.$$./g'
# Create Cyrus user and group # Create Cyrus user and group
pre-su-install: pre-su-install:
@ -262,7 +268,6 @@ pre-su-install:
post-install: post-install:
.if ${PORT_OPTIONS:MDOCS} .if ${PORT_OPTIONS:MDOCS}
@${MKDIR} ${DOCSDIR}
@${MKDIR} ${DOCSDIR}/html @${MKDIR} ${DOCSDIR}/html
.for f in ${DOCS} .for f in ${DOCS}
@${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR} @${INSTALL_DATA} ${WRKSRC}/${f} ${DOCSDIR}
@ -276,6 +281,8 @@ post-install:
@${INSTALL_DATA} ${FILESDIR}/Sendmail.README ${DOCSDIR} @${INSTALL_DATA} ${FILESDIR}/Sendmail.README ${DOCSDIR}
.endif .endif
@PKG_PREFIX=${PREFIX} BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL @PKG_PREFIX=${PREFIX} BATCH=${BATCH} ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
@${ECHO_MSG}
@${CAT} ${PKGMESSAGE} @${CAT} ${PKGMESSAGE}
@${ECHO_MSG}
.include <bsd.port.post.mk> .include <bsd.port.post.mk>