ports/83315: [NEW PORT] devel/simian: simlarity analysis for source code
Andreas Kohn
andreas at syndrom23.de
Tue Jul 12 07:10:12 UTC 2005
>Number: 83315
>Category: ports
>Synopsis: [NEW PORT] devel/simian: simlarity analysis for source code
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Tue Jul 12 07:10:11 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Andreas Kohn
>Release: FreeBSD 7.0-CURRENT i386
>Organization:
>Environment:
System: FreeBSD 7.0-CURRENT #9: Mon Jul 11 13:12:14 CEST 2005
root at klamath.ankon.de.eu.org:/usr/obj/usr/src/sys/KLAMATH
>Description:
Simian is a program for checking source (and all kinds of text files) for
repeating blocks.
Note to commiter: please also add a note to ports/LEGAL, that simian may only be downloaded if you agree to their license (or in reverse, downloading means agreeing). I contacted the vendor, and he is fine with the way the port follows the license requirements.
>How-To-Repeat:
Try finding port for simian, no success :)
>Fix:
--- simian-2.2.4.shar begins here ---
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# simian
# simian/pkg-descr
# simian/Makefile
# simian/pkg-plist
# simian/distinfo
# simian/files
# simian/files/simian.in
#
echo c - simian
mkdir -p simian > /dev/null 2>&1
echo x - simian/pkg-descr
sed 's/^X//' >simian/pkg-descr << 'END-of-simian/pkg-descr'
XSimian (Similarity Analyser) identifies duplication in Java, C#, C, C++, COBOL,
XRuby, JSP, ASP, HTML, XML, Visual Basic source code and even plain text files.
XIn fact, simian can be used on any human readable files such as ini files,
Xdeployment descriptors, you name it.
X
XNote: The port uses the java version by default. You can select the .NET
X version via WITH_MONO=yes, and disable installation of the java parts
X with WITHOUT_JAVA=yes.
X
XWWW: http://www.redhillconsulting.com.au/products/simian/
END-of-simian/pkg-descr
echo x - simian/Makefile
sed 's/^X//' >simian/Makefile << 'END-of-simian/Makefile'
X# New ports collection makefile for: simian
X# Date created: July 8, 2005
X# Whom: andreas at syndrom23.de
X#
X# $FreeBSD$
X#
X
XPORTNAME= simian
XPORTVERSION= 2.2.4
XCATEGORIES= devel java
XMASTER_SITES= http://www.redhillconsulting.com.au/products/simian/
X
XMAINTAINER= andreas at syndrom23.de
XCOMMENT= Similarity analyser for source and other text files
X
X.if defined(WITHOUT_JAVA) && !defined(WITH_MONO)
XWITH_MONO= yes
X.endif
X
X.if defined(WITH_MONO)
XRUN_DEPENDS+= mono:${PORTSDIR}/lang/mono
X.endif
X
XNO_BUILD= yes
XNO_WRKSUBDIR= yes
XUSE_ZIP= yes
X
X.if !defined(WITHOUT_JAVA)
XUSE_JAVA= yes
XJAVA_VERSION= 1.4+
XPLIST_SUB+= JAVA=""
XSUB_LIST+= JAVA=""
X.else
XPLIST_SUB+= JAVA="@comment "
XSUB_LIST+= JAVA="@comment "
X.endif
X
X.if defined(WITH_MONO)
XPLIST_SUB+= MONO=""
XSUB_LIST+= MONO=""
X.else
XPLIST_SUB+= MONO="@comment "
XSUB_LIST+= MONO="@comment "
X.endif
X
X.if defined(PACKAGE_BUILDING)
XRESTRICTED= "Have to agree to license before download"
X.endif
X
XSUB_FILES= simian
XSUB_LIST+= VERSION=${PORTVERSION}
X
X.if !defined(NOPORTDOCS)
XPORTDOCS= LICENSE.txt changes.html customers.html features.html \
X future_plans.html get_dotnet.png get_it_now.html \
X get_java_blue-button.gif index.html installation.html \
X menu.html overview.html simian.jpg \
X javadoc
X.endif
X
X.include <bsd.port.pre.mk>
X
Xpre-fetch:
X.if !exists(${DISTDIR}/${DISTNAME}${EXTRACT_SUFX})
X.if (!defined(SIMIAN_AGREE_LICENSE) || ${SIMIAN_AGREE_LICENSE} != "yes")
X @${ECHO} By downloading this version, you agree to the terms
X @${ECHO} and conditions set out in the license agreement and
X @${ECHO} you agree that, should you wish to continue using
X @${ECHO} Simian for other than open source projects, non-
X @${ECHO} commercial projects or evaluation purposes for a
X @${ECHO} period greater than 15 days, you will purchase a
X @${ECHO} license as described above.
X @${ECHO}
X @${ECHO} http://www.redhillconsulting.com.au/products/simian/LICENSE.txt
X @${ECHO}
X @${ECHO} Build with SIMIAN_AGREE_LICENSE=yes to continue.
X @${ECHO}
X @${FALSE}
X.endif
X.endif
X
Xdo-install:
X @${MKDIR} ${PREFIX}/share/xsl/${PORTNAME}
X ${CP} ${WRKSRC}/simian.xsl ${PREFIX}/share/xsl/${PORTNAME}
X @${MKDIR} ${PREFIX}/simian
X @${MKDIR} ${PREFIX}/simian/bin
X.if !defined(WITHOUT_JAVA)
X ${CP} ${WRKSRC}/bin/simian-2.2.4.jar ${PREFIX}/simian/bin
X.endif
X.if defined(WITH_MONO)
X ${CP} ${WRKSRC}/bin/*.dll ${PREFIX}/simian/bin
X ${CP} ${WRKSRC}/bin/simian-2.2.4.exe ${PREFIX}/simian/bin
X.endif
X ${CP} ${WRKSRC}/simian ${PREFIX}/bin/simian
X ${CHMOD} a+x ${PREFIX}/bin/simian
X.if !defined(NOPORTDOCS)
X cd ${WRKSRC} \
X && ${FIND} ${PORTDOCS} -type d -exec ${MKDIR} ${DOCSDIR}/\{} \; \
X && ${FIND} ${PORTDOCS} -type f -exec ${INSTALL_DATA} \{} ${DOCSDIR}/\{} \;
X.endif
X
X.include <bsd.port.post.mk>
END-of-simian/Makefile
echo x - simian/pkg-plist
sed 's/^X//' >simian/pkg-plist << 'END-of-simian/pkg-plist'
Xbin/simian
X%%JAVA%%simian/bin/simian-2.2.4.jar
X%%MONO%%simian/bin/simian-2.2.4.exe
X%%MONO%%simian/bin/IKVM.GNU.Classpath.dll
X%%MONO%%simian/bin/IKVM.Runtime.dll
Xshare/xsl/simian/simian.xsl
X at dirrm simian/bin
X at dirrm simian
X at dirrm share/xsl/simian
END-of-simian/pkg-plist
echo x - simian/distinfo
sed 's/^X//' >simian/distinfo << 'END-of-simian/distinfo'
XMD5 (simian-2.2.4.zip) = 815515bfbd7ce4b7f88619c972ed7743
XSIZE (simian-2.2.4.zip) = 2956900
END-of-simian/distinfo
echo c - simian/files
mkdir -p simian/files > /dev/null 2>&1
echo x - simian/files/simian.in
sed 's/^X//' >simian/files/simian.in << 'END-of-simian/files/simian.in'
X#!/bin/sh
X
X%%JAVA%%MONO=
X
X%%MONO%%MONO=%%LOCALBASE%%/bin/mono
X%%MONO%%
X%%MONO%%$MONO %%PREFIX%%/simian/bin/simian-%%VERSION%%.exe $@
X
X%%JAVA%%if [ "$MONO" = "" ]; then
X%%JAVA%% JAVA=`which java`
X%%JAVA%% $JAVA -jar %%PREFIX%%/simian/bin/simian-%%VERSION%%.jar $@
X%%JAVA%%fi
END-of-simian/files/simian.in
exit
--- simian-2.2.4.shar ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list