Update to 20161001

This commit is contained in:
Parag A Nemade 2016-10-03 13:39:58 +05:30
parent 47e862ad38
commit 73cd69a4c4
No known key found for this signature in database
GPG Key ID: 71932951EB71E972
8 changed files with 73 additions and 113 deletions

1
.gitignore vendored
View File

@ -13,3 +13,4 @@ fontforge_full-20100501.tar.bz2
/20150612.tar.gz
/fontforge-20150824.tar.gz
/fontforge-20160404.tar.gz
/fontforge-20161001.tar.gz

View File

@ -1,8 +1,9 @@
From 75426cbbe57138849b96537ab1dee81e7861af11 Mon Sep 17 00:00:00 2001
From: Parag Nemade <pnemade@redhat.com>
Date: Fri, 8 Apr 2016 12:03:12 +0530
From b2c5de7835a753cad1f35db8202c4733b5fc2990 Mon Sep 17 00:00:00 2001
From: Parag A Nemade <pnemade@fedoraproject.org>
Date: Mon, 3 Oct 2016 12:56:29 +0530
Subject: [PATCH] Add python3 support
Signed-off-by: Parag A Nemade <pnemade@fedoraproject.org>
---
pycontrib/FontCompare/fc/BitmapHandler.py | 20 +++++++--------
pycontrib/FontCompare/fc/DocCompare.py | 2 +-
@ -12,14 +13,14 @@ Subject: [PATCH] Add python3 support
pycontrib/FontCompare/unittests/unittests.py | 18 ++++++-------
pycontrib/collab/web-test-collab.py | 2 +-
pycontrib/even.py | 2 +-
pycontrib/gdraw/__init__.py | 2 +-
pycontrib/gdraw/gdraw.py | 18 ++++++-------
pycontrib/graphicore.py | 2 +-
pycontrib/gdraw/__init__.py | 4 +--
pycontrib/gdraw/gdraw.py | 20 +++++++--------
pycontrib/graphicore.py | 4 +--
pycontrib/graphicore/ipython_view.py | 13 +++++-----
pycontrib/graphicore/shell.py | 2 +-
pycontrib/graphicore/shell.py | 4 +--
pycontrib/svg2sfd.py | 38 ++++++++++++++--------------
pycontrib/webcollab.py | 2 +-
15 files changed, 64 insertions(+), 63 deletions(-)
pycontrib/webcollab.py | 6 ++---
15 files changed, 70 insertions(+), 69 deletions(-)
diff --git a/pycontrib/FontCompare/fc/BitmapHandler.py b/pycontrib/FontCompare/fc/BitmapHandler.py
index d4d00da..c159128 100644
@ -212,7 +213,7 @@ index 96f9128..4f30fcb 100755
"""
running even from the fontforge menu
diff --git a/pycontrib/gdraw/__init__.py b/pycontrib/gdraw/__init__.py
index d47976c..25bf981 100644
index d47976c..dde7ea8 100644
--- a/pycontrib/gdraw/__init__.py
+++ b/pycontrib/gdraw/__init__.py
@@ -1,4 +1,4 @@
@ -221,8 +222,17 @@ index d47976c..25bf981 100644
# vim:ts=8:sw=4:expandtab:encoding=utf-8
'''
Copyright <hashao2@gmail.com> 2009
@@ -22,7 +22,7 @@ Copyright <hashao2@gmail.com> 2009
__all__ = ['Timer', 'GtkRunner', 'gtkrunner']
__version__ = '0.1'
-from gdraw import *
+from .gdraw import *
def main():
pass
diff --git a/pycontrib/gdraw/gdraw.py b/pycontrib/gdraw/gdraw.py
index f2d5e50..3ed3abd 100755
index f2d5e50..8b6e693 100755
--- a/pycontrib/gdraw/gdraw.py
+++ b/pycontrib/gdraw/gdraw.py
@@ -1,4 +1,4 @@
@ -231,6 +241,15 @@ index f2d5e50..3ed3abd 100755
'''ctypes wrapper to Attach the GDraw event handler to the gtk main loop.
Copyright <hashao2@gmail.com> 2009
@@ -67,7 +67,7 @@ def setup_syspath(modpath="modules"):
__all__ = ['Timer', 'GtkRunner', 'gtkrunner']
-from _gdraw import *
+from ._gdraw import *
from ctypes import *
import types
@@ -111,7 +111,7 @@ class Timer:
return
@ -296,7 +315,7 @@ index f2d5e50..3ed3abd 100755
def start(self, timeout=GTIMEOUT):
diff --git a/pycontrib/graphicore.py b/pycontrib/graphicore.py
index f95e488..a986327 100755
index f95e488..229a2b7 100755
--- a/pycontrib/graphicore.py
+++ b/pycontrib/graphicore.py
@@ -1,4 +1,4 @@
@ -305,6 +324,13 @@ index f95e488..a986327 100755
# -*- coding: utf-8 -*-
"""
running the fontforge scripts in the graphicore folder on fontforge startup
@@ -22,4 +22,4 @@ sys.path.append(os.path.dirname(sys.modules[__name__].__file__))
sys.path.reverse();
#load the modules
-import graphicore.shell
\ No newline at end of file
+import graphicore.shell
diff --git a/pycontrib/graphicore/ipython_view.py b/pycontrib/graphicore/ipython_view.py
index f39eedb..2b77395 100644
--- a/pycontrib/graphicore/ipython_view.py
@ -353,7 +379,7 @@ index f39eedb..2b77395 100644
input.close()
diff --git a/pycontrib/graphicore/shell.py b/pycontrib/graphicore/shell.py
index 5d102f7..2728ae2 100755
index 5d102f7..32fa584 100755
--- a/pycontrib/graphicore/shell.py
+++ b/pycontrib/graphicore/shell.py
@@ -1,4 +1,4 @@
@ -362,6 +388,15 @@ index 5d102f7..2728ae2 100755
# -*- coding: utf-8 -*-
"""
FontForge Interactive Python Shell
@@ -32,7 +32,7 @@ if len(sys.argv) == 0:
# some versions of IPython need content in sys.argv
sys.argv.append('')
-from ipython_view import *
+from .ipython_view import *
import gdraw
def runShell(data = None, glyphOrFont = None):
diff --git a/pycontrib/svg2sfd.py b/pycontrib/svg2sfd.py
index e1fc0ac..e23cb15 100644
--- a/pycontrib/svg2sfd.py
@ -459,7 +494,7 @@ index e1fc0ac..e23cb15 100644
continue
s = l.strip().split()
diff --git a/pycontrib/webcollab.py b/pycontrib/webcollab.py
index 9ee0f17..f96828c 100755
index 9ee0f17..4be07ec 100755
--- a/pycontrib/webcollab.py
+++ b/pycontrib/webcollab.py
@@ -1,4 +1,4 @@
@ -468,6 +503,17 @@ index 9ee0f17..f96828c 100755
# -*- coding: utf-8 -*-
"""
running web collab server hooks
@@ -44,8 +44,8 @@ def startWebServerInCollabMode(data = None, glyphOrFont = None):
global child
global childNodejs
ensureChildClosed()
- print("FONTFORGE:" + FONTFORGE)
- print("script path:" + collabpath + "web-test-collab.py")
+ print(("FONTFORGE:" + FONTFORGE))
+ print(("script path:" + collabpath + "web-test-collab.py"))
child = subprocess.Popen( [ FONTFORGE, "-forceuihidden", "-script", collabpath + "web-test-collab.py" ] )
#
# start the nodejs server
--
2.7.3
2.9.3

View File

@ -1,41 +0,0 @@
diff -Nur fontforge-20090224.orig/configure fontforge-20090224/configure
--- fontforge-20090224.orig/configure 2008-12-24 14:04:18.000000000 -0700
+++ fontforge-20090224/configure 2009-04-01 22:56:07.000000000 -0600
@@ -26670,6 +26670,7 @@
else
PYLIBS=""
fi
+ PYDEFINES="$PYDEFINES, ('SOLIBDIR','\"$libdir/\"')"
PY=pyhook/setup.py
fi
diff -Nur fontforge-20090224.orig/pyhook/loadfontforge.h fontforge-20090224/pyhook/loadfontforge.h
--- fontforge-20090224.orig/pyhook/loadfontforge.h 2007-12-23 19:28:35.000000000 -0700
+++ fontforge-20090224/pyhook/loadfontforge.h 2009-04-01 22:49:08.000000000 -0600
@@ -11,7 +11,7 @@
if ( (lib = dlopen("libgunicode" SO_EXT,RTLD_LAZY))==NULL ) {
#ifdef PREFIX
- lib = dlopen( PREFIX "/lib/" "libgunicode" SO_EXT,RTLD_LAZY);
+ lib = dlopen( SOLIBDIR "libgunicode.so.3" ,RTLD_LAZY);
#endif
}
if ( lib==NULL ) {
@@ -21,7 +21,7 @@
if ( (lib = dlopen("libgutils" SO_EXT,RTLD_LAZY))==NULL ) {
#ifdef PREFIX
- lib = dlopen( PREFIX "/lib/" "libgutils" SO_EXT,RTLD_LAZY);
+ lib = dlopen( SOLIBDIR "libgutils.so.1" ,RTLD_LAZY);
#endif
}
if ( lib==NULL ) {
@@ -31,7 +31,7 @@
if ( (lib = dlopen("libfontforge" SO_EXT,RTLD_LAZY))==NULL ) {
#ifdef PREFIX
- lib = dlopen( PREFIX "/lib/" "libfontforge" SO_EXT,RTLD_LAZY);
+ lib = dlopen( SOLIBDIR "libfontforge.so.1" ,RTLD_LAZY);
#endif
}
if ( lib==NULL ) {

View File

@ -1,37 +0,0 @@
--- fontforge-20120731-b/fontforge/parsepdf.c 2012-08-02 16:09:09.000000000 +0100
+++ fontforge-20120731-b-new/fontforge/parsepdf.c 2013-02-07 17:44:05.371466086 +0000
@@ -1691,9 +1691,9 @@
/* to "Unicode" values it specifies rather than to the real order in which the glyphs are */
/* stored in the file */
pos = cmap_from_cid || sf->map == NULL ? gid : sf->map->map[gid];
- sc = sf->glyphs[pos];
- if (pos >= 0 && pos < sf->glyphcnt && (sc->unicodeenc != uvals[0] || nuni > 1)) {
+ if (pos >= 0 && pos < sf->glyphcnt && (sf->glyphs[pos]->unicodeenc != uvals[0] || nuni > 1)) {
+ sc = sf->glyphs[pos];
/* Sometimes FF instead of assigning proper Unicode values to TTF glyphs keeps */
/* them encoded to the same codepoint, but creates for each glyph an alternate */
/* encoding, corresponding to the position this glyph has in the font's encoding */
@@ -1723,6 +1723,7 @@
FILE *file;
int i, j, gid, start, end, uni, cur=0, nuni, nhex, nchars, lo, *uvals;
long *mappings;
+ size_t num_mappings;
char tok[200], *ccval, prevtok[200];
SplineFont *sf = basesf->subfontcnt > 0 ? basesf->subfonts[0] : basesf;
@@ -1733,9 +1734,14 @@
return;
rewind(file);
+ num_mappings = sf->glyphcnt;
mappings = gcalloc(sf->glyphcnt,sizeof(long));
while ( pdf_getprotectedtok(file,tok) >= 0 ) {
if ( strcmp(tok,"beginbfchar") == 0 && sscanf(prevtok,"%d",&nchars)) {
+ if (cur + nchars >= num_mappings) {
+ num_mappings = cur + nchars;
+ mappings = grealloc(mappings, num_mappings * sizeof(long));
+ }
for (i=0; i<nchars; i++) {
if (pdf_skip_brackets(file,tok) >= 0 && sscanf(tok,"%x",&gid) &&
pdf_skip_brackets(file,tok) >= 0 && sscanf(tok,"%lx",&mappings[cur])) {

View File

@ -1,11 +0,0 @@
--- fontforge-20120731-b/fontforge/parsepdf.c.orig 2013-04-15 17:47:51.113706334 +0100
+++ fontforge-20120731-b/fontforge/parsepdf.c 2013-04-15 17:55:55.531682304 +0100
@@ -960,6 +960,8 @@
start = 0;
num = pdf_getinteger(pt,pc);
}
+ if ( (pt=PSDictHasEntry(&pc->pdfdict,"DecodeParms"))!=NULL && strstr(pt, "/Predictor")!=NULL)
+return( NULL );
if ( (pt=PSDictHasEntry(&pc->pdfdict,"Index"))!=NULL ) {
if ( sscanf(pt,"[%d %d]", &start, &num )!=2 )
return( NULL );

View File

@ -1,5 +1,5 @@
--- Makefile.am.old 2014-08-12 10:07:32.000000000 +0530
+++ Makefile.am 2014-09-08 16:23:56.046996941 +0530
--- ./Makefile.am.old 2014-08-12 10:07:32.000000000 +0530
+++ ./Makefile.am 2014-09-08 16:23:56.046996941 +0530
@@ -43,7 +43,6 @@
AM_CPPFLAGS =
AM_LDFLAGS =

View File

@ -1,10 +1,10 @@
%global gettext_package FontForge
%global gnulib_githead 2bf7326
%global gittag0 20160404
%global gittag0 20161001
Name: fontforge
Version: 20160404
Release: 4%{?dist}
Version: %{gittag0}
Release: 1%{?dist}
Summary: Outline and bitmap font editor
License: GPLv3+
@ -14,6 +14,7 @@ Source0: https://github.com/fontforge/%{name}/archive/%{gittag0}.tar.gz#/
Source1: http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=snapshot;h=%{gnulib_githead};sf=tgz;name=gnulib-%{gnulib_githead}.tar.gz
# https://github.com/fontforge/fontforge/pull/1723
Patch0: fontforge-20140813-use-system-uthash.patch
# Fedora specific patch to have python3 support only
Patch1: Add-python3-support.patch
Requires: xdg-utils
@ -72,11 +73,9 @@ This package contains documentation files for %{name}.
%prep
%setup -q -n %{name}-%{version}
%autosetup -p1
tar xzf %{SOURCE1}
%patch0 -p0
%patch1 -p1
sed -i -e '/^#!\//, 1d' pycontrib/webcollab.py
mkdir htdocs
@ -169,6 +168,9 @@ fi
%doc htdocs
%changelog
* Mon Oct 03 2016 Parag Nemade <pnemade AT redhat DOT com> - 20161001-1
- Update to 20161001
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 20160404-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

View File

@ -1,2 +1,2 @@
1daba85b251e00c614e4e857c67cae4c fontforge-20160404.tar.gz
c48b3dfc2a4142028f117cefc3e99d66 fontforge-20161001.tar.gz
149162d1d21a0dfc705a31916f4b0cd0 gnulib-2bf7326.tar.gz