From b3a7989295bd1da220a47913f0fb7518bb68bb9f8e3390d988b84d7d0bf0451f Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Sun, 15 Sep 2019 16:41:42 +0000 Subject: [PATCH] Update to 2.7.1 OBS-URL: https://build.opensuse.org/package/show/graphics/gmic?expand=0&rev=21 --- _constraints | 2 +- cmake-fixes.patch | 13 --- gmic.changes | 12 +++ gmic.spec | 238 +++++++++++++++++++++++++++------------------ gmic_2.6.3.tar.gz | 3 - gmic_2.7.1.tar.gz | 3 + gmic_qt.desktop | 10 -- gmic_reference.pdf | 3 - 8 files changed, 160 insertions(+), 124 deletions(-) delete mode 100644 cmake-fixes.patch delete mode 100644 gmic_2.6.3.tar.gz create mode 100644 gmic_2.7.1.tar.gz delete mode 100644 gmic_qt.desktop delete mode 100644 gmic_reference.pdf diff --git a/_constraints b/_constraints index 24b5d90..465c5ba 100644 --- a/_constraints +++ b/_constraints @@ -2,7 +2,7 @@ - 1920 + 2200 3 diff --git a/cmake-fixes.patch b/cmake-fixes.patch deleted file mode 100644 index 771d01f..0000000 --- a/cmake-fixes.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: gmic-2.4.5/CMakeLists.txt -=================================================================== ---- gmic-2.4.5.orig/CMakeLists.txt -+++ gmic-2.4.5/CMakeLists.txt -@@ -53,7 +53,7 @@ - # knowledge of the CeCILL and CeCILL-C licenses and that you accept its terms. - # - --cmake_minimum_required(VERSION 3.9) -+cmake_minimum_required(VERSION 3.5) - cmake_policy(SET CMP0046 OLD) - - if(CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR) diff --git a/gmic.changes b/gmic.changes index 69b1b3e..c344118 100644 --- a/gmic.changes +++ b/gmic.changes @@ -1,3 +1,15 @@ +------------------------------------------------------------------- +Sun Sep 8 19:29:39 UTC 2019 - Christophe Giboudeaux + +- Update to 2.7.1, no changelog available +- Use cmake() and pkgconfig() for build requirements when possible +- Run spec-cleaner +- Prepare the spec file for the future gmic-digikam plugin +- Drop cmake-fixes.patch, no longer needed +- Drop gmic_reference.pdf +- Use %cmake_build, remove the ninja dependency +- Trim marketing wording from the description + ------------------------------------------------------------------- Wed May 22 16:05:55 UTC 2019 - Marcus Rueckert diff --git a/gmic.spec b/gmic.spec index 815bd5a..12b81cc 100644 --- a/gmic.spec +++ b/gmic.spec @@ -1,7 +1,7 @@ # # spec file for package gmic # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,56 +12,74 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # + %global _gimpplugindir %(gimptool-2.0 --gimpplugindir)/plug-ins - -%global zart_version 20180503git34f7e48 - -# The macro make_jobs gets overwritten by macros.qt5 => ninja doesn't work -#define __builder ninja - +%if 0%{?suse_version} > 1500 || 0%{?sle_version} >= 150200 +%bcond_without digikam_plugin +%else +%bcond_with digikam_plugin +%endif +# opencv3 is not available for ppc +%ifnarch ppc64 ppc64le +%bcond_without opencv +%else +%bcond_with opencv +%endif Name: gmic -Version: 2.6.3 +Version: 2.7.1 Release: 0 +Summary: GREYC's Magick for Image Computing (denoise and others) +# gmic-qt is GPL-3.0-or-later, zart is CECILL-2.0, libgmic and cli program are +# CECILL-2.1 and CECILL-C +License: CECILL-2.1 AND CECILL-C +Group: Productivity/Graphics/Bitmap Editors URL: https://gmic.eu # Git URL: https://framagit.org/dtschump/gmic Source0: https://gmic.eu/files/source/gmic_%{version}.tar.gz -Source1: gmic_qt.desktop -Source2: gmic_qt.png -Source10: http://gmic.eu/gmic_reference.pdf -Patch: cmake-fixes.patch - -Summary: GREYC's Magick for Image Computing (denoise and others) -License: CECILL-2.1 -Group: Productivity/Graphics/Bitmap Editors - -BuildRequires: cmake -BuildRequires: OpenEXR-devel -BuildRequires: fftw3-devel +Source1: gmic_qt.png +BuildRequires: cmake > 3.8 BuildRequires: fftw3-threads-devel -BuildRequires: gcc-c++ -BuildRequires: gimp-devel -BuildRequires: libGraphicsMagick++-devel -BuildRequires: libcurl-devel -BuildRequires: libjasper-devel -BuildRequires: libjpeg-devel -BuildRequires: libqt5-linguist-devel -BuildRequires: libqt5-qtbase-devel -BuildRequires: libstdc++-devel -BuildRequires: libtiff-devel -BuildRequires: ninja +BuildRequires: pkgconfig +BuildRequires: update-desktop-files +# Not available yet +# %%if %%{with digikam_plugin} +# BuildRequires: cmake(DigikamCore) >= 6.3.0 +# %%endif +BuildRequires: cmake(Qt5Core) +BuildRequires: cmake(Qt5Gui) +BuildRequires: cmake(Qt5LinguistTools) +BuildRequires: cmake(Qt5Network) +BuildRequires: cmake(Qt5Widgets) +BuildRequires: cmake(Qt5Xml) +BuildRequires: pkgconfig(GraphicsMagick++) +BuildRequires: pkgconfig(OpenEXR) +BuildRequires: pkgconfig(fftw3) +BuildRequires: pkgconfig(gimp-2.0) +BuildRequires: pkgconfig(libcurl) +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(libpng) +BuildRequires: pkgconfig(libtiff-4) +BuildRequires: pkgconfig(zlib) +%if %{with opencv} +# in openSUSE >= 15.2, opencv-devel is opencv4 and pkgconfig(opencv) is opencv3 +# ...and opencv3-devel doesn't exist in leap 15.0 and 15.1 +%if 0%{?suse_version} <= 1500 && 0%{?sle_version} < 150200 BuildRequires: opencv-devel -BuildRequires: pkgconfig(Qt5Widgets) +%else +BuildRequires: pkgconfig(opencv) +%endif +%endif %description -G'MIC is an open and full-featured framework for image processing, providing +G'MIC is a framework for image processing, providing several different user interfaces to convert/manipulate/filter/visualize generic image datasets, from 1d scalar signals to 3d+t sequences of multi-spectral volumetric images. Technically speaking, what it does is: -* Define a lightweight but powerful script language (the G'MIC language) +* Define a lightweight language (the G'MIC language) dedicated to the design of image processing operators and pipelines. * Provide several user interfaces embedding the corresponding interpreter: @@ -99,10 +117,12 @@ G'MIC has superior denoising and sharpening capabilities. %package -n libgmic1 Summary: Shared library that belongs to gmic +License: CECILL-2.1 Group: Productivity/Graphics/Bitmap Editors %package -n libgmic-devel Summary: Header and library from gmic for use in other C++ projects +License: CECILL-2.1 Group: Development/Libraries/C and C++ Requires: libgmic1 = %{version} @@ -116,11 +136,12 @@ uses the gmic functionality provided by the gmic library. %package -n gimp-plugin-gmic Summary: GMIC plugin for gimp -Group: Productivity/Graphics/Bitmap Editors License: GPL-3.0-or-later +Group: Productivity/Graphics/Bitmap Editors Requires: gimp -Obsoletes: gmic-gimp -Provides: gmic-gimp +# This package was only available in the 'graphics' repo +Provides: gmic-gimp = %{version} +Obsoletes: gmic-gimp < %{version} %description -n gimp-plugin-gmic This is a plugin for gimp that exposes many of the nice gmic features @@ -128,24 +149,28 @@ for interactive use in gimp. %package -n krita-plugin-gmic Summary: GMIC plugin for krita -Group: Productivity/Graphics/Bitmap Editors License: GPL-3.0-or-later +Group: Productivity/Graphics/Bitmap Editors Requires: krita %description -n krita-plugin-gmic This is a plugin for krita to provide gmic features. -%package doc -Summary: GMIC reference documentation -Group: Productivity/Graphics/Bitmap editors -License: GFDL-1.3-or-later - -%description doc -This is the reference documentation for G'MIC in .pdf format. +# %%if %%{with digikam_plugin} +# %%package -n digikam-plugin-gmic +# Summary: GMIC plugin for digikam +# License: GPL-3.0-or-later +# Group: Productivity/Graphics/Bitmap Editors +# Requires: digikam +# +# %%description -n digikam-plugin-gmic +# This is a plugin for digikam to provide gmic features. +# %%endif %package zart Summary: GMIC GUI for video streams -Group: Productivity/Graphics/Bitmap editors +License: CECILL-2.0 +Group: Productivity/Graphics/Bitmap Editors %description zart ZArt is a computer program whose purpose is to demonstrate the possibilities of @@ -154,61 +179,87 @@ 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. %prep -%autosetup -p1 - -cp %{SOURCE10} . +%setup -q +# Generated file that should not be there +rm -f zart/.qmake.stash %build + +# Leap 15.0 doesn't know %%cmake_build +%{?!cmake_build:%define cmake_build() make %{?_smp_mflags} VERBOSE=1} + # Build gmic %cmake \ -DENABLE_DYNAMIC_LINKING=ON \ - -DBUILD_LIB_STATIC=OFF \ - || cat CMakeFiles/CMakeError.log -%make_jobs + -DBUILD_LIB_STATIC=OFF +%cmake_build + cd .. # Create link for zart dynamic linking ln -s ../build/libgmic.so src/libgmic.so -# Build gmic{_gimp|_krita}_qt +# Build gmic{_gimp|_krita|_digikam}_qt pushd gmic-qt %cmake \ -DENABLE_DYNAMIC_LINKING=ON \ -DGMIC_PATH=%{_builddir}/%{name}-%{version}/src \ -DGMIC_LIB_PATH=%{_builddir}/%{name}-%{version}/build \ - -DGMIC_QT_HOST=gimp \ - || cat CMakeFiles/CMakeError.log -%make_jobs + -DGMIC_QT_HOST=gimp +%cmake_build + cd .. %cmake \ -DENABLE_DYNAMIC_LINKING=ON \ -DGMIC_PATH=%{_builddir}/%{name}-%{version}/src \ -DGMIC_LIB_PATH=%{_builddir}/%{name}-%{version}/build \ - -DGMIC_QT_HOST=krita \ - || cat CMakeFiles/CMakeError.log -%make_jobs + -DGMIC_QT_HOST=krita +%cmake_build + cd .. +# %%if %%{with digikam_plugin} +# %%cmake \ +# -DENABLE_DYNAMIC_LINKING=ON \ +# -DGMIC_PATH=%%{_builddir}/%%{name}-%%{version}/src \ +# -DGMIC_LIB_PATH=%%{_builddir}/%%{name}-%%{version}/build \ +# -DGMIC_QT_HOST=digikam +# %%cmake_build +# +# cd .. +# %%endif + %cmake \ -DENABLE_DYNAMIC_LINKING=ON \ -DGMIC_PATH=%{_builddir}/%{name}-%{version}/src \ -DGMIC_LIB_PATH=%{_builddir}/%{name}-%{version}/build \ - -DGMIC_QT_HOST=none \ - || cat CMakeFiles/CMakeError.log -%make_jobs + -DGMIC_QT_HOST=none +%cmake_build + +cd .. popd +%if %{with opencv} # Build zart pushd zart -qmake-qt5 CONFIG+=release GMIC_DYNAMIC_LINKING=on GMIC_PATH=%{_builddir}/%{name}-%{version}/src zart.pro -make %{?_smp_mflags} +%qmake5 zart.pro \ + CONFIG+=release \ + GMIC_DYNAMIC_LINKING=on \ + GMIC_PATH=%{_builddir}/%{name}-%{version}/src +%make_jobs popd +%endif %install %cmake_install -install -d -m 0755 %{buildroot}%{_sysconfdir}/bash_completion.d -install -m 0644 build/resources/gmic_bashcompletion.sh %{buildroot}%{_sysconfdir}/bash_completion.d/gmic + +install -D -m 0644 %{SOURCE1} %{buildroot}%{_datadir}/pixmaps/gmic_qt.png + +%suse_update_desktop_file -c gmic_qt "G'Mic Qt" "G'MIC Qt GUI" "gmic_qt %%F" gmic_qt "Qt;Graphics;Photography;" + +install -d -m 0755 %{buildroot}%{_datadir}/bash-completion/completions +install -m 0644 build/resources/gmic_bashcompletion.sh %{buildroot}%{_datadir}/bash-completion/completions # Film color lookup tables install -d -m 0755 %{buildroot}%{_gimpplugindir} @@ -226,62 +277,61 @@ install -d -m 0755 %{buildroot}%{_gimpplugindir} install -m 0755 build/gmic_gimp_qt %{buildroot}%{_gimpplugindir}/gmic_gimp_qt popd +# %%if %%{with digikam_plugin} +# # digikam plugin +# install -d -m 0755 %%{buildroot}%%{_libqt5_plugindir}/digikam/editor +# install -m 0755 build/Editor_GmicQt_Plugin.so %%{buildroot}%%{_libqt5_plugindir}/digikam/editor/Editor_GmicQt_Plugin.so +# %%endif + +%if %{with opencv} # zart pushd zart install -m 0755 zart %{buildroot}%{_bindir}/zart popd +%endif -install -D -m 0644 %{S:1} %{buildroot}%{_datadir}/applications/gmic_qt.desktop -install -D -m 0644 %{S:2} %{buildroot}%{_datadir}/pixmaps/gmic_qt.png - -%post -n libgmic1 -%{run_ldconfig} - -%postun -n libgmic1 -%{run_ldconfig} +%post -n libgmic1 -p /sbin/ldconfig +%postun -n libgmic1 -p /sbin/ldconfig %files -%defattr(-,root,root) %license COPYING -#license gmic-qt/COPYING %doc README gmic-qt/README.md %{_bindir}/gmic %{_bindir}/gmic_qt -%{_mandir}/man1/gmic.1* -%config %attr(0644,root,root) /etc/bash_completion.d/gmic +%{_mandir}/man1/gmic.1%{?ext_man} %{_datadir}/applications/gmic_qt.desktop +%dir %{_datadir}/bash-completion +%dir %{_datadir}/bash-completion/completions +%{_datadir}/bash-completion/completions/gmic_bashcompletion.sh %{_datadir}/pixmaps/gmic_qt.png -%files doc -%defattr(-,root,root) -%doc gmic_reference.pdf - +%if %{with opencv} %files zart -%defattr(-,root,root) -#license zart/LICENSE -#doc zart/README %{_bindir}/zart +%endif %files -n gimp-plugin-gmic -%defattr(-,root,root) -#license gmic-qt/COPYING -%doc gmic-qt/README.md +%license COPYING %{_gimpplugindir}/gmic_gimp_qt %{_gimpplugindir}/gmic_cluts.gmz %files -n krita-plugin-gmic -%defattr(-,root,root) -#license gmic-qt/COPYING -%doc gmic-qt/README.md +%license COPYING %{_bindir}/gmic_krita_qt +# %%if %%{with digikam_plugin} +# %%files -n digikam-plugin-gmic +# %%license COPYING +# %%dir %%{_libqt5_plugindir}/digikam +# %%dir %%{_libqt5_plugindir}/digikam/editor +# %%{_libqt5_plugindir}/digikam/editor/Editor_GmicQt_Plugin.so +# %%endif + %files -n libgmic1 -%defattr(-,root,root) %license COPYING %{_libdir}/libgmic.so.* %files -n libgmic-devel -%defattr(-,root,root) %{_includedir}/gmic.h %{_libdir}/libgmic.so %{_libdir}/cmake/gmic/ diff --git a/gmic_2.6.3.tar.gz b/gmic_2.6.3.tar.gz deleted file mode 100644 index 34428d9..0000000 --- a/gmic_2.6.3.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9a3947850ad8e6997039ebf8d03ce8ac371f2a01c3ec6330e7d8d447932cbb47 -size 5537926 diff --git a/gmic_2.7.1.tar.gz b/gmic_2.7.1.tar.gz new file mode 100644 index 0000000..c907286 --- /dev/null +++ b/gmic_2.7.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c71e784abd2141252efad505b6a48b6974c388788db5530b3ca0dfb07baeafeb +size 5843308 diff --git a/gmic_qt.desktop b/gmic_qt.desktop deleted file mode 100644 index 900b6b3..0000000 --- a/gmic_qt.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Value=1.0 -Type=Application -Name=G'MIC Qt -GenericName=G'MIC Qt GUI -Comment=GREYC's Magic for Image Computing -Icon=gmic_qt -Exec=/usr/bin/gmic_qt %F -Categories=Graphics;Photography;Qt; -Terminal=false diff --git a/gmic_reference.pdf b/gmic_reference.pdf deleted file mode 100644 index 1fa04ba..0000000 --- a/gmic_reference.pdf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2b926aaf95417accf734b6f1bb866d1541a7f79033b0d89ba03ef07f499d13d1 -size 60443455