]>
Commit | Line | Data |
---|---|---|
a7145d56 JB |
1 | # |
2 | # Conditional build: | |
ed9b96d9 JB |
3 | %bcond_without python # Python (3) scripting and extension |
4 | %bcond_without doc # Sphinx documentation | |
a7145d56 | 5 | |
5b9f5543 | 6 | Summary: An outline font editor |
5fbf9ad2 | 7 | Summary(pl.UTF-8): Edytor fontów rysowanych |
5b9f5543 | 8 | Name: fontforge |
57cb36ff | 9 | Version: 20230101 |
b31e2458 | 10 | Release: 2 |
a7145d56 | 11 | License: GPL v3+ with BSD parts |
5b9f5543 | 12 | Group: X11/Applications/Publishing |
a7145d56 | 13 | #Source0Download: https://github.com/fontforge/fontforge/releases |
ed9b96d9 | 14 | Source0: https://github.com/fontforge/fontforge/releases/download/%{version}/%{name}-%{version}.tar.xz |
57cb36ff JB |
15 | # Source0-md5: 7043f25368ed25bcd75d168564919fb7 |
16 | Patch0: %{name}-po.patch | |
8d38c334 | 17 | URL: https://fontforge.org/ |
a7145d56 | 18 | BuildRequires: cairo-devel >= 1.6 |
ed9b96d9 | 19 | BuildRequires: cmake >= 3.5 |
a7145d56 | 20 | BuildRequires: freetype-devel >= 1:2.3.7 |
87017297 | 21 | BuildRequires: gettext-tools |
ed9b96d9 | 22 | BuildRequires: gcc >= 5:3.2 |
ff913066 | 23 | BuildRequires: giflib-devel |
a7145d56 | 24 | BuildRequires: glib2-devel >= 1:2.6 |
ed9b96d9 | 25 | BuildRequires: gtk+3-devel >= 3.10 |
57cb36ff | 26 | BuildRequires: libbrotli-devel |
5b9f5543 JB |
27 | BuildRequires: libjpeg-devel |
28 | BuildRequires: libpng-devel | |
ed9b96d9 JB |
29 | BuildRequires: libspiro-devel >= 1:0.6 |
30 | BuildRequires: libstdc++-devel >= 1:4.7 | |
a7145d56 JB |
31 | BuildRequires: libtiff-devel >= 4 |
32 | BuildRequires: libltdl-devel >= 2:2 | |
a7145d56 JB |
33 | BuildRequires: libxml2-devel >= 2.0 |
34 | BuildRequires: pango-devel >= 1:1.10 | |
35 | BuildRequires: pkgconfig >= 1:0.25 | |
57cb36ff JB |
36 | BuildRequires: python3-devel >= 1:3.6 |
37 | BuildRequires: python3-modules >= 1:3.6 | |
a7145d56 | 38 | BuildRequires: readline-devel |
57cb36ff | 39 | BuildRequires: sphinx-pdg |
a7145d56 | 40 | BuildRequires: tar >= 1:1.22 |
ed9b96d9 | 41 | BuildRequires: woff2-devel |
f3c514af | 42 | BuildRequires: xorg-lib-libX11-devel |
f3c514af | 43 | BuildRequires: xorg-lib-libXi-devel |
a7145d56 | 44 | BuildRequires: xz |
c40b8487 | 45 | BuildRequires: zlib-devel |
a7145d56 | 46 | Requires: cairo >= 1.6 |
01b2c9d0 | 47 | Requires: freetype >= 1:2.3.7 |
a7145d56 | 48 | Requires: glib2 >= 1:2.6 |
ed9b96d9 | 49 | Requires: gtk+3 >= 3.10 |
7b1f7094 | 50 | Requires: iconv |
a7145d56 | 51 | Requires: pango >= 1:1.10 |
ed9b96d9 JB |
52 | # API and plugins support withdrawn |
53 | Obsoletes: fontforge-devel < 20190413 | |
54 | Obsoletes: fontforge-static < 20190413 | |
8d38c334 | 55 | Obsoletes: pfaedit < 040311 |
5b9f5543 JB |
56 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
57 | ||
58 | %description | |
59 | FontForge allows you to edit outline and bitmap fonts. You can create | |
60 | new ones or modify old ones. It is also a font format converter and | |
61 | can convert among PostScript (ASCII & binary Type 1, some Type 3s, | |
62 | some Type 0s), TrueType, OpenType (Type2) and CID-keyed fonts. | |
63 | ||
64 | FontForge used to be called PfaEdit. | |
65 | ||
ce0761d3 JR |
66 | %description -l pl.UTF-8 |
67 | FontForge pozwala na edycję fontów rysowanych i bitmapowych. Można | |
68 | tworzyć nowe lub modyfikować istniejące. Jest to także konwerter | |
69 | między formatami fontów - potrafi obsługiwać fonty postscriptowe | |
70 | (ASCII i binarne Type 1, część Type 3, część Type 0), TrueType, | |
5b9f5543 JB |
71 | OpenType (Type2) i fonty z kluczami CID. |
72 | ||
ce0761d3 | 73 | FontForge wcześniej nazywał się PfaEdit. |
5b9f5543 | 74 | |
16b7cb86 JB |
75 | %package devel |
76 | Summary: Header files for FontForge libraries | |
77 | Summary(pl.UTF-8): Pliki nagłówkowe bibliotek FontForge | |
78 | Group: Development/Libraries | |
79 | Requires: %{name} = %{version}-%{release} | |
a7145d56 | 80 | Requires: cairo-devel >= 1.6 |
a7145d56 | 81 | Requires: freetype-devel >= 1:2.3.7 |
c40b8487 JB |
82 | Requires: giflib-devel |
83 | Requires: libjpeg-devel | |
01b2c9d0 | 84 | Requires: libltdl-devel |
c40b8487 | 85 | Requires: libpng-devel |
ed9b96d9 | 86 | Requires: libspiro-devel >= 1:0.6 |
a7145d56 | 87 | Requires: libtiff-devel >= 4 |
a7145d56 | 88 | Requires: pango-devel >= 1:1.10 |
c40b8487 | 89 | Requires: xorg-lib-libX11-devel |
c40b8487 | 90 | Requires: zlib-devel |
16b7cb86 JB |
91 | |
92 | %description devel | |
93 | Header files for FontForge libraries. | |
94 | ||
95 | %description devel -l pl.UTF-8 | |
96 | Pliki nagłówkowe bibliotek FontForge. | |
97 | ||
a7145d56 JB |
98 | %package static |
99 | Summary: Static FontForge libraries | |
100 | Summary(pl.UTF-8): Statyczne biblioteki FontForge | |
101 | Group: Development/Libraries | |
102 | Requires: %{name}-devel = %{version}-%{release} | |
103 | ||
104 | %description static | |
105 | Static FontForge libraries. | |
106 | ||
107 | %description static -l pl.UTF-8 | |
108 | Statyczne biblioteki FontForge. | |
109 | ||
110 | %package doc | |
111 | Summary: FontForge documentation | |
112 | Summary(pl.UTF-8): Dokumentacja do FontForge | |
113 | Group: Documentation | |
114 | ||
115 | %description doc | |
116 | FontForge documentation. | |
117 | ||
118 | %description doc -l pl.UTF-8 | |
119 | Dokumentacja do FontForge. | |
120 | ||
ed9b96d9 | 121 | %package -n python3-fontforge |
a7145d56 JB |
122 | Summary: Python bindings for FontForge libraries |
123 | Summary(pl.UTF-8): Wiązania Pythona do bibliotek FontForge | |
124 | Group: Libraries/Python | |
125 | Requires: %{name} = %{version}-%{release} | |
ed9b96d9 | 126 | Obsoletes: python-fontforge < 20200314 |
a7145d56 | 127 | |
ed9b96d9 | 128 | %description -n python3-fontforge |
a7145d56 JB |
129 | Python bindings for FontForge libraries. |
130 | ||
ed9b96d9 | 131 | %description -n python3-fontforge -l pl.UTF-8 |
a7145d56 JB |
132 | Wiązania Pythona do bibliotek FontForge. |
133 | ||
5b9f5543 | 134 | %prep |
ed9b96d9 | 135 | %setup -q |
57cb36ff | 136 | %patch0 -p1 |
ed9b96d9 JB |
137 | |
138 | %{__sed} -i -e '1s,/usr/bin/env python3,%{__python3},' \ | |
139 | pycontrib/svg2glyph/svg2glyph | |
140 | ||
141 | %{__sed} -i -e '1s,/usr/bin/env fontforge,%{_bindir}/fontforge,' \ | |
142 | pycontrib/simple/expand-a.py \ | |
143 | pycontrib/simple/load-font-and-show-name.py | |
144 | ||
145 | # make Sphinx warnings non-fatal | |
146 | %{__sed} -i -e '/Sphinx_BUILD_BINARY/ s/ -W / /' doc/CMakeLists.txt | |
147 | # missing? | |
148 | touch doc/sphinx/contents.rst | |
69dd669d | 149 | |
5b9f5543 | 150 | %build |
ed9b96d9 JB |
151 | install -d build |
152 | cd build | |
153 | %cmake .. \ | |
154 | -DCMAKE_INSTALL_DOCDIR=%{_docdir}/fontforge \ | |
155 | %{!?with_doc:-DENABLE_DOCS=OFF} \ | |
156 | -DENABLE_FONTFORGE_EXTRAS=ON \ | |
157 | %if %{without python} | |
158 | -DENABLE_PYTHON_EXTENSION=OFF \ | |
159 | -DENABLE_PYTHON_SCRIPTING=OFF \ | |
160 | %endif | |
161 | -DENABLE_WRITE_PFM=ON | |
5b9f5543 JB |
162 | |
163 | %{__make} | |
164 | ||
ed9b96d9 JB |
165 | %{__rm} doc/sphinx-docs/{.buildinfo,.nojekyll,objects.inv} |
166 | ||
5b9f5543 JB |
167 | %install |
168 | rm -rf $RPM_BUILD_ROOT | |
169 | ||
ed9b96d9 | 170 | %{__make} -C build install \ |
16b7cb86 | 171 | DESTDIR=$RPM_BUILD_ROOT |
5b9f5543 | 172 | |
ed9b96d9 JB |
173 | # API no longer exported |
174 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libfontforge.so | |
2142475b | 175 | |
b31e2458 | 176 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/ka{_GE,} |
93802d2a JR |
177 | %{__mv} $RPM_BUILD_ROOT%{_localedir}/tr{_TR,} |
178 | ||
7935b599 | 179 | %find_lang FontForge |
04c00bcf | 180 | |
5b9f5543 JB |
181 | %clean |
182 | rm -rf $RPM_BUILD_ROOT | |
183 | ||
184 | %post -p /sbin/ldconfig | |
185 | %postun -p /sbin/ldconfig | |
186 | ||
7935b599 | 187 | %files -f FontForge.lang |
5b9f5543 | 188 | %defattr(644,root,root,755) |
ed9b96d9 | 189 | %doc AUTHORS LICENSE README.md |
57cb36ff JB |
190 | %attr(755,root,root) %{_bindir}/acorn2sfd |
191 | %attr(755,root,root) %{_bindir}/dewoff | |
192 | %attr(755,root,root) %{_bindir}/findtable | |
5b9f5543 | 193 | %attr(755,root,root) %{_bindir}/fontforge |
1699a51e AM |
194 | %attr(755,root,root) %{_bindir}/fontimage |
195 | %attr(755,root,root) %{_bindir}/fontlint | |
57cb36ff JB |
196 | %attr(755,root,root) %{_bindir}/pcl2ttf |
197 | %attr(755,root,root) %{_bindir}/pfadecrypt | |
198 | %attr(755,root,root) %{_bindir}/rmligamarks | |
5b9f5543 | 199 | %attr(755,root,root) %{_bindir}/sfddiff |
57cb36ff JB |
200 | %attr(755,root,root) %{_bindir}/showttf |
201 | %attr(755,root,root) %{_bindir}/stripttc | |
202 | %attr(755,root,root) %{_bindir}/ttf2eps | |
203 | %attr(755,root,root) %{_bindir}/woff | |
ed9b96d9 | 204 | %attr(755,root,root) %{_libdir}/libfontforge.so.4 |
1699a51e | 205 | %{_datadir}/fontforge |
ed9b96d9 | 206 | %{_datadir}/metainfo/org.fontforge.FontForge.appdata.xml |
a7145d56 | 207 | %{_datadir}/mime/packages/fontforge.xml |
ed9b96d9 JB |
208 | %{_desktopdir}/org.fontforge.FontForge.desktop |
209 | %{_iconsdir}/hicolor/*x*/apps/org.fontforge.FontForge.png | |
210 | %{_iconsdir}/hicolor/scalable/apps/org.fontforge.FontForge.svg | |
57cb36ff | 211 | %{_mandir}/man1/acorn2sfd.1* |
16b7cb86 JB |
212 | %{_mandir}/man1/fontforge.1* |
213 | %{_mandir}/man1/fontimage.1* | |
214 | %{_mandir}/man1/fontlint.1* | |
215 | %{_mandir}/man1/sfddiff.1* | |
57cb36ff JB |
216 | %{_mandir}/man1/showttf.1* |
217 | %{_mandir}/man1/ttf2eps.1* | |
16b7cb86 | 218 | |
a7145d56 JB |
219 | %files doc |
220 | %defattr(644,root,root,755) | |
ed9b96d9 JB |
221 | %dir %{_docdir}/fontforge |
222 | %{_docdir}/fontforge/_images | |
223 | %{_docdir}/fontforge/_static | |
224 | %{_docdir}/fontforge/appendices | |
225 | %{_docdir}/fontforge/fontutils | |
226 | %{_docdir}/fontforge/scripting | |
227 | %{_docdir}/fontforge/techref | |
228 | %{_docdir}/fontforge/tutorial | |
229 | %{_docdir}/fontforge/ui | |
230 | %dir %{_docdir}/fontforge/old | |
231 | %lang(de) %{_docdir}/fontforge/old/de | |
232 | %lang(ja) %{_docdir}/fontforge/old/ja | |
233 | %{_docdir}/fontforge/*.html | |
234 | %{_docdir}/fontforge/*.js | |
235 | ||
236 | %files -n python3-fontforge | |
a7145d56 | 237 | %defattr(644,root,root,755) |
ed9b96d9 JB |
238 | %attr(755,root,root) %{py3_sitedir}/fontforge.so |
239 | %attr(755,root,root) %{py3_sitedir}/psMat.so |