summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2012-06-24 07:56:56 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2012-06-24 07:56:56 +0000
commit4c71c202fb0c783e9e0e89547676e61adc0e19b0 (patch)
tree2961f228e5ad9ef87df228058d8638a113ad4d84 /dev-util/kelbt
parentsci-libs/libcmatrix: Fix compilation with gcc-4.7, #423181 (diff)
downloadgentoo-2-4c71c202fb0c783e9e0e89547676e61adc0e19b0.tar.gz
gentoo-2-4c71c202fb0c783e9e0e89547676e61adc0e19b0.tar.bz2
gentoo-2-4c71c202fb0c783e9e0e89547676e61adc0e19b0.zip
Add patch to fix build with gcc 4.7 (keep the same name since it's the same patch as ragel's).
(Portage version: 2.2.0_alpha110/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/kelbt')
-rw-r--r--dev-util/kelbt/ChangeLog7
-rw-r--r--dev-util/kelbt/files/ragel-6.7+gcc-4.7.patch178
-rw-r--r--dev-util/kelbt/kelbt-0.15.ebuild12
3 files changed, 191 insertions, 6 deletions
diff --git a/dev-util/kelbt/ChangeLog b/dev-util/kelbt/ChangeLog
index 8003b3de33dd..a4abc0a3d82a 100644
--- a/dev-util/kelbt/ChangeLog
+++ b/dev-util/kelbt/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-util/kelbt
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/kelbt/ChangeLog,v 1.5 2012/05/22 23:46:46 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/kelbt/ChangeLog,v 1.6 2012/06/24 07:56:56 flameeyes Exp $
+
+ 24 Jun 2012; Diego E. Pettenò <flameeyes@gentoo.org>
+ +files/ragel-6.7+gcc-4.7.patch, kelbt-0.15.ebuild:
+ Add patch to fix build with gcc 4.7 (keep the same name since it's the same
+ patch as ragel's).
*kelbt-0.15 (22 May 2012)
diff --git a/dev-util/kelbt/files/ragel-6.7+gcc-4.7.patch b/dev-util/kelbt/files/ragel-6.7+gcc-4.7.patch
new file mode 100644
index 000000000000..80eb29a46f05
--- /dev/null
+++ b/dev-util/kelbt/files/ragel-6.7+gcc-4.7.patch
@@ -0,0 +1,178 @@
+From 27454d1e55b2a5cefc3cc1044d036add9ee9a6d3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= <flameeyes@flameeyes.eu>
+Date: Tue, 22 May 2012 16:25:37 -0700
+Subject: [PATCH] aapl: fix building with gcc-4.7.0
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Starting with GCC 4.7, you have to explicit methods inherited from
+base templates, otherwise it will refuse to build.
+
+---
+
+The URL reported in the README is no longer registered, so I couldn't
+find a way to report this to an upstream project.
+
+Signed-off-by: Diego Elio Pettenò <flameeyes@flameeyes.eu>
+---
+ aapl/avlcommon.h | 12 ++++++------
+ aapl/bstcommon.h | 16 ++++++++--------
+ aapl/bubblesort.h | 2 +-
+ aapl/mergesort.h | 2 +-
+ 4 files changed, 16 insertions(+), 16 deletions(-)
+
+diff --git a/aapl/avlcommon.h b/aapl/avlcommon.h
+index 06983bc..2e3c190 100644
+--- a/aapl/avlcommon.h
++++ b/aapl/avlcommon.h
+@@ -881,9 +881,9 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ }
+
+ #ifdef AVL_BASIC
+- keyRelation = compare( *element, *curEl );
++ keyRelation = this->compare( *element, *curEl );
+ #else
+- keyRelation = compare( element->BASEKEY(getKey()),
++ keyRelation = this->compare( element->BASEKEY(getKey()),
+ curEl->BASEKEY(getKey()) );
+ #endif
+
+@@ -920,7 +920,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ long keyRelation;
+
+ while (curEl) {
+- keyRelation = compare( *element, *curEl );
++ keyRelation = this->compare( *element, *curEl );
+
+ /* Do we go left? */
+ if ( keyRelation < 0 )
+@@ -969,7 +969,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ return element;
+ }
+
+- keyRelation = compare( key, curEl->BASEKEY(getKey()) );
++ keyRelation = this->compare( key, curEl->BASEKEY(getKey()) );
+
+ /* Do we go left? */
+ if ( keyRelation < 0 ) {
+@@ -1023,7 +1023,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ return element;
+ }
+
+- keyRelation = compare(key, curEl->getKey());
++ keyRelation = this->compare(key, curEl->getKey());
+
+ /* Do we go left? */
+ if ( keyRelation < 0 ) {
+@@ -1058,7 +1058,7 @@ template <AVLMEL_TEMPDEF> Element *AvlTree<AVLMEL_TEMPUSE>::
+ long keyRelation;
+
+ while (curEl) {
+- keyRelation = compare( key, curEl->BASEKEY(getKey()) );
++ keyRelation = this->compare( key, curEl->BASEKEY(getKey()) );
+
+ /* Do we go left? */
+ if ( keyRelation < 0 )
+diff --git a/aapl/bstcommon.h b/aapl/bstcommon.h
+index 888717f..7c53ff3 100644
+--- a/aapl/bstcommon.h
++++ b/aapl/bstcommon.h
+@@ -361,7 +361,7 @@ template <BST_TEMPL_DEF> bool BstTable<BST_TEMPL_USE>::
+ }
+
+ mid = lower + ((upper-lower)>>1);
+- keyRelation = compare(key, GET_KEY(*mid));
++ keyRelation = this->compare(key, GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+@@ -373,12 +373,12 @@ template <BST_TEMPL_DEF> bool BstTable<BST_TEMPL_USE>::
+
+ lower = mid - 1;
+ while ( lower != lowEnd &&
+- compare(key, GET_KEY(*lower)) == 0 )
++ this->compare(key, GET_KEY(*lower)) == 0 )
+ lower--;
+
+ upper = mid + 1;
+ while ( upper != highEnd &&
+- compare(key, GET_KEY(*upper)) == 0 )
++ this->compare(key, GET_KEY(*upper)) == 0 )
+ upper++;
+
+ low = (Element*)lower + 1;
+@@ -419,7 +419,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ }
+
+ mid = lower + ((upper-lower)>>1);
+- keyRelation = compare(key, GET_KEY(*mid));
++ keyRelation = this->compare(key, GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+@@ -457,7 +457,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ }
+
+ mid = lower + ((upper-lower)>>1);
+- keyRelation = compare(key, GET_KEY(*mid));
++ keyRelation = this->compare(key, GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+@@ -508,7 +508,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ }
+
+ mid = lower + ((upper-lower)>>1);
+- keyRelation = compare(key, GET_KEY(*mid));
++ keyRelation = this->compare(key, GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+@@ -603,7 +603,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ }
+
+ mid = lower + ((upper-lower)>>1);
+- keyRelation = compare(GET_KEY(el), GET_KEY(*mid));
++ keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+@@ -662,7 +662,7 @@ template <BST_TEMPL_DEF> Element *BstTable<BST_TEMPL_USE>::
+ }
+
+ mid = lower + ((upper-lower)>>1);
+- keyRelation = compare(GET_KEY(el), GET_KEY(*mid));
++ keyRelation = this->compare(GET_KEY(el), GET_KEY(*mid));
+
+ if ( keyRelation < 0 )
+ upper = mid - 1;
+diff --git a/aapl/bubblesort.h b/aapl/bubblesort.h
+index bcc2fb6..f0f4ce5 100644
+--- a/aapl/bubblesort.h
++++ b/aapl/bubblesort.h
+@@ -72,7 +72,7 @@ template <class T, class Compare> void BubbleSort<T,Compare>::
+ changed = false;
+ for ( long i = 0; i < len-pass; i++ ) {
+ /* Do we swap pos with the next one? */
+- if ( compare( data[i], data[i+1] ) > 0 ) {
++ if ( this->compare( data[i], data[i+1] ) > 0 ) {
+ char tmp[sizeof(T)];
+
+ /* Swap the two items. */
+diff --git a/aapl/mergesort.h b/aapl/mergesort.h
+index 68b8426..8cefa73 100644
+--- a/aapl/mergesort.h
++++ b/aapl/mergesort.h
+@@ -110,7 +110,7 @@ template< class T, class Compare> void MergeSort<T,Compare>::
+ }
+ else {
+ /* Both upper and lower left. */
+- if ( compare(*lower, *upper) <= 0 )
++ if ( this->compare(*lower, *upper) <= 0 )
+ memcpy( dest++, lower++, sizeof(T) );
+ else
+ memcpy( dest++, upper++, sizeof(T) );
+--
+1.7.8.6
+
diff --git a/dev-util/kelbt/kelbt-0.15.ebuild b/dev-util/kelbt/kelbt-0.15.ebuild
index c19345568469..f9b93cf8ae8f 100644
--- a/dev-util/kelbt/kelbt-0.15.ebuild
+++ b/dev-util/kelbt/kelbt-0.15.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/kelbt/kelbt-0.15.ebuild,v 1.1 2012/05/22 23:46:46 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/kelbt/kelbt-0.15.ebuild,v 1.2 2012/06/24 07:56:56 flameeyes Exp $
EAPI=4
@@ -21,10 +21,12 @@ src_prepare() {
find "${S}" -iname "Makefile*" -exec sed -i \
-e '/\$(CXX)/s:CFLAGS:CXXFLAGS:' \
{} \;
+
+ epatch "${FILESDIR}"/ragel-6.7+gcc-4.7.patch
}
src_compile() {
- emake CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" || die
+ emake CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}"
}
src_test() {
@@ -33,11 +35,11 @@ src_test() {
}
src_install() {
- dobin kelbt/kelbt || die
- dodoc TODO CREDITS ChangeLog || die
+ dobin kelbt/kelbt
+ dodoc TODO CREDITS ChangeLog
if use vim-syntax; then
insinto /usr/share/vim/vimfiles/syntax
- doins ${PN}.vim || die
+ doins ${PN}.vim
fi
}