aboutsummaryrefslogtreecommitdiffstats
path: root/Mk
diff options
context:
space:
mode:
authornemysis <nemysis@FreeBSD.org>2013-10-19 06:12:37 +0800
committernemysis <nemysis@FreeBSD.org>2013-10-19 06:12:37 +0800
commit1dfba40c699aa805b7e502a80cffd1b5ffbfffaf (patch)
tree908d36b9437f4275c3b4a45ffaac6c8514cf7102 /Mk
parent22644cbdacf77938989406184aad4bfa137e1288 (diff)
downloadfreebsd-ports-graphics-1dfba40c699aa805b7e502a80cffd1b5ffbfffaf.tar.gz
freebsd-ports-graphics-1dfba40c699aa805b7e502a80cffd1b5ffbfffaf.tar.zst
freebsd-ports-graphics-1dfba40c699aa805b7e502a80cffd1b5ffbfffaf.zip
- New Uses pure.mk
- Provide support for Pure Programming Language based projects PR: ports/179401 Submitted by: nemysis (self) Approved by: pawel (mentor), bapt (portmgr)
Diffstat (limited to 'Mk')
-rw-r--r--Mk/Uses/pure.mk39
1 files changed, 39 insertions, 0 deletions
diff --git a/Mk/Uses/pure.mk b/Mk/Uses/pure.mk
new file mode 100644
index 00000000000..c7fbf4671fb
--- /dev/null
+++ b/Mk/Uses/pure.mk
@@ -0,0 +1,39 @@
+# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
+# $FreeBSD$
+#
+# Provide support for Pure Programming Language based projects
+#
+# MAINTAINER= nemysis@FreeBSD.org
+#
+# Feature: pure
+# Usage: USES=pure or USES=pure:ARGS
+# Valid ARGS: ffi
+# ARGS description:
+# ffi makes the port depends on pure-ffi at runtime
+#
+
+.if !defined(_INCLUDE_USES_PURE_MK)
+_INCLUDE_USES_PURE_MK= yes
+
+_valid_ARGS= ffi
+_pure_ARGS= ${pure_ARGS:C/\:/ /g}
+
+# Sanity check
+.if defined(pure_ARGS) && ${_pure_ARGS} != ffi
+IGNORE=Incorrect 'USES+= pure:${pure_ARGS}' usage: argument [${pure_ARGS}] is not recognized
+.endif
+
+LIB_DEPENDS+= libpure.so:${PORTSDIR}/lang/pure
+.include "${PORTSDIR}/Mk/Uses/gmake.mk"
+
+.if ${_pure_ARGS:Mffi}
+RUN_DEPENDS+= ${LOCALBASE}/lib/pure/ffi.pure:${PORTSDIR}/devel/pure-ffi
+.endif
+
+MAKE_ARGS+= prefix=${PREFIX} mandir=${PREFIX}/man \
+ CC="${CC}" CFLAGS="${CFLAGS}" \
+ CXX="${CXX}" CXXFLAGS="${CXXFLAGS}" \
+ CPPFLAGS+=-I${LOCALBASE}/include \
+ LDFLAGS+=-L${LOCALBASE}/lib
+
+.endif #!defined(_INCLUDE_USES_PURE_MK)