pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/devel/sloccount Import sloccount 2.26 as devel/sloccount
details: https://anonhg.NetBSD.org/pkgsrc/rev/ecfcaea3ad3a
branches: trunk
changeset: 367562:ecfcaea3ad3a
user: khorben <khorben%pkgsrc.org@localhost>
date: Mon Sep 04 11:00:36 2017 +0000
description:
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.
diffstat:
devel/sloccount/DESCR | 2 +
devel/sloccount/Makefile | 68 +++++++++++++++++++
devel/sloccount/PLIST | 46 +++++++++++++
devel/sloccount/distinfo | 12 +++
devel/sloccount/patches/patch-compute__all | 15 ++++
devel/sloccount/patches/patch-compute__sloc__lang | 17 ++++
devel/sloccount/patches/patch-lex__count | 15 ++++
devel/sloccount/patches/patch-makefile | 79 +++++++++++++++++++++++
devel/sloccount/patches/patch-rpm__unpacker | 15 ++++
devel/sloccount/patches/patch-sloccount | 55 ++++++++++++++++
10 files changed, 324 insertions(+), 0 deletions(-)
diffs (truncated from 364 to 300 lines):
diff -r 9c307a0a640d -r ecfcaea3ad3a devel/sloccount/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/sloccount/DESCR Mon Sep 04 11:00:36 2017 +0000
@@ -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.
diff -r 9c307a0a640d -r ecfcaea3ad3a devel/sloccount/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/sloccount/Makefile Mon Sep 04 11:00:36 2017 +0000
@@ -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"
diff -r 9c307a0a640d -r ecfcaea3ad3a devel/sloccount/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/sloccount/PLIST Mon Sep 04 11:00:36 2017 +0000
@@ -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
diff -r 9c307a0a640d -r ecfcaea3ad3a devel/sloccount/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/sloccount/distinfo Mon Sep 04 11:00:36 2017 +0000
@@ -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
diff -r 9c307a0a640d -r ecfcaea3ad3a devel/sloccount/patches/patch-compute__all
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/sloccount/patches/patch-compute__all Mon Sep 04 11:00:36 2017 +0000
@@ -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
diff -r 9c307a0a640d -r ecfcaea3ad3a devel/sloccount/patches/patch-compute__sloc__lang
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/sloccount/patches/patch-compute__sloc__lang Mon Sep 04 11:00:36 2017 +0000
@@ -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
diff -r 9c307a0a640d -r ecfcaea3ad3a devel/sloccount/patches/patch-lex__count
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/sloccount/patches/patch-lex__count Mon Sep 04 11:00:36 2017 +0000
@@ -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;
diff -r 9c307a0a640d -r ecfcaea3ad3a devel/sloccount/patches/patch-makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/sloccount/patches/patch-makefile Mon Sep 04 11:00:36 2017 +0000
@@ -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)
diff -r 9c307a0a640d -r ecfcaea3ad3a devel/sloccount/patches/patch-rpm__unpacker
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/sloccount/patches/patch-rpm__unpacker Mon Sep 04 11:00:36 2017 +0000
@@ -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
Home |
Main Index |
Thread Index |
Old Index