summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen L Arnold <nerdboy@gentoo.org>2015-11-09 23:17:07 -0800
committerStephen L Arnold <nerdboy@gentoo.org>2015-11-09 23:18:57 -0800
commitb2aa994251263a6de5f287274ae115e67e7f41ff (patch)
tree8178544ab7973af495df791f75f2c109b957c8f7 /dev-util/cccc
parentRevert "net-misc/socat: Add USE=libressl (bug #565244 by Marek Behun)." (diff)
downloadgentoo-b2aa994251263a6de5f287274ae115e67e7f41ff.tar.gz
gentoo-b2aa994251263a6de5f287274ae115e67e7f41ff.tar.bz2
gentoo-b2aa994251263a6de5f287274ae115e67e7f41ff.zip
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
Diffstat (limited to 'dev-util/cccc')
-rw-r--r--dev-util/cccc/cccc-3.1.4-r1.ebuild (renamed from dev-util/cccc/cccc-3.1.4.ebuild)29
-rw-r--r--dev-util/cccc/files/cccc-3.1.4-gcc-4.7.patch11
-rw-r--r--dev-util/cccc/files/cccc-3.1.4-whitespace-and-unqualified-lookup.patch95
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
index 0385935adbda..4a2492e9a21a 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 dcbe7aa26b47..000000000000
--- 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 000000000000..7e3e7fdf1dca
--- /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