summaryrefslogtreecommitdiff
path: root/Mk/Uses/gettext.mk
diff options
context:
space:
mode:
authorJason Helfman <jgh@FreeBSD.org>2013-04-23 07:27:18 +0000
committerJason Helfman <jgh@FreeBSD.org>2013-04-23 07:27:18 +0000
commita81cf1434658dc74d0fa643a56d863895081e9b6 (patch)
tree41f96185743768386d18aab3d5a6a0e91fa63589 /Mk/Uses/gettext.mk
parentConvert dns to USES=pkgconfig (diff)
Introduces USES= gettext to replace USE_GETTEXT
  It can take 3 arguments:   build to add gettext into both RUN and BUILD DEPENDS   run to add gettext into RUN_DEPENDS   lib (default,implicit) to add gettext into LIB_DEPENDS   This deprecates USE_GETTEXT. Please convert your ports.   USE_GETTEXT will be removed as soon as it is no longer used in   the ports tree Approved by: portmgr (bapt)
Notes
Notes: svn path=/head/; revision=316316
Diffstat (limited to 'Mk/Uses/gettext.mk')
-rw-r--r--Mk/Uses/gettext.mk31
1 files changed, 31 insertions, 0 deletions
diff --git a/Mk/Uses/gettext.mk b/Mk/Uses/gettext.mk
new file mode 100644
index 000000000000..db93bd6de13f
--- /dev/null
+++ b/Mk/Uses/gettext.mk
@@ -0,0 +1,31 @@
+# $FreeBSD$
+#
+# handle dependency on the gettext (libintl) port
+#
+# MAINTAINER: portmgr@FreeBSD.org
+#
+# Feature: gettext
+# Usage: USES=gettext or USES=gettext:ARGS
+# Valid ARGS: build, run, lib (default, implicit)
+#
+#
+.if !defined(_INCLUDE_USES_GETTEXT_MK)
+_INCLUDE_USES_GETTEXT_MK= yes
+
+_GETTEXT_DEPENDS= xgettext:${PORTSDIR}/devel/gettext
+
+.if !defined(gettext_ARGS)
+gettext_ARGS= lib
+.endif
+
+.if ${gettext_ARGS} == "build"
+BUILD_DEPENDS+= ${_GETTEXT_DEPENDS}
+.elif ${gettext_ARGS} == "run"
+RUN_DEPENDS+= ${_GETTEXT_DEPENDS}
+.elif ${gettext_ARGS} == "lib"
+LIB_DEPENDS+= intl:${PORTSDIR}/devel/gettext
+.else
+IGNORE= USES=gettext - invalid args: [${gettext_ARGS}] specifed
+.endif
+
+.endif