aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorlwhsu <lwhsu@FreeBSD.org>2012-06-14 00:19:08 +0800
committerlwhsu <lwhsu@FreeBSD.org>2012-06-14 00:19:08 +0800
commit55b44556b6e8547f5a6f892d6b7edecad845847b (patch)
treef34c3a0ceafef837db4d85b673e93da97904cd8b /lang
parentb361e9a86c4830df60796d9dab16d4e954d13756 (diff)
downloadfreebsd-ports-gnome-55b44556b6e8547f5a6f892d6b7edecad845847b.tar.gz
freebsd-ports-gnome-55b44556b6e8547f5a6f892d6b7edecad845847b.tar.zst
freebsd-ports-gnome-55b44556b6e8547f5a6f892d6b7edecad845847b.zip
- Move ats source to FETCH_DEPENDS to avoid fetch failure in slave ports
- Use the new options framework - Use COPYTREE_SHARE to install data PR: ports/168702 Submitted by: Jyun-Yan You <jyyou@cs.nctu.edu.tw>
Diffstat (limited to 'lang')
-rw-r--r--lang/ats/Makefile38
-rw-r--r--lang/ats/bsd.ats.mk21
2 files changed, 22 insertions, 37 deletions
diff --git a/lang/ats/Makefile b/lang/ats/Makefile
index b917c20373f3..7676c56d16e3 100644
--- a/lang/ats/Makefile
+++ b/lang/ats/Makefile
@@ -16,9 +16,6 @@ EXTRACT_SUFX= .tgz
MAINTAINER= jyyou@cs.nctu.edu.tw
COMMENT= A language with a type system rooted in the Applied Type System
-OPTIONS= GMP "Build with GMP support" on \
- PCRE "Build with PCRE support" on
-
ONLY_FOR_ARCHS= i386 amd64
USE_GMAKE= yes
GNU_CONFIGURE= yes
@@ -28,6 +25,9 @@ CFLAGS+= -I${LOCALBASE}/include \
PORTDOCS= FAQ.txt BOOK
PORTEXAMPLES= AUP INTRO KernighanRitchie MISC MULTICORE TEST
+OPTIONS_DEFINE= GMP PCRE
+OPTIONS_DEFAULT= GMP PCRE
+
.include <bsd.port.pre.mk>
.if ${ARCH} == amd64
@@ -36,12 +36,12 @@ PLIST_SUB+= LIBDIR="lib64"
PLIST_SUB+= LIBDIR="lib"
.endif
-.if !defined(WITHOUT_GMP)
-LIB_DEPENDS+= gmp.10:${PORTSDIR}/math/gmp
+.if ${PORT_OPTIONS:MGMP}
+LIB_DEPENDS+= gmp:${PORTSDIR}/math/gmp
.endif
-.if !defined(WITHOUT_PCRE)
-LIB_DEPENDS+= pcre.1:${PORTSDIR}/devel/pcre
+.if ${PORT_OPTIONS:MPCRE}
+LIB_DEPENDS+= pcre:${PORTSDIR}/devel/pcre
.endif
post-patch:
@@ -55,35 +55,23 @@ post-patch:
${WRKSRC}/utils/scripts/atslib.dats
post-configure:
-.if defined(WITHOUT_GMP)
+.if !${PORT_OPTIONS:MGMP}
${SED} -i '' -e '/HAVE_GMP_H/d' ${WRKSRC}/config.h
.endif
-.if defined(WITHOUT_PCRE)
+.if !${PORT_OPTIONS:MPCRE}
${SED} -i '' -e '/HAVE_PCRE_H/d' ${WRKSRC}/config.h
.endif
post-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
-.for x in ${PORTDOCS}
- cd ${WRKSRC}/doc; \
- ${FIND} ${x} -type d -exec ${INSTALL} -d ${DOCSDIR}/{} \;
-.endfor
-.for x in ${PORTDOCS}
- cd ${WRKSRC}/doc; \
- ${FIND} ${x} -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
-.endfor
+ cd ${WRKSRC}/doc && \
+ ${COPYTREE_SHARE} "${PORTDOCS}" ${DOCSDIR}
.endif
.if !defined(NOPORTEXAMPLES)
${MKDIR} ${EXAMPLESDIR}
-.for x in ${PORTEXAMPLES}
- cd ${WRKSRC}/doc/EXAMPLE; \
- ${FIND} ${x} -type d -exec ${INSTALL} -d ${EXAMPLESDIR}/{} \;
-.endfor
-.for x in ${PORTEXAMPLES}
- cd ${WRKSRC}/doc/EXAMPLE; \
- ${FIND} ${x} -type f -exec ${INSTALL_DATA} {} ${EXAMPLESDIR}/{} \;
-.endfor
+ cd ${WRKSRC}/doc/EXAMPLE && \
+ ${COPYTREE_SHARE} "${PORTEXAMPLES}" ${EXAMPLESDIR}
${FIND} ${EXAMPLESDIR} -name Makefile \
-exec ${SED} -i '' -e 's|^ATSUSRQ=.*|ATSUSRQ="${PREFIX}"|' {} \;
.endif
diff --git a/lang/ats/bsd.ats.mk b/lang/ats/bsd.ats.mk
index bb052f338eac..60a5cfafa6bc 100644
--- a/lang/ats/bsd.ats.mk
+++ b/lang/ats/bsd.ats.mk
@@ -12,8 +12,8 @@ PKGNAMEPREFIX= ${ATS_CTRBPREFIX}
ATS_CTRBPREFIX= ats-contrib-
ATS_CTRBEXAMPLEDIR= ${PREFIX}/share/examples/${ATS_CTRBPREFIX}${PORTNAME}
-BUILD_DEPENDS+= ${LOCALBASE}/bin/atscc:${PORTSDIR}/lang/ats \
- ${NONEXISTENT}:${PORTSDIR}/lang/ats:patch
+FETCH_DEPENDS+= ${NONEXISTENT}:${PORTSDIR}/lang/ats:patch
+BUILD_DEPENDS+= ${LOCALBASE}/bin/atscc:${PORTSDIR}/lang/ats
USE_GMAKE= yes
MAKE_ENV+= ATSHOME=${LOCALBASE}
@@ -32,17 +32,14 @@ pre-build:
${LN} -sf ${BUILD_WRKSRC}/contrib ${BUILD_WRKSRC}/contrib/${ATS_CTRB}/
do-install:
- cd ${INSTALL_WRKSRC}/contrib; \
- ${FIND} -d ${ATS_CTRB} -type d \
- -exec ${INSTALL} -d ${ATS_LIBDIR}/contrib/{} \; ; \
- ${FIND} ${ATS_CTRB} -type f \
- -exec ${INSTALL_DATA} {} ${ATS_LIBDIR}/contrib/{} \;
+ ${MKDIR} ${ATS_LIBDIR}/contrib
+ cd ${INSTALL_WRKSRC}/contrib && \
+ ${RM} -f ${ATS_CTRB}/contrib && \
+ ${COPYTREE_SHARE} ${ATS_CTRB} ${ATS_LIBDIR}/contrib
.if !defined(NOPORTEXAMPLES) && defined(ATS_CTRBEXAMPLE)
- cd ${INSTALL_WRKSRC}/doc/EXAMPLE/${ATS_CTRBEXAMPLE}; \
- ${FIND} -d . -type d \
- -exec ${INSTALL} -d ${ATS_CTRBEXAMPLEDIR}/{} \; ; \
- ${FIND} . -type f \
- -exec ${INSTALL_DATA} {} ${ATS_CTRBEXAMPLEDIR}/{} \;
+ ${MKDIR} ${ATS_CTRBEXAMPLEDIR}
+ cd ${INSTALL_WRKSRC}/doc/EXAMPLE/${ATS_CTRBEXAMPLE} && \
+ ${COPYTREE_SHARE} . ${ATS_CTRBEXAMPLEDIR}
${FIND} ${ATS_CTRBEXAMPLEDIR} -name Makefile \
-exec ${SED} -i '' \
-e 's|^ATSUSRQ=.*|ATSUSRQ="${LOCALBASE}"|' \