From fcfee78a18251aa9d0c8281e752d557d16e4bc5a Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Tue, 26 Oct 2021 09:49:42 -0400 Subject: [PATCH] Update to 0.2.9 (close RHBZ#2017405) Add a man page for the new CLI entry point. --- .gitignore | 1 + cffsubr.1 | 39 +++++++++++++++++++++++++++++++++++++++ python-cffsubr.spec | 44 ++++++++++++++++++++++++++++++++++---------- sources | 2 +- 4 files changed, 75 insertions(+), 11 deletions(-) create mode 100644 cffsubr.1 diff --git a/.gitignore b/.gitignore index 091729a..f4105a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /cffsubr-0.2.8.tar.gz +/cffsubr-0.2.9.tar.gz diff --git a/cffsubr.1 b/cffsubr.1 new file mode 100644 index 0000000..c792c3d --- /dev/null +++ b/cffsubr.1 @@ -0,0 +1,39 @@ +.TH CFFSUBR "1" "October 2021" "" "User Commands" +.SH NAME +.B cffsubr +\(en compress OpenType Font\(cqs CFF or CFF2 table by computing subroutines +.SH SYNOPSIS +.B cffsubr +.RB [ \-h ] +.RB [ \-o \ \fIOUTPUT_FILE \ |\ \-i ] +.RB [ \-f \ { 1 , 2 }] +.RB [ \-N ] +.RB [ \-d ] +.I input_file +.SH OPTIONS +.SS "POSITIONAL ARGUMENTS" +.TP +.I input_file +Input font file. +Must contain either CFF or CFF2 table +.SS "OPTIONAL ARGUMENTS" +.TP +.BR \-h ,\ \-\-help +Show a help message and exit. +.TP +.B \-o\ \fIOUTPUT_FILE\fR,\ \fB\-\-output\-file\ \fIOUTPUT_FILE +Optional path to output file. +By default, dump binary data to +.IR stdout . +.TP +.BR \-i ,\ \-\-inplace +Whether to overwrite the input file. +.TP +.B \-f\ \fR{\fB1\fR,\fB2\fR},\fB\ \-\-cff\-version\ \fR{\fB1\fR,\fB2\fR} +Output CFF table format version. +.TP +.BR \-N ,\ \-\-no\-glyph\-names +Whether to drop postscript glyph names when converting from CFF to CFF2. +.TP +.BR \-d ,\ \-\-desubroutinize +Don\(cqt subroutinize, instead remove all subroutines (in any). diff --git a/python-cffsubr.spec b/python-cffsubr.spec index c8d92ee..9837afa 100644 --- a/python-cffsubr.spec +++ b/python-cffsubr.spec @@ -1,13 +1,21 @@ %global srcname cffsubr Name: python-%{srcname} -Version: 0.2.8 -Release: 5%{?dist} +Version: 0.2.9 +Release: 1%{?dist} Summary: Standalone CFF subroutinizer based on the AFDKO tx tool +# The entire source is ASL 2.0, except the following, which are OFL (but are +# not packaged, so they do not contribute to the overall package License +# field): +# - tests/data/SourceSansPro-Regular.subset.ttx +# - tests/data/SourceSansVariable-Regular.subset.ttx +# See NOTICE. License: ASL 2.0 URL: https://pypi.org/project/%{srcname} Source0: %{pypi_source} +# Written for Fedora in groff_man(7) format based on the output of “cffsubr --help” +Source1: %{srcname}.1 BuildArch: noarch @@ -47,11 +55,14 @@ sed -r -i 's/(ext_modules=)/# \1/' setup.py # Remove bundled adobe-afdko: rm -rf external +cp -p '%{SOURCE1}' . + %build -%py3_build +%pyproject_wheel %install -%py3_install +%pyproject_install +%pyproject_save_files %{srcname} # Workaround to prevent a dangling symlink: install -d "%{buildroot}$(dirname '%{txbin}')" @@ -61,26 +72,39 @@ ln -s '%{txbin}' '%{buildroot}%{txbin}' ln -s '%{buildroot}%{txbin}' %{buildroot}/%{python3_sitelib}/%{srcname}/tx symlinks -c -o %{buildroot}/%{python3_sitelib}/%{srcname}/tx +install -t '%{buildroot}%{_mandir}/man1' -D -p -m 0644 '%{srcname}.1' + %check %if 0%{?fedora} == 33 # Fixing this would require an adobe-afdko update; see # https://github.com/adobe-type-tools/cffsubr/issues/13. -%global koption -k 'not (TestSubroutinize and test_non_standard_upem_mute_font_matrix_warning)' +k="${k-}${k+ and }not (TestSubroutinize and test_non_standard_upem_mute_font_matrix_warning)" %endif -%pytest %{?koption} +%pytest -k "${k-}" -%files -n python3-%{srcname} -%license LICENSE +%files -n python3-%{srcname} -f %{pyproject_files} +# pyproject-rpm-macros handles the LICENSE file; verify with “rpm -qL -p …” %doc README.md -%{python3_sitelib}/%{srcname} -%{python3_sitelib}/%{srcname}-%{version}-py%{python3_version}.egg-info + +# Symbolic link to the “tx” executable; we patched out building a separate copy +# for the Python package, so the Python build does not know about this and we +# must list it explicitly. +%{python3_sitelib}/%{srcname}/tx # This was just a workaround: %exclude %{txbin} +%{_bindir}/%{srcname} +%{_mandir}/man1/%{srcname}.1* + %changelog +* Tue Oct 26 2021 Benjamin A. Beasley - 0.2.9-1 +- Update to 0.2.9 (close RHBZ#2017405) +- Add a man page for the new “cffsubr” CLI entry point + * Tue Oct 26 2021 Benjamin A. Beasley - 0.2.8-5 - Drop python3dist(setuptools) BR because it is implied by pyproject-rpm-macros, and pyproject-rpm-macros BR because it is (now) implied by python3-devel +- Use the full set of pyproject-rpm-macros * Fri Jul 23 2021 Fedora Release Engineering - 0.2.8-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild diff --git a/sources b/sources index 9d75b86..b1e9873 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (cffsubr-0.2.8.tar.gz) = 3792b3e6899004947a074a6750ff8dfa0c51f84609bf14bb25b2f94195c4842c3141254d265a638662657b252f32511e1d8948bfe89b893491d34b17975676f7 +SHA512 (cffsubr-0.2.9.tar.gz) = 600b6b63ad70e5f00da0f64dd1410d49af622ac923aea3346c904e47e490410a6205fc5b2c2ddc6c684af04face3c217a2c722141f67d5f8ce5b87543eb363e4