From 553525cd39835d39987dda08dd4c5e3785bfc27b Mon Sep 17 00:00:00 2001 From: Aleksandar Samardzic Date: Tue, 11 May 2010 20:00:31 +0200 Subject: development/sloccount: Added to 12.0 repository --- development/sloccount/README | 23 +++++++++++ development/sloccount/slack-desc | 19 +++++++++ development/sloccount/sloccount.SlackBuild | 65 ++++++++++++++++++++++++++++++ development/sloccount/sloccount.info | 8 ++++ 4 files changed, 115 insertions(+) create mode 100644 development/sloccount/README create mode 100644 development/sloccount/slack-desc create mode 100644 development/sloccount/sloccount.SlackBuild create mode 100644 development/sloccount/sloccount.info (limited to 'development/sloccount') diff --git a/development/sloccount/README b/development/sloccount/README new file mode 100644 index 0000000000000..e70e86262b4e2 --- /dev/null +++ b/development/sloccount/README @@ -0,0 +1,23 @@ +SLOCCount is a set of tools for counting physical Source Lines of Code +(SLOC) in a large number of languages. It can measure 19 different +languages, including C, C++, Perl, LISP/Scheme, and Python (A complete +list is available on the home page). + +SLOCCount includes a number of heuristics, so it can automatically +detect file types, even those that don't use the "standard" extensions, +and conversely, it can detect many files that have a standard extension +but aren't really of that type. The SLOC counters have enough smarts to +handle oddities of several languages. For example, SLOCCount examines +assembly language files, determines the comment scheme, and then +correctly counts the lines automatically. It also correctly handles +language constructs that are often mishandled by other tools, such as +Python's constant strings when used as comments and Perl's "perlpod" +documentation. + +SLOCCount will even automatically estimate the effort, time, and money +it would take to develop the software (if it was developed as +traditional proprietary software). Without options, it will use the +basic COCOMO model, which makes these estimates solely from the count of +lines of code. You can get better estimates if you have more information +about the project; see the SLOCCount documentation for information on +how to control the estimation formulas used in SLOCCount. diff --git a/development/sloccount/slack-desc b/development/sloccount/slack-desc new file mode 100644 index 0000000000000..497a5b9fe431f --- /dev/null +++ b/development/sloccount/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + + |-----handy-ruler------------------------------------------------------| +sloccount: SLOCCount (Source Lines of Code Counter) +sloccount: +sloccount: SLOCCount is a set of tools for counting physical Source +sloccount: Lines of Code (SLOC) in a large number of languages. It can +sloccount: measure 19 different languages, including C, C++, Perl, +sloccount: LISP/Scheme, and Python (A complete list is available on the +sloccount: home page). +sloccount: +sloccount: SLOCcount home page is: http://www.dwheeler.com/sloccount/ +sloccount: +sloccount: diff --git a/development/sloccount/sloccount.SlackBuild b/development/sloccount/sloccount.SlackBuild new file mode 100644 index 0000000000000..0ecf82bf0e962 --- /dev/null +++ b/development/sloccount/sloccount.SlackBuild @@ -0,0 +1,65 @@ +#!/bin/sh + +# Slackware build script for SLOCcount +# Written by Aleksandar B. Samardzic +# Modified by the SlackBuilds.org project + +PRGNAM=sloccount +VERSION=2.26 +ARCH=${ARCH:-i486} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION +chown -R root:root . +chmod -R u+w,go+r-w,a-s . + +# Patching makefile; patch posted upstream, so following line should be +# (hopefully) deleted sometimes. +sed -i \ + -e '40s/$/ $(CFLAGS)/' \ + -e '73s/share/usr/' \ + -e '166a\\t$(INSTALL_A_DIR) $(INSTALL_DIR)' \ + -e '187s/ install_docs//' \ + makefile + +CFLAGS="$SLKCFLAGS" CXXFLAGS="$SLCKCFLAGS" make +make install PREFIX=$PKG + +( cd $PKG + find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null + find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null +) + +( cd $PKG/usr/man + find . -type f -exec gzip -9 {} \; + for i in $(find . -type l) ; do ln -s $(readlink $i).gz $i.gz ; rm $i ; done +) + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING ChangeLog README SOURCES TODO sloccount.html table.html \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz diff --git a/development/sloccount/sloccount.info b/development/sloccount/sloccount.info new file mode 100644 index 0000000000000..66f0d489020ae --- /dev/null +++ b/development/sloccount/sloccount.info @@ -0,0 +1,8 @@ +PRGNAM="sloccount" +VERSION="2.26" +HOMEPAGE="http://www.dwheeler.com/sloccount/" +DOWNLOAD="http://www.dwheeler.com/sloccount/sloccount-2.26.tar.gz" +MD5SUM="09abd6e2a016ebaf7552068a1dba1249" +MAINTAINER="Aleksandar B. Samardzic" +EMAIL="asamardzic@matf.bg.ac.yu" +APPROVED="rworkman" -- cgit v1.2.3