1 |
%define lib_major 0 |
2 |
|
3 |
# optional compile flags |
4 |
%define enable_python 0 |
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.10 |
11 |
%define libname %mklibname %{name} %{api_version}_%{lib_major} |
12 |
%define devlibname %mklibname -d %{name}%{api_version} |
13 |
|
14 |
%define babl_ver 0.1.78 |
15 |
%define gegl_ver 0.4.24 |
16 |
|
17 |
Summary: The GNU Image Manipulation Program |
18 |
Name: gimp |
19 |
Epoch: 2 |
20 |
Version: 2.10.22 |
21 |
Release: %mkrel 3 |
22 |
License: GPLv2+ |
23 |
Group: Graphics/Editors and Converters |
24 |
URL: http://www.gimp.org/ |
25 |
|
26 |
Source0: http://download.gimp.org/pub/gimp/v%{abi_version}/gimp-%{version}.tar.bz2 |
27 |
#Source1: http://download.gimp.org/pub/gimp/v%%{abi_version}/gimp-%%{version}.tar.bz2.md5 |
28 |
Source13: gimp-scripting-sample.pl |
29 |
Patch0: gimp-2.8.0-link.patch |
30 |
#gw fix name in desktop file and disable startup notification |
31 |
Patch2: gimp-2.10.0-desktopentry.patch |
32 |
# (wally) |
33 |
# drop requires for unsafe and unsupported (upstream) webkit and thus disable webkit based |
34 |
# help-browser plug-in |
35 |
Patch4: gimp-2.10.0-external-help-browser.patch |
36 |
BuildRequires: pkgconfig(OpenEXR) |
37 |
BuildRequires: pkgconfig(atk) >= 2.2.0 |
38 |
BuildRequires: pkgconfig(babl) >= %{babl_ver} |
39 |
BuildRequires: pkgconfig(cairo) >= 1.12.2 |
40 |
BuildRequires: pkgconfig(cairo-pdf) >= 1.10.2 |
41 |
BuildRequires: pkgconfig(dbus-glib-1) >= 0.70 |
42 |
BuildRequires: pkgconfig(fontconfig) >= 2.12.4 |
43 |
BuildRequires: pkgconfig(gdk-pixbuf-2.0) >= 2.30.8 |
44 |
BuildRequires: pkgconfig(gegl-0.4) >= %{gegl_ver} |
45 |
BuildRequires: pkgconfig(gexiv2) >= 0.3.30 |
46 |
BuildRequires: pkgconfig(gio-2.0) >= 2.30.2 |
47 |
BuildRequires: pkgconfig(glib-2.0) >= 2.54.2 |
48 |
BuildRequires: pkgconfig(gmodule-no-export-2.0) |
49 |
BuildRequires: pkgconfig(gtk+-2.0) >= 2.24.10 |
50 |
BuildRequires: pkgconfig(gudev-1.0) >= 167 |
51 |
BuildRequires: pkgconfig(iso-codes) |
52 |
BuildRequires: pkgconfig(lcms2) >= 2.8 |
53 |
BuildRequires: pkgconfig(libcurl) >= 7.15.1 |
54 |
BuildRequires: pkgconfig(libexif) >= 0.6.15 |
55 |
BuildRequires: pkgconfig(libpng) >= 1.6.25 |
56 |
BuildRequires: pkgconfig(librsvg-2.0) >= 2.40.6 |
57 |
BuildRequires: pkgconfig(libwebp) |
58 |
BuildRequires: pkgconfig(pangocairo) >= 1.29.4 |
59 |
BuildRequires: pkgconfig(pangoft2) |
60 |
BuildRequires: pkgconfig(poppler-glib) >= 0.44.0 |
61 |
BuildRequires: pkgconfig(xcursor) |
62 |
BuildRequires: pkgconfig(xfixes) |
63 |
|
64 |
BuildRequires: aalib-devel |
65 |
BuildRequires: gegl |
66 |
BuildRequires: glib-networking |
67 |
BuildRequires: libgomp-devel |
68 |
BuildRequires: pkgconfig(mypaint-brushes-2.0) |
69 |
BuildRequires: pkgconfig(poppler-data) >= 0.4.7 |
70 |
BuildRequires: pkgconfig(libmypaint) >= 1.3.0 |
71 |
BuildRequires: gtk-doc >= 1.11-3 |
72 |
BuildRequires: pkgconfig(alsa) |
73 |
BuildRequires: pkgconfig(libmng) |
74 |
BuildRequires: pkgconfig(libtiff-4) |
75 |
BuildRequires: pkgconfig(libopenjp2) |
76 |
BuildRequires: perl |
77 |
BuildRequires: pkgconfig(xmu) |
78 |
BuildRequires: pkgconfig(xpm) |
79 |
BuildRequires: pkgconfig(zlib) |
80 |
BuildRequires: pkgconfig(bzip2) |
81 |
BuildRequires: libgs-devel |
82 |
BuildRequires: intltool |
83 |
# mail plugin |
84 |
BuildRequires: sendmail-command |
85 |
# python plugin |
86 |
%if %{enable_python} |
87 |
BuildRequires: pkgconfig(pygtk-2.0) >= 2.10.4 |
88 |
%endif |
89 |
BuildRequires: automake |
90 |
BuildRequires: pkgconfig(libwmf) >= 0.2.8 |
91 |
BuildRequires: pkgconfig(xext) |
92 |
BuildRequires: desktop-file-utils |
93 |
BuildRequires: pkgconfig(libheif) |
94 |
|
95 |
Provides: gimp1_3 = %{version}-%{release} |
96 |
Provides: gimp2_0 = %{version}-%{release} |
97 |
Provides: gimp2_2 = %{version}-%{release} |
98 |
Provides: gimp2.6 = %{version}-%{release} |
99 |
Obsoletes: gimp1_3 < 2.0 |
100 |
Obsoletes: gimp2_0 < 2.2 |
101 |
Obsoletes: gimp2_2 < 2.4 |
102 |
Obsoletes: gimp2.6 < 2.8 |
103 |
# workaround libgimp not bumping its major on API/ABI changes: |
104 |
Requires: %{libname} = %{epoch}:%{version} |
105 |
Requires: mypaint-brushes |
106 |
# (tmb) needed for gegl:introspect |
107 |
# fixme? should gegl libs require this ? |
108 |
Requires: graphviz |
109 |
Conflicts: perl-Gimp < 2.2 |
110 |
Conflicts: gutenprint-gimp2 < 5.0.1 |
111 |
Recommends: gimp-help |
112 |
Obsoletes: gimp-help-2-common < 2.6 |
113 |
Provides: gimp-plugin-wavelet-decompose = %{version}-%{release} |
114 |
Obsoletes: gimp-plugin-wavelet-decompose < 2.10.22 |
115 |
|
116 |
%description |
117 |
The GIMP is an image manipulation program suitable for photo retouching, |
118 |
image composition and image authoring. Many people find it extremely useful |
119 |
in creating logos and other graphics for web pages. The GIMP has many of the |
120 |
tools and filters you would expect to find in similar commercial offerings, |
121 |
and some interesting extras as well. |
122 |
|
123 |
The GIMP provides a large image manipulation toolbox, including channel |
124 |
operations and layers, effects, sub-pixel imaging and anti-aliasing, |
125 |
and conversions, all with multi-level undo. |
126 |
|
127 |
This version of The GIMP includes a scripting facility, but many of the |
128 |
included scripts rely on fonts that we cannot distribute. The GIMP ftp |
129 |
site has a package of fonts that you can install by yourself, which |
130 |
includes all the fonts needed to run the included scripts. Some of the |
131 |
fonts have unusual licensing requirements; all the licenses are documented |
132 |
in the package. Get them in http://download.gimp.org/pub/gimp/fonts/ if |
133 |
you are so inclined. Alternatively, choose fonts which exist on your |
134 |
system before running the scripts. |
135 |
|
136 |
%package -n %{devlibname} |
137 |
Summary: GIMP plugin and extension development kit |
138 |
Group: Development/GNOME and GTK+ |
139 |
Epoch: 2 |
140 |
License: LGPLv2+ |
141 |
Requires: libgtk+2.0-devel >= %{req_gtk_version} |
142 |
Requires: %{libname} = %{epoch}:%{version} |
143 |
Provides: gimp-devel = %{version}-%{release} |
144 |
Provides: gimp2.6-devel = %{version}-%{release} |
145 |
Provides: libgimp-devel = %{version}-%{release} |
146 |
|
147 |
%description -n %{devlibname} |
148 |
Static libraries and header files for writing GIMP plugins and extensions. |
149 |
|
150 |
%package -n %{libname} |
151 |
Summary: GIMP libraries |
152 |
Group: System/Libraries |
153 |
Epoch: 2 |
154 |
License: LGPLv2+ |
155 |
Provides: libgimp%{api_version} = %{version}-%{release} |
156 |
Obsoletes: %{mklibname gimp 2.6_2.0_0} < 2.8 |
157 |
|
158 |
%description -n %{libname} |
159 |
This is the library that provides core GIMP functionality. |
160 |
It enable other programs to use GIMP's features but is mainly intended |
161 |
to be used by the GIMP and its "external" plugins. |
162 |
|
163 |
%package python |
164 |
Summary: GIMP python extension |
165 |
Group: Development/Python |
166 |
Epoch: 2 |
167 |
Requires: pygtk2.0 |
168 |
Obsoletes: gimp1_3-python < 2.0 |
169 |
Obsoletes: gimp2_0-python < 2.2 |
170 |
Obsoletes: gimp2_2-python < 2.4 |
171 |
|
172 |
%description python |
173 |
This package contains the python modules for GIMP, which act as a |
174 |
wrapper to libgimp allowing the writing of plug-ins for Gimp. |
175 |
This is similar to script-fu, except that you can use the full set |
176 |
of Python extension modules from the plug-in, and you write plug-in |
177 |
in python instead of in scheme. |
178 |
|
179 |
%prep |
180 |
%autosetup -p1 -n %name-%version |
181 |
|
182 |
%build |
183 |
export LD_PRELOAD=libgomp.so.1 |
184 |
#autoreconf -vfi |
185 |
sed -i 's!mypaint-brushes-1.0!mypaint-brushes-2.0!g' configure |
186 |
%configure \ |
187 |
--enable-default-binary=yes \ |
188 |
--disable-static \ |
189 |
--enable-mp=yes \ |
190 |
%if %enable_python |
191 |
--enable-python=yes \ |
192 |
%else |
193 |
--enable-python=no \ |
194 |
%endif |
195 |
--enable-gtk-doc=yes \ |
196 |
--without-webkit \ |
197 |
--with-bug-report-url=https://bugs.mageia.org/ |
198 |
|
199 |
%make_build |
200 |
|
201 |
%install |
202 |
%make_install |
203 |
|
204 |
#clean unpackaged files |
205 |
find %{buildroot} -name '*.la' -delete |
206 |
|
207 |
# workaround broken help system |
208 |
HELP_DIR=%{buildroot}%{_datadir}/gimp/%{api_version}/help/C |
209 |
[[ -d $HELP_DIR ]] || mkdir -p $HELP_DIR |
210 |
HELP_IDX=$HELP_DIR/introduction.html |
211 |
echo -e '<HTML><HEAD><TITLE>GIMP Base Library</HEAD>\n<BODY><UL>' > $HELP_IDX |
212 |
|
213 |
/bin/ls %{buildroot}%{_datadir}/gtk-doc/html/*/index.html | sed -e "s@%{buildroot}@@g" >> $HELP_IDX |
214 |
perl -pi -e 's!(.*/html/)([^/]*)(/index.html)!<LI><A HREF="\1\2\3">\2</A>!g' $HELP_IDX |
215 |
|
216 |
echo '</UL></BODY></HTML>' >> $HELP_IDX |
217 |
|
218 |
%find_lang gimp20 --all-name |
219 |
|
220 |
%if %{enable_python} |
221 |
chmod 755 %buildroot%{_libdir}/gimp/%{api_version}/plug-ins/*/*.py |
222 |
mkdir -p %{buildroot}%{_libdir}/python%{python2_version}/site-packages |
223 |
echo %{_libdir}/gimp/%{api_version}/python > %{buildroot}%{_libdir}/python%{python2_version}/site-packages/gimp.pth |
224 |
echo %{_libdir}/gimp/%{api_version}/plug-ins >> %{buildroot}%{_libdir}/python%{python2_version}/site-packages/gimp.pth |
225 |
%endif |
226 |
|
227 |
desktop-file-install --vendor="" \ |
228 |
--add-category="X-Mageia-CrossDesktop" \ |
229 |
--dir %{buildroot}%{_datadir}/applications %{buildroot}%{_datadir}/applications/* |
230 |
|
231 |
%files -f gimp20.lang |
232 |
%{_bindir}/gimp |
233 |
%{_bindir}/gimp-%{abi_version} |
234 |
%{_bindir}/gimp-console |
235 |
%{_bindir}/gimp-console-%{abi_version} |
236 |
%{_bindir}/gimp-test-clipboard-2.0 |
237 |
%{_libexecdir}/gimp-debug-tool-2.0 |
238 |
%{_datadir}/applications/* |
239 |
%{_datadir}/gimp |
240 |
%{_datadir}/metainfo/*.xml |
241 |
%dir %{_libdir}/gimp |
242 |
%dir %{_libdir}/gimp/%{api_version} |
243 |
%dir %{_libdir}/gimp/%{api_version}/environ |
244 |
%{_libdir}/gimp/%{api_version}/interpreters |
245 |
%{_libdir}/gimp/%{api_version}/environ/default.env |
246 |
%{_libdir}/gimp/%{api_version}/modules |
247 |
%{_libdir}/gimp/%{api_version}/plug-ins |
248 |
%exclude %{_libdir}/gimp/%{api_version}/plug-ins/*/*.py |
249 |
%{_mandir}/man1/gimp* |
250 |
%{_mandir}/man5/gimp* |
251 |
%{_iconsdir}/hicolor/*/apps/gimp.png |
252 |
#%%_datadir/icons/hicolor/scalable/apps/gimp.svg |
253 |
%config(noreplace) %{_sysconfdir}/gimp |
254 |
|
255 |
%doc AUTHORS NEWS README README.i18n docs/Wilber* |
256 |
|
257 |
%files -n %{devlibname} |
258 |
%doc %{_datadir}/gtk-doc/html/* |
259 |
%{_bindir}/gimptool-* |
260 |
%{_datadir}/aclocal/*.m4 |
261 |
%{_includedir}/* |
262 |
%{_libdir}/lib*.so |
263 |
%{_libdir}/pkgconfig/* |
264 |
%{_mandir}/man1/gimptool-* |
265 |
|
266 |
%files -n %{libname} |
267 |
# explicitly list all libs to avoid old libtool issue |
268 |
%{_libdir}/libgimpconfig-%{api_version}.so.%{lib_major}{,.*} |
269 |
%{_libdir}/libgimp-%{api_version}.so.%{lib_major}{,.*} |
270 |
%{_libdir}/libgimpthumb-%{api_version}.so.%{lib_major}{,.*} |
271 |
%{_libdir}/libgimpbase-%{api_version}.so.%{lib_major}{,.*} |
272 |
%{_libdir}/libgimpcolor-%{api_version}.so.%{lib_major}{,.*} |
273 |
%{_libdir}/libgimpmath-%{api_version}.so.%{lib_major}{,.*} |
274 |
%{_libdir}/libgimpmodule-%{api_version}.so.%{lib_major}{,.*} |
275 |
%{_libdir}/libgimpui-%{api_version}.so.%{lib_major}{,.*} |
276 |
%{_libdir}/libgimpwidgets-%{api_version}.so.%{lib_major}{,.*} |
277 |
|
278 |
%if %{enable_python} |
279 |
%files python |
280 |
%{_libdir}/gimp/%{api_version}/environ/pygimp.env |
281 |
%{_libdir}/gimp/%{api_version}/python |
282 |
%{_libdir}/gimp/%{api_version}/plug-ins/*/*.py |
283 |
%{_libdir}/python%{python2_version}/site-packages/*.pth |
284 |
%endif |