debian/0000755000000000000000000000000012266022312007162 5ustar debian/changelog0000644000000000000000000000555312265775065011067 0ustar ohcount (3.0.0-8) unstable; urgency=low * Remove the explicit dependency on ruby 1.8 Thanks to Jonas Genannt (Closes: #733724) * Switch from cdbs to dh. Thanks to Jonas Genannt * Standards-Version updated to 3.9.5 -- Sylvestre Ledru Thu, 16 Jan 2014 16:26:45 +0100 ohcount (3.0.0-7) unstable; urgency=low * Standards-Version updated to 3.9.4 * libdifflcs-ruby dep renamed to ruby-diff-lcs (Closes: #707792) * Remove Torsten from the uploaders (I have been DD for a while :) * ACK NMU (thanks btw) -- Sylvestre Ledru Sat, 11 May 2013 19:17:57 +0200 ohcount (3.0.0-6.1) unstable; urgency=low * Non-maintainer upload. * Add dependency on file (Closes: #677494). -- Luk Claes Wed, 04 Jul 2012 17:18:12 +0000 ohcount (3.0.0-6) unstable; urgency=low * Update some issues with the documentation (Closes: #650685) -- Sylvestre Ledru Sat, 10 Dec 2011 19:38:15 +0100 ohcount (3.0.0-5) unstable; urgency=low * Oups. Plug back the patches * Manpage of ohcount added -- Sylvestre Ledru Fri, 30 Sep 2011 21:37:34 +0200 ohcount (3.0.0-4) unstable; urgency=low * Support of the txx extension (considered as C++). Thanks to Sébastien Dinot for the patch. * Switch to dpkg-source 3.0 (quilt) format * Standards-Version updated to version 3.9.2 * Fix debian-rules-uses-deprecated-makefile lintian warning -- Sylvestre Ledru Mon, 26 Sep 2011 13:42:49 +0200 ohcount (3.0.0-3) unstable; urgency=low * Standards-Version updated to version 3.9.1 * Fix a seg fault when checking lintian source code. Thanks to Raphael Geissert for investigating for me. (Closes: #608837) (LP: #605631) * Fix lintian warning copyright-refers-to-deprecated-bsd-license-file -- Sylvestre Ledru Sat, 15 Jan 2011 09:34:05 +0100 ohcount (3.0.0-2) unstable; urgency=low * Missing dependency (Closes: #558491) -- Sylvestre Ledru Sun, 29 Nov 2009 18:19:46 +0100 ohcount (3.0.0-1) unstable; urgency=low * New upstream release * New package ohcount-doc added * Homepage updated * Vcs-* added * Many changes on the debian/rules due to a refactoring from upstream which has been done (patches are now obsolete or upstream) * Upstream has redeveloped ohcount with C (instead of ruby). (Closes: #542892) * Update of the watch file * Repack script updated (upstream has a .so) * Standards-Version updated to version 3.8.3 * Change of my email address since I am now DD * Standards-Version updated to 3.8.3 * DM-Upload-Allowed removed -- Sylvestre Ledru Fri, 27 Nov 2009 11:22:21 +0100 ohcount (2.0.1-1) unstable; urgency=low * Initial release (Closes: #523006) -- Sylvestre Ledru Tue, 07 Apr 2009 20:18:38 +0200 debian/orig-tar.sh0000755000000000000000000000063711170341057011256 0ustar #!/bin/sh -e # called by uscan with '--upstream-version' DIR=ohcount-$2 TAR=../ohcount_$2.orig.tar.gz # clean up the upstream tarball tar zxf $3 # Remove vendor/ because it is including tar -c -z -X debian/orig-tar.exclude -f $TAR $DIR/ rm -rf $DIR # move to directory 'tarballs' if [ -r .svn/deb-layout ]; then . .svn/deb-layout mv $TAR $origDir echo "moved $TAR to $origDir" fi debian/control0000644000000000000000000000305412266022241010570 0ustar Source: ohcount Section: utils Priority: optional Maintainer: Sylvestre Ledru Build-Depends: debhelper (>= 7), libpcre3-dev, gem2deb, rake, ragel (>= 6.3), ruby-diff-lcs, doxygen, gperf, file Standards-Version: 3.9.5 Homepage: http://sourceforge.net/projects/ohcount/ Vcs-Svn: https://bollin.googlecode.com/svn/ohcount/trunk Vcs-Browser: http://bollin.googlecode.com/svn/ohcount/trunk XS-Ruby-Versions: all Package: ohcount XB-Ruby-Versions: ${ruby:Versions} Architecture: any Depends: ruby | ruby-interpreter, ${shlibs:Depends}, ${misc:Depends}, ruby-diff-lcs, file Suggests: ohcount-doc Description: Source code line counter Ohcount supports over 70 popular programming languages. Ohcount does more than just count lines of code. It can also detect popular open source licenses such as GPL within a large directory of source code. It can also detect code that targets a particular programming API, such as Win32 or KDE. Ohcount is the line counter which powers http://www.ohloh.net/ . Package: ohcount-doc Section: doc Architecture: all Depends: ${shlibs:Depends}, ${misc:Depends} Description: Source code line counter - Documentation Ohcount supports over 70 popular programming languages. Ohcount does more than just count lines of code. It can also detect popular open source licenses such as GPL within a large directory of source code. It can also detect code that targets a particular programming API, such as Win32 or KDE. Ohcount is the line counter which powers http://www.ohloh.net/ . This package contains the documentation. debian/compat0000644000000000000000000000000211166733357010400 0ustar 7 debian/ohcount-doc.docs0000644000000000000000000000000712266021475012264 0ustar README debian/patches/0000755000000000000000000000000012266021475010622 5ustar debian/patches/fix_null_dereference.patch0000644000000000000000000000322511670723323016013 0ustar From a6783afcf61f18e9f1aef3e2655b30af7501c902 Mon Sep 17 00:00:00 2001 From: Robin Luckey Date: Thu, 1 Oct 2009 14:32:16 -0700 Subject: [PATCH] [FIX] Avoid null dereference in disambiguate_inc() --- src/detector.c | 18 ++++++++++-------- test/unit/detector_test.h | 1 + 2 files changed, 11 insertions(+), 8 deletions(-) create mode 100644 test/detect_files/empty.inc diff --git a/src/detector.c b/src/detector.c index 4d0e1f4..9b4d8d2 100644 --- a/src/detector.c +++ b/src/detector.c @@ -452,14 +452,16 @@ const char *disambiguate_in(SourceFile *sourcefile) { const char *disambiguate_inc(SourceFile *sourcefile) { char *p = ohcount_sourcefile_get_contents(sourcefile); - char *eof = p + strlen(p); - while (p < eof) { - if (*p == '\0') - return BINARY; - else if (*p == '?' && strncmp(p + 1, "php", 3) == 0) - return LANG_PHP; - p++; - } + if (p) { + char *eof = p + strlen(p); + while (p < eof) { + if (*p == '\0') + return BINARY; + else if (*p == '?' && strncmp(p + 1, "php", 3) == 0) + return LANG_PHP; + p++; + } + } return NULL; } diff --git a/test/detect_files/empty.inc b/test/detect_files/empty.inc new file mode 100644 index 0000000..e69de29 diff --git a/test/unit/detector_test.h b/test/unit/detector_test.h index cd36b6d..628b6cc 100644 --- a/test/unit/detector_test.h +++ b/test/unit/detector_test.h @@ -77,6 +77,7 @@ void test_detector_detect_polyglot() { ASSERT_DETECT(LANG_IDL_PVWAVE, "foo.pro"); ASSERT_DETECT(LANG_ASSEMBLER, "foo.z80"); ASSERT_DETECT(LANG_PHP, "php.inc"); + ASSERT_NODETECT("empty.inc"); ASSERT_DETECT(LANG_FSHARP, "fs1.fs"); } -- 1.7.0.1 debian/patches/disabled_test_suite.patch0000644000000000000000000000055112266021475015663 0ustar Description: disable test suite on build time, does not work Author: Jonas Genannt Forwarded: not-needed --- a/build +++ b/build @@ -109,7 +109,7 @@ build_test_suite() run_test_suite() { echo "Running test suite" - sh -c "cd test/unit/ && ./run_tests" + echo "disabled test suite, does not work" } build_ruby_bindings() debian/patches/series0000644000000000000000000000014412266021475012036 0ustar fix_null_dereference_2.patch fix_null_dereference.patch txx_support.patch disabled_test_suite.patch debian/patches/txx_support.patch0000644000000000000000000000061011670723323014256 0ustar diff -Naur ohcount-3.0.0/src/hash/extensions.gperf ohcount-3.0.1/src/hash/extensions.gperf --- ohcount-3.0.0/src/hash/extensions.gperf 2009-09-30 17:30:19.000000000 +0000 +++ ohcount-3.0.1/src/hash/extensions.gperf 2011-09-26 09:32:34.000000000 +0000 @@ -161,6 +161,7 @@ tif, BINARY tiff, BINARY tpl, LANG_HTML +txx, LANG_CPP vala, LANG_VALA vb, LANG_VISUALBASIC vba, LANG_VISUALBASIC debian/patches/fix_null_dereference_2.patch0000644000000000000000000000350011670723323016230 0ustar From c0b28d67f27f6e954c93dabd71d098854896d679 Mon Sep 17 00:00:00 2001 From: Robin Luckey Date: Thu, 1 Oct 2009 15:43:42 -0700 Subject: [PATCH] [FIX] Null dereference error in disambiguate_in() --- src/detector.c | 3 +++ test/unit/detector_test.h | 4 ++++ 2 files changed, 7 insertions(+), 0 deletions(-) create mode 100644 test/detect_files/empty.in diff --git a/src/detector.c b/src/detector.c index 9b4d8d2..863b379 100644 --- a/src/detector.c +++ b/src/detector.c @@ -437,6 +437,9 @@ const char *disambiguate_in(SourceFile *sourcefile) { buf[length] = '\0'; SourceFile *undecorated = ohcount_sourcefile_new(buf); p = ohcount_sourcefile_get_contents(sourcefile); + if (!p) { + return NULL; + } // The filepath without the '.in' extension does not exist on disk. The // sourcefile->diskpath field must be set incase the detector needs to run // 'file -b' on the file. diff --git a/test/detect_files/empty.in b/test/detect_files/empty.in new file mode 100644 index 0000000..e69de29 diff --git a/test/unit/detector_test.h b/test/unit/detector_test.h index 628b6cc..a26adaa 100644 --- a/test/unit/detector_test.h +++ b/test/unit/detector_test.h @@ -36,6 +36,9 @@ void test_detector_disambiguate_m() { ASSERT_DETECT(LANG_OCTAVE, "foo_octave.m"); } +void test_detector_disambiguate_in() { + ASSERT_NODETECT("empty.in"); +} void test_detector_disambiguate_pro() { ASSERT_DETECT(LANG_IDL_PVWAVE, "foo.pro"); ASSERT_DETECT(LANG_MAKE, "qmake.pro"); @@ -119,6 +122,7 @@ void test_detector_xml_with_custom_extension() { void all_detector_tests() { test_detector_smalltalk(); test_detector_disambiguate_m(); + test_detector_disambiguate_in(); test_detector_disambiguate_pro(); test_detector_fortran_fixedfree(); test_detector_detect_polyglot(); -- 1.7.0.1 debian/ohcount.10000644000000000000000000000405011670723422010732 0ustar .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.39.4. .TH OHCOUNT "1" "September 2011" "ohcount 3.0.0" "User Commands" .SH NAME ohcount \- manual page for ohcount 3.0.0 .SH SYNOPSIS .B ohcount [\fIoption\fR] [\fIpaths\fR...] .SH DESCRIPTION Ohloh source code line counter command line tool. .IP http://www.ohloh.net/ .SS "[option] can be one of the following:" .HP \fB\-a\fR, \fB\-\-annotate\fR .HP \fB\-d\fR, \fB\-\-detect\fR .HP \fB\-h\fR, \fB\-\-help\fR .HP \fB\-i\fR, \fB\-\-individual\fR .HP \fB\-l\fR, \fB\-\-license\fR .HP \fB\-re\fR .HP \fB\-s\fR, \fB\-\-summary\fR .PP \fB\-a\fR, \fB\-\-annotate\fR Show annotated source code .IP The contents of all source code files found within the given paths will be emitted to stdout. Each line will be prefixed with a tab\-delimited language name and semantic categorization (code, comment, or blank). .PP \fB\-d\fR, \fB\-\-detect\fR Find source code files .IP Recursively find all source code files within the given paths. For each source code file found, the file name will be emitted to stdout prefixed with a tab\-delimited language name. .PP \fB\-h\fR, \fB\-\-help\fR Display this message .PP \fB\-i\fR, \fB\-\-individual\fR Count lines of code per file .IP Count lines in all source code files within the given paths, and emit a report of the lines of code, comments, and blanks in each language per file. .PP \fB\-l\fR, \fB\-\-license\fR .IP Displays detected licensing information contained in each source code file. .PP \fB\-re\fR .IP Prints raw entity information to the screen (mainly for debugging). .PP \fB\-s\fR, \fB\-\-summary\fR Count lines of code (default) .IP Count lines in all source code files within the given paths, and emit a report of the total number of lines of code, comments, and blanks in each language. This is the default action. .PP [paths] can refer to any number of individual files or directories. .IP Directories will be probed recursively. If no path is given, the current directory will be used. debian/watch0000644000000000000000000000014011670723323010216 0ustar version=3 http://sf.net/ohcount/ohcount-(\d+[0-9\-\.r]+)\.tar\.gz \ debian debian/orig-tar.sh debian/ohcount-doc.doc-base0000644000000000000000000000031712266021475013015 0ustar Document: ohcount Title: Debian ohcount Manual Author: Ohloh Abstract: ohcount manual Section: Programming/Ruby Format: HTML Index: /usr/share/doc/ohcount-doc/index.html Files: /usr/share/doc/ohcount-doc/* debian/orig-tar.exclude0000644000000000000000000000000511670723323012264 0ustar *.so debian/rules0000755000000000000000000000137112266021475010255 0ustar #!/usr/bin/make -f %: dh $@ --buildsystem=ruby --with ruby override_dh_auto_clean: dh_auto_clean -O--buildsystem=ruby ./build clean rm -rf doc_build override_dh_install: ./build all dh_install --buildsystem=ruby --with ruby install -d debian/ohcount/usr/lib/ruby/vendor_ruby/ohcount install -d debian/ohcount/usr/bin install -d debian/ohcount-doc/usr/share/doc/ohcount-doc cp bin/ohcount debian/ohcount/usr/bin/ cp -R ruby/gestalt ruby/gestalt.rb ruby/ohcount.rb debian/ohcount/usr/lib/ruby/vendor_ruby/ohcount/ # build doxygen mkdir doc_build cp -aR doc/* doc_build/ (cd doc_build && doxygen Doxyfile) cp -aR doc_build/html/* debian/ohcount-doc/usr/share/doc/ohcount-doc rm -rf debian/ohcount/ruby get-orig-source: uscan --force-download debian/ohcount.manpages0000644000000000000000000000002211670723323012360 0ustar debian/ohcount.1 debian/copyright0000644000000000000000000001134611670723323011132 0ustar This package was debianized by Sylvestre Ledru on Tue, 07 Apr 2009 20:18:38 +0200. It was downloaded from Upstream Author: Ohloh Copyright: Copyright (C) 2007-2009 Ohloh License: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. The full text of the license can be found in `/usr/share/common-licenses/GPL-2'. The Debian packaging is (C) 2009, Sylvestre Ledru and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. ohcount incorporates some piece of code in order to test during build time its capabilities. These files are not included in the binary. Files: test/expected_dir/haxe1.hx test/src_dir/haxe1.hx Copyright: Thomas Pfeiffer - kiroukou Niel Drummond License: Copyright the original author or authors. Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.mozilla.org/MPL/MPL-1.1.html Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Files: test/src_dir/pascal2.pp test/expected_dir/pascal2.pp Copyright: Simon Steele 1998-2000 License: BSD Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of the nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. Files: test/src_dir/js1.js test/expected_dir/js1.js Copyright: 2005-2008 Sam Stephenson License: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Files: test/src_dir/foo.ebuild test/detect_files/foo.ebuild License: GPL-2 Files: test/src_dir/as1.as test/expected_dir/as1.as Copyright: Sean Chatman and Garrett Woodworth 2008 License: MIT Files: test/src_dir/perl_module.pm test/expected_dir/perl_module.pm Copyright: Audrey Tang 2003-2007 License: This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. a) the GNU General Public License as published by the Free Software Foundation; either version 1, or (at your option) any later version, or b) the "Artistic License" which comes with Perl. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL' and the Artistic Licence in `/usr/share/common-licenses/Artistic'. debian/source/0000755000000000000000000000000012265774467010512 5ustar debian/source/format0000644000000000000000000000001411670723322011677 0ustar 3.0 (quilt)