aboutsummaryrefslogtreecommitdiff
path: root/Mk
diff options
context:
space:
mode:
authorBryan Drewery <bdrewery@FreeBSD.org>2013-03-15 22:03:42 +0000
committerBryan Drewery <bdrewery@FreeBSD.org>2013-03-15 22:03:42 +0000
commit63f96859ce0b25a7057110abdd77cff71ff45681 (patch)
treed72ad8a21ce169d4163dc3bde69207c34ac21e0d /Mk
parent4cf78eacbab3fd0188059a00356e6e23e76e547b (diff)
downloadports-63f96859ce0b25a7057110abdd77cff71ff45681.tar.gz
ports-63f96859ce0b25a7057110abdd77cff71ff45681.zip
Notes
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/qmail.mk64
-rw-r--r--Mk/bsd.mail.mk71
-rw-r--r--Mk/bsd.port.mk4
3 files changed, 64 insertions, 75 deletions
diff --git a/Mk/Uses/qmail.mk b/Mk/Uses/qmail.mk
new file mode 100644
index 000000000000..60d02f11a8d5
--- /dev/null
+++ b/Mk/Uses/qmail.mk
@@ -0,0 +1,64 @@
+# $FreeBSD$
+#
+# MAINTAINER= bdrewery@FreeBSD.org
+#
+# 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.
+#
+
+.if !defined(_INCLUDE_QMAIL_MK)
+_INCLUDE_QMAIL_MK= yes
+
+QMAIL_PREFIX?= /var/qmail
+
+.if !defined(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:L} == ${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:L}
+. else
+_QMAIL_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail
+. endif
+
+.endif
+
+.endif
diff --git a/Mk/bsd.mail.mk b/Mk/bsd.mail.mk
deleted file mode 100644
index 43b7e5c74e06..000000000000
--- a/Mk/bsd.mail.mk
+++ /dev/null
@@ -1,71 +0,0 @@
-#-*- tab-width: 4; -*-
-# ex:ts=4
-#
-# $FreeBSD$
-#
-# Please view me with 4 column tabs!
-
-.if !defined(_POSTMKINCLUDED) && !defined(Mail_Pre_Include)
-
-# Please make sure all changes to this file are passed through the maintainer.
-# Do not commit them yourself (unless of course you're the Port's Wraith ;).
-Mail_Include_MAINTAINER= bdrewery@FreeBSD.org
-Mail_Pre_Include= bsd.mail.mk
-
-
-## Begin QMAIL Stuff
-
-# 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.
-#
-# USE_QMAIL_BUILD - Add qmail or qmail slaveport to BUILD_DEPENDS.
-#
-# USE_QMAIL_RUN - Add qmail or qmail slaveport to RUN_DEPENDS.
-#
-# USE_QMAIL - Add qmail or qmail slaveport to RUN and BUILD_DEPENDS.
-#
-# WANT_QMAIL - Set vars related to qmail, like QMAIL_PREFIX.
-
-QMAIL_PREFIX?= /var/qmail
-
-_QMAIL_VALID_SLAVEPORTS= ldap mysql spamcontrol tls
-
-.if defined(USE_QMAIL) || defined(USE_QMAIL_RUN) || defined (USE_QMAIL_BUILD)
-
-.if defined(QMAIL_SLAVEPORT)
-. for slave in ${_QMAIL_VALID_SLAVEPORTS}
-. if ${QMAIL_SLAVEPORT:L} == ${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:L}
-.else
-QMAIL_DEPENDS= ${QMAIL_PREFIX}/bin/qmail-send:${PORTSDIR}/mail/qmail
-.endif
-
-.if defined(USE_QMAIL) || defined(USE_QMAIL_RUN)
-RUN_DEPENDS+= ${QMAIL_DEPENDS}
-.endif
-
-.if defined(USE_QMAIL) || defined(USE_QMAIL_BUILD)
-BUILD_DEPENDS+= ${QMAIL_DEPENDS}
-.endif
-
-.endif
-
-## End QMAIL Stuff
-
-.endif
diff --git a/Mk/bsd.port.mk b/Mk/bsd.port.mk
index 8280916e6b19..e132a5d5b430 100644
--- a/Mk/bsd.port.mk
+++ b/Mk/bsd.port.mk
@@ -1488,10 +1488,6 @@ PKGCOMPATDIR?= ${LOCALBASE}/lib/compat/pkg
.include "${PORTSDIR}/Mk/bsd.gstreamer.mk"
.endif
-.if defined(USE_QMAIL) || defined(USE_QMAIL_RUN) || defined(USE_QMAIL_BUILD) || defined(WANT_QMAIL)
-.include "${PORTSDIR}/Mk/bsd.mail.mk"
-.endif
-
.if defined(USE_SDL) || defined(WANT_SDL)
.include "${PORTSDIR}/Mk/bsd.sdl.mk"
.endif