## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 2; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: opentype-sanitizer # The following dependent packages have their versions kept in sync with # opentype-sanitizer, and should be updated at the same time, ideally as a # multi-build update (i.e., using a side tag). # # - python-opentype-sanitizer Version: 9.2.0 Release: %autorelease Summary: Parses and serializes OpenType/WOFF/WOFF2 font files # Some test fonts (even after filtering out those that are not freely # redistributable—see below) have other acceptable licenses, such as OFL-1.1 or # Bitstream-Vera, and certain build-system files are MIT-licensed; but none are # installed, so they do not affect the license field of the package. License: BSD-3-Clause URL: https://github.com/khaledhosny/ots # This is generated from the upstream tarball (ots-%%{version}.tar.gz) by # get-source.py, which excludes test fonts that are not redistributable. Source0: ots-%{version}-filtered.tar.xz # Usage: ./get-source.py VERSION # # Requires python3, python3-requests, python3-tqdm, and python3-fonttools. # # Some test fonts have unknown or restrictive licenses and cannot be # redistributed in Fedora. We could remove all the test fonts, but the # more-sophisticated approach in this script allows us to keep as many test # fonts as possible: # 1. Fonts with restrictive distributability metadata (fstype in the OS2 # section) are filtered out. # 2. Fonts with known-good licenses are included. # 3. Fonts that have been manually audited for distributability can be # recorded in the script source so that they are always included or always # filtered out # 4. Fonts not accepted or rejected in 1–3 above are filtered out as a # precaution, and manual auditing is suggested to the script user. Source1: get-source.py # This is also generated from Source1. Since test fonts are now manually # specified in the meson files, we must patch out those that have been removed. # This file, a list of SHA1 checksums (which correspond to filenames) makes # that possible. Source2: ots-%{version}-excluded-font-checksums.txt # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} BuildRequires: meson BuildRequires: ninja-build BuildRequires: gcc-c++ BuildRequires: pkgconfig(freetype2) BuildRequires: pkgconfig(libwoff2dec) BuildRequires: pkgconfig(liblz4) BuildRequires: pkgconfig(zlib) BuildRequires: pkgconfig(gtest) # The source package includes several dozen sample “good” fonts to provide a # minimal set of functional tests. To more thoroughly test “good” fonts, # HowToTest.md says, “install as many as possible TrueType and OpenType fonts.” # Rather than adding a huge list of BR’s on arbitrary fonts, and trying to # ensure that the tests find them, we consider that the bundled “good” fonts # are adequate for validating the package build (as opposed to developing # opentype-sanitizer itself). %global common_description %{expand: The OpenType Sanitizer (OTS) parses and serializes OpenType files (OTF, TTF) and WOFF and WOFF2 font files, validating them and sanitizing them as it goes. The C library is integrated into Chromium and Firefox, and also simple command line tools to check files offline in a Terminal. The CSS font-face property is great for web typography. Having to use images in order to get the correct typeface is a great sadness; one should be able to use vectors. However, on many platforms the system-level TrueType font renderers have never been part of the attack surface before, and putting them on the front line is a scary proposition... Especially on platforms like Windows, where it’s a closed-source blob running with high privilege.} %description %{common_description} %prep %autosetup -n ots-%{version} -p1 # Remove bundled dependencies rm -rf third_party # Disable tests that use fonts that were filtered out for license issues. sed -r -i "/$(tr '\n' '|' < '%{SOURCE2}' | sed -r 's@\|+$@@')/d" \ tests/meson.build %conf # gtest 1.13.0 requires at least C++14 %meson -Dcpp_std=c++14 %build %meson_build %install %meson_install %check %meson_test %files %license LICENSE %doc README.md %doc docs/*.md %{_bindir}/ots-idempotent %{_bindir}/ots-perf %{_bindir}/ots-sanitize %{_bindir}/ots-side-by-side %{_bindir}/ots-validator-checker %{_mandir}/man1/ots-idempotent.1* %{_mandir}/man1/ots-perf.1* %{_mandir}/man1/ots-sanitize.1* %{_mandir}/man1/ots-side-by-side.1* %{_mandir}/man1/ots-validator-checker.1* %changelog ## START: Generated by rpmautospec * Sat Nov 02 2024 Benjamin A. Beasley - 9.2.0-2 - Invoke %%meson in %%conf rather than in %%build * Thu Oct 03 2024 Benjamin A. Beasley - 9.2.0-1 - Update to 9.2.0 (close RHBZ#2316174) * Thu Oct 03 2024 Benjamin A. Beasley - 9.1.0-8 - Exclude fonts under licenses that require license text * Thu Jul 18 2024 Fedora Release Engineering - 9.1.0-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild * Thu Jan 25 2024 Fedora Release Engineering - 9.1.0-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Sun Jan 21 2024 Fedora Release Engineering - 9.1.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild * Thu Jul 20 2023 Fedora Release Engineering - 9.1.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild * Tue May 30 2023 Benjamin A. Beasley - 9.1.0-1 - Update to 9.1.0 (close RHBZ#2210894) * Mon Jan 30 2023 Benjamin A. Beasley - 9.0.0-4 - Build with C++14 for gtest 1.13.0 * Thu Jan 19 2023 Fedora Release Engineering - 9.0.0-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Tue Dec 20 2022 Benjamin A. Beasley - 9.0.0-2 - Leaf package: remove i686 support * Sat Sep 17 2022 Benjamin A. Beasley - 9.0.0-1 - Update to 9.0.0 (close RHBZ#2127480) * Tue Sep 13 2022 Benjamin A. Beasley - 8.2.2-1 - Update to 8.2.2 (close RHBZ#2124619) * Tue Sep 13 2022 Benjamin A. Beasley - 8.2.1-5 - Update License to SPDX * Fri Jul 22 2022 Fedora Release Engineering - 8.2.1-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Wed Apr 20 2022 Benjamin A. Beasley - 8.2.1-3 - Drop “forge” macros, which are not doing much here * Wed Mar 02 2022 Benjamin A. Beasley - 8.2.1-2 - Update comment: python-ots renamed to python-opentype-sanitizer * Tue Feb 01 2022 Benjamin A. Beasley - 8.2.1-1 - Update to 8.2.1 (close RHBZ#2035908) * Thu Jan 20 2022 Fedora Release Engineering - 8.1.4-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Wed Sep 08 2021 Benjamin A. Beasley - 8.1.4-5 - Use PR patches directly generated from GitHub * Thu Jul 22 2021 Fedora Release Engineering - 8.1.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Mon May 31 2021 Benjamin A. Beasley - 8.1.4-2 - Add a spec file comment regarding dependent package python-ots * Tue May 11 2021 Benjamin A. Beasley - 8.1.4-1 - Initial package ## END: Generated by rpmautospec