Package gmic: Specfile

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
%def_disable snapshot
%define gimpplugindir %(gimptool-2.0 --gimpplugindir)
%def_enable zart
%ifarch %e2k
# it's impossible to use such a bad OpenMP implementation for such complex code
%def_disable openmp
%else
%def_enable openmp
%endif

# https://github.com/c-koi/zart
# no tags
%define zart_ver ac29dcb
# https://github.com/c-koi/gmic-qt
%define gmic_qt_ver v.3.0.0-43-g3c41d41
# https://github.com/dtschump/gmic-community.git
%define gmic_comm_ver gmic-3.1.2

Name: gmic
Version: 3.1.2
Release: alt1

Summary: GREYC's Magic Image Converter
License: CECILL-2.0 and GPL-3.0
Group: Graphics
Url: http://gmic.sourceforge.net/

%if_disabled snapshot
Source: http://gmic.eu/files/source/%{name}_%version.tar.gz
%else
Vcs: https://github.com/dtschump/gmic.git
Source: %name-%version.tar
%endif
Source1: zart-%zart_ver.tar
Source2: gmic-qt-%gmic_qt_ver.tar
Source3: gmic-community-%gmic_comm_ver.tar

Requires: lib%name = %version-%release

BuildRequires: dos2unix
BuildRequires: gcc-c++ imake libGraphicsMagick-c++-devel libImageMagick-devel libXext-devel libXrandr-devel
BuildRequires: libavformat-devel libfftw3-devel libgimp-devel libjpeg-devel libopencv-devel libpng-devel
BuildRequires: libswscale-devel libtiff-devel openexr-devel xorg-cf-files zlib-devel
%{?_enable_openmp:BuildRequires: libgomp-devel}
BuildRequires: libcurl-devel
BuildRequires: bash-completion
# for -zart and -qt
BuildRequires(pre): rpm-macros-qt5
BuildRequires: qt5-base-devel qt5-tools-devel

%description
G'MIC (GREYC's Magic Image Converter) is an interpreter of image processing
macros whose goal is to convert, manipulate and visualize generic 1D/2D/3D
multi-spectral image datasets.

%package -n lib%name
Summary: GREYC's Magic Image Converter Library
Group: System/Libraries

%description -n lib%name
G'MIC (GREYC's Magic Image Converter) is an interpreter of image processing
macros whose goal is to convert, manipulate and visualize generic 1D/2D/3D
multi-spectral image datasets.

This package provides shared G'MIC library.

%package -n lib%name-devel
Summary: GREYC's Magic Image Converter Library (development package)
Group: Development/C++
Requires: lib%name = %version-%release

%description -n lib%name-devel
G'MIC (GREYC's Magic Image Converter) is an interpreter of image processing
macros whose goal is to convert, manipulate and visualize generic 1D/2D/3D
multi-spectral image datasets.

This package provides development files for GREYC's Magic Image Converter Library.

%package zart
Summary: GREYC's image processing language demo
Group: Graphics
Provides: zart = %version-%release
Requires: lib%name = %version-%release
Requires: gst-libav

%description zart
ZArt is a computer program whose purpose is to demonstrate the possibilities of
the G'MIC image processing language by offering the choice of several
manipulations on a video stream acquired from a webcam. In other words, ZArt is
a GUI for G'MIC real-time manipulations on the output of a webcam.

%package qt
Summary: Qt-based frontend for G'MIC
Group: Graphics
Requires: %name = %version-%release

%description qt
G'MIC-Qt is a versatile front-end to the image processing framework
G'MIC. It is in fact a plugin for GIMP and Krita, as well as a standalone
application.

%package -n gimp-plugin-gmic
Summary: Image denoising and interpolation plugin for GIMP
Group: Graphics
Requires: gimp

%description -n gimp-plugin-gmic
G'MIC (GREYC's Magic Image Converter) is an interpreter of image processing
macros whose goal is to convert, manipulate and visualize generic 1D/2D/3D
multi-spectral image datasets.

%prep
%setup -n gmic-%version -a1 -a2 -a3
%if_disabled openmp
sed -i "s|-fopenmp -Dcimg_use_openmp||;s|-lgomp||" src/Makefile
sed -i "s|cimg_use_openmp||;s|-fopenmp||" gmic-qt/gmic_qt.pro zart/zart.pro
%endif

dos2unix src/Makefile
# fix libdir
sed -i 's|\$(USR)/\$(LIB)/|$(USR)/%_lib/|' src/Makefile
# fix libcgmic path
subst 's| \.\.\/\(\.\.\/gmic-community/libcgmic\)| \1|' src/Makefile
%ifnarch %ix86 x86_64
sed -i 's|-mtune=generic||' src/Makefile
%endif
# remove unusual rpath
sed -i 's|-Wl,-rpath,.||' src/Makefile

%build
%add_optflags %(getconf LFS_CFLAGS)
pushd src
%make V=1 NOSTRIP=1 OPT_CFLAGS="%optflags" cli lib libc
popd

pushd %name-qt
%qmake_qt5 CONFIG+=release GMIC_PATH=../src HOST=gimp gmic_qt.pro
%make_build
%qmake_qt5 CONFIG+=release GMIC_PATH=../src HOST=none gmic_qt.pro
%make_build
popd

%if_enabled zart
pushd zart
rm -f .qmake.stash
%qmake_qt5 CONFIG+=release GMIC_PATH=../src zart.pro
%make_build
popd
%endif

%install
cp -f gmic-community/libcgmic/COPYING COPYING-libcgmic

pushd src
%makeinstall_std
popd

pushd %name-qt
%makeinstall_std
popd

%if_enabled zart
pushd zart
#%%makeinstall_std
%make INSTALL_ROOT=%buildroot install
popd
%endif

%find_lang --with-man %name

%files -f %name.lang
%_bindir/%name
%_man1dir/%name.1*
%_datadir/bash-completion/completions/%name
%doc README COPYING

%files qt
%_bindir/%{name}_qt
%_desktopdir/gmic_qt.desktop
%_iconsdir/hicolor/*x*/apps/gmic_qt.png
%_iconsdir/hicolor/scalable/apps/gmic_qt.svg
%doc %name-qt/README*

%files -n lib%name
%_libdir/lib%name.so.*
%_libdir/libc%name.so.*
%doc COPYING COPYING-libcgmic

%files -n lib%name-devel
%_includedir/gmic.h
%_includedir/gmic_libc.h
%_libdir/lib%name.so
%_libdir/libc%name.so

%if_enabled zart
%files zart
%_bindir/zart
%_desktopdir/zart.desktop
%_iconsdir/hicolor/*x*/apps/zart.png
%_iconsdir/hicolor/scalable/apps/zart.svg
%doc zart/README* zart/Licence_CeCILL_V2*
%endif

%files -n gimp-plugin-gmic
%gimpplugindir/plug-ins/*

%changelog
* Wed May 11 2022 Yuri N. Sedunov <aris@altlinux.org> 3.1.2-alt1
- 3.1.2

* Wed May 11 2022 Yuri N. Sedunov <aris@altlinux.org> 3.1.1-alt1
- 3.1.1

* Mon May 02 2022 Yuri N. Sedunov <aris@altlinux.org> 3.1.0-alt1
- 3.1.0

* Wed Jan 19 2022 Yuri N. Sedunov <aris@altlinux.org> 3.0.2-alt1
- 3.0.2

* Fri Jan 14 2022 Yuri N. Sedunov <aris@altlinux.org> 3.0.1-alt1
- 3.0.1

* Sat Sep 18 2021 Yuri N. Sedunov <aris@altlinux.org> 2.9.9-alt2
- disabled OpenMP support for %%e2k (ilyakurdyukov@)

* Fri Sep 03 2021 Yuri N. Sedunov <aris@altlinux.org> 2.9.9-alt1
- 2.9.9

* Sat Jul 17 2021 Yuri N. Sedunov <aris@altlinux.org> 2.9.8-alt1
- 2.9.8

* Sun Apr 11 2021 Yuri N. Sedunov <aris@altlinux.org> 2.9.7-alt1
- 2.9.7

* Tue Feb 09 2021 Yuri N. Sedunov <aris@altlinux.org> 2.9.6-alt1
- 2.9.6

* Sat Feb 06 2021 Yuri N. Sedunov <aris@altlinux.org> 2.9.5-alt1
- 2.9.5

* Tue Nov 24 2020 Yuri N. Sedunov <aris@altlinux.org> 2.9.4-alt1
- 2.9.4

* Tue Nov 17 2020 Yuri N. Sedunov <aris@altlinux.org> 2.9.3-alt1
- 2.9.3

* Sat Sep 05 2020 Yuri N. Sedunov <aris@altlinux.org> 2.9.2-alt1
- 2.9.2

* Tue Jun 23 2020 Yuri N. Sedunov <aris@altlinux.org> 2.9.1-alt1
- 2.9.1

* Tue Apr 07 2020 Aleksei Nikiforov <darktemplar@altlinux.org> 2.9.0-alt2
- Fixed build with opencv-4.3.0.

* Mon Mar 30 2020 Yuri N. Sedunov <aris@altlinux.org> 2.9.0-alt1
- 2.9.0

* Tue Feb 11 2020 Yuri N. Sedunov <aris@altlinux.org> 2.8.4-alt1
- 2.8.4

* Fri Jan 24 2020 Yuri N. Sedunov <aris@altlinux.org> 2.8.3-alt1
- 2.8.3

* Wed Jan 15 2020 Yuri N. Sedunov <aris@altlinux.org> 2.8.2-alt1
- 2.8.2

* Thu Dec 19 2019 Yuri N. Sedunov <aris@altlinux.org> 2.8.1-alt1
- 2.8.1

* Fri Dec 06 2019 Yuri N. Sedunov <aris@altlinux.org> 2.8.0-alt1
- 2.8.0

* Sat Oct 12 2019 Yuri N. Sedunov <aris@altlinux.org> 2.7.4-alt1
- 2.7.4

* Wed Sep 04 2019 Yuri N. Sedunov <aris@altlinux.org> 2.7.1-alt1
- 2.7.1

* Thu Aug 15 2019 Yuri N. Sedunov <aris@altlinux.org> 2.7.0-alt1
- 2.7.0

* Tue Jul 02 2019 Yuri N. Sedunov <aris@altlinux.org> 2.6.7-alt1
- 2.6.7

* Sat Jun 08 2019 Yuri N. Sedunov <aris@altlinux.org> 2.6.5-alt1
- 2.6.5

* Tue May 14 2019 Yuri N. Sedunov <aris@altlinux.org> 2.6.2-alt1
- 2.6.2

* Wed Mar 20 2019 Yuri N. Sedunov <aris@altlinux.org> 2.5.3-alt1
- 2.5.3

* Wed Jan 09 2019 Yuri N. Sedunov <aris@altlinux.org> 2.4.4-alt1
- 2.4.4

* Tue Oct 09 2018 Yuri N. Sedunov <aris@altlinux.org> 2.4.0-alt1
- 2.4.0

* Sun Aug 19 2018 Yuri N. Sedunov <aris@altlinux.org> 2.3.4-alt1
- 2.3.4

* Fri Jun 29 2018 Yuri N. Sedunov <aris@altlinux.org> 2.3.2-alt1
- 2.3.2

* Wed Jun 27 2018 Yuri N. Sedunov <aris@altlinux.org> 2.3.1-alt1
- 2.3.1

* Thu May 17 2018 Yuri N. Sedunov <aris@altlinux.org> 2.2.3-alt1
- 2.2.3

* Fri Apr 13 2018 Yuri N. Sedunov <aris@altlinux.org> 2.2.2-alt1
- 2.2.2

* Sat Feb 17 2018 Yuri N. Sedunov <aris@altlinux.org> 2.2.0-alt1
- 2.2.0

* Thu Jan 25 2018 Yuri N. Sedunov <aris@altlinux.org> 2.1.9-alt1
- 2.1.9

* Fri May 12 2017 Yuri N. Sedunov <aris@altlinux.org> 1.7.9.1-alt1
- 1.7.9.1

* Thu Nov 17 2016 Yuri N. Sedunov <aris@altlinux.org> 1.7.8-alt1
- 1.7.8

* Wed Jun 08 2016 Yuri N. Sedunov <aris@altlinux.org> 1.7.2-alt1
- 1.7.2

* Wed May 11 2016 Yuri N. Sedunov <aris@altlinux.org> 1.7.1-alt1
- 1.7.1

* Tue Apr 12 2016 Sergey Bolshakov <sbolshakov@altlinux.ru> 1.7.0-alt2
- fix build for non-x86 arches

* Mon Apr 11 2016 Yuri N. Sedunov <aris@altlinux.org> 1.7.0-alt1
- 1.7.0

* Fri Dec 18 2015 Yuri N. Sedunov <aris@altlinux.org> 1.6.8-alt1
- 1.6.8

* Sat Oct 31 2015 Yuri N. Sedunov <aris@altlinux.org> 1.6.7-alt1
- 1.6.7

* Mon Oct 19 2015 Yuri N. Sedunov <aris@altlinux.org> 1.6.6.1-alt1
- 1.6.6.1

* Tue Jun 23 2015 Yuri N. Sedunov <aris@altlinux.org> 1.6.5.0-alt1
- 1.6.5.0

* Fri May 29 2015 Yuri N. Sedunov <aris@altlinux.org> 1.6.3.1-alt1
- 1.6.3.1

* Mon Apr 06 2015 Yuri N. Sedunov <aris@altlinux.org> 1.6.1.0-alt1
- 1.6.1.0

* Wed Dec 24 2014 Yuri N. Sedunov <aris@altlinux.org> 1.6.0.3-alt1
- 1.6.0.3

* Thu Oct 09 2014 Yuri N. Sedunov <aris@altlinux.org> 1.6.0.1-alt1
- 1.6.0.1

* Thu Aug 28 2014 Yuri N. Sedunov <aris@altlinux.org> 1.6.0.0-alt1
- 1.6.0.0

* Sat Nov 16 2013 Yuri N. Sedunov <aris@altlinux.org> 1.5.7.2-alt1
- 1.5.7.2

* Mon Jan 28 2013 Yuri N. Sedunov <aris@altlinux.org> 1.5.3.0-alt1
- 1.5.3.0 (ALT #28117)

* Thu Sep 27 2012 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.5.0.8-alt1.1
- Rebuilt with libopencv2.4

* Sun Jan 08 2012 Victor Forsiuk <force@altlinux.org> 1.5.0.8-alt1
- 1.5.0.8

* Tue Dec 27 2011 Victor Forsiuk <force@altlinux.org> 1.5.0.7-alt1
- 1.5.0.7

* Sat Nov 12 2011 Victor Forsiuk <force@altlinux.org> 1.5.0.6-alt1
- 1.5.0.6

* Wed Aug 31 2011 Victor Forsiuk <force@altlinux.org> 1.5.0.1-alt1
- 1.5.0.1

* Sun Aug 14 2011 Eugeny A. Rostovtsev (REAL) <real at altlinux.org> 1.5.0.0-alt1.1
- Rebuilt with OpenCV 2.3.1

* Sun Jul 10 2011 Victor Forsiuk <force@altlinux.org> 1.5.0.0-alt1
- 1.5.0.0

* Sun Jun 19 2011 Victor Forsiuk <force@altlinux.org> 1.4.9.5-alt1
- 1.4.9.5

* Tue May 10 2011 Victor Forsiuk <force@altlinux.org> 1.4.9.2-alt1
- 1.4.9.2

* Mon Apr 04 2011 Victor Forsiuk <force@altlinux.org> 1.4.9.0-alt1
- 1.4.9.0

* Fri Mar 04 2011 Victor Forsiuk <force@altlinux.org> 1.4.8.2-alt1
- 1.4.8.2

* Mon Feb 21 2011 Victor Forsiuk <force@altlinux.org> 1.4.8.1-alt1
- 1.4.8.1
- Package bash completion file.

* Tue Feb 01 2011 Victor Forsiuk <force@altlinux.org> 1.4.7.4-alt1
- 1.4.7.4

* Wed Dec 01 2010 Victor Forsiuk <force@altlinux.org> 1.4.5.2-alt1
- 1.4.5.2
- Patched to build with libopencv2 (patch by real@).

* Tue Sep 14 2010 Anton Farygin <rider@altlinux.ru> 1.4.1.0-alt1.1
- NMU: rebuild with new ImageMagick

* Thu Sep 09 2010 Victor Forsiuk <force@altlinux.org> 1.4.1.0-alt1
- 1.4.1.0

* Wed Jul 14 2010 Anton Farygin <rider@altlinux.ru> 1.3.4.0-alt1.1
- NMU: rebuild with new ImageMagick

* Tue Mar 09 2010 Victor Forsiuk <force@altlinux.org> 1.3.4.0-alt1
- 1.3.4.0

* Mon Feb 22 2010 Victor Forsiuk <force@altlinux.org> 1.3.3.6-alt1
- 1.3.3.6

* Thu Nov 26 2009 Victor Forsyuk <force@altlinux.org> 1.3.3.0-alt1
- 1.3.3.0

* Wed Aug 26 2009 Victor Forsyuk <force@altlinux.org> 1.3.2.4-alt1
- 1.3.2.4

* Mon Jun 15 2009 Victor Forsyuk <force@altlinux.org> 1.3.2.0-alt1
- 1.3.2.0

* Thu Mar 19 2009 Victor Forsyuk <force@altlinux.org> 1.3.1.1-alt1
- 1.3.1.1

* Wed Mar 11 2009 Victor Forsyuk <force@altlinux.org> 1.3.0.4-alt1
- 1.3.0.4

* Tue Feb 17 2009 Victor Forsyuk <force@altlinux.org> 1.3.0.3-alt1
- Initial build.