summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2009-05-19 19:07:29 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2009-05-19 19:07:29 +0000
commitfd24d830ada570a783b819318740857d19784a1c (patch)
tree4250560d07519c3a942b3b18da5f901cc53c9662 /dev-util/ragel
parentVersion bump. (diff)
downloadgentoo-2-fd24d830ada570a783b819318740857d19784a1c.tar.gz
gentoo-2-fd24d830ada570a783b819318740857d19784a1c.tar.bz2
gentoo-2-fd24d830ada570a783b819318740857d19784a1c.zip
Add patch/hack to build with GCC 4.4 and a patch to fix tests under Gentoo/FreeBSD.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/ragel')
-rw-r--r--dev-util/ragel/ChangeLog7
-rw-r--r--dev-util/ragel/files/ragel-6.5+gcc-4.4.patch22
-rw-r--r--dev-util/ragel/files/ragel-6.5-freebsd.patch28
-rw-r--r--dev-util/ragel/ragel-6.5.ebuild10
4 files changed, 65 insertions, 2 deletions
diff --git a/dev-util/ragel/ChangeLog b/dev-util/ragel/ChangeLog
index 820dc5a1f0c3..a5bb2cb7c9e3 100644
--- a/dev-util/ragel/ChangeLog
+++ b/dev-util/ragel/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-util/ragel
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/ragel/ChangeLog,v 1.26 2009/05/19 18:33:18 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/ragel/ChangeLog,v 1.27 2009/05/19 19:07:29 flameeyes Exp $
+
+ 19 May 2009; Diego E. Pettenò <flameeyes@gentoo.org> ragel-6.5.ebuild,
+ +files/ragel-6.5+gcc-4.4.patch, +files/ragel-6.5-freebsd.patch:
+ Add patch/hack to build with GCC 4.4 and a patch to fix tests under
+ Gentoo/FreeBSD.
19 May 2009; Diego E. Pettenò <flameeyes@gentoo.org> ragel-6.5.ebuild:
Fix ebuild since upstream changed the tarball; now vim-syntax is back, as
diff --git a/dev-util/ragel/files/ragel-6.5+gcc-4.4.patch b/dev-util/ragel/files/ragel-6.5+gcc-4.4.patch
new file mode 100644
index 000000000000..131b05d04f01
--- /dev/null
+++ b/dev-util/ragel/files/ragel-6.5+gcc-4.4.patch
@@ -0,0 +1,22 @@
+diff --git a/ragel/main.cpp b/ragel/main.cpp
+index a16a50a..13d0152 100644
+--- a/ragel/main.cpp
++++ b/ragel/main.cpp
+@@ -336,7 +336,7 @@ void processArgs( int argc, const char **argv, InputData &id )
+ printStatistics = true;
+ break;
+ case '-': {
+- char *eq = strchr( pc.paramArg, '=' );
++ char *eq = const_cast<char *>(strchr( pc.paramArg, '=' ));
+
+ if ( eq != 0 )
+ *eq++ = 0;
+@@ -507,7 +507,7 @@ char *makeIntermedTemplate( const char *baseFileName )
+ {
+ char *result = 0;
+ const char *templ = "ragel-XXXXXX.xml";
+- char *lastSlash = strrchr( baseFileName, '/' );
++ const char *lastSlash = strrchr( baseFileName, '/' );
+ if ( lastSlash == 0 ) {
+ result = new char[strlen(templ)+1];
+ strcpy( result, templ );
diff --git a/dev-util/ragel/files/ragel-6.5-freebsd.patch b/dev-util/ragel/files/ragel-6.5-freebsd.patch
new file mode 100644
index 000000000000..f4de33ba4745
--- /dev/null
+++ b/dev-util/ragel/files/ragel-6.5-freebsd.patch
@@ -0,0 +1,28 @@
+From 8da80e890a57c76671d61acf2ee58d9686b7b271 Mon Sep 17 00:00:00 2001
+From: =?utf-8?q?Diego=20Elio=20'Flameeyes'=20Petten=C3=B2?= <flameeyes@gmail.com>
+Date: Tue, 19 May 2009 20:46:39 +0200
+Subject: [PATCH 2/2] Fix tests on FreeBSD: malloc.h should not be used, stdlib.h should.
+
+Also use the C++ proper includes instead of the C includes.
+---
+ test/cppscan1.h | 4 ++--
+ 1 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/test/cppscan1.h b/test/cppscan1.h
+index 3fa0229..346dd9b 100644
+--- a/test/cppscan1.h
++++ b/test/cppscan1.h
+@@ -2,8 +2,8 @@
+ #define _CPPSCAN1_H
+
+ #include <iostream>
+-#include <malloc.h>
+-#include <string.h>
++#include <cstdlib>
++#include <cstring>
+
+ using namespace std;
+
+--
+1.6.3.1
+
diff --git a/dev-util/ragel/ragel-6.5.ebuild b/dev-util/ragel/ragel-6.5.ebuild
index fa6024ae1ada..9dbc7c351592 100644
--- a/dev-util/ragel/ragel-6.5.ebuild
+++ b/dev-util/ragel/ragel-6.5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-util/ragel/ragel-6.5.ebuild,v 1.2 2009/05/19 18:33:18 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-util/ragel/ragel-6.5.ebuild,v 1.3 2009/05/19 19:07:29 flameeyes Exp $
inherit eutils
@@ -16,6 +16,14 @@ IUSE="vim-syntax"
DEPEND=""
RDEPEND=""
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}+gcc-4.4.patch
+ epatch "${FILESDIR}"/${P}-freebsd.patch
+}
+
src_compile() {
econf --docdir=/usr/share/doc/${PF} || die "econf failed"
emake || die "emake failed"