%define major 3 %define libname %mklibname %{name} %{major} %define develname %mklibname %{name} -d %define lib_ver %(echo %{version}|sed -e 's/\\.//g') %define zart_version d014169343f835381ad232ee11e077326561c9eb %define gimpplugin 1 %define abi_version 3.0 %bcond_without krita_plugin Name: gmic Version: 3.5.3 Release: %mkrel 1 Summary: A script language (G'MIC) dedicated to image processing Group: Graphics/Utilities # CeCILL version 2.0 License: CeCILL Url: https://gmic.eu/ Source0: https://gmic.eu/files/source/%{name}_%{version}.tar.gz Source1: https://github.com/GreycLab/gmic-community/archive/gmic-3.4.3/%{name}-community-3.4.3.tar.gz Source2: zart.desktop Source3: https://github.com/c-koi/zart/archive/%{zart_version}.tar.gz Patch0: gmic-3.5.0-mga-optflags.patch Patch2: gmic-3.5.3-qmake-flags.patch Patch3: gmic-3.3.3-ldflags.patch Patch4: gmic-dont-add-rpaths.patch # patches (10,11) come from opensuse to enable krita plugin Patch10: 0001-Find-the-local-gmic-library.patch Patch11: krita5.patch BuildRequires: dos2unix BuildRequires: cimg-devel BuildRequires: ffmpeg-devel BuildRequires: cmake(Qt5Core) BuildRequires: cmake(Qt5Gui) BuildRequires: cmake(Qt5Network) BuildRequires: cmake(Qt5Widgets) BuildRequires: cmake(Qt5Xml) BuildRequires: cmake(Qt6Core) BuildRequires: cmake(Qt6Gui) BuildRequires: cmake(Qt6LinguistTools) BuildRequires: cmake(Qt6Network) BuildRequires: cmake(Qt6Widgets) BuildRequires: cmake(Qt6Xml) BuildRequires: pkgconfig(GraphicsMagick) BuildRequires: pkgconfig(fftw3) BuildRequires: pkgconfig(libcurl) BuildRequires: pkgconfig(opencv) %if %{gimpplugin} BuildRequires: pkgconfig(gimp-%{abi_version}) %else Obsoletes: gimp-plugin-gmic < %{version}-%{release} %endif BuildRequires: wget %if %{with krita_plugin} BuildRequires: kf5-rpm-macros BuildRequires: krita-devel BuildRequires: cmake(Qt5LinguistTools) %else Obsoletes: krita-plugin-gmic < %{version}-%{release} %endif Provides: %{name}-qt = %{version}-%{release} %description G'MIC defines a complete image processing framework, and thus can manage generic image data as other image-related tools. Anyway, the specific features described below make it a bit particular : * It internally works with lists of images. Image manipulations and interactions can be done either grouped or focused on specific items. * It can process a wide variety of image types, including multi-spectral (arbitrary number of channels) and 3d volumetric images, as well as image sequences, or 3d vector objects. Images with different pixel types are supported, allowing to process flawlessly images with 8bits or 16bits integers per channel, as well as float-valued datasets. * It provides small but efficient visualization modules dedicated to the exploration/viewing of 2d/3d multi-spectral images, 3d vector objects (elevation map, isocurves, isosurfaces,...), or 1d graph plots. * It proposes commands to handle custom interactive windows where events can be managed easily by the user. * It is highly extensible through the importation of custom command files which add new commands that become understood by the language interpreter. %if %{gimpplugin} * Most of the functionalities can be used inside GIMP via the provided plug-in, allowing end-users to integrate any G'MIC-based pipeline directly in a nice GUI, without coding efforts. %endif * It is based on the latest development versions of the CImg Library, a well established C++ template image processing toolkit, developed by the same team of developers. %files -f %{name}.lang %doc README %license COPYING %{_bindir}/%{name} %{_bindir}/%{name}_qt %{_datadir}/bash-completion/completions/%{name} %{_mandir}/man1/%{name}.1.* %{_datadir}/applications/gmic_qt.desktop %{_iconsdir}/hicolor/*/*/gmic_qt.png %{_iconsdir}/hicolor/*/*/gmic_qt.svg #------------------------------------------------------ %package -n zart Summary: GUI for G'MIC real-time manipulations on the output of a webcam Group: Graphics/Utilities Provides: %{name}-zart = %{version}-%{release} %description -n 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. %files -n zart %license zart/LICENSE %{_bindir}/zart %{_datadir}/applications/zart.desktop %{_iconsdir}/hicolor/*/*/zart.png %{_iconsdir}/hicolor/*/*/zart.svg #------------------------------------------------------ %if %{gimpplugin} %package -n gimp-plugin-%{name} Summary: gmic plugin for gimp Group: Graphics/Utilities Requires: gimp >= 2.6.0 Provides: %{name}-gimp = %{version}-%{release} %description -n gimp-plugin-%{name} G'MIC has been made available as an easy-to-use plug-in for GIMP. It extends this retouching software capabilities by offering a large number of pre-defined image filters and effects. Of course, the plug-in is highly customizable and it is possible to add your own custom G'MIC-written filters in it. %files -n gimp-plugin-%{name} %{_libdir}/gimp/%{abi_version}/plug-ins/%{name}_gimp_qt %{_datadir}/gmic/ %endif #------------------------------------------------------ %if %{with krita_plugin} %package -n krita-plugin-%{name} Summary: gmic plugin for krita Group: Graphical desktop/KDE Requires: krita Provides: %{name}-krita = %{version}-%{release} %description -n krita-plugin-%{name} This is a plugin for krita to provide G'MIC features. %files -n krita-plugin-%{name} %{_kf5_libdir}/kritaplugins/krita_gmic_qt.so %endif #------------------------------------------------------ %package -n %{libname} Summary: Library for gmic Group: System/Libraries %description -n %{libname} This package contains the library needed to run programs dynamically linked with gmic. %files -n %{libname} %{_libdir}/lib*%{name}.so.%{major}{,.*} %{_libdir}/lib*%{name}.so.%{lib_ver} #------------------------------------------------------ %package -n %{develname} Summary: Header file for gmic Group: Development/C++ Requires: %{libname} = %{version}-%{release} Provides: %{name}-devel = %{version}-%{release} %description -n %{develname} This package contains the development file for gmic. %files -n %{develname} %{_includedir}/%{name}*.h %{_libdir}/lib*%{name}.so #------------------------------------------------------ %prep %setup -q -a 1 -a 3 #dos2unix src/Makefile %patch -P0 -p1 %patch -P2 -p1 %patch -P3 -p1 %patch -P4 -p1 %if %{with krita_plugin} %patch -P10 -p1 %patch -P11 -p1 %endif # fix file-not-utf8 iconv -f iso8859-1 -t utf-8 COPYING > COPYING.conv && mv -f COPYING.conv COPYING # prepare libcgmic from community mv %{name}-community-gmic-3.4.3/libcgmic/* ./src mv zart-%{zart_version} zart # We want to build against the system installed CImg package. # G'MIC provides no way todo this, so we just copy the file over what's there already pushd src #mv CImg.h CImg.h.bak #ln -s /usr/include/CImg.h CImg.h popd %build %set_build_flags pushd src %if %{gimpplugin} %make_build -j1 all libc NOSTRIP=1 LIB=%{_lib} MAKE="%make_build -j1" %else %make_build -j1 cli lib libc gmic_qt zart NOSTRIP=1 LIB=%{_lib} MAKE="%make_build -j1" %endif popd pushd zart %qmake_qt5 zart.pro %make_build popd %if %{with krita_plugin} pushd gmic-qt %cmake_kf5 \ -DENABLE_SYSTEM_GMIC=ON \ -DENABLE_DYNAMIC_LINKING=ON \ -DGMIC_QT_HOST=krita-plugin %cmake_build popd %endif %install pushd src %make_install LIB=%{_lib} %if ! %{gimpplugin} find %{buildroot} -name '*.gmz' -delete %endif popd pushd zart install -m 0755 zart %{buildroot}%{_bindir}/zart install -Dm 0644 %{SOURCE2} %{buildroot}%{_datadir}/applications/zart.desktop install -Dm 0644 images/gmic_hat.png %{buildroot}%{_iconsdir}/hicolor/64x64/apps/zart.png popd %if %{with krita_plugin} pushd gmic-qt %cmake_install popd %endif %find_lang %{name} --with-man %changelog * Sun Mar 23 2025 daviddavid 3.5.3-1.mga10 + Revision: 2169207 - new version: 3.5.3 - switch to gimp v3 * Sun Jan 26 2025 daviddavid 3.5.0-1.mga10 + Revision: 2142524 - new version: 3.5.0 - switch gmic-qt to Qt6 - zart and krita-plugin not yet ported to Qt5 * Sat Sep 14 2024 wally 3.4.0-2.mga10 + Revision: 2096245 - rebuild for opencv 4.10.0 * Thu Jun 27 2024 daviddavid 3.4.0-1.mga10 + Revision: 2077186 - new version: 3.4.0 * Sat Jan 20 2024 daviddavid 3.3.3-1.mga10 + Revision: 2032682 - new version: 3.3.3 * Thu Oct 19 2023 daviddavid 3.2.5-3.mga10 + Revision: 1999331 - rebuild for new krita 5.2.0 * Fri Jun 16 2023 daviddavid 3.2.5-2.mga9 + Revision: 1962080 - krita-plugin do not need gmic main pkg - add more virtual provides * Sat Jun 10 2023 daviddavid 3.2.5-1.mga9 + Revision: 1961608 - new version: 3.2.5 - enable krita plugin with opensuse patches (mga#31999) * Tue Jan 17 2023 daviddavid 3.2.0-1.mga9 + Revision: 1934132 - new version: 3.2.0 * Fri Jan 06 2023 papoteur 3.1.6-1.mga9 + Revision: 1930557 -new 3.1.6 -add zart sources * Mon Dec 12 2022 ns80 2.9.7-7.mga9 + Revision: 1921035 - rebuild for new libtiff * Wed Nov 02 2022 ghibo 2.9.7-6.mga9 + Revision: 1901475 - Rebuild for newer opencv * Tue Nov 01 2022 ghibo 2.9.7-5.mga9 + Revision: 1900939 - Rebuild against opencv 4.6.0 * Tue Apr 05 2022 umeabot 2.9.7-4.mga9 + Revision: 1845318 - Mageia 9 Mass Rebuild * Mon Dec 27 2021 wally 2.9.7-3.mga9 + Revision: 1764441 - modify qmake patch to use our linker flags to avoid overlinking * Mon Dec 27 2021 wally 2.9.7-2.mga9 + Revision: 1764290 - add patch to use our linker flags and use dynamic linking with qmake builds - drop old obsoletes and conflicts - rebuild for openexr 3.1.3 * Sat Apr 10 2021 daviddavid 2.9.7-1.mga9 + Revision: 1714502 - new version: 2.9.7 * Tue Mar 02 2021 daviddavid 2.9.6-1.mga9 + Revision: 1696075 - new version: 2.9.6 - re-enable gmic 2 plugin * Fri Jan 01 2021 luigiwalser 2.9.4-3.mga8 + Revision: 1667502 - obsolete gimp2.0 plugin - try rebuilding gimp plugin * Wed Dec 16 2020 umeabot 2.9.4-2.mga8 + Revision: 1658495 - Rebuild for new Qt5 * Tue Nov 24 2020 daviddavid 2.9.4-1.mga8 + Revision: 1649024 - new version: 2.9.4 * Tue Nov 24 2020 daviddavid 2.9.3-1.mga8 + Revision: 1648883 - new version: 2.9.3 (mga#27651) * Sat Oct 31 2020 joequant 2.9.2-1.mga8 + Revision: 1640802 - add icons - fix gmic - use cp and not ln - update wget - fix typo - add CImg.h - update and rebuild * Sat Sep 26 2020 tv 2.9.1-2.mga8 + Revision: 1630189 - rebuild for new libIlmImf * Sun Jul 12 2020 daviddavid 2.9.1-1.mga8 + Revision: 1605505 - new version: 2.9.1 * Wed Feb 19 2020 umeabot 2.8.3-2.mga8 + Revision: 1544524 - Mageia 8 Mass Rebuild * Sun Jan 26 2020 daviddavid 2.8.3-1.mga8 + Revision: 1483145 - new version: 2.8.3 - rebuild for new opencv 4.2.0 + wally - replace deprecated %%setup_compile_flags * Wed Oct 30 2019 daviddavid 2.7.5-1.mga8 + Revision: 1456797 - new version: 2.7.5 * Tue Sep 03 2019 daviddavid 2.7.1-1.mga8 + Revision: 1436545 - new version: 2.7.1 * Tue Aug 20 2019 daviddavid 2.7.0-1.mga8 + Revision: 1430430 - new version: 2.7.0 * Tue Jul 02 2019 daviddavid 2.6.7-1.mga8 + Revision: 1417557 - new version: 2.6.7 * Wed Apr 17 2019 daviddavid 2.5.7-1.mga7 + Revision: 1391860 - new version: 2.5.7 * Wed Apr 10 2019 daviddavid 2.5.6-1.mga7 + Revision: 1387857 - new version: 2.5.6 * Tue Apr 02 2019 daviddavid 2.5.5-1.mga7 + Revision: 1385355 - new version: 2.5.5 * Sat Mar 30 2019 umeabot 2.5.4-2.mga7 + Revision: 1381811 - Qt5 Rebuild * Mon Mar 25 2019 daviddavid 2.5.4-1.mga7 + Revision: 1380051 - new version: 2.5.4 * Sun Mar 17 2019 daviddavid 2.5.3-1.mga7 + Revision: 1378416 - new version: 2.5.3 * Sun Mar 17 2019 daviddavid 2.5.2-1.mga7 + Revision: 1378279 - new version: 2.5.2 * Wed Jan 30 2019 daviddavid 2.4.5-1.mga7 + Revision: 1361876 - new version: 2.4.5 * Sat Dec 22 2018 daviddavid 2.4.3-1.mga7 + Revision: 1344407 - new version: 2.4.3 * Mon Dec 03 2018 daviddavid 2.4.2-1.mga7 + Revision: 1337985 - new version: 2.4.2 * Sat Nov 03 2018 daviddavid 2.4.1-3.mga7 + Revision: 1328000 - also add Obsoletes to ease upgrade mga6 -> mga7 * Thu Nov 01 2018 daviddavid 2.4.1-2.mga7 + Revision: 1327286 - add Conflicts to ease upgrade mga6 -> mga7 * Wed Oct 31 2018 daviddavid 2.4.1-1.mga7 + Revision: 1326819 - new version: 2.4.1 * Tue Oct 16 2018 daviddavid 2.4.0-2.mga7 + Revision: 1320944 - rebuild for new ilmbase and openexr 2.3.0 * Fri Oct 05 2018 daviddavid 2.4.0-1.mga7 + Revision: 1317897 - new version: 2.4.0 * Wed Sep 05 2018 daviddavid 2.3.6-1.mga7 + Revision: 1257227 - new version: 2.3.6 * Sun Jul 22 2018 daviddavid 2.3.3-1.mga7 + Revision: 1244770 - new version: 2.3.3 - remove merged upstream patches * Tue May 29 2018 daviddavid 2.2.3-1.mga7 + Revision: 1232898 - new version: 2.2.3 + wally - rebuild for openexr 2.2.1 * Mon May 14 2018 daviddavid 2.0.0-5.mga7 + Revision: 1229309 - rebuild for new gegl 0.4.0 * Fri Apr 13 2018 daviddavid 2.0.0-4.mga7 + Revision: 1218319 - rebuild for new opencv 3.4.1 * Sat Jan 13 2018 wally 2.0.0-3.mga7 + Revision: 1192560 - rebuild for new ilmbase * Mon Jun 05 2017 akien 2.0.0-2.mga6 + Revision: 1106978 - Properly prevent the Makefile from fetching sources - Remove additional sources already in S0 - only the patch is needed * Mon Jun 05 2017 akien 2.0.0-1.mga6 + Revision: 1106867 - Bundle the headers that would otherwise be downloaded - Version 2.0.0 * Tue May 02 2017 akien 1.7.9-2.mga6 + Revision: 1098288 - Rebuild for ffmpeg 3.3 * Sun Dec 11 2016 daviddavid 1.7.9-1.mga6 + Revision: 1074202 - new version: 1.7.9 - now zart and libcgmic are in a separate community tarball * Mon May 02 2016 daviddavid 1.7.1-3.mga6 + Revision: 1008738 - disable also parallel build on other arches - try to disable parallel build on arm as compilation needs a lot of memory resource * Sun May 01 2016 daviddavid 1.7.1-1.mga6 + Revision: 1008503 - new version: 1.7.1 - rename and rediff nostrip-and-nozart patch * Mon Feb 08 2016 umeabot 1.6.9-2.mga6 + Revision: 950773 - Mageia 6 Mass Rebuild * Mon Feb 08 2016 daviddavid 1.6.9-1.mga6 + Revision: 943875 - new version: 1.6.9 - rename and rediff nostrip-and-nozart patch * Fri Feb 05 2016 daviddavid 1.6.8-2.mga6 + Revision: 936947 - disable optimizations flags in upstream makefile * Thu Feb 04 2016 daviddavid 1.6.8-1.mga6 + Revision: 936015 - new version: 1.6.8 - switch zart build to Qt5 - remove no more needed makefile patch - patch0: fix prevent of stripping binaries and disable zart compilation to use our %%qmake_qt5 macro to ensure proper build flags - add a desktop file and an icon for zart subpackage - new upstream URL and Source URL - switch BRs to pkgconfig() and add pkgconfig(libcurl) * Thu Nov 20 2014 matteo 1.6.0.1-1.mga5 + Revision: 797964 - convert makefile line endings to unix format - fix zart install - fix lib installation path - rediff/redo makefile patch - new version 1.6.0.1 * Wed Oct 15 2014 umeabot 1.5.7.0-6.mga5 + Revision: 744551 - Second Mageia 5 Mass Rebuild * Tue Sep 16 2014 umeabot 1.5.7.0-5.mga5 + Revision: 679668 - Mageia 5 Mass Rebuild * Sun Aug 24 2014 luigiwalser 1.5.7.0-4.mga5 + Revision: 666993 - rebuild for ilmbase and OpenEXR * Thu May 01 2014 luigiwalser 1.5.7.0-3.mga5 + Revision: 619151 - rebuild for ilmbase * Sat Oct 19 2013 umeabot 1.5.7.0-2.mga4 + Revision: 534522 - Mageia 4 Mass Rebuild * Thu Sep 12 2013 wally 1.5.7.0-1.mga4 + Revision: 478179 - new version 1.5.7.0 - rediff/redo makefile patch * Thu Sep 12 2013 fwang 1.5.5.0-7.mga4 + Revision: 477935 - use correct ldflags * Thu Sep 12 2013 fwang 1.5.5.0-6.mga4 + Revision: 477861 - rebuild for new openexr * Sat Aug 24 2013 wally 1.5.5.0-5.mga4 + Revision: 471410 - drop requires added in previous release as seems like libs aren't needed to run gmic/zart * Sat Aug 24 2013 wally 1.5.5.0-4.mga4 + Revision: 471356 - use find_lang macro - add requires - add .so file to devel pkg * Sat Aug 24 2013 wally 1.5.5.0-3.mga4 + Revision: 471333 - clean lib pkg requires/obsoletes/provides - clean unneeded conflicts * Mon Jun 03 2013 fwang 1.5.5.0-2.mga4 + Revision: 435939 - rebuild for new libpng * Mon Mar 25 2013 matteo 1.5.5.0-1.mga3 + Revision: 405194 - new version * Wed Feb 06 2013 matteo 1.5.4.0-1.mga3 + Revision: 394769 - new version * Sat Jan 12 2013 umeabot 1.5.2.4-2.mga3 + Revision: 351865 - Mass Rebuild - https://wiki.mageia.org/en/Feature:Mageia3MassRebuild + boklm - Update group: Graphics/Other -> Graphics/Utilities * Mon Dec 10 2012 matteo 1.5.2.4-1.mga3 + Revision: 329360 - new version * Sun Dec 02 2012 fwang 1.5.2.1-2.mga3 + Revision: 325027 - rebuild for new openexr * Sat Nov 03 2012 matteo 1.5.2.1-1.mga3 + Revision: 313458 - fixed subpackages group - fixed group - new version * Tue Sep 04 2012 fwang 1.5.1.9-2.mga3 + Revision: 287848 - update ldflags * Tue Sep 04 2012 matteo 1.5.1.9-1.mga3 + Revision: 287809 - new version * Sat Aug 18 2012 matteo 1.5.1.8-1.mga3 + Revision: 281962 - new version * Sat Jul 28 2012 matteo 1.5.1.7-1.mga3 + Revision: 275079 - new version * Sat Jun 23 2012 matteo 1.5.1.6-2.mga3 + Revision: 262775 - added missing br graphicsmagick-devel - removed gimp-plugin unnecessary requirement * Fri Jun 22 2012 matteo 1.5.1.6-1.mga3 + Revision: 262700 - new upstream version 1.5.1.6 * Wed Jun 20 2012 matteo 1.5.1.5-3.mga3 + Revision: 262241 - fix obsoletes to solve dependencies error * Tue Jun 19 2012 matteo 1.5.1.5-2.mga3 + Revision: 261831 - fix gmic and gimp-plugin-gmic descriptions - fix unversioned provide (zart) - remove old and unnecessary patches * Mon Jun 18 2012 matteo 1.5.1.5-1.mga3 + Revision: 261822 - moved gimp requirement from gmic to gimp-plugin-gmic - libname description improved - imported package gmic