2013-01-24 11:06:09 +01:00
|
|
|
# Created by: Jyun-Yan You <jyyou@cs.nctu.edu.tw>
|
2011-10-14 19:00:39 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= ats
|
|
|
|
PORTVERSION= ${ATS_VER}
|
2011-11-07 05:00:32 +01:00
|
|
|
CATEGORIES= lang
|
2011-11-16 17:14:29 +01:00
|
|
|
MASTER_SITES= SF
|
2011-10-14 19:00:39 +02:00
|
|
|
MASTER_SITE_SUBDIR= ${PORTNAME}-lang/${PORTNAME}-lang/${ATS_IMPL}-${PORTVERSION}
|
|
|
|
DISTNAME= ${PORTNAME}-lang-${ATS_IMPL}-${PORTVERSION}
|
2012-05-28 19:40:27 +02:00
|
|
|
EXTRACT_SUFX= .tgz
|
2011-10-14 19:00:39 +02:00
|
|
|
|
|
|
|
MAINTAINER= jyyou@cs.nctu.edu.tw
|
2013-01-24 11:06:09 +01:00
|
|
|
COMMENT= Language with a type system rooted in the Applied Type System
|
2011-10-14 19:00:39 +02:00
|
|
|
|
|
|
|
ONLY_FOR_ARCHS= i386 amd64
|
|
|
|
USE_GMAKE= yes
|
|
|
|
GNU_CONFIGURE= yes
|
|
|
|
CFLAGS+= -I${LOCALBASE}/include \
|
|
|
|
-L${LOCALBASE}/lib
|
|
|
|
|
2012-09-07 07:09:41 +02:00
|
|
|
PORTDOCS= FAQ.txt
|
2011-10-14 19:00:39 +02:00
|
|
|
PORTEXAMPLES= AUP INTRO KernighanRitchie MISC MULTICORE TEST
|
|
|
|
|
2012-06-13 18:19:08 +02:00
|
|
|
OPTIONS_DEFINE= GMP PCRE
|
|
|
|
OPTIONS_DEFAULT= GMP PCRE
|
|
|
|
|
2011-10-14 19:00:39 +02:00
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
|
|
|
|
.if ${ARCH} == amd64
|
|
|
|
PLIST_SUB+= LIBDIR="lib64"
|
|
|
|
.else
|
|
|
|
PLIST_SUB+= LIBDIR="lib"
|
|
|
|
.endif
|
|
|
|
|
2012-06-13 18:19:08 +02:00
|
|
|
.if ${PORT_OPTIONS:MGMP}
|
|
|
|
LIB_DEPENDS+= gmp:${PORTSDIR}/math/gmp
|
2011-10-14 19:00:39 +02:00
|
|
|
.endif
|
|
|
|
|
2012-06-13 18:19:08 +02:00
|
|
|
.if ${PORT_OPTIONS:MPCRE}
|
|
|
|
LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
|
2011-10-14 19:00:39 +02:00
|
|
|
.endif
|
|
|
|
|
2012-05-28 19:40:27 +02:00
|
|
|
post-patch:
|
|
|
|
${SED} -i '' -e 's/gcc/${CC}/' \
|
|
|
|
${WRKSRC}/ccomp/runtime/GCATS/Makefile \
|
2013-01-24 11:06:09 +01:00
|
|
|
${WRKSRC}/utils/scripts/Makefile \
|
|
|
|
${WRKSRC}/libatsdoc/Makefile
|
2012-05-28 19:40:27 +02:00
|
|
|
${SED} -i '' -e 's/ATSCCOMP_def "gcc"/ATSCCOMP_def "${CC}"/' \
|
|
|
|
${WRKSRC}/utils/scripts/basics.dats
|
|
|
|
${SED} -i '' -e 's/argv_p = "gcc"/argv_p = "${CC}"/' \
|
|
|
|
-e 's/execvp("gcc", argv)/execvp("${CC}", argv)/' \
|
|
|
|
${WRKSRC}/utils/scripts/atslib.dats
|
|
|
|
|
2011-10-14 19:00:39 +02:00
|
|
|
post-configure:
|
2012-06-27 20:07:16 +02:00
|
|
|
.if empty(PORT_OPTIONS:MGMP)
|
2011-10-14 19:00:39 +02:00
|
|
|
${SED} -i '' -e '/HAVE_GMP_H/d' ${WRKSRC}/config.h
|
|
|
|
.endif
|
2012-06-27 20:07:16 +02:00
|
|
|
.if empty(PORT_OPTIONS:MPCRE)
|
2011-10-14 19:00:39 +02:00
|
|
|
${SED} -i '' -e '/HAVE_PCRE_H/d' ${WRKSRC}/config.h
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-install:
|
2013-01-24 11:06:09 +01:00
|
|
|
.if ${PORT_OPTIONS:MDOCS}
|
2011-10-14 19:00:39 +02:00
|
|
|
${MKDIR} ${DOCSDIR}
|
2012-06-13 18:19:08 +02:00
|
|
|
cd ${WRKSRC}/doc && \
|
|
|
|
${COPYTREE_SHARE} "${PORTDOCS}" ${DOCSDIR}
|
2011-10-14 19:00:39 +02:00
|
|
|
.endif
|
|
|
|
.if !defined(NOPORTEXAMPLES)
|
|
|
|
${MKDIR} ${EXAMPLESDIR}
|
2012-06-13 18:19:08 +02:00
|
|
|
cd ${WRKSRC}/doc/EXAMPLE && \
|
|
|
|
${COPYTREE_SHARE} "${PORTEXAMPLES}" ${EXAMPLESDIR}
|
2011-10-14 19:00:39 +02:00
|
|
|
${FIND} ${EXAMPLESDIR} -name Makefile \
|
|
|
|
-exec ${SED} -i '' -e 's|^ATSUSRQ=.*|ATSUSRQ="${PREFIX}"|' {} \;
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.include "bsd.ats.mk"
|
|
|
|
.include <bsd.port.post.mk>
|