/[packages]/updates/5/fontforge/current/SPECS/fontforge.spec
ViewVC logotype

Contents of /updates/5/fontforge/current/SPECS/fontforge.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1186904 - (show annotations) (download)
Fri Dec 29 01:10:44 2017 UTC (17 months, 2 weeks ago) by luigiwalser
File size: 3975 byte(s)
add patches from debian to fix CVE-2017-1156[89] and CVE-2017-1157[124567]
1 %define ffversion 20120731
2 %define dl_ffversion %{ffversion}-b
3 %define docversion 20120731-b
4
5 Name: fontforge
6 Version: 1.0
7 Release: %mkrel 1.%{ffversion}.10
8 Summary: Font Editor for PostScript, TrueType, OpenType and various fonts
9 License: BSD-like
10 Group: Publishing
11 Source0: http://garr.dl.sourceforge.net/project/fontforge/fontforge-source/fontforge_full-%{dl_ffversion}.tar.bz2
12 Source2: http://garr.dl.sourceforge.net/project/fontforge/fontforge-docs/fontforge_htdocs-%{docversion}.tar.bz2
13 Source3: http://fontforge.sourceforge.net/cidmaps.tgz
14 Source4: http://fontforge.sourceforge.net/fontforge-tutorial.pdf
15 Source11: %{name}-16x16.png
16 Source12: %{name}-32x32.png
17 Source13: %{name}-48x48.png
18 Patch0: fontforge-%{version}-uni-nodevel.patch
19 Patch1: fontforge-1.0-20100501-mga-local-helpdir.patch
20 # Patches from Debian
21 Patch10: 008_libgif.diff
22 Patch11: 024_def_background.diff
23 Patch12: 0001-Fix-out-of-bounds-read-in-getsid.patch
24 Patch13: 0002-readcfftopdict-Prevent-stack-underflow-condition.patch
25 Patch14: 0003-Fix-out-of-bounds-read-condition-and-buffer-overflow.patch
26 Patch15: 0004-parsettf.c-Fix-buffer-overrun-condition.patch
27 Patch16: 0005-parsettf.c-Fix-buffer-overflow-condition-when-readin.patch
28 Patch17: 0006-parsettf.c-Fix-out-of-bounds-read-condition-on-buffe.patch
29 # Patches from OpenSuse:
30 Patch21: libpng16-dynamic.diff
31 URL: http://fontforge.sourceforge.net/
32 BuildRequires: freetype2-devel
33 BuildRequires: jpeg-devel
34 BuildRequires: png-devel
35 BuildRequires: tiff-devel
36 BuildRequires: libungif-devel
37 BuildRequires: libxml2-devel
38 BuildRequires: libx11-devel
39 # (Abel) it wants either autotrace or potrace
40 Requires: fonttracer
41 # (Abel) libuninameslist.so.0 is a runtime dependency via dlopen()
42 Requires: %{mklibname uninameslist 0}
43 BuildRequires: libuninameslist-devel
44 BuildRequires: chrpath
45 # (tv) libpng is a runtime dependency via dlopen()
46 Requires: %{mklibname png 16 16}
47
48 %description
49 FontForge is an outline font editor that lets you create your own
50 postscript, truetype, opentype, cid-keyed, multi-master, cff, svg and
51 bitmap (bdf) fonts, or edit existing ones. Also lets you convert one
52 format to another. FontForge has support for many macintosh font formats.
53
54 %prep
55 %setup -q -n fontforge-%{dl_ffversion}
56 %patch0 -p1 -b .uninames
57 %patch1 -p1 -b .helpdir
58 %patch10 -p1 -b .libgif
59 %patch11 -p1 -b .background
60 %patch12 -p1
61 %patch13 -p1
62 %patch14 -p1
63 %patch15 -p1
64 %patch16 -p1
65 %patch17 -p1
66 %patch21 -p0 -b .libpng2
67 install -m 644 %{SOURCE4} .
68
69 mkdir -p htdocs cidmap
70 tar xjf %{SOURCE2} -C htdocs
71 tar xf %{SOURCE3} -C cidmap
72
73 %build
74 # For the motivation behind --without-freetype-src, see:
75 # http://sourceforge.net/mailarchive/forum.php?thread_name=m3pqthbe44.fsf%%40jhcloos.com&forum_name=fontforge-devel
76 # (Replace the double-percent with a single percent.).
77 %configure2_5x --disable-shared --without-freetype-src
78 %make
79
80 %install
81 %makeinstall
82
83 rm -rf %{buildroot}%{_libdir}
84
85 # XDG compliance
86 mkdir -p %{buildroot}%{_datadir}/applications
87 cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF
88 [Desktop Entry]
89 Name=FontForge
90 Comment=%{Summary}
91 Exec=%{name}
92 Icon=%{name}
93 Terminal=false
94 Type=Application
95 StartupNotify=true
96 Categories=Graphics;Scanning;OCR;Office;Viewer;
97 EOF
98
99 # icons
100 install -m644 %{SOURCE11} -D %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png
101 install -m644 %{SOURCE12} -D %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png
102 install -m644 %{SOURCE13} -D %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png
103
104 # added with htdocs in %doc section
105 rm -rf %{buildroot}%{_datadir}/doc/fontforge
106
107 rm -rf %{buildroot}%{_includedir}
108
109 chrpath -d %{buildroot}%{_bindir}/%{name}
110
111 %find_lang FontForge
112
113 %files -f FontForge.lang
114 %doc LICENSE htdocs README-unix README-Unix.html fontforge-tutorial.pdf
115 %{_bindir}/*
116 %{_mandir}/man1/*
117 %{_iconsdir}/hicolor/16x16/apps/%{name}.png
118 %{_iconsdir}/hicolor/32x32/apps/%{name}.png
119 %{_iconsdir}/hicolor/48x48/apps/%{name}.png
120 %{_datadir}/applications/%{name}.desktop
121 %{_datadir}/fontforge

  ViewVC Help
Powered by ViewVC 1.1.26