Fix swig syntax error 26/248626/1 submit/tizen/20201201.015536 submit/tizen/20201201.050038
authorDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Dec 2020 04:17:23 +0000 (13:17 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Tue, 1 Dec 2020 04:20:34 +0000 (13:20 +0900)
Change-Id: Iafb05badac1167019d5efbaea67a19e19373cbb3

packaging/fix_swig_syntax_error.patch [new file with mode: 0644]
packaging/libzypp.spec

diff --git a/packaging/fix_swig_syntax_error.patch b/packaging/fix_swig_syntax_error.patch
new file mode 100644 (file)
index 0000000..8ef9e0c
--- /dev/null
@@ -0,0 +1,40 @@
+diff --git a/zypp/Patch.h b/zypp/Patch.h
+index 33de43c82..1ba453a8a 100644
+--- a/zypp/Patch.h
++++ b/zypp/Patch.h
+@@ -107,7 +107,7 @@ namespace zypp
+       bool isCategory( const std::string & category_r ) const;
+       /** \overload taking OR'ed \ref Categories */
+       bool isCategory( Categories category_r ) const;
+-
++#ifndef SWIG // Swig treats it as syntax error
+       /** \overload taking container of category strings
+        * 2nd template arg just to prevent instantiation for Category
+        */
+@@ -118,7 +118,7 @@ namespace zypp
+       { if ( isCategory( el ) ) return true; }
+       return false;
+       }
+-
++#endif
+       /** Patch category as enum of wellknown categories.
+        * Unknown values are mapped to \ref CAT_OTHER.
+        */
+@@ -143,7 +143,7 @@ namespace zypp
+       bool isSeverity( const std::string & severity_r ) const;
+       /** \overload taking OR'ed \ref SeverityFlags */
+       bool isSeverity( SeverityFlags severity_r ) const;
+-
++#ifndef SWIG // Swig treats it as syntax error
+       /** \overload taking container of severity strings
+        * 2nd template arg just to prevent instantiation for SeverityFlag
+        */
+@@ -154,7 +154,7 @@ namespace zypp
+       { if ( isSeverity( el ) ) return true; }
+       return false;
+       }
+-
++#endif
+       /** Severity string mapped to an enum.
+        * Unknown string values are mapped to \ref SEV_OTHER
+        */
index 75c306b..dfeabfe 100644 (file)
@@ -8,6 +8,7 @@ Source:         %{name}-%{version}.tar.bz2
 Source1:        %{name}-rpmlintrc
 Source10:       Exclude_subdirectory.patch
 Source11:       add_pie_compile_option.patch
+Source12:       fix_swig_syntax_error.patch
 Source1001:    libzypp.manifest
 
 # Features we provide (update doc/autoinclude/FeatureTest.doc):
@@ -107,6 +108,7 @@ Authors:
 cp %{SOURCE1001} .
 %{__patch} -p1 < %{SOURCE10}
 %{__patch} -p1 < %{SOURCE11}
+%{__patch} -p1 < %{SOURCE12}
 
 %build
 mkdir build