1 |
pterjan |
77778 |
%define major 13 |
2 |
ahmad |
19338 |
%define glibmajor 6 |
3 |
|
|
%define qt3major 3 |
4 |
|
|
%define qt4major 3 |
5 |
|
|
%define cppmajor 0 |
6 |
ahmad |
79295 |
%define girmajor 0.16 |
7 |
ahmad |
19338 |
%define libname %mklibname %name %major |
8 |
|
|
%define libnameglib %mklibname %name-glib %glibmajor |
9 |
|
|
%define libnameqt4 %mklibname %name-qt4- %qt4major |
10 |
|
|
%define libnameqt %mklibname %name-qt %qt3major |
11 |
|
|
%define libnamecpp %mklibname %name-cpp %cppmajor |
12 |
|
|
%define libnamedev %mklibname -d %name |
13 |
|
|
%define libnameglibdev %mklibname -d %name-glib |
14 |
|
|
%define libnameqtdev %mklibname -d %name-qt |
15 |
|
|
%define libnameqt4dev %mklibname -d %name-qt4 |
16 |
|
|
%define libnamecppdev %mklibname -d %name-cpp |
17 |
ahmad |
79295 |
%define namegir %{name}-gir%{girmajor} |
18 |
ahmad |
19338 |
|
19 |
ahmad |
19344 |
%define qt3support 0 |
20 |
ahmad |
19338 |
|
21 |
|
|
Name: poppler |
22 |
pterjan |
97383 |
Version: 0.16.5 |
23 |
ahmad |
80490 |
Release: %mkrel 1 |
24 |
ahmad |
19338 |
License: GPLv2+ |
25 |
|
|
Group: Office |
26 |
|
|
URL: http://poppler.freedesktop.org |
27 |
|
|
Summary: PDF rendering library |
28 |
|
|
Source: http://poppler.freedesktop.org/%{name}-%{version}.tar.gz |
29 |
|
|
## upstreamable patches |
30 |
|
|
Patch1: poppler-0.12-CVE-2009-3608,3609.patch |
31 |
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot |
32 |
|
|
BuildRequires: qt4-devel |
33 |
|
|
%if %qt3support |
34 |
|
|
BuildRequires: qt3-devel |
35 |
|
|
%endif |
36 |
|
|
BuildRequires: gtk2-devel |
37 |
|
|
BuildRequires: cairo-devel >= 1.8.4 |
38 |
|
|
BuildRequires: jpeg-devel |
39 |
|
|
BuildRequires: openjpeg-devel |
40 |
|
|
BuildRequires: gobject-introspection-devel |
41 |
|
|
BuildRequires: gtk-doc |
42 |
|
|
Obsoletes: xpdf-tools < 3.02-10mdv |
43 |
|
|
Provides: xpdf-tools |
44 |
|
|
Obsoletes: pdftohtml |
45 |
|
|
Provides: pdftohtml |
46 |
|
|
|
47 |
|
|
%description |
48 |
|
|
Poppler is a PDF rendering library based on the xpdf-3.0 code base. |
49 |
|
|
|
50 |
|
|
%package -n %{libname} |
51 |
|
|
Summary: PDF rendering library |
52 |
|
|
Group: System/Libraries |
53 |
blino |
78257 |
Conflicts: %{_lib}poppler12 |
54 |
ahmad |
19338 |
Suggests: poppler-data |
55 |
|
|
|
56 |
|
|
%description -n %{libname} |
57 |
|
|
Poppler is a PDF rendering library based on the xpdf-3.0 code base. |
58 |
|
|
|
59 |
|
|
%package -n %{libnamedev} |
60 |
|
|
Summary: Development files for %{name} |
61 |
|
|
Group: Development/C++ |
62 |
|
|
Provides: lib%{name}-devel = %{version}-%release |
63 |
|
|
Requires: %{libname} = %{version}-%release |
64 |
|
|
Obsoletes: %{libname}-devel |
65 |
|
|
|
66 |
|
|
%description -n %{libnamedev} |
67 |
|
|
Development files for %{name} |
68 |
|
|
|
69 |
|
|
%package -n %{libnameqt} |
70 |
|
|
Summary: PDF rendering library - QT backend |
71 |
|
|
Group: System/Libraries |
72 |
|
|
|
73 |
|
|
%description -n %{libnameqt} |
74 |
|
|
Poppler is a PDF rendering library based on the xpdf-3.0 code base. |
75 |
|
|
This is the QT backend version. |
76 |
|
|
|
77 |
|
|
%if %qt3support |
78 |
|
|
%package -n %{libnameqtdev} |
79 |
|
|
Summary: Development files for %{name}-qt |
80 |
|
|
Group: Development/C++ |
81 |
|
|
Provides: lib%{name}-qt-devel = %{version} |
82 |
|
|
Requires: %{libnameqt} = %{version} |
83 |
|
|
Requires: %libnamedev = %version |
84 |
|
|
Obsoletes: %libnameqt-devel |
85 |
|
|
|
86 |
|
|
%description -n %{libnameqtdev} |
87 |
|
|
Development files for %{name}-qt |
88 |
|
|
|
89 |
|
|
%endif |
90 |
|
|
|
91 |
|
|
%package -n %{libnamecpp} |
92 |
|
|
Summary: PDF rendering library - C++ backend |
93 |
|
|
Group: System/Libraries |
94 |
|
|
|
95 |
|
|
%description -n %{libnamecpp} |
96 |
|
|
Poppler is a PDF rendering library based on the xpdf-3.0 code base. |
97 |
|
|
This is the C++ backend version. |
98 |
|
|
|
99 |
|
|
%package -n %{libnameqt4dev} |
100 |
|
|
Summary: Development files for %{name}-qt4 |
101 |
|
|
Group: Development/C++ |
102 |
|
|
Provides: lib%{name}-qt4-devel = %{version} |
103 |
|
|
Requires: %{libnameqt4} = %{version} |
104 |
|
|
Requires: %libnamedev = %version |
105 |
|
|
Obsoletes: %libnameqt4-devel |
106 |
|
|
|
107 |
|
|
%description -n %{libnameqt4dev} |
108 |
|
|
Development files for %{name}-qt4 |
109 |
|
|
|
110 |
|
|
%package -n %{libnameqt4} |
111 |
|
|
Summary: PDF rendering library - QT4 backend |
112 |
|
|
Group: System/Libraries |
113 |
|
|
|
114 |
|
|
%description -n %{libnameqt4} |
115 |
|
|
Poppler is a PDF rendering library based on the xpdf-3.0 code base. |
116 |
|
|
This is the QT backend version. |
117 |
|
|
|
118 |
|
|
|
119 |
|
|
%package -n %{libnameglib} |
120 |
|
|
Summary: PDF rendering library - glib binding |
121 |
|
|
Group: System/Libraries |
122 |
ahmad |
79944 |
Requires: %{namegir} >= %{version} |
123 |
|
|
Conflicts: %libname < %version-%release |
124 |
ahmad |
19338 |
|
125 |
|
|
%description -n %{libnameglib} |
126 |
|
|
Poppler is a PDF rendering library based on the xpdf-3.0 code base. |
127 |
|
|
|
128 |
|
|
%package -n %{libnameglibdev} |
129 |
|
|
Summary: Development files for %{name}'s glib binding |
130 |
|
|
Group: Development/C++ |
131 |
|
|
Provides: lib%{name}-glib-devel = %{version} |
132 |
|
|
Requires: %{libnameglib} = %{version} |
133 |
|
|
Requires: %{libnamedev} = %{version} |
134 |
ahmad |
79295 |
Conflicts: %libnamedev < %version-%release |
135 |
ahmad |
19338 |
Obsoletes: %libnameglib-devel |
136 |
|
|
|
137 |
|
|
%description -n %{libnameglibdev} |
138 |
|
|
Development files for %{name}'s glib binding. |
139 |
|
|
|
140 |
|
|
%package -n %{libnamecppdev} |
141 |
|
|
Summary: Development files for %{name}-cpp |
142 |
|
|
Group: Development/C++ |
143 |
|
|
Provides: lib%{name}-cpp-devel = %{version} |
144 |
|
|
Requires: %{libnamecpp} = %{version} |
145 |
|
|
Requires: %libnamedev = %version |
146 |
|
|
|
147 |
|
|
%description -n %{libnamecppdev} |
148 |
ahmad |
79295 |
Development files for %{name}-cpp. |
149 |
ahmad |
19338 |
|
150 |
ahmad |
79295 |
%package -n %{namegir} |
151 |
|
|
Summary: Gobject-introspection files for %{name} |
152 |
|
|
Group: System/Libraries |
153 |
ahmad |
79944 |
Requires: %{libnameglib} = %{version} |
154 |
ahmad |
79295 |
|
155 |
|
|
%description -n %{namegir} |
156 |
|
|
Gobject-introspection files for %{name}. |
157 |
|
|
|
158 |
ahmad |
19338 |
%prep |
159 |
|
|
|
160 |
|
|
%setup -q |
161 |
|
|
%patch1 -p0 -b .cve-2009-3608,3609.patch |
162 |
|
|
|
163 |
|
|
#needed by patch2 |
164 |
|
|
#autoreconf |
165 |
|
|
|
166 |
|
|
%build |
167 |
|
|
export CPPFLAGS="-I%_includedir/freetype2" |
168 |
|
|
export PATH="%qt4dir/bin:${PATH}" |
169 |
|
|
|
170 |
|
|
%if %qt3support |
171 |
|
|
export POPPLER_QT_LIBS="%_libdir/libqt-mt.la" |
172 |
|
|
%endif |
173 |
|
|
|
174 |
|
|
%configure2_5x \ |
175 |
|
|
--enable-cairo-output \ |
176 |
|
|
--enable-poppler-qt4 \ |
177 |
|
|
%if %qt3support |
178 |
|
|
--enable-poppler-qt \ |
179 |
|
|
%else |
180 |
|
|
--disable-poppler-qt \ |
181 |
|
|
%endif |
182 |
|
|
--enable-xpdf-headers \ |
183 |
|
|
--enable-gtk-doc |
184 |
|
|
%make |
185 |
|
|
|
186 |
|
|
%install |
187 |
|
|
rm -rf %{buildroot} |
188 |
|
|
%makeinstall_std |
189 |
|
|
%{__cp} -a config.h %{buildroot}%{_includedir}/poppler/ |
190 |
|
|
|
191 |
|
|
%clean |
192 |
|
|
rm -rf %{buildroot} |
193 |
|
|
|
194 |
|
|
%files |
195 |
|
|
%defattr(-,root,root) |
196 |
|
|
%doc AUTHORS COPYING NEWS README |
197 |
|
|
%_bindir/* |
198 |
|
|
%_mandir/man1/* |
199 |
|
|
|
200 |
|
|
%files -n %{libname} |
201 |
|
|
%defattr(-,root,root) |
202 |
|
|
%{_libdir}/libpoppler.so.%{major}* |
203 |
|
|
|
204 |
|
|
%files -n %{libnamedev} |
205 |
|
|
%defattr(-,root,root) |
206 |
|
|
%{_libdir}/libpoppler.so |
207 |
|
|
%attr(644,root,root) %{_libdir}/libpoppler.*a |
208 |
|
|
%dir %{_includedir}/poppler |
209 |
|
|
%{_includedir}/poppler/config.h |
210 |
|
|
%{_includedir}/poppler/[A-Z]* |
211 |
|
|
%{_includedir}/poppler/fofi |
212 |
|
|
%{_includedir}/poppler/goo |
213 |
|
|
%{_includedir}/poppler/splash |
214 |
|
|
%{_includedir}/poppler/poppler-config.h |
215 |
|
|
%{_libdir}/pkgconfig/poppler-cairo.pc |
216 |
|
|
%{_libdir}/pkgconfig/poppler-splash.pc |
217 |
|
|
%{_libdir}/pkgconfig/poppler.pc |
218 |
|
|
%{_datadir}/gtk-doc/html/%name |
219 |
|
|
|
220 |
|
|
%files -n %{libnameglib} |
221 |
|
|
%defattr(-,root,root) |
222 |
|
|
%{_libdir}/libpoppler-glib.so.%{glibmajor}* |
223 |
|
|
|
224 |
ahmad |
79295 |
%files -n %{namegir} |
225 |
|
|
%defattr(-,root,root) |
226 |
|
|
%_libdir/girepository-1.0/Poppler-%{girmajor}.typelib |
227 |
|
|
|
228 |
ahmad |
19338 |
%files -n %{libnameglibdev} |
229 |
|
|
%defattr(-,root,root) |
230 |
|
|
%attr(644,root,root) %{_libdir}/libpoppler-glib.*a |
231 |
|
|
%{_libdir}/libpoppler-glib.so |
232 |
|
|
%{_libdir}/pkgconfig/poppler-glib.pc |
233 |
|
|
%{_includedir}/poppler/glib |
234 |
ahmad |
79944 |
%_datadir/gir-1.0/Poppler-%{girmajor}.gir |
235 |
ahmad |
19338 |
|
236 |
|
|
%if %qt3support |
237 |
|
|
%files -n %{libnameqt} |
238 |
|
|
%defattr(-,root,root) |
239 |
|
|
%{_libdir}/libpoppler-qt.so.%{qt3major}* |
240 |
|
|
|
241 |
|
|
%files -n %{libnameqtdev} |
242 |
|
|
%defattr(-,root,root) |
243 |
|
|
%{_libdir}/libpoppler-qt.so |
244 |
|
|
%attr(644,root,root) %{_libdir}/libpoppler-qt.*a |
245 |
|
|
%{_libdir}/pkgconfig/poppler-qt.pc |
246 |
|
|
%_includedir/poppler/qt3 |
247 |
|
|
%endif |
248 |
|
|
|
249 |
|
|
%files -n %{libnameqt4dev} |
250 |
|
|
%defattr(-,root,root) |
251 |
|
|
%_includedir/poppler/qt4 |
252 |
|
|
%{_libdir}/pkgconfig/poppler-qt4.pc |
253 |
|
|
%{_libdir}/libpoppler-qt4.so |
254 |
|
|
%attr(644,root,root) %{_libdir}/libpoppler-qt4.*a |
255 |
|
|
|
256 |
|
|
%files -n %{libnameqt4} |
257 |
|
|
%defattr(-,root,root) |
258 |
|
|
%{_libdir}/libpoppler-qt4.so.%{qt4major}* |
259 |
|
|
|
260 |
|
|
%files -n %{libnamecpp} |
261 |
|
|
%defattr(-,root,root) |
262 |
|
|
%{_libdir}/libpoppler-cpp.so.%{cppmajor}* |
263 |
|
|
|
264 |
|
|
%files -n %{libnamecppdev} |
265 |
|
|
%defattr(-,root,root) |
266 |
|
|
%{_libdir}/libpoppler-cpp.so |
267 |
|
|
%attr(644,root,root) %{_libdir}/libpoppler-cpp.*a |
268 |
|
|
%{_libdir}/pkgconfig/poppler-cpp.pc |
269 |
|
|
%_includedir/poppler/cpp |