diff options
author | Aleksandar Samardzic <asamardzic@matf.bg.ac.yu> | 2010-05-11 20:00:31 +0200 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-11 20:00:31 +0200 |
commit | 553525cd39835d39987dda08dd4c5e3785bfc27b (patch) | |
tree | f2e3f0413ebf01363db518c02b6b36543310bc7f /development/sloccount | |
parent | 621bdb523ea319921bd07e4bd149ed95f8c3b7a4 (diff) | |
download | slackbuilds-553525cd39835d39987dda08dd4c5e3785bfc27b.tar.gz |
development/sloccount: Added to 12.0 repository
Diffstat (limited to 'development/sloccount')
-rw-r--r-- | development/sloccount/README | 23 | ||||
-rw-r--r-- | development/sloccount/slack-desc | 19 | ||||
-rw-r--r-- | development/sloccount/sloccount.SlackBuild | 65 | ||||
-rw-r--r-- | development/sloccount/sloccount.info | 8 |
4 files changed, 115 insertions, 0 deletions
diff --git a/development/sloccount/README b/development/sloccount/README new file mode 100644 index 0000000000..e70e86262b --- /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 0000000000..497a5b9fe4 --- /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 0000000000..0ecf82bf0e --- /dev/null +++ b/development/sloccount/sloccount.SlackBuild @@ -0,0 +1,65 @@ +#!/bin/sh + +# Slackware build script for SLOCcount +# Written by Aleksandar B. Samardzic <asamardzic@matf.bg.ac.yu> +# 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 0000000000..66f0d48902 --- /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" |