summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2012-06-07 12:20:01 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2012-06-07 12:20:01 +0000
commit6fb9760dee904b2b54635bebcdc3a42633aed2bc (patch)
tree37a2a7453504f288084aa7949c2bb231bcf482d6 /dev-lang
parentRemove older unstable, bug #417385 (diff)
downloadgentoo-2-6fb9760dee904b2b54635bebcdc3a42633aed2bc.tar.gz
gentoo-2-6fb9760dee904b2b54635bebcdc3a42633aed2bc.tar.bz2
gentoo-2-6fb9760dee904b2b54635bebcdc3a42633aed2bc.zip
Fix build failure against gcc-4.7 (approved by binki)
(Portage version: 2.2.0_alpha108_p3/cvs/Linux x86_64)
Diffstat (limited to 'dev-lang')
-rw-r--r--dev-lang/squirrel/ChangeLog10
-rw-r--r--dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch59
-rw-r--r--dev-lang/squirrel/squirrel-2.2.4-r2.ebuild47
3 files changed, 114 insertions, 2 deletions
diff --git a/dev-lang/squirrel/ChangeLog b/dev-lang/squirrel/ChangeLog
index 902392da976f..81e30fe07ceb 100644
--- a/dev-lang/squirrel/ChangeLog
+++ b/dev-lang/squirrel/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-lang/squirrel
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/squirrel/ChangeLog,v 1.5 2011/05/04 22:20:54 binki Exp $
+# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/squirrel/ChangeLog,v 1.6 2012/06/07 12:20:01 slyfox Exp $
+
+*squirrel-2.2.4-r2 (07 Jun 2012)
+
+ 07 Jun 2012; Sergei Trofimovich <slyfox@gentoo.org>
+ +files/squirrel-2.2.4-gcc47.patch, +squirrel-2.2.4-r2.ebuild:
+ Fix build failure against gcc-4.7 (approved by binki)
04 May 2011; Nathan Phillip Brink <binki@gentoo.org> metadata.xml:
Take over squirrel which used to be proxy maintained for me.
diff --git a/dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch b/dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch
new file mode 100644
index 000000000000..032a4eb914a6
--- /dev/null
+++ b/dev-lang/squirrel/files/squirrel-2.2.4-gcc47.patch
@@ -0,0 +1,59 @@
+From fd2d422f16ca1134f3be8d693290e6b1c536bf71 Mon Sep 17 00:00:00 2001
+From: Sergei Trofimovich <slyfox@gentoo.org>
+Date: Thu, 7 Jun 2012 10:10:28 +0300
+Subject: [squirrel: PATCH] fix build breakage on gcc-4.7 and clang++
+
+gcc 4.7 got proper support for argument dependent lookup
+for builtin types:
+ http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46075
+
+It exposed old problem:
+> gcc -O2 -fno-exceptions -fno-rtti -Wall -fno-strict-aliasing -c sqapi.cpp sqbaselib.cpp sqfuncstate.cpp sqdebug.cpp \
+ sqlexer.cpp sqobject.cpp sqcompiler.cpp sqstate.cpp sqtable.cpp sqmem.cpp sqvm.cpp sqclass.cpp -I../include -I. -Iinclude
+ In file included from sqobject.h:5:0,
+ from sqpcheader.h:16,
+ from sqapi.cpp:4:
+ squtils.h: In instantiation of 'sqvector<T>::~sqvector() [with T = long long int]':
+ sqclosure.h:142:52: required from here
+ squtils.h:46:4: error: 'sq_vm_free' was not declared in this scope, and no declarations were found by argument-dependent
+ lookup at the point of instantiation [-fpermissive]
+ In file included from sqpcheader.h:17:0,
+ from sqapi.cpp:4:
+ sqstate.h:143:6: note: 'void sq_vm_free(void*, SQUnsignedInteger)' declared here, later in the translation unit
+
+Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
+---
+ squirrel/sqstate.h | 3 ---
+ squirrel/squtils.h | 4 ++++
+ 2 files changed, 4 insertions(+), 3 deletions(-)
+
+diff --git a/squirrel/sqstate.h b/squirrel/sqstate.h
+index 3ed3307..e931404 100755
+--- a/squirrel/sqstate.h
++++ b/squirrel/sqstate.h
+@@ -138,7 +138,4 @@ private:
+
+ bool CompileTypemask(SQIntVec &res,const SQChar *typemask);
+
+-void *sq_vm_malloc(SQUnsignedInteger size);
+-void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
+-void sq_vm_free(void *p,SQUnsignedInteger size);
+ #endif //_SQSTATE_H_
+diff --git a/squirrel/squtils.h b/squirrel/squtils.h
+index bff7d24..ac3aef9 100755
+--- a/squirrel/squtils.h
++++ b/squirrel/squtils.h
+@@ -10,6 +10,10 @@
+
+ #define sq_aligning(v) (((size_t)(v) + (SQ_ALIGNMENT-1)) & (~(SQ_ALIGNMENT-1)))
+
++
++void *sq_vm_malloc(SQUnsignedInteger size);
++void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
++void sq_vm_free(void *p,SQUnsignedInteger size);
+ //sqvector mini vector class, supports objects by value
+ template<typename T> class sqvector
+ {
+--
+1.7.8.6
+
diff --git a/dev-lang/squirrel/squirrel-2.2.4-r2.ebuild b/dev-lang/squirrel/squirrel-2.2.4-r2.ebuild
new file mode 100644
index 000000000000..7d1905e643c0
--- /dev/null
+++ b/dev-lang/squirrel/squirrel-2.2.4-r2.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/squirrel/squirrel-2.2.4-r2.ebuild,v 1.1 2012/06/07 12:20:01 slyfox Exp $
+
+EAPI=3
+
+inherit autotools eutils multilib
+
+MY_P="${PN}_${PV}_stable"
+DESCRIPTION="A interpreted language mainly used for games"
+HOMEPAGE="http://squirrel-lang.org/"
+SRC_URI="mirror://sourceforge/${PN}/${PN}${PV:0:1}/${MY_P}/${MY_P}.tar.gz"
+
+LICENSE="ZLIB"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc examples static-libs"
+
+# /usr/bin/sq conflicts
+RDEPEND="!app-text/ispell"
+
+S="${WORKDIR}/SQUIRREL${PV:0:1}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-autotools.patch
+ epatch "${FILESDIR}"/${P}-supertux-const.patch
+ epatch "${FILESDIR}"/${P}-stdint.h.patch
+ epatch "${FILESDIR}"/${P}-gcc47.patch
+
+ eautoreconf
+}
+
+src_configure() {
+ econf --docdir="${EPREFIX}"/usr/share/doc/${PF} \
+ $(use_enable doc) \
+ $(use_enable examples) \
+ $(use_enable static-libs static)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die
+ if ! use static-libs; then
+ rm -v "${ED}"/usr/$(get_libdir)/*.la || die
+ fi
+
+ dodoc HISTORY README || die
+}