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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1188362 - (show annotations) (download)
Sun Dec 31 16:02:57 2017 UTC (17 months, 2 weeks ago) by luigiwalser
File size: 9542 byte(s)
add patches from debian to fix CVE-2017-1778[4-9]
1 %define lib_major 0
2
3 # optional compile flags
4 %define enable_python 1
5 %{?_without_python: %global enable_python 0}
6
7 %define enable_lzw 0
8 %{?_with_lzw: %global enable_lzw 1}
9
10 %define req_gtk_version 2.12.1
11
12 %define api_version 2.0
13 %define abi_version 2.8
14 %define libname %mklibname %{name} %{api_version}_%{lib_major}
15 %define devlibname %mklibname -d %{name}%{api_version}
16
17 Summary: The GNU Image Manipulation Program
18 Name: gimp
19 Epoch: 1
20 Version: 2.8.14
21 %define subrel 3
22 Release: %mkrel 4
23 License: GPLv2+
24 Group: Graphics/Editors and Converters
25 URL: http://www.gimp.org/
26
27 Source0: http://download.gimp.org/pub/gimp/v%{abi_version}/gimp-%version.tar.bz2
28 Source1: http://download.gimp.org/pub/gimp/v%{abi_version}/gimp-%version.tar.bz2.md5
29 Source13: gimp-scripting-sample.pl
30 Patch0: gimp-2.8.0-link.patch
31 #gw fix name in desktop file and disable startup notification
32 Patch2: gimp-2.5.1-desktopentry.patch
33 Patch3: gimp-CVE-2016-4994-commit.patch
34 Patch4: gimp-bgo773233-CVE-2007-3126.patch
35 Patch5: Bug-739134-CVE-2017-17786-Out-of-bounds-read-heap-ov.patch
36 Patch6: plug-ins-TGA-16-bit-RGB-without-alpha-bit-is-also-va.patch
37 Patch7: Bug-790849-CVE-2017-17789-CVE-2017-17789-Heap-buffer.patch
38 Patch8: Bug-790784-CVE-2017-17784-heap-overread-in-gbr-parse.patch
39 Patch9: Bug-790853-CVE-2017-17787-heap-overread-in-psp-impor.patch
40 Patch10: Bug-739133-CVE-2017-17785-Heap-overflow-while-parsin.patch
41 Patch11: 790783-buffer-overread-in-XCF-parser-if-version-fiel.patch
42 BuildRequires: pkgconfig(atk) >= 2.2.0
43 BuildRequires: pkgconfig(babl) >= 0.1.10
44 BuildRequires: pkgconfig(cairo) >= 1.10.2
45 BuildRequires: pkgconfig(cairo-pdf) >= 1.10.2
46 BuildRequires: pkgconfig(dbus-glib-1) >= 0.70
47 BuildRequires: pkgconfig(fontconfig) >= 2.2.0
48 BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.24.1
49 BuildRequires: pkgconfig(gegl-0.2) >= 0.2.0
50 BuildRequires: pkgconfig(gio-2.0) >= 2.30.2
51 BuildRequires: pkgconfig(glib-2.0) >= 2.30.2
52 BuildRequires: pkgconfig(gmodule-no-export-2.0)
53 BuildRequires: pkgconfig(gtk+-2.0) >= 2.24.10
54 BuildRequires: pkgconfig(gudev-1.0) >= 167
55 BuildRequires: pkgconfig(iso-codes)
56 BuildRequires: pkgconfig(lcms2) >= 2.2
57 BuildRequires: pkgconfig(libcurl) >= 7.15.1
58 BuildRequires: pkgconfig(libexif) >= 0.6.15
59 BuildRequires: pkgconfig(libpng) >= 1.2.37
60 BuildRequires: pkgconfig(librsvg-2.0) >= 2.36.0
61 BuildRequires: pkgconfig(pangocairo) >= 1.29.4
62 BuildRequires: pkgconfig(pangoft2)
63 BuildRequires: pkgconfig(poppler-glib) >= 0.12.4
64 BuildRequires: pkgconfig(webkit-1.0) >= 1.6.1
65 BuildRequires: pkgconfig(xcursor)
66 BuildRequires: pkgconfig(xfixes)
67
68 BuildRequires: aalib-devel
69 BuildRequires: gtk-doc >= 1.11-3
70 BuildRequires: pkgconfig(alsa)
71 BuildRequires: pkgconfig(libmng)
72 BuildRequires: pkgconfig(libtiff-4)
73 BuildRequires: pkgconfig(jasper)
74 BuildRequires: perl
75 BuildRequires: pkgconfig(xmu)
76 BuildRequires: pkgconfig(xpm)
77 BuildRequires: pkgconfig(zlib)
78 BuildRequires: bzip2-devel
79 BuildRequires: libgs-devel
80 BuildRequires: intltool
81 # mail plugin
82 BuildRequires: sendmail-command
83 # python plugin
84 %if %enable_python
85 BuildRequires: pkgconfig(pygtk-2.0) >= 2.10.4
86 %endif
87 BuildRequires: automake
88 BuildRequires: libwmf-devel >= 0.2.8
89 BuildRequires: pkgconfig(xext)
90 BuildRequires: desktop-file-utils
91 Provides: gimp1_3 gimp2_0 gimp2_2 gimp2.6
92 Obsoletes: gimp1_3 gimp2_0 gimp2_2 gimp2.6
93 # workaround libgimp not bumping its major on API/ABI changes:
94 Requires: %{libname} = %epoch:%{version}
95 Conflicts: perl-Gimp < 2.2
96 Conflicts: gutenprint-gimp2 < 5.0.1
97 Recommends: gimp-help
98 Obsoletes: gimp-help-2-common < 2.6
99
100 %description
101 The GIMP is an image manipulation program suitable for photo retouching,
102 image composition and image authoring. Many people find it extremely useful
103 in creating logos and other graphics for web pages. The GIMP has many of the
104 tools and filters you would expect to find in similar commercial offerings,
105 and some interesting extras as well.
106
107 The GIMP provides a large image manipulation toolbox, including channel
108 operations and layers, effects, sub-pixel imaging and anti-aliasing,
109 and conversions, all with multi-level undo.
110
111 This version of The GIMP includes a scripting facility, but many of the
112 included scripts rely on fonts that we cannot distribute. The GIMP ftp
113 site has a package of fonts that you can install by yourself, which
114 includes all the fonts needed to run the included scripts. Some of the
115 fonts have unusual licensing requirements; all the licenses are documented
116 in the package. Get them in http://download.gimp.org/pub/gimp/fonts/ if
117 you are so inclined. Alternatively, choose fonts which exist on your
118 system before running the scripts.
119
120 Build Options:
121 --without python Disable pygimp (default enabled)
122 --with lzw Enable LZW compression in GIF (default disabled)
123
124 %package -n %{devlibname}
125 Summary: GIMP plugin and extension development kit
126 Group: Development/GNOME and GTK+
127 Requires: libgtk+2.0-devel >= %{req_gtk_version}
128 Epoch: 1
129 License: LGPLv2+
130 Requires: %{libname} = %epoch:%{version}
131 Provides: gimp-devel = %{version}-%{release}
132 Provides: gimp2.6-devel = %{version}-%{release}
133 Provides: libgimp-devel = %{version}-%{release}
134
135 %description -n %{devlibname}
136 Static libraries and header files for writing GIMP plugins and extensions.
137
138 %package -n %libname
139 Summary: GIMP libraries
140 Group: System/Libraries
141 Epoch: 1
142 License: LGPLv2+
143 Provides: libgimp%{api_version} = %{version}-%{release}
144 Obsoletes: %mklibname gimp 2.6_2.0_0
145
146 %description -n %libname
147 This is the library that provides core GIMP functionality.
148 It enable other programs to use GIMP's features but is mainly intended
149 to be used by the GIMP and its "external" plugins.
150
151 %package python
152 Summary: GIMP python extension
153 Group: Development/Python
154 Epoch: 1
155 Requires: pygtk2.0
156 Obsoletes: gimp1_3-python, gimp2_0-python, gimp2_2-python
157
158 %description python
159 This package contains the python modules for GIMP, which act as a
160 wrapper to libgimp allowing the writing of plug-ins for Gimp.
161 This is similar to script-fu, except that you can use the full set
162 of Python extension modules from the plug-in, and you write plug-in
163 in python instead of in scheme.
164
165 %prep
166 %setup -q -n gimp-%version
167 %patch0 -p0 -b .link
168 %patch2 -p1 -b .desktopentry
169 %patch3 -p1 -b .CVE-2016-4995
170 %patch4 -p1 -b .ICO
171 %patch5 -p1
172 %patch6 -p1
173 %patch7 -p1
174 %patch8 -p1
175 %patch9 -p1
176 %patch10 -p1
177 %patch11 -p1
178
179 %build
180 %configure2_5x --enable-default-binary=yes --disable-static \
181 --enable-mp=yes \
182 %if %enable_python
183 --enable-python=yes \
184 %else
185 --enable-python=no \
186 %endif
187 %if %enable_lzw
188 --with-gif-compression=lzw \
189 %else
190 --with-gif-compression=rle \
191 %endif
192 --enable-gtk-doc=yes
193
194 %make
195
196 %install
197 %makeinstall_std
198
199 #clean unpackaged files
200 find %buildroot -name '*.la' -delete
201
202 # workaround broken help system
203 HELP_DIR=%{buildroot}%_datadir/gimp/%api_version/help/C
204 [[ -d $HELP_DIR ]] || mkdir -p $HELP_DIR
205 HELP_IDX=$HELP_DIR/introduction.html
206 echo -e '<HTML><HEAD><TITLE>GIMP Base Library</HEAD>\n<BODY><UL>' > $HELP_IDX
207
208 /bin/ls %{buildroot}%_datadir/gtk-doc/html/*/index.html | sed -e "s@%{buildroot}@@g" >> $HELP_IDX
209 perl -pi -e 's!(.*/html/)([^/]*)(/index.html)!<LI><A HREF="\1\2\3">\2</A>!g' $HELP_IDX
210
211 echo '</UL></BODY></HTML>' >> $HELP_IDX
212
213 %find_lang gimp20 --all-name
214
215 %if %enable_python
216 chmod 755 %buildroot%_libdir/gimp/%{api_version}/plug-ins/*.py
217 mkdir -p %{buildroot}%{_libdir}/python%{pyver}/site-packages
218 echo %_libdir/gimp/%{api_version}/python > %{buildroot}%{_libdir}/python%{pyver}/site-packages/gimp.pth
219 echo %_libdir/gimp/%{api_version}/plug-ins >> %{buildroot}%{_libdir}/python%{pyver}/site-packages/gimp.pth
220 %endif
221
222 desktop-file-install --vendor="" \
223 --add-category="X-Mageia-CrossDesktop" \
224 --dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/*
225
226 %files -f gimp20.lang
227 %{_bindir}/gimp
228 %{_bindir}/gimp-%abi_version
229 %{_bindir}/gimp-console
230 %{_bindir}/gimp-console-%abi_version
231 %{_datadir}/applications/*
232 %{_datadir}/appdata/gimp.appdata.xml
233 %{_datadir}/gimp
234 %dir %{_libdir}/gimp
235 %dir %{_libdir}/gimp/%{api_version}
236 %dir %{_libdir}/gimp/%{api_version}/environ
237 %{_libdir}/gimp/%{api_version}/interpreters
238 %{_libdir}/gimp/%{api_version}/environ/default.env
239 %{_libdir}/gimp/%{api_version}/modules
240 %{_libdir}/gimp/%{api_version}/plug-ins
241 %exclude %{_libdir}/gimp/%{api_version}/plug-ins/*.py
242 %{_mandir}/man1/gimp*
243 %{_mandir}/man5/gimp*
244 %_datadir/icons/hicolor/*/apps/gimp.png
245 #%_datadir/icons/hicolor/scalable/apps/gimp.svg
246 %config(noreplace) %{_sysconfdir}/gimp
247
248 %doc AUTHORS NEWS README README.i18n docs/Wilber*
249
250 %files -n %{devlibname}
251 %doc ChangeLog
252 %doc %{_datadir}/gtk-doc/html/*
253 %{_bindir}/gimptool-*
254 %{_datadir}/aclocal/*.m4
255 %{_includedir}/*
256 %{_libdir}/lib*.so
257 %{_libdir}/pkgconfig/*
258 %{_mandir}/man1/gimptool-*
259
260 %files -n %libname
261 # explicitly list all libs to avoid old libtool issue
262 %{_libdir}/libgimpconfig-%{api_version}.so.%{lib_major}*
263 %{_libdir}/libgimp-%{api_version}.so.%{lib_major}*
264 %{_libdir}/libgimpthumb-%{api_version}.so.%{lib_major}*
265 %{_libdir}/libgimpbase-%{api_version}.so.%{lib_major}*
266 %{_libdir}/libgimpcolor-%{api_version}.so.%{lib_major}*
267 %{_libdir}/libgimpmath-%{api_version}.so.%{lib_major}*
268 %{_libdir}/libgimpmodule-%{api_version}.so.%{lib_major}*
269 %{_libdir}/libgimpui-%{api_version}.so.%{lib_major}*
270 %{_libdir}/libgimpwidgets-%{api_version}.so.%{lib_major}*
271
272 %if %enable_python
273 %files python
274 %{_libdir}/gimp/%{api_version}/environ/pygimp.env
275 %{_libdir}/gimp/%{api_version}/python
276 %{_libdir}/gimp/%{api_version}/plug-ins/*.py
277 %{_libdir}/python%{pyver}/site-packages/*.pth
278 %endif

  ViewVC Help
Powered by ViewVC 1.1.26