diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..37188d1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +xgridfit-xgridfit.tar.gz +/xgridfit-2.3.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index e92c3d0..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -xgridfit fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1676231 diff --git a/sources b/sources new file mode 100644 index 0000000..98c8d41 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +df594c0d993e7d9bf06a7981faf972b5 xgridfit-2.3.tar.gz diff --git a/xgridfit-2.2a-maindir-in-python.patch b/xgridfit-2.2a-maindir-in-python.patch new file mode 100644 index 0000000..dde987a --- /dev/null +++ b/xgridfit-2.2a-maindir-in-python.patch @@ -0,0 +1,26 @@ +diff -uNr xgridfit-2.2a.orig/Makefile xgridfit-2.2a/Makefile +--- xgridfit-2.2a.orig/Makefile 2010-03-30 17:58:56.000000000 +0200 ++++ xgridfit-2.2a/Makefile 2010-06-06 19:04:26.302726506 +0200 +@@ -46,7 +46,9 @@ + done + @install -d -m 0755 $(DESTDIR)$(MANDIR)/man1 + @install -p -m 0644 man/*.1 $(DESTDIR)$(MANDIR)/man1 +- @cd python ; python setup.py install --root=$(DESTDIR)/ ++ @rm -fr python.tmp ; cp -pr python python.tmp ; sed -i -e "s|@xgridfit_dir@|${MAINDIR}|g" python.tmp/xgflib.py ++ @cd python.tmp ; python setup.py install --root=$(DESTDIR)/ ++ @cd - ; rm -fr python.tmp + @echo "Xgridfit installed successfully." + + +diff -uNr xgridfit-2.2a.orig/python/xgflib.py xgridfit-2.2a/python/xgflib.py +--- xgridfit-2.2a.orig/python/xgflib.py 2010-03-30 17:26:55.000000000 +0200 ++++ xgridfit-2.2a/python/xgflib.py 2010-06-06 18:55:45.840596588 +0200 +@@ -18,7 +18,7 @@ + VERSION = '2.2' + JAVA_EXECUTABLE = 'java' + DISPLAY_DIAGNOSTIC_MESSAGES = False +-XGRIDFIT_DIR = abspath('/usr/local/share/xml/xgridfit/') ++XGRIDFIT_DIR = abspath('@xgridfit_dir@') + XSLT_DIR = abspath(join(XGRIDFIT_DIR, 'lib')) + UTIL_DIR = abspath(join(XGRIDFIT_DIR, 'utils')) + SCHEMA_DIR = abspath(join(XGRIDFIT_DIR, 'schemas')) diff --git a/xgridfit-2.3-python3.patch b/xgridfit-2.3-python3.patch new file mode 100644 index 0000000..2b70eee --- /dev/null +++ b/xgridfit-2.3-python3.patch @@ -0,0 +1,19 @@ +diff -up xgridfit/lib/xgridfit-python.xsl.py3 xgridfit/lib/xgridfit-python.xsl +--- xgridfit/lib/xgridfit-python.xsl.py3 2017-11-03 20:19:21.947851599 +0100 ++++ xgridfit/lib/xgridfit-python.xsl 2017-11-03 20:19:46.137844915 +0100 +@@ -540,11 +540,11 @@ CURRENT_FONT.maxp_maxStackDepth = 0 + try: + CURRENT_FONT[name].ttinstrs = fontforge.parseTTInstrs(instrs) + except TypeError as detail: +- print "Warning: can't install instructions for glyph ", name +- print detail ++ print ("Warning: can't install instructions for glyph ", name) ++ print (detail) + except ValueError as detail: +- print "Warning: can't install instructions for glyph ", name +- print detail ++ print ("Warning: can't install instructions for glyph ", name) ++ print (detail) + + + CURRENT_FONT.cvt = ( diff --git a/xgridfit.spec b/xgridfit.spec new file mode 100644 index 0000000..067677f --- /dev/null +++ b/xgridfit.spec @@ -0,0 +1,192 @@ +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib())")} + +%global alphatag 20100725cvs +%global patchlevel a + +%global archivever %{!?alphatag:%{version}%{?patchlevel}}%{?alphatag:%{name}} + +Name: xgridfit +Version: 2.3 +Release: 4%{?dist} +Summary: Font hinting tool + +# This is where we drop fontforge +Group: Applications/Publishing +License: LGPLv2 +URL: http://%{name}.sf.net/ +Source0: %{name}-%{version}.tar.gz +Patch1: %{name}-2.2a-maindir-in-python.patch +Patch2: %{name}-2.3-python3.patch + + +BuildArch: noarch + +BuildRequires: python2-devel + +Requires: %{_bindir}/xsltproc, fontforge, libxml2-python +Requires(post): %{_bindir}/xmlcatalog +Requires(preun): %{_bindir}/xmlcatalog + +%description +Xgridfit is a high-level, XML-based language for gridfitting, or ‘hinting’, +fonts. The Xgridfit program compiles an XML source file into tables and +instructions that relate to the gridfitting of glyphs. Xgridfit does not +insert these elements into a font itself, but rather relies on FontForge, the +Open-Source font editor, to do so. + + +%package doc +Group: Documentation +Summary: Font hinting tool use documentation +# Does not really make sense without the tool itself +Requires: %{name} = %{version}-%{release} + +%description doc +Xgridfit font hinting tool user documentation. + + +%prep +%setup -q -n %{name} +%patch1 -p1 -b .mip +%patch2 -p1 -b .py3 + +%build + + +%install +make install DESTDIR=%{buildroot} \ + BINDIR=%{_bindir} \ + MANDIR=%{_mandir} \ + MAINDIR=%{_datadir}/xml/%{name}-%{version} + +# Simplify preun/post catalog logic +ln -s catalog.xml \ + %{buildroot}%{_datadir}/xml/%{name}-%{version}/schemas/catalog-%{version}.%{release}.xml + + +%post +cd %{_sysconfdir}/xml +[ -e catalog ] || xmlcatalog --noout --create catalog +xmlcatalog --noout --add \ + nextCatalog %{_datadir}/xml/%{name}-%{version}/schemas/catalog-%{version}.%{release}.xml "" catalog >/dev/null +: + + +%preun +xmlcatalog --noout --del \ + %{_datadir}/xml/%{name}-%{version}/schemas/catalog-%{version}.%{release}.xml \ + %{_sysconfdir}/xml/catalog >/dev/null >/dev/null +: + + + +%files +%doc COPYING ChangeLog +%{_datadir}/xml/%{name}-%{version} +%{_mandir}/man1/* +%{python_sitelib}/* +%{_bindir}/* + +%files doc +%doc docs/* + +%changelog +* Fri Nov 03 2017 Karsten Hopp - 2.3-4 +- fontforge with python3 can't handle python2 print statements + +* Thu Jul 27 2017 Fedora Release Engineering - 2.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 2.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sat Dec 03 2016 Filipe Rosset - 2.3-1 +- Rebuilt for new upstream release 2.3, fixes rhbz #xgridfit + spec clean up + +* Tue Jul 19 2016 Fedora Release Engineering - 2.2-14.a.20100725cvs +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Fri Feb 05 2016 Fedora Release Engineering - 2.2-13.a.20100725cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 2.2-12.a.20100725cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Jun 08 2014 Fedora Release Engineering - 2.2-11.a.20100725cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 2.2-10.a.20100725cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Feb 15 2013 Fedora Release Engineering - 2.2-9.a.20100725cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jul 22 2012 Fedora Release Engineering - 2.2-8.a.20100725cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 2.2-7.a.20100725cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Mon Feb 07 2011 Fedora Release Engineering - 2.2-6.a.20100725cvs +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jul 29 2010 Nicolas Mailhot +- 2.2-5.a.20100725cvs +— Rebuild against python 2.7 + +* Sun Jul 25 2010 Nicolas Mailhot +- 2.2-4.a.20100725cvs +— Bump to cvs version (required by edrip) + +* Sun Jun 6 2010 Nicolas Mailhot +- 2.2-3.a +— Fix hardcoded path in python module +- 2.2-2.a +— Add missing requires + +* Sat Jun 5 2010 Nicolas Mailhot +- 2.2-1.a +— Major upstream changes (python utilities, namespace, etc) + +* Mon Jul 27 2009 Fedora Release Engineering +- 1.19-2.b +— Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Jul 14 2009 Nicolas Mailhot +- 1.19-1.b +— Rework to use upstream makefile now there is one + +* Thu Feb 26 2009 Fedora Release Engineering +- 1.17-4.a +— Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Mon Feb 23 2009 Nicolas Mailhot +- 1.17-3.a +— global-ization + +* Mon Feb 16 2009 Nicolas Mailhot +- 1.17-2.a + +* Fri Jan 30 2009 Nicolas Mailhot +- 1.17-1 + +* Fri Nov 14 2008 Nicolas Mailhot +- 1.11-1.a +◮ update for F11 cycle + +* Mon Sep 1 2008 Nicolas Mailhot +- 1.9-1 +ᕏ Major update, many changes +ᕚ Only package xsltproc support for now + +* Sun May 18 2008 Nicolas Mailhot +- 1.6-3 +⊸ Lots of new makefile goodness + +* Thu Mar 13 2008 Nicolas Mailhot +- 1.5-2 +✓ Fix path munging + +* Tue Mar 11 2008 Nicolas Mailhot +- 1.5-1 +✓ Initial Fedora packaging