Fix building of setools package

Signed-off-by: Adam Tkac <atkac@redhat.com>
This commit is contained in:
Adam Tkac 2012-06-27 17:02:03 +02:00
parent 2ea2765871
commit e97a2ab6bd
2 changed files with 24 additions and 1 deletions

View File

@ -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)

18
swig207-setools.patch Normal file
View File

@ -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);