Accepting request 744183 from home:mimi_vx:branches:M17N

- add python38_config.patch to build with python-3.8
- spec-cleaned

OBS-URL: https://build.opensuse.org/request/show/744183
OBS-URL: https://build.opensuse.org/package/show/M17N/fontforge?expand=0&rev=72
This commit is contained in:
Takashi Iwai 2019-11-04 08:53:40 +00:00 committed by Git OBS Bridge
parent 03cb09676c
commit 4e53f86f2a
3 changed files with 33 additions and 13 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Oct 30 13:28:56 UTC 2019 - Ondřej Súkup <mimi.vx@gmail.com>
- add python38_config.patch to build with python-3.8
- spec-cleaned
-------------------------------------------------------------------
Wed Aug 21 12:36:23 UTC 2019 - pgajdos@suse.com

View File

@ -21,8 +21,7 @@ Version: 20190801
Release: 0
Summary: A Font Editor
License: GPL-3.0-or-later
Group: Productivity/Graphics/Vector Editors
Url: http://fontforge.org/
URL: http://fontforge.org/
# Source: https://github.com/fontforge/fontforge/archive/%{version}.tar.gz
# see bug 926061, fontforge-*-repacked.tar.xz does not contain fontforge-*/win/gold/libX11-*.noarch.rpm
Source0: fontforge-%{version}-repacked.tar.xz
@ -30,6 +29,8 @@ Source1: get-source.sh
# workardound for bug 930076, imho upstream should fix this
# https://github.com/fontforge/fontforge/issues/2270
Patch0: fontforge-version.patch
# fix for build with python38
Patch1: python38_config.patch
BuildRequires: autoconf
BuildRequires: automake
BuildRequires: cairo-devel
@ -54,7 +55,6 @@ BuildRequires: zlib-devel
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xft)
BuildRequires: pkgconfig(xi)
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if 0%{?suse_version} > 1210
BuildRequires: libspiro-devel
%endif
@ -67,7 +67,6 @@ some Type 0s), TrueType, OpenType (Type2), and CID-keyed fonts.
%package doc
Summary: Documentation for FontForge
Group: Documentation/HTML
%if 0%{?suse_version} >= 1230
BuildArch: noarch
%endif
@ -81,7 +80,6 @@ This subpackage contains the documentation to FontForge.
%package devel
Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: freetype2-devel
@ -96,6 +94,9 @@ to develop applications that use FontForge libraries.
%prep
%setup -q
%patch0 -p1
%if 0%{?python3_version_nodots} >= 38
%patch1 -p1
%endif
sed -i 's/\r$//' doc/html/{Big5.txt,corpchar.txt}
%build
@ -108,21 +109,19 @@ sed -i 's/\r$//' doc/html/{Big5.txt,corpchar.txt}
make %{?_smp_mflags}
%install
make DESTDIR=%{buildroot} install %{?_smp_mflags}
%make_install
%suse_update_desktop_file -i org.fontforge.FontForge VectorGraphics
%find_lang FontForge
find %{buildroot} -type f -name "*.la" -delete -print
%fdupes -s %{buildroot}%{_datadir}/%{name}
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f FontForge.lang
%defattr(-,root,root)
%doc LICENSE COPYING.gplv3
%license LICENSE COPYING.gplv3
%exclude %{_docdir}/%{name}/html
%{_mandir}/man1/*.1*
%{_mandir}/man1/*.1%{?ext_man}
%{_bindir}/*
%{_libdir}/lib*.so.*
%{_datadir}/fontforge/
@ -134,14 +133,14 @@ find %{buildroot} -type f -name "*.la" -delete -print
%{_datadir}/metainfo/org.fontforge.FontForge.*.xml
%{_datadir}/pixmaps/org.fontforge.FontForge.*
%{_datadir}/mime/packages/%{name}.xml
%dir %{_docdir}/fontforge
%files doc
%defattr(-,root,root)
%doc AUTHORS LICENSE README.md
%license LICENSE
%doc AUTHORS README.md
%doc %{_docdir}/%{name}/html
%files devel
%defattr(-, root, root)
%doc CONTRIBUTING.md
%{_includedir}/fontforge/
%{_libdir}/pkgconfig/*.pc

15
python38_config.patch Normal file
View File

@ -0,0 +1,15 @@
Index: fontforge-20190801/m4/fontforge_arg_enable.m4
===================================================================
--- fontforge-20190801.orig/m4/fontforge_arg_enable.m4
+++ fontforge-20190801/m4/fontforge_arg_enable.m4
@@ -116,8 +116,8 @@ fi
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