[graphite2] 01/02: add WIP patch to make fnttxtrender use python3

Rene Engelhard rene at moszumanska.debian.org
Tue Sep 19 21:10:23 UTC 2017


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch master
in repository graphite2.

commit b7b95817ea0fb12828dfb8231ff4ed3685dc520e
Author: Rene Engelhard <rene at rene-engelhard.de>
Date:   Tue Sep 19 21:04:07 2017 +0000

    add WIP patch to make fnttxtrender use python3
---
 debian/patches/fnttxtrender-python3.diff | 49 ++++++++++++++++++++++++++++++++
 debian/patches/series                    |  1 +
 2 files changed, 50 insertions(+)

diff --git a/debian/patches/fnttxtrender-python3.diff b/debian/patches/fnttxtrender-python3.diff
new file mode 100644
index 0000000..2581d57
--- /dev/null
+++ b/debian/patches/fnttxtrender-python3.diff
@@ -0,0 +1,49 @@
+Description: make fnttxtrender use python3 explicitly
+ seems fonttools doesn't ship the module for python2 anymore and so:
+ .
+   File "/<<PKGBUILDDIR>>/tests/fnttxtrender", line 6, in <module>
+     from fontTools.ttLib import TTFont
+ ImportError: No module named fontTools.ttLib
+ .
+ happens.
+Last-Update: 2017-09-19
+
+--- graphite2-1.3.10.orig/tests/fnttxtrender
++++ graphite2-1.3.10/tests/fnttxtrender
+@@ -1,4 +1,4 @@
+-#!/usr/bin/python
++#!/usr/bin/python3
+ 
+ import codecs
+ from optparse import OptionParser
+@@ -242,7 +242,7 @@ for label, words in reader :
+         l = makelabel(label, count, wcount)
+         if cjson is not None and cmpgls(gls[0], cjson[l][0], opts.epsilon) :
+             errors += 1
+-            print l + " Failed"
++            print (l + " Failed")
+         if opts.quiet : continue
+         if log is None :
+             log = JsonLog(outfile, fpaths, opts, args)
+--- graphite2-1.3.10.orig/Graphite.cmake
++++ graphite2-1.3.10/Graphite.cmake
+@@ -113,7 +113,7 @@ function(cmptest TESTNAME FONTFILE TEXTF
+         set(PLATFORM_TEST_SUFFIX ${CMAKE_SYSTEM_NAME})
+     endif (EXISTS ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${CMAKE_SYSTEM_NAME}.json)
+     if ((NOT GRAPHITE2_NFILEFACE) AND ((NOT GRAPHITE2_ASAN) OR CMAKE_COMPILER_IS_GNUCXX))
+-        add_test(NAME ${TESTNAME} COMMAND python ${PROJECT_SOURCE_DIR}/fnttxtrender --graphite_library=$<TARGET_FILE:graphite2> -t ${PROJECT_SOURCE_DIR}/texts/${TEXTFILE} -o ${PROJECT_BINARY_DIR}/${TESTNAME}.json -c ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${PLATFORM_TEST_SUFFIX}.json ${ARGN} ${PROJECT_SOURCE_DIR}/fonts/${FONTFILE})
++        add_test(NAME ${TESTNAME} COMMAND python3 ${PROJECT_SOURCE_DIR}/fnttxtrender --graphite_library=$<TARGET_FILE:graphite2> -t ${PROJECT_SOURCE_DIR}/texts/${TEXTFILE} -o ${PROJECT_BINARY_DIR}/${TESTNAME}.json -c ${PROJECT_SOURCE_DIR}/standards/${TESTNAME}${PLATFORM_TEST_SUFFIX}.json ${ARGN} ${PROJECT_SOURCE_DIR}/fonts/${FONTFILE})
+         if (GRAPHITE2_ASAN)
+             set_property(TEST ${TESTNAME} APPEND 
+                     PROPERTY ENVIRONMENT "ASAN_SYMBOLIZER_PATH=${ASAN_SYMBOLIZER}"
+--- graphite2-1.3.10.orig/tests/graphite.py
++++ graphite2-1.3.10/tests/graphite.py
+@@ -126,7 +126,7 @@ def tag_to_str(num) :
+     gr2.gr_tag_to_str(num, s)
+     return str(s.value)
+ 
+-class Label(unicode) :
++class Label(str) :
+     def __new__(typename, ref, size) :
+         return super(Label, typename).__new__(typename, string_at(ref, size))
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 8ffd26b..c78e3c4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ non-linux.diff
 no-icons.diff
 test-timeout.diff
 reproducible-build.diff
+#fnttxtrender-python3.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/graphite2.git



More information about the Pkg-openoffice-commits mailing list