From 82d8991909d75b78d76f4ee441e96cb07fb9ce7c Mon Sep 17 00:00:00 2001 From: Adam Tkac Date: Fri, 20 May 2011 15:38:32 +0200 Subject: [PATCH] Make guile generator compatible with guile2 (#706140) Signed-off-by: Adam Tkac --- swig.spec | 7 ++++++- swig203-rh706140.patch | 30 ++++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 swig203-rh706140.patch diff --git a/swig.spec b/swig.spec index 462233b..fa2a874 100644 --- a/swig.spec +++ b/swig.spec @@ -4,7 +4,7 @@ Summary: Connects C/C++/Objective C to some high-level programming languages Name: swig Version: 2.0.3 -Release: 1%{?dist} +Release: 2%{?dist} License: GPLv3+ and BSD Group: Development/Tools URL: http://swig.sourceforge.net/ @@ -12,6 +12,7 @@ Source: http://downloads.sourceforge.net/project/swig/swig/swig-%{version}/swig- Patch1: swig-1.3.23-pylib.patch Patch2: swig200-rh623854.patch Patch3: swig200-rh666429.patch +Patch4: swig203-rh706140.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: perl, python-devel, pcre-devel @@ -46,6 +47,7 @@ This package contains documentation for SWIG and useful examples %patch1 -p1 -b .pylib %patch2 -p1 -b .rh623854 %patch3 -p1 -b .rh666429 +%patch4 -p1 -b .rh706140 # as written on https://fedoraproject.org/wiki/Packaging_talk:Perl, section 2 # (specific req/prov filtering). Before you remove this hack make sure you don't @@ -117,6 +119,9 @@ rm -rf %{buildroot} %doc Doc Examples LICENSE LICENSE-GPL LICENSE-UNIVERSITIES COPYRIGHT %changelog +* Fri May 20 2011 Adam Tkac 2.0.3-2 +- make guile generator compatible with guile2 (#706140) + * Fri Apr 22 2011 Adam Tkac 2.0.3-1 - update to 2.0.3 - swig202-rh691513.patch merged diff --git a/swig203-rh706140.patch b/swig203-rh706140.patch new file mode 100644 index 0000000..3f79da9 --- /dev/null +++ b/swig203-rh706140.patch @@ -0,0 +1,30 @@ +diff -up swig-2.0.3/Lib/guile/guile_gh_run.swg.rh706140 swig-2.0.3/Lib/guile/guile_gh_run.swg +--- swig-2.0.3/Lib/guile/guile_gh_run.swg.rh706140 2011-05-20 15:16:42.300658987 +0200 ++++ swig-2.0.3/Lib/guile/guile_gh_run.swg 2011-05-20 15:17:08.609658991 +0200 +@@ -15,7 +15,11 @@ + extern "C" { + #endif + ++#if SCM_MAJOR_VERSION >= 2 ++typedef scm_t_subr swig_guile_proc; ++#else + typedef SCM (*swig_guile_proc)(); ++#endif + + #define SWIG_malloc(size) \ + SCM_MUST_MALLOC(size) +diff -up swig-2.0.3/Lib/guile/guile_scm_run.swg.rh706140 swig-2.0.3/Lib/guile/guile_scm_run.swg +--- swig-2.0.3/Lib/guile/guile_scm_run.swg.rh706140 2011-05-20 15:17:22.057658991 +0200 ++++ swig-2.0.3/Lib/guile/guile_scm_run.swg 2011-05-20 15:17:46.183658997 +0200 +@@ -12,7 +12,11 @@ + extern "C" { + #endif + ++#if SCM_MAJOR_VERSION >= 2 ++typedef scm_t_subr swig_guile_proc; ++#else + typedef SCM (*swig_guile_proc)(); ++#endif + typedef SCM (*guile_destructor)(SCM); + + typedef struct swig_guile_clientdata {