pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/sloccount



Module Name:    pkgsrc
Committed By:   khorben
Date:           Mon Sep  4 11:00:36 UTC 2017

Added Files:
        pkgsrc/devel/sloccount: DESCR Makefile PLIST distinfo
        pkgsrc/devel/sloccount/patches: patch-compute__all
            patch-compute__sloc__lang patch-lex__count patch-makefile
            patch-rpm__unpacker patch-sloccount

Log Message:
Import sloccount 2.26 as devel/sloccount

sloccount is a set of tools for counting physical Source Lines of Code (SLOC)
in a large number of languages of a potentially large set of programs.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/sloccount/DESCR \
    pkgsrc/devel/sloccount/Makefile pkgsrc/devel/sloccount/PLIST \
    pkgsrc/devel/sloccount/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/devel/sloccount/patches/patch-compute__all \
    pkgsrc/devel/sloccount/patches/patch-compute__sloc__lang \
    pkgsrc/devel/sloccount/patches/patch-lex__count \
    pkgsrc/devel/sloccount/patches/patch-makefile \
    pkgsrc/devel/sloccount/patches/patch-rpm__unpacker \
    pkgsrc/devel/sloccount/patches/patch-sloccount

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Added files:

Index: pkgsrc/devel/sloccount/DESCR
diff -u /dev/null pkgsrc/devel/sloccount/DESCR:1.1
--- /dev/null   Mon Sep  4 11:00:36 2017
+++ pkgsrc/devel/sloccount/DESCR        Mon Sep  4 11:00:36 2017
@@ -0,0 +1,2 @@
+Set of tools for counting physical Source Lines of Code (SLOC) in a large
+number of languages of a potentially large set of programs.
Index: pkgsrc/devel/sloccount/Makefile
diff -u /dev/null pkgsrc/devel/sloccount/Makefile:1.1
--- /dev/null   Mon Sep  4 11:00:36 2017
+++ pkgsrc/devel/sloccount/Makefile     Mon Sep  4 11:00:36 2017
@@ -0,0 +1,68 @@
+# $NetBSD: Makefile,v 1.1 2017/09/04 11:00:36 khorben Exp $
+
+
+DISTNAME=      sloccount-2.26
+CATEGORIES=    devel
+MASTER_SITES=  http://www.dwheeler.com/sloccount/
+
+MAINTAINER=    khorben%defora.org@localhost
+HOMEPAGE=      http://www.dwheeler.com/sloccount/
+COMMENT=       Counting physical Source Lines of Code (SLOC)
+
+LICENSE=       gnu-gpl-v2
+
+USE_TOOLS+=    flex gunzip perl
+
+MAKE_FILE=     makefile
+MAKE_FLAGS+=   PREFIX=${PREFIX}
+MAKE_FLAGS+=   CFLAGS=${CFLAGS:Q}
+MAKE_FLAGS+=   LDFLAGS=${LDFLAGS:Q}
+MAKE_FLAGS+=   DESTDIR=${DESTDIR}
+MAKE_FLAGS+=   INSTALL_DIR=${DESTDIR}${PREFIX}/libexec/sloccount
+
+.include "../../mk/bsd.prefs.mk"
+MAKE_FLAGS+=   DOC_DIR=${DESTDIR}${PREFIX}/share/doc/sloccount
+MAKE_FLAGS+=   MAN_DIR=${DESTDIR}${PREFIX}/${PKGMANDIR}
+AUTO_MKDIRS=   yes
+
+REPLACE_PERL=          append_license
+REPLACE_PERL+=         append_specname
+REPLACE_PERL+=         asm_count
+REPLACE_PERL+=         break_filelist
+REPLACE_PERL+=         cobol_count
+REPLACE_PERL+=         count_extensions
+REPLACE_PERL+=         extract-count
+REPLACE_PERL+=         extract_license
+REPLACE_PERL+=         f90_count
+REPLACE_PERL+=         fortran_count
+REPLACE_PERL+=         generic_count
+REPLACE_PERL+=         get_sloc
+REPLACE_PERL+=         get_sloc_details
+REPLACE_PERL+=         haskell_count
+REPLACE_PERL+=         lex_count
+REPLACE_PERL+=         modula3_count
+REPLACE_PERL+=         objc_count
+REPLACE_PERL+=         perl_count
+REPLACE_PERL+=         print_sum
+REPLACE_PERL+=         python_count
+REPLACE_PERL+=         simplecount
+REPLACE_PERL+=         sql_count
+
+SUBST_CLASSES+=                generic
+SUBST_MESSAGE.generic= Fixing path to internal generic_count binary.
+SUBST_STAGE.generic=   post-patch
+SUBST_SED.generic=     -e 's,^generic_count,${PREFIX}/libexec/sloccount/&,g'
+SUBST_FILES.generic=   ada_count awk_count csh_count exp_count lisp_count \
+                       makefile_count ruby_count sed_count sh_count tcl_count
+
+SUBST_CLASSES+=                prefix
+SUBST_MESSAGE.prefix=  Fixing path to internal binaries.
+SUBST_STAGE.prefix=    post-patch
+SUBST_SED.prefix=      -e 's,@PREFIX@,${PREFIX},g'
+SUBST_FILES.prefix=    compute_all compute_sloc_lang lex_count sloccount
+
+post-install:
+       ${MV} ${DESTDIR}${PREFIX}/libexec/sloccount/sloccount ${DESTDIR}${PREFIX}/bin/sloccount
+       ${GUNZIP_CMD} ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1/sloccount.1.gz
+
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/devel/sloccount/PLIST
diff -u /dev/null pkgsrc/devel/sloccount/PLIST:1.1
--- /dev/null   Mon Sep  4 11:00:36 2017
+++ pkgsrc/devel/sloccount/PLIST        Mon Sep  4 11:00:36 2017
@@ -0,0 +1,46 @@
+@comment $NetBSD: PLIST,v 1.1 2017/09/04 11:00:36 khorben Exp $
+bin/sloccount
+libexec/sloccount/ada_count
+libexec/sloccount/asm_count
+libexec/sloccount/awk_count
+libexec/sloccount/break_filelist
+libexec/sloccount/c_count
+libexec/sloccount/cobol_count
+libexec/sloccount/compute_all
+libexec/sloccount/compute_sloc_lang
+libexec/sloccount/count_extensions
+libexec/sloccount/count_unknown_ext
+libexec/sloccount/csh_count
+libexec/sloccount/exp_count
+libexec/sloccount/f90_count
+libexec/sloccount/fortran_count
+libexec/sloccount/generic_count
+libexec/sloccount/get_sloc
+libexec/sloccount/get_sloc_details
+libexec/sloccount/haskell_count
+libexec/sloccount/java_count
+libexec/sloccount/jsp_count
+libexec/sloccount/lex_count
+libexec/sloccount/lexcount1
+libexec/sloccount/lisp_count
+libexec/sloccount/make_filelists
+libexec/sloccount/makefile_count
+libexec/sloccount/ml_count
+libexec/sloccount/modula3_count
+libexec/sloccount/objc_count
+libexec/sloccount/pascal_count
+libexec/sloccount/perl_count
+libexec/sloccount/php_count
+libexec/sloccount/print_sum
+libexec/sloccount/python_count
+libexec/sloccount/ruby_count
+libexec/sloccount/sed_count
+libexec/sloccount/sh_count
+libexec/sloccount/show_filecount
+libexec/sloccount/sql_count
+libexec/sloccount/tcl_count
+man/man1/sloccount.1
+share/doc/sloccount/ChangeLog
+share/doc/sloccount/README
+share/doc/sloccount/TODO
+share/doc/sloccount/sloccount.html
Index: pkgsrc/devel/sloccount/distinfo
diff -u /dev/null pkgsrc/devel/sloccount/distinfo:1.1
--- /dev/null   Mon Sep  4 11:00:36 2017
+++ pkgsrc/devel/sloccount/distinfo     Mon Sep  4 11:00:36 2017
@@ -0,0 +1,12 @@
+$NetBSD: distinfo,v 1.1 2017/09/04 11:00:36 khorben Exp $
+
+SHA1 (sloccount-2.26.tar.gz) = 505031c6adfb93e454aaf8b0ee7de04122079d13
+RMD160 (sloccount-2.26.tar.gz) = a5bd1dbe8bd5e5c52ed790990c0d5d8fc49b26ff
+SHA512 (sloccount-2.26.tar.gz) = ed6ab315a56dbdc86c654b94e790c9ea9e2dcad0db26b63c0973c33eb7fa634b4ade0a1f3c6ccfd5172ea95f648c1dd3b0ae2575b0aa44b3fec708c24a6aca54
+Size (sloccount-2.26.tar.gz) = 190948 bytes
+SHA1 (patch-compute__all) = 86bee28f56a366c63f122a417bad92020e748df1
+SHA1 (patch-compute__sloc__lang) = 8692b6b086aad2cf986123c85f70229017a9bf37
+SHA1 (patch-lex__count) = b9014c54a9a4a3a39bb84c5b008be486931ea57f
+SHA1 (patch-makefile) = 0f696e08486299dadd919d3aee1d31d01d1c6ad1
+SHA1 (patch-rpm__unpacker) = 1bd30245b1ad1c6de72c0ec63acbd76b95d79efb
+SHA1 (patch-sloccount) = 610b0033e7b0e10939f1d4b5ec3f7e1fcaa83827

Index: pkgsrc/devel/sloccount/patches/patch-compute__all
diff -u /dev/null pkgsrc/devel/sloccount/patches/patch-compute__all:1.1
--- /dev/null   Mon Sep  4 11:00:36 2017
+++ pkgsrc/devel/sloccount/patches/patch-compute__all   Mon Sep  4 11:00:36 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-compute__all,v 1.1 2017/09/04 11:00:36 khorben Exp $
+
+Correct path to the helper binaries
+
+--- compute_all.orig   2004-08-01 03:01:39.000000000 +0000
++++ compute_all
+@@ -72,7 +72,7 @@ do
+        dup) true ;;
+        auto) true ;;
+        *)
+-         numsloc=`compute_sloc_lang $language "." | tr -d " "`
++         numsloc=`@PREFIX@/libexec/sloccount/compute_sloc_lang $language "." | tr -d " "`
+          echo "$language      $numsloc" >> all-physical.sloc.new
+        ;;
+      esac
Index: pkgsrc/devel/sloccount/patches/patch-compute__sloc__lang
diff -u /dev/null pkgsrc/devel/sloccount/patches/patch-compute__sloc__lang:1.1
--- /dev/null   Mon Sep  4 11:00:36 2017
+++ pkgsrc/devel/sloccount/patches/patch-compute__sloc__lang    Mon Sep  4 11:00:36 2017
@@ -0,0 +1,17 @@
+$NetBSD: patch-compute__sloc__lang,v 1.1 2017/09/04 11:00:36 khorben Exp $
+
+Correct path to the helper binaries
+
+--- compute_sloc_lang.orig     2004-08-01 03:02:54.000000000 +0000
++++ compute_sloc_lang
+@@ -49,8 +49,8 @@ do
+    esac
+ 
+    case "$use_c_count" in
+-     y) c_count -f ${language}_list.dat > ${language}_outfile.dat ;;
+-     *) ${language}_count -f ${language}_list.dat > ${language}_outfile.dat
++     y) "@PREFIX@/libexec/sloccount/c_count" -f ${language}_list.dat > ${language}_outfile.dat ;;
++     *) "@PREFIX@/libexec/sloccount/${language}_count" -f ${language}_list.dat > ${language}_outfile.dat
+         ;;
+    esac
+    tail -1 < ${language}_outfile.dat
Index: pkgsrc/devel/sloccount/patches/patch-lex__count
diff -u /dev/null pkgsrc/devel/sloccount/patches/patch-lex__count:1.1
--- /dev/null   Mon Sep  4 11:00:36 2017
+++ pkgsrc/devel/sloccount/patches/patch-lex__count     Mon Sep  4 11:00:36 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-lex__count,v 1.1 2017/09/04 11:00:36 khorben Exp $
+
+Correct path to the helper binaries
+
+--- lex_count.orig     2004-08-01 03:06:09.000000000 +0000
++++ lex_count
+@@ -62,7 +62,7 @@ sub count_file {
+   my ($file) = @_;
+   my $sloc = 0;
+ 
+-  $sloc = `lexcount1 < "$file"`;
++  $sloc = `@PREFIX@/libexec/sloccount/lexcount1 < "$file"`;
+   chomp($sloc);
+   print "$sloc $file\n";
+   $total_sloc += $sloc;
Index: pkgsrc/devel/sloccount/patches/patch-makefile
diff -u /dev/null pkgsrc/devel/sloccount/patches/patch-makefile:1.1
--- /dev/null   Mon Sep  4 11:00:36 2017
+++ pkgsrc/devel/sloccount/patches/patch-makefile       Mon Sep  4 11:00:36 2017
@@ -0,0 +1,79 @@
+$NetBSD: patch-makefile,v 1.1 2017/09/04 11:00:36 khorben Exp $
+
+- Add support for CFLAGS and LDFLAGS
+- Correct permissions when installing manual pages and documentation
+
+--- makefile.orig      2004-08-01 18:52:06.000000000 +0000
++++ makefile
+@@ -37,7 +37,9 @@ EXE_SUFFIX=
+ # Set this to your C compiler, if it's not "gcc"; a likely alternative is "cc".
+ # The "-Wall" option turns on warnings in gcc.  gcc users might also want
+ # to consider using "-Werror", which turns warnings into errors.
+-CC=gcc -Wall
++CC=gcc
++CFLAGS=-Wall
++LDFLAGS=
+ 
+ # Set this to the name of your "install" program.  On some systems,
+ # "install -C" would be useful (so unchanged files won't be modified),
+@@ -128,28 +130,28 @@ MYDOCS=sloccount.html README TODO Change
+ all: $(COMPILED_EXECUTABLES)
+ 
+ lexcount1$(EXE_SUFFIX): lexcount1.c
+-      $(CC) lexcount1.c -o lexcount1$(EXE_SUFFIX)
++      $(CC) $(CFLAGS) $(LDFLAGS) lexcount1.c -o lexcount1$(EXE_SUFFIX)
+ 
+ c_count$(EXE_SUFFIX): c_count.c
+-      $(CC) c_count.c -o c_count$(EXE_SUFFIX)
++      $(CC) $(CFLAGS) $(LDFLAGS) c_count.c -o c_count$(EXE_SUFFIX)
+ 
+ php_count$(EXE_SUFFIX): php_count.c
+-      $(CC) php_count.c -o php_count$(EXE_SUFFIX)
++      $(CC) $(CFLAGS) $(LDFLAGS) php_count.c -o php_count$(EXE_SUFFIX)
+ 
+ pascal_count.c: pascal_count.l driver.c driver.h
+       flex -Cfe -t pascal_count.l > pascal_count.c
+ 
+ pascal_count$(EXE_SUFFIX): pascal_count.c
+-      $(CC) pascal_count.c -o pascal_count$(EXE_SUFFIX)
++      $(CC) $(CFLAGS) $(LDFLAGS) pascal_count.c -o pascal_count$(EXE_SUFFIX)
+ 
+ jsp_count.c: jsp_count.l driver.c driver.h
+       flex -Cfe -t jsp_count.l > jsp_count.c
+ 
+ jsp_count$(EXE_SUFFIX): jsp_count.c
+-      $(CC) jsp_count.c -o jsp_count$(EXE_SUFFIX)
++      $(CC) $(CFLAGS) $(LDFLAGS) jsp_count.c -o jsp_count$(EXE_SUFFIX)
+ 
+ ml_count$(EXE_SUFFIX): ml_count.c
+-      $(CC) ml_count.c -o ml_count$(EXE_SUFFIX)
++      $(CC) $(CFLAGS) $(LDFLAGS) ml_count.c -o ml_count$(EXE_SUFFIX)
+ 
+ sloccount.1.gz: sloccount.1
+       gzip -c sloccount.1 > sloccount.1.gz
+@@ -160,7 +162,7 @@ java_count$(EXE_SUFFIX): c_count$(EXE_SU
+ 
+ # This is USC's code counter, not built by default:
+ c_lines: C_LINES.C
+-      $(CC) C_LINES.C -o c_lines$(EXE_SUFFIX)
++      $(CC) $(CFLAGS) $(LDFLAGS) C_LINES.C -o c_lines$(EXE_SUFFIX)
+ 
+ 
+ install_programs: all
+@@ -171,14 +173,14 @@ uninstall_programs:
+ 
+ install_man: $(MANPAGES)
+       $(INSTALL_A_DIR) $(MAN_DIR_MAN1)
+-      $(INSTALL) $(MANPAGES) $(MAN_DIR_MAN1)
++      $(INSTALL) -m 0644 $(MANPAGES) $(MAN_DIR_MAN1)
+ 
+ uninstall_man:
+       cd $(MAN_DIR_MAN1) && rm -f $(MANPAGES)
+ 
+ install_docs: install_man
+       $(INSTALL_A_DIR) $(DOC_DIR)
+-      $(INSTALL) $(MYDOCS) $(DOC_DIR)
++      $(INSTALL) -m 0644 $(MYDOCS) $(DOC_DIR)
+ 
+ uninstall_docs:
+       rm -fr $(DOC_DIR)
Index: pkgsrc/devel/sloccount/patches/patch-rpm__unpacker
diff -u /dev/null pkgsrc/devel/sloccount/patches/patch-rpm__unpacker:1.1
--- /dev/null   Mon Sep  4 11:00:36 2017
+++ pkgsrc/devel/sloccount/patches/patch-rpm__unpacker  Mon Sep  4 11:00:36 2017
@@ -0,0 +1,15 @@
+$NetBSD: patch-rpm__unpacker,v 1.1 2017/09/04 11:00:36 khorben Exp $
+
+Fix portability of comparison check.
+
+--- rpm_unpacker.orig  2004-08-01 03:10:41.000000000 +0000
++++ rpm_unpacker
+@@ -61,7 +61,7 @@ do
+   # If disk space is available, REMOVE THIS LINE:
+   # find "$newbuild" -type f -name "*.html" -exec rm {} \;
+  done
+- if [ $anychange == 0 ]
++ if [ $anychange = 0 ]
+  then
+   echo "UNPACKER: did not add a build directory for spec file $specfile"
+  fi
Index: pkgsrc/devel/sloccount/patches/patch-sloccount
diff -u /dev/null pkgsrc/devel/sloccount/patches/patch-sloccount:1.1
--- /dev/null   Mon Sep  4 11:00:36 2017
+++ pkgsrc/devel/sloccount/patches/patch-sloccount      Mon Sep  4 11:00:36 2017
@@ -0,0 +1,55 @@
+$NetBSD: patch-sloccount,v 1.1 2017/09/04 11:00:36 khorben Exp $
+
+Correct path to the helper binaries
+
+--- sloccount.orig     2004-08-01 18:52:22.000000000 +0000
++++ sloccount
+@@ -39,6 +39,8 @@ fi
+ 
+ startingdir=`pwd`
+ 
++prefix="/usr/pkg"
++libexecdir="$prefix/libexec/sloccount"
+ 
+ # "datadir" is some suitable safe place for the data; here's the default:
+ datadir=${HOME}/.slocdata
+@@ -212,23 +214,23 @@ in
+   
+   case $split_things_up
+   in
+-   y) make_filelists $follow $notopfollow --datadir "$datadir" --skip src "$1"/* ||
++   y) "$libexecdir/make_filelists" $follow $notopfollow --datadir "$datadir" --skip src "$1"/* ||
+           exit 1
+       if [ -d "$1"/src ]
+       then
+-       make_filelists $notopfollow --datadir "$datadir" --prefix "src_" "$1"/src/* ||
++       "$libexecdir/make_filelists" $notopfollow --datadir "$datadir" --prefix "src_" "$1"/src/* ||
+           exit 1
+       fi
+       ;;
+-   *) make_filelists $follow $notopfollow --datadir "$datadir" "$@" || exit 1
++   *) "$libexecdir/make_filelists" $follow $notopfollow --datadir "$datadir" "$@" || exit 1
+       ;;
+   esac
+   
+   cd $datadir
+   if echo "Categorizing files." &&
+-     break_filelist --duplistfile sloc_hashes $duplicate_control $autogen * &&
++     "$libexecdir/break_filelist" --duplistfile sloc_hashes $duplicate_control $autogen * &&
+      echo "Computing results." &&
+-     compute_all *
++     "$libexecdir/compute_all" *
+   then
+     display_results=y
+   fi
+@@ -251,8 +253,8 @@ in
+   cd $datadir
+   case $details
+   in
+-    y)   get_sloc_details * ;;
+-    *)   get_sloc $addlang $showother $filecount $oneprogram $effort_model $schedule_model $personcost $overhead * ;;
++    y)   "$libexecdir/get_sloc_details" * ;;
++    *)   "$libexecdir/get_sloc" $addlang $showother $filecount $oneprogram $effort_model $schedule_model $personcost $overhead * ;;
+   esac;;
+ esac
+ 



Home | Main Index | Thread Index | Old Index