diff options
author | Ryan Hill <dirtyepic@gentoo.org> | 2009-02-10 05:01:37 +0000 |
---|---|---|
committer | Ryan Hill <dirtyepic@gentoo.org> | 2009-02-10 05:01:37 +0000 |
commit | fd02e44e9b969de0ea6ccc2ff33339031dabab86 (patch) | |
tree | 3c0f86767606c29c20b50da5933ee221c998717c /dev-lang/maude | |
parent | stable sparc, bug 255848 (diff) | |
download | gentoo-2-fd02e44e9b969de0ea6ccc2ff33339031dabab86.tar.gz gentoo-2-fd02e44e9b969de0ea6ccc2ff33339031dabab86.tar.bz2 gentoo-2-fd02e44e9b969de0ea6ccc2ff33339031dabab86.zip |
Fix building with GCC 4.3 for bug #227529
(Portage version: 2.2_rc23/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang/maude')
-rw-r--r-- | dev-lang/maude/ChangeLog | 8 | ||||
-rw-r--r-- | dev-lang/maude/files/maude-2.3.0-gcc43.patch | 107 | ||||
-rw-r--r-- | dev-lang/maude/maude-2.3.0.ebuild | 11 |
3 files changed, 122 insertions, 4 deletions
diff --git a/dev-lang/maude/ChangeLog b/dev-lang/maude/ChangeLog index fcba333373d1..8c9cc29b80d0 100644 --- a/dev-lang/maude/ChangeLog +++ b/dev-lang/maude/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for dev-lang/maude -# Copyright 2000-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/maude/ChangeLog,v 1.11 2008/06/04 03:40:46 markusle Exp $ +# Copyright 2000-2009 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/dev-lang/maude/ChangeLog,v 1.12 2009/02/10 05:01:37 dirtyepic Exp $ + + 10 Feb 2009; Ryan Hill <dirtyepic@gentoo.org> + +files/maude-2.3.0-gcc43.patch, maude-2.3.0.ebuild: + Fix building with GCC 4.3 for bug #227529 *maude-2.3.0 (04 Jun 2008) diff --git a/dev-lang/maude/files/maude-2.3.0-gcc43.patch b/dev-lang/maude/files/maude-2.3.0-gcc43.patch new file mode 100644 index 000000000000..457359519b87 --- /dev/null +++ b/dev-lang/maude/files/maude-2.3.0-gcc43.patch @@ -0,0 +1,107 @@ +--- Maude-2.3/src/BuiltIn/stringOpSymbol.cc 2003-11-10 18:33:00.000000000 -0600 ++++ Maude-2.4/src/BuiltIn/stringOpSymbol.cc 2008-09-11 19:03:36.000000000 -0600 +@@ -220,7 +220,9 @@ StringOpSymbol::eqRewrite(DagNode* subje + case CODE('f', 'l'): + { + bool error; +- //double fl = stringToDouble(left.c_str(), error); ++#ifdef ROPE_C_STR_BROKEN ++ // ++ // This kudge doesn't seem to be need nowadays, but copy() doesn't work. + // + // This messing about is needed because Rope::c_str() + // fails in libstdc++-v3 +@@ -231,7 +233,9 @@ StringOpSymbol::eqRewrite(DagNode* subje + t[len] = '\0'; + double fl = stringToDouble(t, error); + delete [] t; +- // ++#else ++ double fl = stringToDouble(left.c_str(), error); ++#endif + if (error) + goto fail; + return floatSymbol->rewriteToFloat(subject, context, fl); +@@ -282,6 +286,7 @@ StringOpSymbol::eqRewrite(DagNode* subje + break; + default: + CantHappen("bad string op"); ++ r = false; // avoid compiler warning + } + Assert(trueTerm.getTerm() != 0 && falseTerm.getTerm() != 0, + "null true/false for relational op"); +@@ -358,6 +363,7 @@ StringOpSymbol::eqRewrite(DagNode* subje + break; + default: + CantHappen("bad string op"); ++ r = 0; // avoid compiler warning + } + Assert(notFoundTerm.getTerm() != 0, "null notFound for find op"); + if (r == NONE) +@@ -591,6 +597,13 @@ StringOpSymbol::ropeToNumber(const crope + if (!isalnum(subject[j])) + return false; + } ++ // ++ // We have detected a fraction form. ++ // ++#ifdef ROPE_C_STR_BROKEN ++ // ++ // This kudge doesn't seem to be need nowadays, but copy() doesn't work. ++ // + char* t = new char[len]; // longer than needed but who cares + int dLen = len - (i + 1); + subject.copy(i + 1, dLen, t); +@@ -609,20 +622,34 @@ StringOpSymbol::ropeToNumber(const crope + } + delete [] t; + return true; ++#else ++ return mpz_set_str(denominator.get_mpz_t(), subject.substr(i + 1).c_str(), base) == 0 && ++ mpz_set_str(numerator.get_mpz_t(), subject.substr(0,i).c_str(), base) == 0; ++#endif + } + else + return false; + } + } ++ // ++ // We have a regular integer form. ++ // ++ denominator = 0; ++#ifdef ROPE_C_STR_BROKEN ++ // ++ // This kudge doesn't seem to be need nowadays, but copy() doesn't work. ++ // + char* t = new char[len + 1]; + subject.copy(t); + t[len] = '\0'; + if (mpz_set_str(numerator.get_mpz_t(), t, base) == 0) + { + delete [] t; +- denominator = 0; + return true; + } + delete [] t; +- return false; ++ return false; ++#else ++ return mpz_set_str(numerator.get_mpz_t(), subject.c_str(), base) == 0; ++#endif + } +--- Maude-2.3/src/Utility/macros.hh 2007-01-11 21:13:21.000000000 -0600 ++++ Maude-2.4/src/Utility/macros.hh 2008-09-04 13:52:55.000000000 -0600 +@@ -50,10 +50,10 @@ + #if HAVE_CTYPE_H + #include <ctype.h> + #endif +-#if HAVE_STRINGS_H +-#include <strings.h> +-#elif HAVE_STRING_H ++#if HAVE_STRING_H + #include <string.h> ++#elif HAVE_STRINGS_H ++#include <strings.h> + #endif + #if HAVE_UNISTD_H + #include <unistd.h> // needed by solaris diff --git a/dev-lang/maude/maude-2.3.0.ebuild b/dev-lang/maude/maude-2.3.0.ebuild index 9f9f36af53c5..c5d66a52fbf5 100644 --- a/dev-lang/maude/maude-2.3.0.ebuild +++ b/dev-lang/maude/maude-2.3.0.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2008 Gentoo Foundation +# Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/dev-lang/maude/maude-2.3.0.ebuild,v 1.2 2008/06/04 15:55:37 mr_bones_ Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-lang/maude/maude-2.3.0.ebuild,v 1.3 2009/02/10 05:01:37 dirtyepic Exp $ inherit toolchain-funcs eutils versionator @@ -28,6 +28,13 @@ DEPEND="${RDEPEND} S="${WORKDIR}"/${MY_PN}-${MY_PV} +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}"/${P}-gcc43.patch +} + src_compile() { econf || die "econf failed" emake -j1 || die "emake failed" |