[packages/graphite2] - updated to 1.3.14 - added python patch (future module is not needed now) - package python module

qboosh qboosh at pld-linux.org
Thu May 7 21:09:12 CEST 2020


commit d77ad78a704ed16262eab139fe0eeffbd99f84ef
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu May 7 21:09:29 2020 +0200

    - updated to 1.3.14
    - added python patch (future module is not needed now)
    - package python module

 graphite2-python.patch | 11 +++++++
 graphite2.spec         | 85 +++++++++++++++++++++++++++++++++++++++++++++++---
 2 files changed, 92 insertions(+), 4 deletions(-)
---
diff --git a/graphite2.spec b/graphite2.spec
index 21ddd29..5c0f931 100644
--- a/graphite2.spec
+++ b/graphite2.spec
@@ -1,14 +1,25 @@
+#
+# Conditional build:
+%bcond_without	python	 # Python module (any)
+%bcond_without	python2	 # CPython 2.x module
+%bcond_without	python3	 # CPython 3.x module
+
+%if %{without python}
+%undefine	with_python2
+%undefine	with_python3
+%endif
 Summary:	Font rendering capabilities for complex non-Roman writing systems
 Summary(pl.UTF-8):	Wsparcie renderowania złożonych systemów pisma nierzymskiego
 Name:		graphite2
-Version:	1.3.13
+Version:	1.3.14
 Release:	1
-License:	LGPL v2.1+
+License:	LGPL v2.1+ or GPL v2+ or MPL
 Group:		Libraries
 Source0:	http://downloads.sourceforge.net/silgraphite/%{name}-%{version}.tgz
-# Source0-md5:	29616d4f9651706036ca25c111508272
+# Source0-md5:	1bccb985a7da01092bfb53bb5041e836
 Patch0:		%{name}-fix_wrong_linker_opts.patch
 Patch1:		%{name}-includes-libs-perl.patch
+Patch2:		%{name}-python.patch
 URL:		http://graphite.sil.org/
 BuildRequires:	cmake >= 2.8.0
 BuildRequires:	libstdc++-devel
@@ -17,6 +28,14 @@ BuildRequires:	pkgconfig
 BuildRequires:	freetype-devel >= 2
 BuildRequires:	glib2-devel >= 2.0
 BuildRequires:	libicu-devel
+%if %{with python2}
+BuildRequires:	python-devel >= 1:2.7
+BuildRequires:	python-setuptools
+%endif
+%if %{with python3}
+BuildRequires:	python3-devel >= 1:3.2
+BuildRequires:	python3-setuptools
+%endif
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %description
@@ -50,10 +69,37 @@ Header files for graphite2 library.
 %description devel -l pl.UTF-8
 Pliki nagłówkowe biblioteki graphite2.
 
+%package -n python-graphite2
+Summary:	Python 2 interface for graphite2 library
+Summary(pl.UTF-8):	Interfejs Pythona 2 do biblioteki graphite2
+Group:		Libraries/Python
+Requires:	%{name} = %{version}-%{release}
+Requires:	python-modules >= 1:2.7
+
+%description -n python-graphite2
+Python 2 interface for graphite2 library.
+
+%description -n python-graphite2 -l pl.UTF-8
+Interfejs Pythona 2 do biblioteki graphite2
+
+%package -n python3-graphite2
+Summary:	Python 3 interface for graphite2 library
+Summary(pl.UTF-8):	Interfejs Pythona 3 do biblioteki graphite2
+Group:		Libraries/Python
+Requires:	%{name} = %{version}-%{release}
+Requires:	python3-modules >= 1:3.2
+
+%description -n python3-graphite2
+Python 3 interface for graphite2 library.
+
+%description -n python3-graphite2 -l pl.UTF-8
+Interfejs Pythona 3 do biblioteki graphite2
+
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 install -d build
@@ -62,6 +108,15 @@ cd build
 	-DGRAPHITE2_VM_TYPE=direct
 
 %{__make}
+cd ..
+
+%if %{with python2}
+%py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -72,6 +127,14 @@ rm -rf $RPM_BUILD_ROOT
 # cmake's fake (with no dependencies); also obsoleted by pkg-config
 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libgraphite2.la
 
+%if %{with python2}
+%py_install
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
 %clean
 rm -rf $RPM_BUILD_ROOT
 
@@ -80,7 +143,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files
 %defattr(644,root,root,755)
-%doc ChangeLog doc/*.txt
+%doc COPYING ChangeLog doc/*.txt
 %attr(755,root,root) %{_bindir}/gr2fonttest
 %attr(755,root,root) %{_libdir}/libgraphite2.so.*.*.*
 %attr(755,root,root) %ghost %{_libdir}/libgraphite2.so.3
@@ -91,3 +154,17 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/graphite2
 %{_pkgconfigdir}/graphite2.pc
 %{_datadir}/graphite2
+
+%if %{with python2}
+%files -n python-graphite2
+%defattr(644,root,root,755)
+%{py_sitescriptdir}/graphite2
+%{py_sitescriptdir}/graphite2-%{version}-py*.egg-info
+%endif
+
+%if %{with python3}
+%files -n python3-graphite2
+%defattr(644,root,root,755)
+%{py3_sitescriptdir}/graphite2
+%{py3_sitescriptdir}/graphite2-%{version}-py*.egg-info
+%endif
diff --git a/graphite2-python.patch b/graphite2-python.patch
new file mode 100644
index 0000000..64ecd37
--- /dev/null
+++ b/graphite2-python.patch
@@ -0,0 +1,11 @@
+future is not used by graphite2 package
+--- graphite2-1.3.14/setup.py.orig	2020-04-01 04:53:13.000000000 +0200
++++ graphite2-1.3.14/setup.py	2020-05-07 20:21:02.267362656 +0200
+@@ -26,7 +26,6 @@
+     zip_safe         = False,
+     package_dir      = {'': 'python'},
+     packages         = ['graphite2'],
+-    install_requires = ['future'],
+     long_description = long_description,
+     long_description_content_type = 'text/markdown',
+     classifiers = [
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/graphite2.git/commitdiff/d77ad78a704ed16262eab139fe0eeffbd99f84ef



More information about the pld-cvs-commit mailing list