2013-10-19 00:12:37 +02:00
|
|
|
# Created by: Rusmir Dusko <nemysis@FreeBSD.org>
|
|
|
|
# $FreeBSD$
|
|
|
|
#
|
|
|
|
# Provide support for Pure Programming Language based projects
|
|
|
|
#
|
|
|
|
# Feature: pure
|
|
|
|
# Usage: USES=pure or USES=pure:ARGS
|
|
|
|
# Valid ARGS: ffi
|
|
|
|
# ARGS description:
|
|
|
|
# ffi makes the port depends on pure-ffi at runtime
|
|
|
|
#
|
2014-03-15 11:31:54 +01:00
|
|
|
# MAINTAINER= nemysis@FreeBSD.org
|
2013-10-19 00:12:37 +02:00
|
|
|
|
|
|
|
.if !defined(_INCLUDE_USES_PURE_MK)
|
|
|
|
_INCLUDE_USES_PURE_MK= yes
|
|
|
|
|
|
|
|
_valid_ARGS= ffi
|
|
|
|
|
|
|
|
# Sanity check
|
2014-09-28 18:36:31 +02:00
|
|
|
.for arg in ${pure_ARGS}
|
2013-11-06 23:50:21 +01:00
|
|
|
. if empty(_valid_ARGS:M${arg})
|
|
|
|
IGNORE= Incorrect 'USES+= pure:${pure_ARGS}' usage: argument [${arg}] is not recognized
|
|
|
|
. endif
|
2014-09-28 18:36:31 +02:00
|
|
|
.endfor
|
2013-10-19 00:12:37 +02:00
|
|
|
|
2016-03-27 03:23:25 +02:00
|
|
|
LIB_DEPENDS+= libpure.so:lang/pure
|
2013-11-12 16:13:04 +01:00
|
|
|
.include "${USESDIR}/gmake.mk"
|
2013-10-19 00:12:37 +02:00
|
|
|
|
2014-09-28 18:36:31 +02:00
|
|
|
.if ${pure_ARGS:Mffi}
|
2016-03-27 03:23:25 +02:00
|
|
|
RUN_DEPENDS+= ${LOCALBASE}/lib/pure/ffi.pure:devel/pure-ffi
|
2013-10-19 00:12:37 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
MAKE_ARGS+= prefix=${PREFIX} mandir=${PREFIX}/man \
|
2013-11-06 23:50:21 +01:00
|
|
|
CC=${CC} CFLAGS="${CFLAGS}" \
|
|
|
|
CXX=${CXX} CXXFLAGS="${CXXFLAGS}" \
|
2013-10-19 00:12:37 +02:00
|
|
|
CPPFLAGS+=-I${LOCALBASE}/include \
|
|
|
|
LDFLAGS+=-L${LOCALBASE}/lib
|
|
|
|
|
|
|
|
.endif #!defined(_INCLUDE_USES_PURE_MK)
|