make the code compatible with python-3.8 (rh#1728058)
This commit is contained in:
parent
c32eb35d45
commit
2777b437f1
@ -0,0 +1,244 @@
|
||||
From 94a19c782cec508cbfb9ed9ff2e1cbbfd433ba10 Mon Sep 17 00:00:00 2001
|
||||
From: Parag Nemade <pnemade@fedoraproject.org>
|
||||
Date: Sat, 20 Jul 2019 20:34:02 +0530
|
||||
Subject: [PATCH] Fix compilation for python 3.8, the reserved "tp_print" slot
|
||||
was changed from a function pointer to a number "Py_ssize_t
|
||||
tp_vectorcall_offset".
|
||||
|
||||
Signed-off-by: Parag Nemade <pnemade@fedoraproject.org>
|
||||
---
|
||||
fontforge/python.c | 50 +++++++++++++++++++++++-----------------------
|
||||
1 file changed, 25 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/fontforge/python.c b/fontforge/python.c
|
||||
index 1e905ffac..ff23d5082 100644
|
||||
--- a/fontforge/python.c
|
||||
+++ b/fontforge/python.c
|
||||
@@ -1966,7 +1966,7 @@ static PyTypeObject PyFF_PointType = {
|
||||
sizeof(PyFF_Point), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
NULL, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
PYCMPF((cmpfunc) PyFFPoint_compare), /* tp_reserved / tp_compare */
|
||||
@@ -2060,7 +2060,7 @@ static PyTypeObject PyFF_ContourIterType = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)contouriter_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -3624,7 +3624,7 @@ static PyTypeObject PyFF_ContourType = {
|
||||
sizeof(PyFF_Contour), /*tp_basicsize*/
|
||||
0, /*tp_itemsize*/
|
||||
(destructor)PyFFContour_dealloc, /*tp_dealloc*/
|
||||
- NULL, /*tp_print*/
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
NULL, /*tp_getattr*/
|
||||
NULL, /*tp_setattr*/
|
||||
PYCMPF((cmpfunc)PyFFContour_compare), /*tp_reserved/tp_compare*/
|
||||
@@ -3719,7 +3719,7 @@ static PyTypeObject PyFF_LayerIterType = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)layeriter_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -4843,7 +4843,7 @@ static PyTypeObject PyFF_LayerType = {
|
||||
sizeof(PyFF_Layer), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)PyFFLayer_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
PYCMPF((cmpfunc)PyFFLayer_compare),/* tp_reserved/tp_compare */
|
||||
@@ -5620,7 +5620,7 @@ static PyTypeObject PyFF_GlyphPenType = {
|
||||
sizeof(PyFF_GlyphPen), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor) PyFF_GlyphPen_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -5849,7 +5849,7 @@ static PyTypeObject PyFF_LayerArrayIterType = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)layersiter_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -6000,7 +6000,7 @@ static PyTypeObject PyFF_LayerArrayType = {
|
||||
sizeof(PyFF_LayerArray), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor) PyFF_LayerArray_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -6125,7 +6125,7 @@ static PyTypeObject PyFF_RefArrayType = {
|
||||
sizeof(PyFF_RefArray), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor) PyFF_RefArray_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -6266,7 +6266,7 @@ static PyTypeObject PyFF_MathKernType = {
|
||||
sizeof(PyFF_MathKern), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)PyFFMathKern_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -9340,7 +9340,7 @@ static PyTypeObject PyFF_GlyphType = {
|
||||
sizeof(PyFF_Glyph), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor) PyFF_Glyph_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
PYCMPF((cmpfunc)PyFFGlyph_compare),/* tp_reserved/tp_compare */
|
||||
@@ -9433,7 +9433,7 @@ static PyTypeObject PyFF_CvtIterType = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)cvtiter_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -9763,7 +9763,7 @@ static PyTypeObject PyFF_CvtType = {
|
||||
sizeof(PyFF_Cvt), /*tp_basicsize*/
|
||||
0, /*tp_itemsize*/
|
||||
(destructor)PyFFCvt_dealloc, /*tp_dealloc*/
|
||||
- NULL, /*tp_print*/
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
NULL, /*tp_getattr*/
|
||||
NULL, /*tp_setattr*/
|
||||
NULL, /*tp_compare*/
|
||||
@@ -10092,7 +10092,7 @@ static PyTypeObject PyFF_SelectionType = {
|
||||
sizeof(PyFF_Selection), /*tp_basicsize*/
|
||||
0, /*tp_itemsize*/
|
||||
(destructor)PyFFSelection_dealloc, /*tp_dealloc*/
|
||||
- NULL, /*tp_print*/
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
NULL, /*tp_getattr*/
|
||||
NULL, /*tp_setattr*/
|
||||
NULL, /*tp_compare*/
|
||||
@@ -10185,7 +10185,7 @@ static PyTypeObject PyFF_LayerInfoArrayIterType = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)layerinfoiter_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -10326,7 +10326,7 @@ static PyTypeObject PyFF_LayerInfoType = {
|
||||
sizeof(PyFF_LayerInfo), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor) PyFF_LayerInfo_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -10513,7 +10513,7 @@ static PyTypeObject PyFF_LayerInfoArrayType = {
|
||||
sizeof(PyFF_LayerInfoArray), /*tp_basicsize*/
|
||||
0, /*tp_itemsize*/
|
||||
(destructor) PyFF_LayerInfoArray_dealloc, /*tp_dealloc*/
|
||||
- NULL, /*tp_print*/
|
||||
+ 0, /*tp_vectorcall_offset*/
|
||||
NULL, /*tp_getattr*/
|
||||
NULL, /*tp_setattr*/
|
||||
NULL, /*tp_compare*/
|
||||
@@ -10638,7 +10638,7 @@ static PyTypeObject PyFF_MathType = {
|
||||
sizeof(PyFF_Math), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor)PyFFMath_dealloc, /*tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -10747,7 +10747,7 @@ static PyTypeObject PyFF_PrivateIterType = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)privateiter_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -10957,7 +10957,7 @@ static PyTypeObject PyFF_PrivateType = {
|
||||
sizeof(PyFF_Private), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor) PyFF_Private_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -11139,7 +11139,7 @@ static PyTypeObject PyFF_FontIterType = {
|
||||
0, /* tp_itemsize */
|
||||
/* methods */
|
||||
(destructor)fontiter_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -17914,7 +17914,7 @@ static PyTypeObject PyFF_FontType = {
|
||||
sizeof(PyFF_Font), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor) PyFF_Font_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -18030,7 +18030,7 @@ static PyTypeObject PyFF_AWGlyphIndexType = {
|
||||
sizeof(PyFF_AWGlyphI), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor) PyFF_AWGlyphIndex_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -18168,7 +18168,7 @@ static PyTypeObject PyFF_AWGlyphType = {
|
||||
sizeof(PyFF_AWGlyph), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor) PyFF_AWGlyph_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
@@ -18291,7 +18291,7 @@ static PyTypeObject PyFF_AWContextType = {
|
||||
sizeof(PyFF_AWContext), /* tp_basicsize */
|
||||
0, /* tp_itemsize */
|
||||
(destructor) PyFF_AWContext_dealloc, /* tp_dealloc */
|
||||
- NULL, /* tp_print */
|
||||
+ 0, /* tp_vectorcall_offset */
|
||||
NULL, /* tp_getattr */
|
||||
NULL, /* tp_setattr */
|
||||
NULL, /* tp_compare */
|
||||
--
|
||||
2.21.0
|
||||
|
14
fontforge-20190413-python-3.8-pkg-config.patch
Normal file
14
fontforge-20190413-python-3.8-pkg-config.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -urN fontforge-20190413.old/m4/fontforge_arg_enable.m4 fontforge-20190413/m4/fontforge_arg_enable.m4
|
||||
--- fontforge-20190413.old/m4/fontforge_arg_enable.m4 2019-04-13 13:08:39.000000000 +0530
|
||||
+++ fontforge-20190413/m4/fontforge_arg_enable.m4 2019-07-21 16:31:27.939734401 +0530
|
||||
@@ -116,8 +116,8 @@
|
||||
if test x"${i_do_have_python_scripting}" != xyes; then
|
||||
i_want_python_ver=
|
||||
else
|
||||
- PKG_CHECK_MODULES([PYTHON],[python-"${PYTHON_VERSION}"], dnl [PKG_CHECK_MODULES([PYTHONDEV],[python-"${PYTHON_VERSION}"],,[i_do_have_python_scripting=maybe])],
|
||||
- [PKG_CHECK_MODULES([PYTHONDEV],[python-"${PYTHON_VERSION}"],,[i_do_have_python_scripting=no])],
|
||||
+ PKG_CHECK_MODULES([PYTHON],[python-"${PYTHON_VERSION}"-embed], dnl [PKG_CHECK_MODULES([PYTHONDEV],[python-"${PYTHON_VERSION}"-embed],,[i_do_have_python_scripting=maybe])],
|
||||
+ [PKG_CHECK_MODULES([PYTHONDEV],[python-"${PYTHON_VERSION}"-embed],,[i_do_have_python_scripting=no])],
|
||||
[i_do_have_python_scripting=no])
|
||||
dnl dnl TODO: have python3 AND python2, but only have python2 dev, but no python3 dev
|
||||
dnl if test x"${i_do_have_python_scripting}" = xmaybe; then
|
@ -4,7 +4,7 @@
|
||||
|
||||
Name: fontforge
|
||||
Version: 20190413
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: Outline and bitmap font editor
|
||||
|
||||
License: GPLv3+
|
||||
@ -14,6 +14,10 @@ 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-20190317-use-system-uthash.patch
|
||||
%if 0%{?python3_version_nodots} >= 38
|
||||
Patch1: fontforge-20190413-python-3.8-pkg-config.patch
|
||||
%endif
|
||||
Patch2: fontforge-20190413-fix-compilation-for-python-3.8-the-reserved-tp_print.patch
|
||||
|
||||
Requires: xdg-utils
|
||||
Requires: autotrace
|
||||
@ -156,6 +160,9 @@ chmod 644 $RPM_BUILD_ROOT%{_datadir}/fontforge/nodejs/collabwebview/js/contentEd
|
||||
%doc htdocs
|
||||
|
||||
%changelog
|
||||
* Tue Jul 23 2019 Parag Nemade <pnemade AT redhat DOT com> - 20190413-2
|
||||
- make the code compatible with python-3.8 (rh#1728058)
|
||||
|
||||
* Sat Apr 13 2019 Parag Nemade <pnemade AT redhat DOT com> - 20190413-1
|
||||
- Update to 20190413 version (#1689629)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user