public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-util/cccc/files/, dev-util/cccc/
@ 2015-11-10  7:19 Steve Arnold
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Arnold @ 2015-11-10  7:19 UTC (permalink / raw
  To: gentoo-commits

commit:     b2aa994251263a6de5f287274ae115e67e7f41ff
Author:     Stephen L Arnold <nerdboy <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 10 07:17:07 2015 +0000
Commit:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
CommitDate: Tue Nov 10 07:18:57 2015 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b2aa9942

dev-util/cccc: rev-bump to r1, new patch for c++ failure

Added c++ patch and updated flags, removed older patch and ebuild. New
version and metadata update coming soon.

Package-Manager: portage-2.2.24

 .../{cccc-3.1.4.ebuild => cccc-3.1.4-r1.ebuild}    | 29 ++++---
 dev-util/cccc/files/cccc-3.1.4-gcc-4.7.patch       | 11 ---
 ...c-3.1.4-whitespace-and-unqualified-lookup.patch | 95 ++++++++++++++++++++++
 3 files changed, 114 insertions(+), 21 deletions(-)

diff --git a/dev-util/cccc/cccc-3.1.4.ebuild b/dev-util/cccc/cccc-3.1.4-r1.ebuild
similarity index 52%
rename from dev-util/cccc/cccc-3.1.4.ebuild
rename to dev-util/cccc/cccc-3.1.4-r1.ebuild
index 0385935..4a2492e 100644
--- a/dev-util/cccc/cccc-3.1.4.ebuild
+++ b/dev-util/cccc/cccc-3.1.4-r1.ebuild
@@ -1,21 +1,28 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 # $Id$
 
-EAPI=4
-inherit eutils toolchain-funcs
+EAPI=5
 
-DESCRIPTION="A code counter for C and C++"
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Source code metrics (line counts, complexity, etc) for Java and C++"
 HOMEPAGE="http://cccc.sourceforge.net/"
 SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
 
 LICENSE="GPL-2"
 SLOT="0"
-KEYWORDS="amd64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
-IUSE=""
+KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="doc"
+
+RDEPEND=""
+DEPEND="${RDEPEND}"
+
+MAKEOPTS="-j1"
 
 src_prepare() {
-	epatch "${FILESDIR}"/${P}-gcc-4.7.patch
+	# fix new C++ syntax error
+	epatch "${FILESDIR}"/${P}-whitespace-and-unqualified-lookup.patch
 
 	sed -i -e "/^CFLAGS/s|=|+=|" pccts/antlr/makefile
 	sed -i -e "/^CFLAGS/s|=|+=|" pccts/dlg/makefile
@@ -26,13 +33,15 @@ src_prepare() {
 }
 
 src_compile() {
-	emake CCC="$(tc-getCXX)" LD="$(tc-getCXX)" pccts
-	emake CCC="$(tc-getCXX)" LD="$(tc-getCXX)" cccc
+	emake CCC=$(tc-getCXX) LD=$(tc-getCXX) pccts
+
+	append-cflags "-std=c++98"
+	emake CCC=$(tc-getCXX) LD=$(tc-getCXX) cccc
 }
 
 src_install() {
 	dodoc readme.txt changes.txt
-	dohtml cccc/*.html
+	use doc && dohtml cccc/*.html
 	cd install || die
 	dodir /usr
 	emake -f install.mak INSTDIR="${ED}"/usr/bin

diff --git a/dev-util/cccc/files/cccc-3.1.4-gcc-4.7.patch b/dev-util/cccc/files/cccc-3.1.4-gcc-4.7.patch
deleted file mode 100644
index dcbe7aa..0000000
--- a/dev-util/cccc/files/cccc-3.1.4-gcc-4.7.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cccc/cccc_tbl.cc
-+++ cccc/cccc_tbl.cc
-@@ -96,7 +96,7 @@
-   typename map_t::iterator value_iterator=map_t::find(old_item_ptr->key());
-   if(value_iterator!=map_t::end())
-     {
--      erase(value_iterator);
-+      this->erase(value_iterator);
-       retval=true;
-     }
-   return retval;

diff --git a/dev-util/cccc/files/cccc-3.1.4-whitespace-and-unqualified-lookup.patch b/dev-util/cccc/files/cccc-3.1.4-whitespace-and-unqualified-lookup.patch
new file mode 100644
index 0000000..7e3e7fd
--- /dev/null
+++ b/dev-util/cccc/files/cccc-3.1.4-whitespace-and-unqualified-lookup.patch
@@ -0,0 +1,95 @@
+diff --git a/cccc/cccc_tbl.cc b/cccc/cccc_tbl.cc
+index df98e2b..c9d0bac 100644
+--- a/cccc/cccc_tbl.cc
++++ b/cccc/cccc_tbl.cc
+@@ -27,18 +27,18 @@
+ #define LINE_BUFFER_SIZE 1000
+ 
+ 
+-template <class T> CCCC_Table<T>::CCCC_Table() 
++template <class T> CCCC_Table<T>::CCCC_Table()
+ : sorted(true)
+ {
+-  iter_ = map_t::end(); 
++  iter_ = map_t::end();
+ }
+ 
+-template <class T> CCCC_Table<T>::~CCCC_Table() 
++template <class T> CCCC_Table<T>::~CCCC_Table()
+ {
+   // the container should manage the destruction of its own
+-  // nodes correctly, we just need to get rid of the 
++  // nodes correctly, we just need to get rid of the
+   // objects to which we hold pointers.
+-  // NB Although CCCC_Table holds pointers, it owns the 
++  // NB Although CCCC_Table holds pointers, it owns the
+   // objects they point to and is responsible for their disposal.
+   T* itemptr=first_item();
+   while(itemptr!=NULL)
+@@ -48,8 +48,8 @@ template <class T> CCCC_Table<T>::~CCCC_Table()
+     }
+ }
+ 
+-template<class T> 
+-int CCCC_Table<T>::get_count(const char* count_tag) 
++template<class T>
++int CCCC_Table<T>::get_count(const char* count_tag)
+ {
+   int retval=0;
+   T* itemptr=first_item();
+@@ -58,11 +58,11 @@ int CCCC_Table<T>::get_count(const char* count_tag)
+       retval+=itemptr->get_count(count_tag);
+       itemptr=next_item();
+     }
+-  
++
+   return retval;
+ }
+ 
+-template<class T> 
++template<class T>
+ T* CCCC_Table<T>::find(string name)
+ {
+   T *retval=NULL;
+@@ -74,7 +74,7 @@ T* CCCC_Table<T>::find(string name)
+   return retval;
+ }
+ 
+-template<class T> 
++template<class T>
+ T* CCCC_Table<T>::find_or_insert(T* new_item_ptr)
+ {
+   string new_key=new_item_ptr->key();
+@@ -92,17 +92,17 @@ T* CCCC_Table<T>::find_or_insert(T* new_item_ptr)
+ template<class T>
+ bool CCCC_Table<T>::remove(T* old_item_ptr)
+ {
+-  bool retval=false; 
++  bool retval=false;
+   typename map_t::iterator value_iterator=map_t::find(old_item_ptr->key());
+   if(value_iterator!=map_t::end())
+     {
+-      erase(value_iterator);
++      this->erase(value_iterator);
+       retval=true;
+     }
+   return retval;
+ }
+-   
+-template <class T> void CCCC_Table<T>::sort() 
++
++template <class T> void CCCC_Table<T>::sort()
+ {
+   if(sorted==false)
+     {
+@@ -133,8 +133,8 @@ template <class T> T* CCCC_Table<T>::next_item()
+ }
+ 
+ template <class T> int CCCC_Table<T>::records()
+-{ 
+-  return map_t::size(); 
++{
++  return map_t::size();
+ }
+ 
+ #endif // _CCCC_TBL_BODY


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-util/cccc/files/, dev-util/cccc/
@ 2019-05-30 23:05 Steve Arnold
  0 siblings, 0 replies; 2+ messages in thread
From: Steve Arnold @ 2019-05-30 23:05 UTC (permalink / raw
  To: gentoo-commits

commit:     9498391cdfe099fb51b68d5a0f68ef8be7476fb7
Author:     Stephen Arnold <nerdboy <AT> gentoo <DOT> org>
AuthorDate: Thu May 30 23:05:07 2019 +0000
Commit:     Steve Arnold <nerdboy <AT> gentoo <DOT> org>
CommitDate: Thu May 30 23:05:07 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9498391c

dev-util/cccc: rev-bump for eapi migration and QA cleanup

* use EAPI 6, filter lto flags, clean up QA issues
  (restore fixed version from the trash)

Bug: https://bugs.gentoo.org/651446
Package-Manager: Portage-2.3.64, Repoman-2.3.12
Signed-off-by: Steve Arnold <nerdboy <AT> gentoo.org>

 dev-util/cccc/Manifest                   |  1 +
 dev-util/cccc/cccc-3.1.5-r1.ebuild       | 70 ++++++++++++++++++++++++++++
 dev-util/cccc/files/cccc-MFC-dialect.opt | 21 +++++++++
 dev-util/cccc/files/cccc-c_dialect.patch | 79 ++++++++++++++++++++++++++++++++
 dev-util/cccc/metadata.xml               | 19 ++++++++
 5 files changed, 190 insertions(+)

diff --git a/dev-util/cccc/Manifest b/dev-util/cccc/Manifest
new file mode 100644
index 00000000000..887fa77c8cf
--- /dev/null
+++ b/dev-util/cccc/Manifest
@@ -0,0 +1 @@
+DIST cccc-3.1.5.tar.gz 662760 BLAKE2B 57817ef9a44f002c017245d7dd3b1ef97fec59b59bce465d5e5e1cc12409b5602cfd8bf7ee938e526af9bcc11398639900d26848aa4f8c7f623669159de17117 SHA512 61544669a75ff7bd99c6ff5bb1e6ec163f2a09f4538493fe60e8f9f95eab7ba19ad6d39b6717ae010a223b8efe48c497a4feb8ead218e350ee2ab91b9c52c969

diff --git a/dev-util/cccc/cccc-3.1.5-r1.ebuild b/dev-util/cccc/cccc-3.1.5-r1.ebuild
new file mode 100644
index 00000000000..a26523720d4
--- /dev/null
+++ b/dev-util/cccc/cccc-3.1.5-r1.ebuild
@@ -0,0 +1,70 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit eutils toolchain-funcs flag-o-matic
+
+DESCRIPTION="Source metrics (line counts, complexity, etc) for Java and C++"
+HOMEPAGE="http://sarnold.github.io/cccc/"
+if [[ ${PV} = 9999* ]]; then
+	EGIT_REPO_URI="https://github.com/sarnold/cccc.git"
+	EGIT_BRANCH="master"
+	inherit git-r3
+else
+	SRC_URI="https://github.com/sarnold/${PN}/archive/${PV}.tar.gz -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos"
+IUSE="apidoc debug doc mfc"
+
+RDEPEND=""
+DEPEND="${RDEPEND}
+	apidoc? ( app-doc/doxygen[dot] )
+	"
+
+src_prepare() {
+	is-flagq -flto* && filter-flags -flto* -fuse-linker-plugin
+	use mfc && eapply "${FILESDIR}"/${PN}-c_dialect.patch
+	default
+
+}
+
+src_compile() {
+	tc-export CC CXX LD AS AR NM RANLIB STRIP OBJCOPY
+	if use debug ; then
+		DEBUG="true" emake CCC=$(tc-getCXX) CC=$(tc-getCC) cccc
+	else
+		emake CCC=$(tc-getCXX) CC=$(tc-getCC) cccc
+	fi
+
+	use apidoc && emake CCC=$(tc-getCXX) metrics docs
+}
+
+src_test() {
+	emake CCC=$(tc-getCXX) test
+}
+
+src_install() {
+	dobin cccc/cccc
+
+	dodoc README.md
+
+	if use mfc ; then
+		insinto /usr/share/doc/${PF}
+		doins "${FILESDIR}"/cccc-MFC-dialect.opt
+	fi
+
+	if use doc ; then
+		insinto /usr/share/doc/${PF}/html
+		doins cccc/*.html || die "html docs failed"
+		if use apidoc ; then
+			insinto /usr/share/doc/${PF}/html/api
+			doins -r doxygen/html/* || die "dox failed"
+			insinto /usr/share/doc/${PF}/html/metrics
+			doins ccccout/* || die "metrics failed"
+		fi
+	fi
+}

diff --git a/dev-util/cccc/files/cccc-MFC-dialect.opt b/dev-util/cccc/files/cccc-MFC-dialect.opt
new file mode 100644
index 00000000000..4c4acb32e1f
--- /dev/null
+++ b/dev-util/cccc/files/cccc-MFC-dialect.opt
@@ -0,0 +1,21 @@
+;;Pro*C embedded SQL
+;; looks like
+;; EXEC SQL UPDATE ARM43_OD_PRODUIT_SERV
+;; SET ARM43ID_TPS_FIN = NULL WHERE
+ARM43ID_TPS_FIN = 0;
+
+CCCC_FileExt@.pc@c++.ansi@
+
+CCCC_Dialect@c++.pc@EXEC@skip_stmt@
+
+;;MFC
+CCCC_Dialect@c++.mfc@ON_WM_PAINT@skip_line@
+CCCC_Dialect@c++.mfc@DECLARE_MESSAGE_MAP@skip_line@
+CCCC_Dialect@c++.mfc@DECLARE_DISPATCH_MAP@skip_line@
+
+CCCC_Dialect@c++.stl@__STL_BEGIN_NAMESPACE@ignore@
+CCCC_Dialect@c++.stl@__STL_END_NAMESPACE@ignore@
+
+CCCC_Dialect@c++.mfc@BEGIN_EVENT_MAP@start_skipping@
+CCCC_Dialect@c++.mfc@END_EVENT_MAP@stop_skipping@
+

diff --git a/dev-util/cccc/files/cccc-c_dialect.patch b/dev-util/cccc/files/cccc-c_dialect.patch
new file mode 100644
index 00000000000..c8951aef13c
--- /dev/null
+++ b/dev-util/cccc/files/cccc-c_dialect.patch
@@ -0,0 +1,79 @@
+diff --git a/cccc/cccc.g b/cccc/cccc.g
+index bdb6805..fd7b504 100644
+--- a/cccc/cccc.g
++++ b/cccc/cccc.g
+@@ -84,6 +84,30 @@ inline void endOfLine(CLexer &lexer)
+ #token MAC_NL		"\r"	<< endOfLine(*this); >>
+ #token UNIX_NL		"\n"    << endOfLine(*this); >>
+ 
++/* augment dialect policies -- M.H added */
++#lexclass SKIP_STMT
++#token SKCOLON ";" << skip();mode(START); >>
++#token SKANYTHING "~[; \t\n]" << skip();more();>>
++#token SKNL "\n" << skip();endOfLine(*this);>>
++#token SKBLANK "[ \t]+" << skip(); >>
++#lexclass START
++
++#lexclass SKIP_BLOCK
++#token SK_ANY "[a-zA-Z0-9_]*"
++<<
++std::string treatment = 
++	CCCC_Options::dialectKeywordPolicy(parse_language,lextext());
++
++if ( treatment != "stop_skipping" )
++{
++    skip();
++}
++else
++{
++    mode(COMMENT_LINE);skip();
++}
++>>
++#lexclass START
+ 
+ /* preprocessor constructs - comments, #defines etc */
+ 
+@@ -343,17 +367,29 @@ inline void endOfLine(CLexer &lexer)
+         if( treatment == "ignore" )
+ 	{
+ 	    skip();
++	    //std::cout << toktext << std::endl <<" :ignore" << std::endl;
+ 	}
+ 	// Ultimately, the next two cases will need to be handled 
+ 	// using a #lexclass or something similar, for the moment
+ 	// we just try to skip the tokens themselves.
+ 	else if ( treatment == "start_skipping" )
+ 	{
+-	    skip();
++	    mode(SKIP_BLOCK);skip();
+ 	}	
+ 	else if ( treatment == "stop_skipping" ) 
+ 	{
+-	    skip();
++	    skip(); mode(COMMENT_LINE);
++	    //gobble end of line M.H.
++	}
++	else if ( treatment == "skip_line" )//M.H added
++	{
++	    mode(COMMENT_LINE);skip(); 
++	    //std::cout << "skip_line" << std::endl;
++	}
++	else if ( treatment == "skip_stmt" )//M.H added
++	{
++	    mode(SKIP_STMT);skip();
++	    //std::cout << "skip_stmt" << std::endl;
+ 	}
+ >>
+ 
+@@ -426,8 +462,10 @@ void init(const string& filename, const string& language)
+ 	pu=ParseUtility::currentInstance();
+ 	ps=ParseStore::currentInstance();
+ 
+-	ANTLRParser::init();
+ 	parse_language=language;
++	ANTLRParser::init();
++	//parse_language=language;
++	//move above, M.H.1st otherwise time init not to language
+ }
+ 
+ >>

diff --git a/dev-util/cccc/metadata.xml b/dev-util/cccc/metadata.xml
new file mode 100644
index 00000000000..ecde1cfd0a0
--- /dev/null
+++ b/dev-util/cccc/metadata.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+	<maintainer type="person">
+		<email>nerdboy@gentoo.org</email>
+	</maintainer>
+	<longdescription lang="en">
+		cccc provides source code metrics (line counts, complexity,
+		object-oriented, and structural metrics) for Java and C++
+	</longdescription>
+	<upstream>
+		<remote-id type="github">sarnold/cccc</remote-id>
+		<bugs-to>https://github.com/sarnold/cccc/issues</bugs-to>
+	</upstream>
+	<use>
+		<flag name="apidoc">Build software docs with doxygen/graphviz and metrics with cccc</flag>
+		<flag name="mfc">Add patch for MFC dialect options</flag>
+	</use>
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-30 23:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-30 23:05 [gentoo-commits] repo/gentoo:master commit in: dev-util/cccc/files/, dev-util/cccc/ Steve Arnold
  -- strict thread matches above, loose matches on Subject: below --
2015-11-10  7:19 Steve Arnold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox