fe837ee6c6
- Loop over USES twice, once to define all *_ARGS variables and once to include Uses/*.mk. This allows all Uses/*.mk to examine arguments given to other USES entries. - Always define *_ARGS (possibly empty) and replace commas with spaces. Similar for _USES_POST. Adjust all Uses/*.mk: - defined(u_ARGS) becomes !empty(u_ARGS) - Eliminate helper variables like _*_ARGS=${*_ARGS:C/,/ /g} - Some Uses/*.mk used ":" as argument separator instead of ",", but no port used this form - Uses/cran.mk: remove unused variable VALID_ARGS and USES+=fortran which has no effect - Uses/twisted.mk: simplify handling of the case where neither "build" nor "run" arguments have been specified PR: 193931 Exp-run by: antoine Approved by: portmgr (antoine)
63 lines
1.5 KiB
Makefile
63 lines
1.5 KiB
Makefile
# $FreeBSD$
|
|
#
|
|
# Feature: qmail
|
|
# Usage: USES=qmail or USES=qmail:ARGS
|
|
# Valid ARGS: both (default, implicit), run, build, vars
|
|
#
|
|
# Ports can use the following vars:
|
|
#
|
|
# QMAIL_PREFIX - Define it if qmail is installed in a different PREFIX.
|
|
# Default: /var/qmail
|
|
#
|
|
# QMAIL_SLAVEPORT - Define it if you install a slaveport of qmail, to
|
|
# prevent stale dependencies. Valid slaveports are:
|
|
# ldap, mysql, spamcontrol and tls.
|
|
#
|
|
# MAINTAINER= bdrewery@FreeBSD.org
|
|
|
|
.if !defined(_INCLUDE_QMAIL_MK)
|
|
_INCLUDE_QMAIL_MK= yes
|
|
|
|
QMAIL_PREFIX?= /var/qmail
|
|
|
|
.if empty(qmail_ARGS)
|
|
qmail_ARGS= both
|
|
.endif
|
|
|
|
.if ${qmail_ARGS} == "build"
|
|
BUILD_DEPENDS+= ${_QMAIL_DEPENDS}
|
|
.elif ${qmail_ARGS} == "run"
|
|
RUN_DEPENDS+= ${_QMAIL_DEPENDS}
|
|
.elif ${qmail_ARGS} == "both"
|
|
BUILD_DEPENDS+= ${_QMAIL_DEPENDS}
|
|
RUN_DEPENDS+= ${_QMAIL_DEPENDS}
|
|
.elif ${qmail_ARGS} == "vars"
|
|
.else
|
|
IGNORE= USES=qmail - invalid args: [${qmail_ARGS}] specified
|
|
.endif
|
|
|
|
.if ${qmail_ARGS} != "vars"
|
|
|
|
_QMAIL_VALID_SLAVEPORTS= ldap mysql spamcontrol tls
|
|
|
|
. if defined(QMAIL_SLAVEPORT)
|
|
. for slave in ${_QMAIL_VALID_SLAVEPORTS}
|
|
. if ${QMAIL_SLAVEPORT:tl} == ${slave}
|
|
_QMAIL_SLAVEPORT_OKAY= true
|
|
. endif
|
|
. endfor
|
|
|
|
. if !defined(_QMAIL_SLAVEPORT_OKAY)
|
|
IGNORE= Invalid QMAIL_SLAVEPORT value. Only one can be set, valid values are: ${_QMAIL_VALID_SLAVEPORTS}
|
|
. endif
|
|
. endif
|
|
|
|
. if defined(QMAIL_SLAVEPORT)
|
|
_QMAIL_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail-${QMAIL_SLAVEPORT:tl}
|
|
. else
|
|
_QMAIL_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail
|
|
. endif
|
|
|
|
.endif
|
|
|
|
.endif
|