diff options
Diffstat (limited to 'debian/patches')
-rw-r--r-- | debian/patches/avoid-syntaxwarning-in-python-extension.patch | 26 | ||||
-rw-r--r-- | debian/patches/check-for-atomic.patch | 31 | ||||
-rw-r--r-- | debian/patches/python3.patch | 23 | ||||
-rw-r--r-- | debian/patches/series | 3 |
4 files changed, 83 insertions, 0 deletions
diff --git a/debian/patches/avoid-syntaxwarning-in-python-extension.patch b/debian/patches/avoid-syntaxwarning-in-python-extension.patch new file mode 100644 index 0000000..c8556d4 --- /dev/null +++ b/debian/patches/avoid-syntaxwarning-in-python-extension.patch @@ -0,0 +1,26 @@ +Author: Mattia Rizzolo <mattia@debian.org> +Description: Avoid SyntaxWarning in a python extension + I also reckon the chances of the check actually passing while using `is` to be quite low… +Forwarded: no, this is already upstream but not (yet) in the 1.0.x branch. +Last-Updated: 2020-09-10 + +--- a/share/extensions/interp.py ++++ b/share/extensions/interp.py +@@ -112,7 +112,7 @@ + else: + fillstyle = 'color' + +- if strokestyle is 'color': ++ if strokestyle == 'color': + if sst['stroke'] == 'none': + sst['stroke-width'] = '0.0' + sst['stroke-opacity'] = '0.0' +@@ -122,7 +122,7 @@ + est['stroke-opacity'] = '0.0' + est['stroke'] = sst['stroke'] + +- if fillstyle is 'color': ++ if fillstyle == 'color': + if sst['fill'] == 'none': + sst['fill-opacity'] = '0.0' + sst['fill'] = est['fill'] diff --git a/debian/patches/check-for-atomic.patch b/debian/patches/check-for-atomic.patch new file mode 100644 index 0000000..4097100 --- /dev/null +++ b/debian/patches/check-for-atomic.patch @@ -0,0 +1,31 @@ +Description: Add -latomic where needed + This is to fix the build on armel and mipsel +Author: Mattia Rizzolo <mattia@debian.org> +Forwarded: https://gitlab.com/inkscape/inkscape/-/merge_requests/1867 +Last-Update: 2020-05-07 + +--- a/CMakeScripts/DefineDependsandFlags.cmake ++++ b/CMakeScripts/DefineDependsandFlags.cmake +@@ -60,6 +60,22 @@ + list(APPEND INKSCAPE_LIBS "-latomic") + ENDIF() + ++include(CheckCXXSourceCompiles) ++CHECK_CXX_SOURCE_COMPILES(" ++#include <atomic> ++#include <cstdint> ++std::atomic<uint64_t> x (0); ++int main() { ++ uint64_t i = x.load(std::memory_order_relaxed); ++ return 0; ++} ++" ++LIBATOMIC_NOT_NEEDED) ++IF (NOT LIBATOMIC_NOT_NEEDED) ++ message(STATUS " Adding -latomic to the libs.") ++ list(APPEND INKSCAPE_LIBS "-latomic") ++ENDIF() ++ + + # ---------------------------------------------------------------------------- + # Helper macros diff --git a/debian/patches/python3.patch b/debian/patches/python3.patch new file mode 100644 index 0000000..16c431c --- /dev/null +++ b/debian/patches/python3.patch @@ -0,0 +1,23 @@ +Description: Don't consider `python` a valid python[23]? interpreter. + Just to be safe, don't even try to look it up. + Should be safe to drop the patch once python2 is not around anymore. +Author: Mattia Rizzolo <mattia@debian.org> +Forwarded: not-needed +Last-Update: 2020-05-07 + +--- a/src/extension/implementation/script.cpp ++++ b/src/extension/implementation/script.cpp +@@ -80,9 +80,11 @@ + { "python", {"python-interpreter", {"python3" }}}, + #else + { "perl", {"perl-interpreter", {"perl" }}}, +- { "python", {"python-interpreter", {"python3", "python" }}}, ++ /* don't consider `python` a valid python(3) interpreter */ ++ { "python", {"python-interpreter", {"python3" }}}, + #endif +- { "python2", {"python2-interpreter", {"python2", "python" }}}, ++ /* don't consider `python` a valid python(2) interpreter either */ ++ { "python2", {"python2-interpreter", {"python2" }}}, + { "ruby", {"ruby-interpreter", {"ruby" }}}, + { "shell", {"shell-interpreter", {"sh" }}}, + }; diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..479224a --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,3 @@ +check-for-atomic.patch +python3.patch +avoid-syntaxwarning-in-python-extension.patch |