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
This commit is contained in:
Takashi Iwai 2018-01-10 13:53:02 +00:00 committed by Git OBS Bridge
parent 880913d7fd
commit 844915e201
3 changed files with 84 additions and 1 deletions

View File

@ -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 ...]")

View File

@ -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

View File

@ -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