diff --git a/kicad-swig-3.0.10.patch b/kicad-swig-3.0.10.patch new file mode 100644 index 0000000..b397260 --- /dev/null +++ b/kicad-swig-3.0.10.patch @@ -0,0 +1,17 @@ +Index: kicad-4.0.2/scripting/build_tools/fix_swig_imports.py +=================================================================== +--- kicad-4.0.2.orig/scripting/build_tools/fix_swig_imports.py ++++ kicad-4.0.2/scripting/build_tools/fix_swig_imports.py +@@ -37,6 +37,12 @@ if (len(lines)<4000): + txt = "" + + for l in lines: ++ if l.startswith("if _swig_python_version_info >= (2, 7, 0):"): # ok with swig version >= 3.0.10 ++ l = l.replace("_swig_python_version_info >= (2, 7, 0)","False") ++ doneOk = True ++ elif l.startswith("elif _swig_python_version_info >= (2, 6, 0):"): # needed with swig version >= 3.0.10 ++ l = l.replace("_swig_python_version_info >= (2, 6, 0)","False") ++ doneOk = True + if l.startswith("if version_info >= (2,6,0):"): # ok with swig version <= 3.0.2 + l = l.replace("version_info >= (2,6,0)","False") + doneOk = True diff --git a/kicad.changes b/kicad.changes index 2311fd5..08baf36 100644 --- a/kicad.changes +++ b/kicad.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 7 18:25:41 UTC 2016 - dmitry_r@opensuse.org + +- Fix broken swig import script when using swig >= 3.0.10 + * kicad-swig-3.0.10.patch + ------------------------------------------------------------------- Fri May 6 17:10:15 UTC 2016 - davejplater@gmail.com diff --git a/kicad.spec b/kicad.spec index 5936d36..a0e9b82 100644 --- a/kicad.spec +++ b/kicad.spec @@ -34,6 +34,8 @@ Patch2: kicad-library-repos-install.patch # kicad looks in /usr/share/doc/kicad for help files and doesn't find them. # this patch adds packges/ befor kicad. Patch3: kicad-suse-help-path.patch +# PATCH-FIX-UPSTREAM kicad-swig-3.0.10.patch -- Fix broken swig import script when using swig >= 3.0.10 +Patch4: kicad-swig-3.0.10.patch %if 0%{?suse_version} > 1320 BuildRequires: boost-devel >= 1.56 %else @@ -95,6 +97,7 @@ This package contains script for KiCad libraries downloading. %patch1 -p1 %patch2 -p1 %patch3 +%patch4 -p1 cp %{SOURCE2} .