From 844915e2016187e73691a1db721cb8a6a8dcb588b0f572fda98df176cc30f5f9 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Wed, 10 Jan 2018 13:53:02 +0000 Subject: [PATCH] Accepting request 563118 from home:dimstar:Factory Fix build with fontforge converted to py3 (Staging:G); also builds with the old variant of fontforge OBS-URL: https://build.opensuse.org/request/show/563118 OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/gnu-free-fonts?expand=0&rev=16 --- freefont-build-using-py3.patch | 76 ++++++++++++++++++++++++++++++++++ gnu-free-fonts.changes | 5 +++ gnu-free-fonts.spec | 4 +- 3 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 freefont-build-using-py3.patch diff --git a/freefont-build-using-py3.patch b/freefont-build-using-py3.patch new file mode 100644 index 0000000..62217f8 --- /dev/null +++ b/freefont-build-using-py3.patch @@ -0,0 +1,76 @@ +Index: freefont-20120503/tools/generate/MacTT +=================================================================== +--- freefont-20120503.orig/tools/generate/MacTT ++++ freefont-20120503/tools/generate/MacTT +@@ -43,7 +43,7 @@ if argc > 1: + f = fontforge.open( argv[i] ) + ttfile = f.fontname + ".mac.ttf" + vstr = trim_version_str( f ) +- print "Generating Mac TrueType file ", ttfile, ' ', vstr ++ print ("Generating Mac TrueType file ", ttfile, ' ', vstr) + f.selection.all() + f.autoHint() + f.autoInstr() +@@ -51,4 +51,4 @@ if argc > 1: + #f.generate( ttfile, flags=('opentype','old-kern') ) + f.close() + else: +- print "Usage: " + scriptname + " font.sfd [font.sfd ...]" ++ print ("Usage: " + scriptname + " font.sfd [font.sfd ...]") +Index: freefont-20120503/tools/generate/OpenType +=================================================================== +--- freefont-20120503.orig/tools/generate/OpenType ++++ freefont-20120503/tools/generate/OpenType +@@ -42,7 +42,7 @@ if argc > 1: + f = fontforge.open( argv[i] ) + otfile = f.fontname + ".otf" + vstr = trim_version_str( f ) +- print "Generating OpenType file ", otfile, ' ', vstr ++ print ("Generating OpenType file ", otfile, ' ', vstr) + # Wanted to set to 'UniocdeBmp' if there were no high unicodes + # but all attemtps to determine that from Python failed. + f.encoding = 'UnicodeFull' +@@ -51,4 +51,4 @@ if argc > 1: + f.generate( otfile, flags=('opentype','old-kern','round') ) + f.close() + else: +- print "Usage: " + scriptname + " font.sfd [font.sfd ...]" ++ print ("Usage: " + scriptname + " font.sfd [font.sfd ...]") +Index: freefont-20120503/tools/generate/TrueType +=================================================================== +--- freefont-20120503.orig/tools/generate/TrueType ++++ freefont-20120503/tools/generate/TrueType +@@ -42,7 +42,7 @@ if argc > 1: + f = fontforge.open( sys.argv[i] ) + ttfile = f.fontname + ".ttf" + vstr = trim_version_str( f ) +- print "Generating TrueType file ", ttfile, ' ', vstr ++ print ("Generating TrueType file ", ttfile, ' ', vstr) + # Wanted to set to 'UniocdeBmp' if there were no high unicodes + # but all attemtps to determine that from Python failed. + f.encoding = 'UnicodeFull' +@@ -54,4 +54,4 @@ if argc > 1: + f.generate( ttfile, flags=('opentype','old-kern','no-hints') ) + f.close() + else: +- print "Usage: " + scriptname + " font.sfd [font.sfd ...]" ++ print ("Usage: " + scriptname + " font.sfd [font.sfd ...]") +Index: freefont-20120503/tools/generate/WOFF +=================================================================== +--- freefont-20120503.orig/tools/generate/WOFF ++++ freefont-20120503/tools/generate/WOFF +@@ -153,7 +153,7 @@ if argc > 1: + f = fontforge.open( sys.argv[i] ) + woff_file = f.fontname + ".woff" + vstr = trim_version_str( f ) +- print "Generating WOFF file ", woff_file, ' ', vstr ++ print ("Generating WOFF file ", woff_file, ' ', vstr) + # Wanted to set to 'UniocdeBmp' if there were no high unicodes + # but all attemtps to determine that from Python failed. + f.encoding = 'UnicodeFull' +@@ -171,4 +171,4 @@ if argc > 1: + f.generate( woff_file, flags=('opentype','no-hints') ) + f.close() + else: +- print "Usage: " + scriptname + " font.sfd [font.sfd ...]" ++ print ("Usage: " + scriptname + " font.sfd [font.sfd ...]") diff --git a/gnu-free-fonts.changes b/gnu-free-fonts.changes index 215ae4a..92449db 100644 --- a/gnu-free-fonts.changes +++ b/gnu-free-fonts.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jan 9 17:22:51 UTC 2018 - dimstar@opensuse.org + +- Add freefont-build-using-py3.patch: Fix build when using python3. + ------------------------------------------------------------------- Sun Apr 17 14:36:22 UTC 2016 - bwiedemann@suse.com diff --git a/gnu-free-fonts.spec b/gnu-free-fonts.spec index d2929e9..5fe93b1 100644 --- a/gnu-free-fonts.spec +++ b/gnu-free-fonts.spec @@ -1,7 +1,7 @@ # # spec file for package gnu-free-fonts # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -32,6 +32,7 @@ Source10: remove-kana-glyphs Source11: GenerateTrueType # PATCH-FIX-UPSTREAM -- bmwiedemann fix build-compare https://savannah.gnu.org/bugs/index.php?47722 Patch0: reproducible.patch +Patch1: freefont-build-using-py3.patch BuildRequires: fontforge >= 20080429 BuildRequires: fontpackages-devel BuildRequires: python @@ -56,6 +57,7 @@ one with modulated stroke). %prep %setup -q -n %{fontname}-%{fontversion} %patch0 -p1 +%patch1 -p1 %build chmod 755 $RPM_SOURCE_DIR/remove-kana-glyphs