Update to 0.2.9 (close RHBZ#2017405)

Add a man page for the new CLI entry point.
This commit is contained in:
Benjamin A. Beasley 2021-10-26 09:49:42 -04:00
parent 58426bf0ce
commit fcfee78a18
4 changed files with 75 additions and 11 deletions

1
.gitignore vendored
View File

@ -1 +1,2 @@
/cffsubr-0.2.8.tar.gz /cffsubr-0.2.8.tar.gz
/cffsubr-0.2.9.tar.gz

39
cffsubr.1 Normal file
View File

@ -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).

View File

@ -1,13 +1,21 @@
%global srcname cffsubr %global srcname cffsubr
Name: python-%{srcname} Name: python-%{srcname}
Version: 0.2.8 Version: 0.2.9
Release: 5%{?dist} Release: 1%{?dist}
Summary: Standalone CFF subroutinizer based on the AFDKO tx tool 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 License: ASL 2.0
URL: https://pypi.org/project/%{srcname} URL: https://pypi.org/project/%{srcname}
Source0: %{pypi_source} Source0: %{pypi_source}
# Written for Fedora in groff_man(7) format based on the output of “cffsubr --help”
Source1: %{srcname}.1
BuildArch: noarch BuildArch: noarch
@ -47,11 +55,14 @@ sed -r -i 's/(ext_modules=)/# \1/' setup.py
# Remove bundled adobe-afdko: # Remove bundled adobe-afdko:
rm -rf external rm -rf external
cp -p '%{SOURCE1}' .
%build %build
%py3_build %pyproject_wheel
%install %install
%py3_install %pyproject_install
%pyproject_save_files %{srcname}
# Workaround to prevent a dangling symlink: # Workaround to prevent a dangling symlink:
install -d "%{buildroot}$(dirname '%{txbin}')" install -d "%{buildroot}$(dirname '%{txbin}')"
@ -61,26 +72,39 @@ ln -s '%{txbin}' '%{buildroot}%{txbin}'
ln -s '%{buildroot}%{txbin}' %{buildroot}/%{python3_sitelib}/%{srcname}/tx ln -s '%{buildroot}%{txbin}' %{buildroot}/%{python3_sitelib}/%{srcname}/tx
symlinks -c -o %{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 %check
%if 0%{?fedora} == 33 %if 0%{?fedora} == 33
# Fixing this would require an adobe-afdko update; see # Fixing this would require an adobe-afdko update; see
# https://github.com/adobe-type-tools/cffsubr/issues/13. # 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 %endif
%pytest %{?koption} %pytest -k "${k-}"
%files -n python3-%{srcname} %files -n python3-%{srcname} -f %{pyproject_files}
%license LICENSE # pyproject-rpm-macros handles the LICENSE file; verify with “rpm -qL -p …”
%doc README.md %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: # This was just a workaround:
%exclude %{txbin} %exclude %{txbin}
%{_bindir}/%{srcname}
%{_mandir}/man1/%{srcname}.1*
%changelog %changelog
* Tue Oct 26 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 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 <code@musicinmybrain.net> - 0.2.8-5 * Tue Oct 26 2021 Benjamin A. Beasley <code@musicinmybrain.net> - 0.2.8-5
- Drop python3dist(setuptools) BR because it is implied by pyproject-rpm-macros, - 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 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 <releng@fedoraproject.org> - 0.2.8-4 * Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild

View File

@ -1 +1 @@
SHA512 (cffsubr-0.2.8.tar.gz) = 3792b3e6899004947a074a6750ff8dfa0c51f84609bf14bb25b2f94195c4842c3141254d265a638662657b252f32511e1d8948bfe89b893491d34b17975676f7 SHA512 (cffsubr-0.2.9.tar.gz) = 600b6b63ad70e5f00da0f64dd1410d49af622ac923aea3346c904e47e490410a6205fc5b2c2ddc6c684af04face3c217a2c722141f67d5f8ce5b87543eb363e4