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

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

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.30