summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZoltan Puskas <zoltan@sinustrom.info>2016-06-26 01:07:44 -0700
committerMichał Górny <mgorny@gentoo.org>2016-06-29 19:56:47 +0200
commitf228caa38719ad848fa163366c8f96a4d9ded711 (patch)
tree6d7c4c79ccdbe60579910edbc8a82a3ef13ad490 /sci-electronics/kicad/files
parentsys-apps/s6-linux-init: 0.1.0.0 version bump (diff)
downloadgentoo-f228caa38719ad848fa163366c8f96a4d9ded711.tar.gz
gentoo-f228caa38719ad848fa163366c8f96a4d9ded711.tar.bz2
gentoo-f228caa38719ad848fa163366c8f96a4d9ded711.zip
sci-electronics/kicad: Fix swig import fixer script for build, #586406
Fix the broken swig import fixer script that did not work with newer Python versions. Also correct ebuild licensing. Bug: https://bugs.gentoo.org/586406 Closes: https://github.com/gentoo/gentoo/pull/1745 Package-Manager: portage-2.3.0_rc1
Diffstat (limited to 'sci-electronics/kicad/files')
-rw-r--r--sci-electronics/kicad/files/kicad-swig-import-helper.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/sci-electronics/kicad/files/kicad-swig-import-helper.patch b/sci-electronics/kicad/files/kicad-swig-import-helper.patch
new file mode 100644
index 00000000000..9202acca9cb
--- /dev/null
+++ b/sci-electronics/kicad/files/kicad-swig-import-helper.patch
@@ -0,0 +1,31 @@
+diff -Naur kicad-4.0.2-orig/scripting/build_tools/fix_swig_imports.py kicad-4.0.2/scripting/build_tools/fix_swig_imports.py
+--- kicad-4.0.2-orig/scripting/build_tools/fix_swig_imports.py 2016-02-13 13:14:42.000000000 -0800
++++ kicad-4.0.2/scripting/build_tools/fix_swig_imports.py 2016-06-26 00:49:20.336661983 -0700
+@@ -37,7 +37,19 @@
+ txt = ""
+
+ for l in lines:
+- if l.startswith("if version_info >= (2,6,0):"): # ok with swig version <= 3.0.2
++ 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, 7, 0):"): # ok with swig version >= 3.0.9
++ l = l.replace("version_info >= (2, 7, 0)","False")
++ doneOk = True
++ elif l.startswith("elif version_info >= (2, 6, 0):"): # needed with swig version >= 3.0.9
++ l = l.replace("version_info >= (2, 6, 0)","False")
++ doneOk = True
++ elif 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
+ elif l.startswith("if version_info >= (2, 6, 0):"): # needed with swig version 3.0.3
+@@ -60,6 +72,3 @@
+
+
+ exit(0)
+-
+-
+-