From: DongHun Kwak Date: Tue, 1 Dec 2020 04:17:23 +0000 (+0900) Subject: Fix swig syntax error X-Git-Tag: submit/tizen/20201201.015536^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e2368517f03f34770c0b0dfbfce924acd3154c74;p=platform%2Fupstream%2Flibzypp.git Fix swig syntax error Change-Id: Iafb05badac1167019d5efbaea67a19e19373cbb3 --- diff --git a/packaging/fix_swig_syntax_error.patch b/packaging/fix_swig_syntax_error.patch new file mode 100644 index 0000000..8ef9e0c --- /dev/null +++ b/packaging/fix_swig_syntax_error.patch @@ -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 + */ diff --git a/packaging/libzypp.spec b/packaging/libzypp.spec index 75c306b..dfeabfe 100644 --- a/packaging/libzypp.spec +++ b/packaging/libzypp.spec @@ -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