[squirrel] update to upstream version 2.2.5 fix build with gcc 4.7

Dan Horák sharkcz at fedoraproject.org
Sun Jan 15 08:48:22 UTC 2012


commit fcdda4feac26ad1f26b28774d6489929b108fd3f
Author: Dan Horák <dan at danny.cz>
Date:   Sun Jan 15 09:48:15 2012 +0100

    update to upstream version 2.2.5
    fix build with gcc 4.7

 .gitignore               |    1 +
 sources                  |    2 +-
 squirrel-2.2.4-mem.patch |   36 ++++++++++++++++++++++++++++++++++++
 squirrel-autotools.patch |   26 +++++++++++++++++++++++---
 squirrel.spec            |   13 ++++++++++---
 5 files changed, 71 insertions(+), 7 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0259782..46d0d29 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
 squirrel_2.2.4_stable.tar.gz
+/squirrel_2.2.5_stable.tar.gz
diff --git a/sources b/sources
index 268a9c1..32a1283 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-e411dfd1bcc5220aa80de53e4a5f094d  squirrel_2.2.4_stable.tar.gz
+35f97d933d46e2b5d54e0c0f2eccfa4a  squirrel_2.2.5_stable.tar.gz
diff --git a/squirrel-2.2.4-mem.patch b/squirrel-2.2.4-mem.patch
new file mode 100644
index 0000000..9cdd400
--- /dev/null
+++ b/squirrel-2.2.4-mem.patch
@@ -0,0 +1,36 @@
+diff -up SQUIRREL2/squirrel/sqmem.h.mem SQUIRREL2/squirrel/sqmem.h
+--- SQUIRREL2/squirrel/sqmem.h.mem	2012-01-13 16:59:34.000000000 +0100
++++ SQUIRREL2/squirrel/sqmem.h	2012-01-13 17:00:19.000000000 +0100
+@@ -0,0 +1,8 @@
++/*	see copyright notice in squirrel.h */
++#ifndef _SQMEM_H_
++#define _SQMEM_H_
++
++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 //_SQMEM_H_
+diff -up SQUIRREL2/squirrel/sqstate.h.mem SQUIRREL2/squirrel/sqstate.h
+--- SQUIRREL2/squirrel/sqstate.h.mem	2012-01-13 16:59:28.000000000 +0100
++++ SQUIRREL2/squirrel/sqstate.h	2012-01-13 16:59:51.000000000 +0100
+@@ -136,8 +136,4 @@ extern SQObjectPtr _one_;
+ extern SQObjectPtr _minusone_;
+ 
+ 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 -up SQUIRREL2/squirrel/squtils.h.mem SQUIRREL2/squirrel/squtils.h
+--- SQUIRREL2/squirrel/squtils.h.mem	2012-01-13 16:59:41.000000000 +0100
++++ SQUIRREL2/squirrel/squtils.h	2012-01-13 17:00:01.000000000 +0100
+@@ -2,6 +2,8 @@
+ #ifndef _SQUTILS_H_
+ #define _SQUTILS_H_
+ 
++#include "sqmem.h"
++
+ #define sq_new(__ptr,__type) {__ptr=(__type *)sq_vm_malloc(sizeof(__type));new (__ptr) __type;}
+ #define sq_delete(__ptr,__type) {__ptr->~__type();sq_vm_free(__ptr,sizeof(__type));}
+ #define SQ_MALLOC(__size) sq_vm_malloc((__size));
diff --git a/squirrel-autotools.patch b/squirrel-autotools.patch
index 87d1ded..6711029 100644
--- a/squirrel-autotools.patch
+++ b/squirrel-autotools.patch
@@ -17,10 +17,10 @@ diff -Nru SQUIRREL2.orig/autogen.sh SQUIRREL2/autogen.sh
 diff -Nru SQUIRREL2.orig/configure.ac SQUIRREL2/configure.ac
 --- SQUIRREL2.orig/configure.ac	1970-01-01 01:00:00.000000000 +0100
 +++ SQUIRREL2/configure.ac	2007-07-07 20:06:22.000000000 +0200
-@@ -0,0 +1,26 @@
+@@ -0,0 +1,27 @@
 +## Bootstrap autoconf/automake
 +AC_PREREQ(2.59)
-+AC_INIT([squirrel], [2.2.4], [])
++AC_INIT([squirrel], [2.2.5], [])
 +AC_CANONICAL_TARGET
 +AC_CONFIG_SRCDIR([configure.ac])
 +AM_INIT_AUTOMAKE
@@ -36,6 +36,7 @@ diff -Nru SQUIRREL2.orig/configure.ac SQUIRREL2/configure.ac
 +
 +# Produce output
 +AC_CONFIG_FILES([Makefile
++		squirrel.pc
 +		squirrel/Makefile
 +		sqstdlib/Makefile
 +		sq/Makefile
@@ -84,7 +85,10 @@ diff -Nru SQUIRREL2.orig/Makefile SQUIRREL2/Makefile
 diff -Nru SQUIRREL2.orig/Makefile.am SQUIRREL2/Makefile.am
 --- SQUIRREL2.orig/Makefile.am	1970-01-01 01:00:00.000000000 +0100
 +++ SQUIRREL2/Makefile.am	2007-07-07 20:05:54.000000000 +0200
-@@ -0,0 +1,18 @@
+@@ -0,0 +1,21 @@
++pkgconfigdir =          $(libdir)/pkgconfig
++pkgconfig_DATA =        squirrel.pc
++
 +SUBDIRS = squirrel sqstdlib sq include
 +
 +MAINTAINERCLEANFILES =	INSTALL \
@@ -300,3 +304,19 @@ diff -Nru SQUIRREL2.orig/squirrel/Makefile.am SQUIRREL2/squirrel/Makefile.am
 +		sqvm.h
 +
 +INCLUDES = -I$(top_srcdir)/include -I.
+diff -up SQUIRREL2/squirrel.pc.in.autotools SQUIRREL2/squirrel.pc.in
+--- SQUIRREL2/squirrel.pc.in.autotools	2012-01-13 18:50:03.000000000 +0100
++++ SQUIRREL2/squirrel.pc.in	2012-01-13 18:50:11.000000000 +0100
+@@ -0,0 +1,12 @@
++refix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@/squirrel
++
++Name: squirrel
++Description: squirrel library
++Version: @VERSION@
++
++Requires:
++Libs: -L${libdir} -lsquirrel -lsqstdlib
++Cflags: -I${includedir}
diff --git a/squirrel.spec b/squirrel.spec
index dbf5fed..effb0eb 100644
--- a/squirrel.spec
+++ b/squirrel.spec
@@ -1,6 +1,6 @@
 Name:           squirrel
-Version:        2.2.4
-Release:        3%{?dist}
+Version:        2.2.5
+Release:        1%{?dist}
 Summary:        High level imperative/OO programming language
 
 Group:          Development/Tools
@@ -9,6 +9,7 @@ URL:            http://squirrel-lang.org/
 Source0:        http://downloads.sourceforge.net/%{name}/%{name}_%{version}_stable.tar.gz
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 Patch0:         squirrel-autotools.patch
+Patch1:         squirrel-2.2.4-mem.patch
 
 BuildRequires:  libtool
 
@@ -40,7 +41,8 @@ Development files needed to use Squirrel libraries.
 find . -type f -exec chmod a-x {} \;
 
 pushd SQUIRREL2
-%patch0 -p1
+%patch0 -p1 -b .autotools
+%patch1 -p1 -b .mem
 
 # fix extension for autotools
 mv sq/sq.c sq/sq.cpp
@@ -95,11 +97,16 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(-,root,root,-)
 %doc SQUIRREL2/doc/*.pdf
 %{_includedir}/squirrel
+%{_libdir}/pkgconfig/squirrel.pc
 %{_libdir}/libsqstdlib.so
 %{_libdir}/libsquirrel.so
 
 
 %changelog
+* Sat Jan 14 2012 Dan Horák <dan[at]danny.cz> - 2.2.5-1
+- update to upstream version 2.2.5
+- fix build with gcc 4.7
+
 * Sat Jan 14 2012 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 2.2.4-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
 


More information about the scm-commits mailing list