Drop req on 2to3

This commit is contained in:
Gwyn Ciesla 2023-10-18 11:36:32 -05:00
parent 5abb595647
commit e440eb5a5c
2 changed files with 70 additions and 11 deletions

View File

@ -20,12 +20,11 @@ Source8: %{fontname}-serif.metainfo.xml
Patch0: gnu-free-fonts-devanagari-rendering.patch Patch0: gnu-free-fonts-devanagari-rendering.patch
Patch1: gnu-free-sans-square-dot-glyph-fix.patch Patch1: gnu-free-sans-square-dot-glyph-fix.patch
Patch2: python3.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: make BuildRequires: make
BuildRequires: fontpackages-devel fontforge BuildRequires: fontpackages-devel fontforge
# following is needed as we are calling /usr/bin/2to3
BuildRequires: /usr/bin/2to3
%global common_desc \ %global common_desc \
Gnu FreeFont is a free family of scalable outline fonts, suitable for general \ Gnu FreeFont is a free family of scalable outline fonts, suitable for general \
@ -88,17 +87,9 @@ This package contains the GNU FreeFont serif font.
%prep %prep
%autosetup -n freefont-%{version} -p1 %autosetup -n freefont-%{version} -p1
# move build scripts to python3 compatible code
pushd tools
pushd generate
# Following for loop should not be used on pyc files # Following for loop should not be used on pyc files
# better remove pre-compiled buildutils.pyc file # better remove pre-compiled buildutils.pyc file
rm *.pyc rm tools/generate/*.pyc
for item in `ls`;do
2to3 -w $item
done
popd
popd
%build %build
make make

68
python3.patch Normal file
View File

@ -0,0 +1,68 @@
--- a/tools/generate/MacTT.bak 2012-05-03 08:23:30.000000000 -0500
+++ b/tools/generate/MacTT 2023-10-18 11:09:56.437731484 -0500
@@ -43,7 +43,7 @@
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 @@
#f.generate( ttfile, flags=('opentype','old-kern') )
f.close()
else:
- print "Usage: " + scriptname + " font.sfd [font.sfd ...]"
+ print("Usage: " + scriptname + " font.sfd [font.sfd ...]")
--- a/tools/generate/OpenType.bak 2012-05-03 08:23:30.000000000 -0500
+++ b/tools/generate/OpenType 2023-10-18 11:09:56.901729078 -0500
@@ -42,7 +42,7 @@
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 @@
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 ...]")
--- a/tools/generate/TrueType.bak 2012-05-03 08:23:30.000000000 -0500
+++ b/tools/generate/TrueType 2023-10-18 11:09:57.386726565 -0500
@@ -42,7 +42,7 @@
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 @@
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 ...]")
--- a/tools/generate/WOFF.bak 2012-05-03 08:23:30.000000000 -0500
+++ b/tools/generate/WOFF 2023-10-18 11:09:57.892723941 -0500
@@ -153,7 +153,7 @@
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 @@
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 ...]")