diff options
-rw-r--r-- | devel/Makefile | 1 | ||||
-rw-r--r-- | devel/scalatest/Makefile | 50 | ||||
-rw-r--r-- | devel/scalatest/distinfo | 2 | ||||
-rw-r--r-- | devel/scalatest/files/find_scala_home.sh | 24 | ||||
-rw-r--r-- | devel/scalatest/pkg-descr | 4 |
5 files changed, 81 insertions, 0 deletions
diff --git a/devel/Makefile b/devel/Makefile index 9d9b8d9f3cae..3b9010c294ed 100644 --- a/devel/Makefile +++ b/devel/Makefile @@ -3228,6 +3228,7 @@ SUBDIR += sabre SUBDIR += safe-iop SUBDIR += safestr + SUBDIR += scalatest SUBDIR += scandoc SUBDIR += scons SUBDIR += scsh-install-lib diff --git a/devel/scalatest/Makefile b/devel/scalatest/Makefile new file mode 100644 index 000000000000..843497b3d718 --- /dev/null +++ b/devel/scalatest/Makefile @@ -0,0 +1,50 @@ +# New ports collection makefile for: scalatest +# Date created: Nov 16 2010 +# Whom: Mitsuru YOSHIDA +# +# $FreeBSD$ +# + +PORTNAME= scalatest +PORTVERSION= 1.2 +CATEGORIES= devel java +MASTER_SITES= http://www.scalatest.org/releases/ + +MAINTAINER= mitsururike@gmail.com +COMMENT= A regression testing utility for use with the Scala Language + +RUN_DEPENDS= scala>=2.8.0:${PORTSDIR}/lang/scala + +USE_ZIP= yes +USE_JAVA= yes +NO_BUILD= yes + +.include <bsd.port.pre.mk> + +.if !defined(NOPORTDOCS) +PORTDOCS= LICENSE NOTICE README.txt doc +.endif +FIND_SCALA_HOME= ${FILESDIR}/find_scala_home.sh ${PREFIX} +SCALA_HOME= $$(${SH} ${FIND_SCALA_HOME}) +PLIST_FILES= ${SCALA_HOME}/lib/scalatest.jar ${SCALA_HOME}/lib/scalatest-tests.jar + +do-install: + ${INSTALL_DATA} ${INSTALL_WRKSRC}/scalatest-${PORTVERSION}.jar ${PREFIX}/${SCALA_HOME}/lib/scalatest.jar + ${INSTALL_DATA} ${INSTALL_WRKSRC}/scalatest-${PORTVERSION}-tests.jar ${PREFIX}/${SCALA_HOME}/lib/scalatest-tests.jar + cd ${INSTALL_WRKSRC}/src/examples \ + && ${FIND} . -type d -exec ${MKDIR} ${EXAMPLESDIR}/\{} \; \ + && ${FIND} . -type f -exec ${INSTALL_DATA} \{} ${EXAMPLESDIR}/\{} \; +.if !defined(NOPORTDOCS) + cd ${INSTALL_WRKSRC} \ + && ${FIND} ${PORTDOCS} -type d -exec ${MKDIR} ${DOCSDIR}/\{} \; \ + && ${FIND} ${PORTDOCS} -type f -exec ${INSTALL_DATA} \{} ${DOCSDIR}/\{} \; +.endif + +post-install: + @cd ${INSTALL_WRKSRC}/src/examples \ + && ${FIND} -s . -type f \ + | ${SED} 's,^\.,${EXAMPLESDIR:S,^${PREFIX}/,,},' >>${TMPPLIST} \ + && ${FIND} -s -d . -type d \ + | ${SED} 's,^\.,@dirrm ${EXAMPLESDIR:S,^${PREFIX}/,,},' >>${TMPPLIST} + +.include <bsd.port.post.mk> diff --git a/devel/scalatest/distinfo b/devel/scalatest/distinfo new file mode 100644 index 000000000000..e81ea248ad8a --- /dev/null +++ b/devel/scalatest/distinfo @@ -0,0 +1,2 @@ +SHA256 (scalatest-1.2.zip) = af5683f0add5e7603518f81b733bbbdf6df297dbd3e1628514cb4bd73a534731 +SIZE (scalatest-1.2.zip) = 7767284 diff --git a/devel/scalatest/files/find_scala_home.sh b/devel/scalatest/files/find_scala_home.sh new file mode 100644 index 000000000000..18ef210e36ed --- /dev/null +++ b/devel/scalatest/files/find_scala_home.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +PREFIX=$1 +SOURCE=$PREFIX"/bin/scala"; +SCRIPT=`basename "$SOURCE"`; +while [ -h "$SOURCE" ]; do + SCRIPT=`basename "$SOURCE"`; + LOOKUP=`ls -ld "$SOURCE"`; + TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`; + if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then + SOURCE=${TARGET:-.}; + else + SOURCE=`dirname "$SOURCE"`/${TARGET:-.}; + fi; +done; + +SCALA_HOME=`dirname "$SOURCE"` +SCALA_HOME=`cd "$SCALA_HOME"; pwd -P` +SCALA_HOME=`cd "$SCALA_HOME"/..; pwd` +SCALA_HOME=`expr $SCALA_HOME : "$PREFIX/\(.*\)"` + +echo $SCALA_HOME + +exit 0 diff --git a/devel/scalatest/pkg-descr b/devel/scalatest/pkg-descr new file mode 100644 index 000000000000..22500cc3a319 --- /dev/null +++ b/devel/scalatest/pkg-descr @@ -0,0 +1,4 @@ +ScalaTest is a testing framework for Scala developed by Bill Venners, George +Berger, Josh Cough, and other contributors starting in late 2007. + +WWW: http://www.scalatest.org/ |