[swig] Fix building of setools package
Adam Tkac
atkac at fedoraproject.org
Wed Jun 27 15:02:22 UTC 2012
commit e97a2ab6bd410950bf6ba20c46c9c476b301e7f3
Author: Adam Tkac <atkac at redhat.com>
Date: Wed Jun 27 17:02:03 2012 +0200
Fix building of setools package
Signed-off-by: Adam Tkac <atkac at redhat.com>
swig.spec | 7 ++++++-
swig207-setools.patch | 18 ++++++++++++++++++
2 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/swig.spec b/swig.spec
index 9f83fd0..13e64e2 100644
--- a/swig.spec
+++ b/swig.spec
@@ -10,7 +10,7 @@
Summary: Connects C/C++/Objective C to some high-level programming languages
Name: swig
Version: 2.0.7
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv3+ and BSD
Group: Development/Tools
URL: http://swig.sourceforge.net/
@@ -19,6 +19,7 @@ Patch4: swig203-rh706140.patch
Patch6: swig204-rh752054.patch
Patch7: swig207-rh830660.patch
Patch8: swig207-r13128.patch
+Patch9: swig207-setools.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: perl, python-devel, pcre-devel
@@ -59,6 +60,7 @@ This package contains documentation for SWIG and useful examples
%patch7 -p1 -b .rh830660
%patch8 -p0 -b .r13128
+%patch9 -p1 -b .setools
# 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
@@ -134,6 +136,9 @@ rm -rf %{buildroot}
%doc Doc Examples LICENSE LICENSE-GPL LICENSE-UNIVERSITIES COPYRIGHT
%changelog
+* Wed Jun 27 2012 Adam Tkac <atkac redhat com> 2.0.7-3
+- fix building of setools package
+
* Tue Jun 12 2012 Adam Tkac <atkac redhat com> 2.0.7-2
- fix generating of python3 wrappers (#830660)
- don't crash when attepmting to warn about wrong descructor (#830249)
diff --git a/swig207-setools.patch b/swig207-setools.patch
new file mode 100644
index 0000000..ef465f7
--- /dev/null
+++ b/swig207-setools.patch
@@ -0,0 +1,18 @@
+diff -up swig-2.0.7/Source/Swig/naming.c.setools swig-2.0.7/Source/Swig/naming.c
+--- swig-2.0.7/Source/Swig/naming.c.setools 2011-12-11 17:29:51.000000000 +0100
++++ swig-2.0.7/Source/Swig/naming.c 2012-06-27 16:21:21.248375130 +0200
+@@ -215,11 +215,11 @@ String *Swig_name_member(const_String_or
+ Append(r, f);
+ }
+ cname = Char(rclassname);
+- if ((strncmp(cname, "struct ", 7) == 0) || ((strncmp(cname, "class ", 6) == 0)) || ((strncmp(cname, "union ", 6) == 0))) {
+- cname = strchr(cname, ' ') + 1;
+- }
+ replace_nspace(r, nspace);
+ Replace(r, "%c", cname, DOH_REPLACE_ANY);
++ if ((strncmp(cname, "struct ", 7) == 0) || ((strncmp(cname, "class ", 6) == 0)) || ((strncmp(cname, "union ", 6) == 0))) {
++ Replace(r, " ", "_", DOH_REPLACE_FIRST);
++ }
+ Replace(r, "%m", membername, DOH_REPLACE_ANY);
+ /* name_mangle(r); */
+ Delete(rclassname);
More information about the scm-commits
mailing list