summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-text/sloccount
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-text/sloccount')
-rw-r--r--app-text/sloccount/Manifest1
-rw-r--r--app-text/sloccount/files/sloccount-2.26-coreutils-tail-n-fix.patch12
-rw-r--r--app-text/sloccount/files/sloccount-2.26-gentoo.patch20
-rw-r--r--app-text/sloccount/files/sloccount-2.26-libexec.patch81
-rw-r--r--app-text/sloccount/metadata.xml7
-rw-r--r--app-text/sloccount/sloccount-2.26-r3.ebuild51
6 files changed, 172 insertions, 0 deletions
diff --git a/app-text/sloccount/Manifest b/app-text/sloccount/Manifest
new file mode 100644
index 000000000000..ef632ae3ab4a
--- /dev/null
+++ b/app-text/sloccount/Manifest
@@ -0,0 +1 @@
+DIST sloccount-2.26.tar.gz 190948 SHA256 fa7fa2bbf2f627dd2d0fdb958bd8ec4527231254c120a8b4322405d8a4e3d12b SHA512 ed6ab315a56dbdc86c654b94e790c9ea9e2dcad0db26b63c0973c33eb7fa634b4ade0a1f3c6ccfd5172ea95f648c1dd3b0ae2575b0aa44b3fec708c24a6aca54 WHIRLPOOL dd809909e10601ec733a7e5426183553c00c2cd25164db2d9085c975f689209067c206094caa84ef5085fc27a7188509fced271928e2d28ccb5a6b0749f7cd77
diff --git a/app-text/sloccount/files/sloccount-2.26-coreutils-tail-n-fix.patch b/app-text/sloccount/files/sloccount-2.26-coreutils-tail-n-fix.patch
new file mode 100644
index 000000000000..caf30cf894de
--- /dev/null
+++ b/app-text/sloccount/files/sloccount-2.26-coreutils-tail-n-fix.patch
@@ -0,0 +1,12 @@
+diff -Nur sloccount-2.22/compute_sloc_lang sloccount-2.22-new/compute_sloc_lang
+--- sloccount-2.22/compute_sloc_lang 2002-02-28 13:34:09.000000000 +0100
++++ sloccount-2.22-new/compute_sloc_lang 2004-10-23 12:36:56.295312577 +0200
+@@ -30,7 +30,7 @@
+ *) ${language}_count -f ${language}_list.dat > ${language}_outfile.dat
+ ;;
+ esac
+- tail -1 < ${language}_outfile.dat
++ tail -n 1 < ${language}_outfile.dat
+
+ else
+ rm -f ${language}_outfile.dat
diff --git a/app-text/sloccount/files/sloccount-2.26-gentoo.patch b/app-text/sloccount/files/sloccount-2.26-gentoo.patch
new file mode 100644
index 000000000000..c3a031190a36
--- /dev/null
+++ b/app-text/sloccount/files/sloccount-2.26-gentoo.patch
@@ -0,0 +1,20 @@
+--- break_filelist.old 2013-10-14 17:23:01.523330534 +0800
++++ break_filelist 2004-08-01 12:17:28.000000000 +0800
+@@ -177,7 +177,7 @@
+ "p" => "pascal", "pas" => "pascal", "pp" => "pascal", "dpr" => "pascal",
+ "py" => "python",
+ "s" => "asm", "S" => "asm", "asm" => "asm",
++ "sh" => "sh", "bash" => "sh", "ebuild" => "sh",
+- "sh" => "sh", "bash" => "sh",
+ "csh" => "csh", "tcsh" => "csh",
+ "java" => "java",
+ "lisp" => "lisp", "el" => "lisp", "scm" => "lisp", "sc" => "lisp",
+@@ -879,7 +879,7 @@
+ $command = $2;
+ }
+
++ if ( ($command =~ m/^(bash|ksh|zsh|pdksh|sh|runscript)[0-9\.]*(\.exe)?$/i) ||
+- if ( ($command =~ m/^(bash|ksh|zsh|pdksh|sh)[0-9\.]*(\.exe)?$/i) ||
+ ($firstline =~
+ m~^#!\s*\@_?(SCRIPT_)?(PATH_)?(BA|K)?SH(ELL)?(\d+)?\@?(\s|\Z)~)) {
+ # Note: wish(1) uses a funny trick; see wish(1) for more info.
diff --git a/app-text/sloccount/files/sloccount-2.26-libexec.patch b/app-text/sloccount/files/sloccount-2.26-libexec.patch
new file mode 100644
index 000000000000..cb8250f68cf6
--- /dev/null
+++ b/app-text/sloccount/files/sloccount-2.26-libexec.patch
@@ -0,0 +1,81 @@
+Files sloccount-2.26.orig/.makefile.swp and sloccount-2.26/.makefile.swp differ
+Files sloccount-2.26.orig/.sloccount.swp and sloccount-2.26/.sloccount.swp differ
+diff -ruN sloccount-2.26.orig/makefile sloccount-2.26/makefile
+--- sloccount-2.26.orig/makefile 2005-02-20 21:26:00.000000000 +0100
++++ sloccount-2.26/makefile 2005-02-20 21:32:58.000000000 +0100
+@@ -70,6 +70,7 @@
+ ARCH=i386
+ VERSIONEDNAME=$(NAME)-$(VERSION)
+ INSTALL_DIR=$(PREFIX)/bin
++LIBEXEC_DIR=$(PREFIX)/libexec/$(NAME)
+ MAN_DIR=$(PREFIX)/share/man
+ MAN_DIR_MAN1=$(MAN_DIR)/man1
+ DOC_DIR=$(PREFIX)/share/doc/$(VERSIONEDNAME)-$(RPM_VERSION)
+@@ -115,11 +116,12 @@
+ sed_count \
+ sh_count \
+ show_filecount \
+- sloccount \
+ sql_count \
+ tcl_count \
+ $(COMPILED_EXECUTABLES)
+
++MAIN_EXECUTABLE=sloccount
++
+ MANPAGES=sloccount.1.gz
+
+ MYDOCS=sloccount.html README TODO ChangeLog
+@@ -162,12 +164,24 @@
+ c_lines: C_LINES.C
+ $(CC) C_LINES.C -o c_lines$(EXE_SUFFIX)
+
++install_prefix:
++ $(INSTALL_A_DIR) $(PREFIX)
+
+-install_programs: all
+- $(INSTALL) $(EXECUTABLES) $(INSTALL_DIR)
++install_program:
++ $(INSTALL_A_DIR) $(INSTALL_DIR)
++ $(INSTALL) $(MAIN_EXECUTABLE) $(INSTALL_DIR)
++
++uninstall_program:
++ cd $(INSTALL_DIR) && rm -f $(MAIN_EXECUTABLE)
++
++install_libexec: all
++ $(INSTALL_A_DIR) $(LIBEXEC_DIR)
++ $(INSTALL) $(EXECUTABLES) $(LIBEXEC_DIR)
++
++uninstall_libexec:
++ cd $(LIBEXEC_DIR) && rm -f $(EXECUTABLES)
++ rmdir $(LIBEXEC_DIR)
+
+-uninstall_programs:
+- cd $(INSTALL_DIR) && rm -f $(EXECUTABLES)
+
+ install_man: $(MANPAGES)
+ $(INSTALL_A_DIR) $(MAN_DIR_MAN1)
+@@ -184,9 +198,9 @@
+ rm -fr $(DOC_DIR)
+
+
+-install: install_programs install_man install_docs
++install: install_prefix install_program install_libexec install_man install_docs
+
+-uninstall: uninstall_programs uninstall_docs uninstall_man
++uninstall: uninstall_program uninstall_libexec uninstall_docs uninstall_man
+
+
+ clean:
+diff -ruN sloccount-2.26.orig/sloccount sloccount-2.26/sloccount
+--- sloccount-2.26.orig/sloccount 2005-02-20 21:26:00.000000000 +0100
++++ sloccount-2.26/sloccount 2005-02-20 21:33:25.000000000 +0100
+@@ -39,6 +39,9 @@
+
+ startingdir=`pwd`
+
++libexec_dir=/usr/libexec/sloccount
++export PATH=$PATH:$libexec_dir
++
+
+ # "datadir" is some suitable safe place for the data; here's the default:
+ datadir=${HOME}/.slocdata
diff --git a/app-text/sloccount/metadata.xml b/app-text/sloccount/metadata.xml
new file mode 100644
index 000000000000..c6d862855eb5
--- /dev/null
+++ b/app-text/sloccount/metadata.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<maintainer>
+ <email>robbat2@gentoo.org</email>
+</maintainer>
+</pkgmetadata>
diff --git a/app-text/sloccount/sloccount-2.26-r3.ebuild b/app-text/sloccount/sloccount-2.26-r3.ebuild
new file mode 100644
index 000000000000..78cad89a8030
--- /dev/null
+++ b/app-text/sloccount/sloccount-2.26-r3.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+inherit eutils toolchain-funcs
+
+DESCRIPTION="Tools for counting Source Lines of Code (SLOC) for a large number of languages"
+HOMEPAGE="http://www.dwheeler.com/sloccount/"
+SRC_URI="http://www.dwheeler.com/sloccount/${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha amd64 ppc sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris"
+IUSE=""
+RDEPEND="dev-lang/perl
+ >=sys-apps/sed-4
+ app-shells/bash"
+DEPEND="${RDEPEND}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-libexec.patch
+ epatch "${FILESDIR}"/${P}-coreutils-tail-n-fix.patch
+ # support for .ebuild and #!/sbin/runscript:
+ epatch "${FILESDIR}"/${P}-gentoo.patch
+
+ sed -i \
+ -e 's|^CC=gcc|CFLAGS+=|g' \
+ -e 's|$(CC)|& $(CFLAGS) $(LDFLAGS)|g' \
+ -e '/^DOC_DIR/ { s/-$(RPM_VERSION)//g }' \
+ -e '/^MYDOCS/ { s/[^ =]\+\.html//g }' \
+ makefile || die "sed makefile failed"
+
+ #fixed hard-codes libexec_dir in sloccount
+ sed -i "s|libexec_dir=|&\"${EPREFIX}\"|" sloccount || die
+}
+
+src_compile() {
+ emake CC=$(tc-getCC)
+}
+
+src_test() {
+ PATH+=":${S}"
+ emake test
+}
+
+src_install() {
+ emake PREFIX="${ED}/usr" DOC_DIR="${ED}/usr/share/doc/${PF}/" install
+ dohtml *html
+}