fontforge/fontforge.spec

133 lines
3.9 KiB
RPMSpec
Raw Normal View History

2020-08-01 12:47:56 +08:00
%global gettext_package FontForge
%global gittag0 20200314
Name: fontforge
2020-08-01 12:47:56 +08:00
Version: 20200314
Release: 4
Summary: Outline and bitmap font editor
License: GPLv3+
URL: http://fontforge.github.io/
2020-08-01 12:47:56 +08:00
Source0: https://github.com/fontforge/%{name}/archive/%{gittag0}.tar.gz#/%{name}-%{version}.tar.gz
2020-08-01 12:47:56 +08:00
Patch0001: fontforge-20200314-Call-gdk_set_allowed_backends-before-gdk_init.patch
Patch0002: fontforge-20200314-sphinx-make-changes-to-support-Sphinx-3.patch
2021-01-30 17:24:41 +08:00
Requires: xdg-utils potrace hicolor-icon-theme
2020-08-01 12:47:56 +08:00
BuildRequires: gcc-c++ cmake libjpeg-devel libtiff-devel libpng-devel giflib-devel libxml2-devel
BuildRequires: freetype-devel desktop-file-utils libuninameslist-devel libXt-devel xorg-x11-proto-devel
BuildRequires: gettext pango-devel cairo-devel libspiro-devel python3-devel readline-devel
BuildRequires: libappstream-glib woff2-devel shared-mime-info gtk3-devel python3-sphinx
%description
2020-08-01 12:47:56 +08:00
FontForge (former PfaEdit) is a font editor for outline and bitmap
fonts. It supports a range of font formats, including PostScript
(ASCII and binary Type 1, some Type 3 and Type 0), TrueType, OpenType
(Type2) and CID-keyed fonts.
2020-08-01 12:47:56 +08:00
%package devel
Summary: Development files for fontforge
Requires: %{name} = %{version}-%{release}
2020-08-01 19:00:20 +08:00
Requires: %{name}-help = %{version}-%{release}
Requires: pkgconfig
2020-08-01 12:47:56 +08:00
%description devel
This package includes the library files you will need to compile
applications against fontforge.
2020-08-01 12:47:56 +08:00
%package help
Summary: Documentation files for %{name}
BuildArch: noarch
2020-08-01 19:00:20 +08:00
Provides: %{name}-doc = %{version}-%{release}
Obsoletes: %{name}-doc < %{version}-%{release}
2020-08-01 12:47:56 +08:00
%description help
This package contains documentation files for %{name}.
%prep
2020-08-01 12:47:56 +08:00
%autosetup -n %{name}-%{version} -p1
# Remove tests that requires Internet access
sed -i '45d;83d;101d;102d;114d;115d;125d' tests/CMakeLists.txt
rm tests/test003.pe tests/test130.pe tests/test0101.py tests/test929.py
# Remove tests for s390x
rm tests/test0004.py tests/test1009.py tests/test1010.py
%build
2020-08-01 12:47:56 +08:00
rm -rf build && mkdir build
pushd build
export CFLAGS="%{optflags} -fno-strict-aliasing"
2020-08-01 12:47:56 +08:00
%cmake .. -DCMAKE_BUILD_TYPE=Release \
-DENABLE_WOFF2=ON \
-DENABLE_DOCS=NO
2020-08-01 12:47:56 +08:00
%{make_build}
popd
2020-08-01 12:47:56 +08:00
%install
pushd build
%{make_install}
popd
2020-08-01 12:47:56 +08:00
desktop-file-install \
--dir $RPM_BUILD_ROOT%{_datadir}/applications \
--add-category X-Fedora \
desktop/org.fontforge.FontForge.desktop
2020-08-01 12:47:56 +08:00
# remove unneeded .la and .a files
find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
find $RPM_BUILD_ROOT -name '*.a' -exec rm -f {} ';'
2020-08-01 12:47:56 +08:00
rm -f %{buildroot}%{_datadir}/doc/fontforge/{.buildinfo,.nojekyll}
appstream-util validate-relax --nonet %{buildroot}%{_metainfodir}/*.appdata.xml
2020-08-01 12:47:56 +08:00
%check
pushd build
make check
popd
2020-08-01 12:47:56 +08:00
# Find translations
%find_lang %{gettext_package}
2020-08-01 12:47:56 +08:00
%files -f %{gettext_package}.lang
%doc AUTHORS
2020-08-01 12:47:56 +08:00
%license LICENSE COPYING.gplv3
%{_bindir}/*
%{_libdir}/lib*.so.*
2020-08-01 12:47:56 +08:00
%{_datadir}/applications/*FontForge.desktop
%{_datadir}/fontforge
2020-08-01 12:47:56 +08:00
%{_datadir}/icons/hicolor/*/apps/org.fontforge.FontForge*
%{_datadir}/pixmaps/org.fontforge.FontForge*
%{_datadir}/mime/packages/fontforge.xml
%{_metainfodir}/org.fontforge.FontForge.appdata.xml
%{python3_sitearch}/fontforge.so
%{python3_sitearch}/psMat.so
2020-08-01 12:47:56 +08:00
%files devel
%{_libdir}/lib*.so
2020-08-01 12:47:56 +08:00
%files help
%doc %{_pkgdocdir}
%{_mandir}/man1/*.1*
%changelog
* Fri May 21 2021 wutao <wutao61@huawei.com> - 20200314-4
- update release
* Wed Dec 16 2020 Ge Wang <wangge20@huawei.com> - 20200314-2
- change install require autotrace to potrace
2021-01-30 17:24:41 +08:00
2020-08-01 12:47:56 +08:00
* Sat Aug 1 2020 xiaoweiwei <xiaoweiwei5@huawei.com> - 20200314-1
- upgrade to 20200314
* Mon Jun 22 2020 yanan li <liyanan032@huawei.com> - 20170731-13
2020-08-01 12:47:56 +08:00
- Solve fontforge 20170731 build fails with python3.8.
2020-04-03 14:16:43 +08:00
* Thu Apr 3 2020 zhujunhao <zhujunhao5@huawei.com> - 20170731-12
- Modify build option
* Thu Dec 12 2019 lihao <lihao129@huawei.com> - 20170731-11
- Package Init