diff options
author | Patrick Lauer <patrick@gentoo.org> | 2013-10-14 09:32:29 +0000 |
---|---|---|
committer | Patrick Lauer <patrick@gentoo.org> | 2013-10-14 09:32:29 +0000 |
commit | 7d7055de20d1ce8459473d16316c0de4e2a56f3b (patch) | |
tree | e479f0703de3f6e488b7020213b623ff8b196012 | |
parent | version bump, drop old (diff) | |
download | gentoo-2-7d7055de20d1ce8459473d16316c0de4e2a56f3b.tar.gz gentoo-2-7d7055de20d1ce8459473d16316c0de4e2a56f3b.tar.bz2 gentoo-2-7d7055de20d1ce8459473d16316c0de4e2a56f3b.zip |
Add support for gentoo file formats (ebuild,initscripts)
(Portage version: 2.2.7/cvs/Linux x86_64, unsigned Manifest commit)
-rw-r--r-- | app-text/sloccount/ChangeLog | 8 | ||||
-rw-r--r-- | app-text/sloccount/files/sloccount-2.26-gentoo.patch | 20 | ||||
-rw-r--r-- | app-text/sloccount/sloccount-2.26-r3.ebuild | 51 |
3 files changed, 78 insertions, 1 deletions
diff --git a/app-text/sloccount/ChangeLog b/app-text/sloccount/ChangeLog index 086c60f5ddce..0c0d1f35d8e8 100644 --- a/app-text/sloccount/ChangeLog +++ b/app-text/sloccount/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for app-text/sloccount # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/sloccount/ChangeLog,v 1.29 2013/07/04 12:25:16 ago Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/sloccount/ChangeLog,v 1.30 2013/10/14 09:32:29 patrick Exp $ + +*sloccount-2.26-r3 (14 Oct 2013) + + 14 Oct 2013; Patrick Lauer <patrick@gentoo.org> + +files/sloccount-2.26-gentoo.patch, +sloccount-2.26-r3.ebuild: + Add support for gentoo file formats (ebuild,initscripts) 04 Jul 2013; Agostino Sarubbo <ago@gentoo.org> sloccount-2.26-r2.ebuild: Stable for x86, wrt bug #472770 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/sloccount-2.26-r3.ebuild b/app-text/sloccount/sloccount-2.26-r3.ebuild new file mode 100644 index 000000000000..940cf661915d --- /dev/null +++ b/app-text/sloccount/sloccount-2.26-r3.ebuild @@ -0,0 +1,51 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/app-text/sloccount/sloccount-2.26-r3.ebuild,v 1.1 2013/10/14 09:32:29 patrick Exp $ + +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 +} |