svn commit: r330779 - head/Mk/Uses
Rusmir Dusko
nemysis at FreeBSD.org
Fri Oct 18 22:12:38 UTC 2013
Author: nemysis
Date: Fri Oct 18 22:12:37 2013
New Revision: 330779
URL: http://svnweb.freebsd.org/changeset/ports/330779
Log:
- 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)
Added:
head/Mk/Uses/pure.mk (contents, props changed)
Added: head/Mk/Uses/pure.mk
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/Mk/Uses/pure.mk Fri Oct 18 22:12:37 2013 (r330779)
@@ -0,0 +1,39 @@
+# Created by: Rusmir Dusko <nemysis at FreeBSD.org>
+# $FreeBSD$
+#
+# Provide support for Pure Programming Language based projects
+#
+# MAINTAINER= nemysis at 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)
More information about the svn-ports-all
mailing list