summaryrefslogtreecommitdiff
path: root/app-text/sloccount
diff options
context:
space:
mode:
Diffstat (limited to 'app-text/sloccount')
-rw-r--r--app-text/sloccount/Manifest4
-rw-r--r--app-text/sloccount/files/sloccount-2.26-gentoo.patch66
-rw-r--r--app-text/sloccount/sloccount-2.26-r3.ebuild54
3 files changed, 94 insertions, 30 deletions
diff --git a/app-text/sloccount/Manifest b/app-text/sloccount/Manifest
index 343ab7d1103b..1b552b042b0a 100644
--- a/app-text/sloccount/Manifest
+++ b/app-text/sloccount/Manifest
@@ -1,6 +1,6 @@
AUX sloccount-2.26-coreutils-tail-n-fix.patch 468 BLAKE2B 81f7e84e738ef592c9863590b8648e1bb3446b8556b2562fe20f42af060719bb639fd93c25a1350ee738b095aff6943fb77b7498aaa6d5b2c6d405affacfbfea SHA512 200ccf47b4ca21a17cbe06ccf7b9a8022c794d1b5c0e0f59477b74a37704a6d5a106d4a7791ab84f6387032c938c132ffc1971e4db6532b21d5a0f2fef6df03e
-AUX sloccount-2.26-gentoo.patch 852 BLAKE2B 5e41be564f2aedb7d5094453148e9a9048894473316f77d50570f94dfcf973aa84f362533b4ceaf617fb8f1eb24db03e42a3562c6ba4da2716e652101acb1b86 SHA512 226a28d6ce4bc42f3074dc4390379e0d4539d9e2d9dabe3ec7b60fd41a9b3d9d882d4c4b0dce6803eb137230b67cc622d2b3ab6c4ead0cb90a410efe4b5b18af
+AUX sloccount-2.26-gentoo.patch 2883 BLAKE2B 97234b574060b0c0d7343e2589765c7aea67604bcd56a3671c825d0e798ea122bc68e9f7d6e1fc0b016ae0124e49e19a059b97a59137bc26f242d91c1f6fa4c7 SHA512 6d744053c050525e6d54be467fdf83bdedc80871d3ffb7f65e15ba44224f2c67e8785e2e5621747ee680000aa542ca014ea6afa25bb90aee5469d679b41114f4
AUX sloccount-2.26-libexec.patch 2293 BLAKE2B 7e2dbbf27535e8a2c6ebba2eca790b67b84cd102a0b000a45bf2b56434138891de72906b42170a488f1a1ef6df4a848f0d72137662b835d5f002350b747f1b33 SHA512 87101dc6c6632d38ff25b842b3342ee7caae0a926ce7c62f07360691a1494f8fefb8a039743d6cc49e3ca53a2eb179a06a97763ff5cf6224056a0916317afa35
DIST sloccount-2.26.tar.gz 190948 BLAKE2B 060cba3796ba4edc5f64ca3cc16de6f7dd8d1d18e45f9ccc0abe7a27e37daa6c02dd7a3f31b124b5e9ccc81ab59a7c4c6405b86ebb17ca9853c1ac1dafcba095 SHA512 ed6ab315a56dbdc86c654b94e790c9ea9e2dcad0db26b63c0973c33eb7fa634b4ade0a1f3c6ccfd5172ea95f648c1dd3b0ae2575b0aa44b3fec708c24a6aca54
-EBUILD sloccount-2.26-r3.ebuild 1267 BLAKE2B 5f1d76f99046efe81cf597fae62e50078078a68d25eea23e20a5eeba8b605976c8656c722a616772b7feaf919bd751ff44fc6b4f7953a1f3c2a2eb3aecb2645c SHA512 c6bedf3aaaafa0fcd5b3145fbf46034a60081ab9deb8f6168258574581a085afc22cafcb36a70ab24680286cbfc670a08099f0d677a1da0961707b7ff6a11782
+EBUILD sloccount-2.26-r3.ebuild 1135 BLAKE2B ce6a8d294d08b22d71341f98947b4a0b113706e63862e768e98ce37b09d9f707a7f91466887f216394e73526008faca5d58995acc1b9ec7dc439af17f59c825a SHA512 6819e72e932a0c85fd7e7efb55c804fca5dd327b12f2e1c0a51cd3b8e7385c8a6ecd2c24b47dedfe7cce9d3dd32d92fc4b3efda6a70a006b6ef2098a2f798773
MISC metadata.xml 216 BLAKE2B 20531789dc11e43feee7ec315a0c1c7249fdf73764e29cb7d6db439826e9ff72f24a5cdb8eb7f1ab99bbb41fb6e4226874a1d1fa4185de52598602bb3b0479a3 SHA512 e881b59fe49746eb25ad66c258b41aba501e4eb563129093a3898ea970a20506e7898f7c355cfcf99605234962bf2c77c1309c258b9a2b84ee4302ccb71c9dbd
diff --git a/app-text/sloccount/files/sloccount-2.26-gentoo.patch b/app-text/sloccount/files/sloccount-2.26-gentoo.patch
index c3a031190a36..5e4010b81f32 100644
--- a/app-text/sloccount/files/sloccount-2.26-gentoo.patch
+++ b/app-text/sloccount/files/sloccount-2.26-gentoo.patch
@@ -1,5 +1,5 @@
---- break_filelist.old 2013-10-14 17:23:01.523330534 +0800
-+++ break_filelist 2004-08-01 12:17:28.000000000 +0800
+--- a/break_filelist
++++ b/break_filelist
@@ -177,7 +177,7 @@
"p" => "pascal", "pas" => "pascal", "pp" => "pascal", "dpr" => "pascal",
"py" => "python",
@@ -18,3 +18,65 @@
($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.
+--- a/makefile
++++ b/makefile
+@@ -37,7 +37,7 @@
+ # 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
++CFLAGS+= -Wall
+
+ # Set this to the name of your "install" program. On some systems,
+ # "install -C" would be useful (so unchanged files won't be modified),
+@@ -124,34 +124,34 @@
+
+ MANPAGES=sloccount.1.gz
+
+-MYDOCS=sloccount.html README TODO ChangeLog
++MYDOCS=README TODO ChangeLog
+
+
+ all: $(COMPILED_EXECUTABLES)
+
+ lexcount1$(EXE_SUFFIX): lexcount1.c
+- $(CC) lexcount1.c -o lexcount1$(EXE_SUFFIX)
++ $(CC) $(CFLAGS) $(CPPFLAGS) $(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) $(CPPFLAGS) $(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) $(CPPFLAGS) $(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) $(CPPFLAGS) $(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) $(CPPFLAGS) $(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) $(CPPFLAGS) $(LDFLAGS) ml_count.c -o ml_count$(EXE_SUFFIX)
+
+ sloccount.1.gz: sloccount.1
+ gzip -c sloccount.1 > sloccount.1.gz
+@@ -162,7 +162,7 @@
+
+ # 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) $(CPPFLAGS) $(LDFLAGS) C_LINES.C -o c_lines$(EXE_SUFFIX)
+
+ install_prefix:
+ $(INSTALL_A_DIR) $(PREFIX)
diff --git a/app-text/sloccount/sloccount-2.26-r3.ebuild b/app-text/sloccount/sloccount-2.26-r3.ebuild
index 0c1bc3de2f75..6b6eb6730501 100644
--- a/app-text/sloccount/sloccount-2.26-r3.ebuild
+++ b/app-text/sloccount/sloccount-2.26-r3.ebuild
@@ -1,9 +1,9 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI="4"
+EAPI=7
-inherit eutils toolchain-funcs
+inherit toolchain-funcs
DESCRIPTION="Tools for counting Source Lines of Code (SLOC) for a large number of languages"
HOMEPAGE="http://www.dwheeler.com/sloccount/"
@@ -12,39 +12,41 @@ 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"
+
+RDEPEND="dev-lang/perl"
DEPEND="${RDEPEND}"
+PATCHES=(
+ "${FILESDIR}"/${P}-libexec.patch
+ "${FILESDIR}"/${P}-coreutils-tail-n-fix.patch
+ # support for
+ # 1) .ebuild
+ # 2) #!/sbin/openrc-run
+ # 3) CFLAGS/CPPFLAGS/LDFLAGS
+ "${FILESDIR}"/${P}-gentoo.patch
+)
+
src_prepare() {
- epatch "${FILESDIR}"/${P}-libexec.patch
- epatch "${FILESDIR}"/${P}-coreutils-tail-n-fix.patch
- # support for .ebuild and #!/sbin/openrc-run:
- 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
+ default
+
+ # fix hard-coded libexec_dir in sloccount
sed -i "s|libexec_dir=|&\"${EPREFIX}\"|" sloccount || die
}
-src_compile() {
- emake CC=$(tc-getCC)
+src_configure() {
+ tc-export CC
}
src_test() {
- PATH+=":${S}"
- emake test
+ PATH="${PATH}:${S}" emake test
}
src_install() {
- emake PREFIX="${ED}/usr" DOC_DIR="${ED}/usr/share/doc/${PF}/" install
- dohtml *html
+ emake PREFIX="${ED}"/usr DOC_DIR="${ED}"/usr/share/doc/${PF}/ install
+
+ HTML_DOCS=( *.html )
+ einstalldocs
+
+ # avoid QA warning
+ gunzip "${ED}"/usr/share/man/man1/sloccount.1.gz || die
}