Accepting request 814571 from graphics

- Update to 2.9.1. No changelog.
- Add patch to allow building gmic with older CMake versions:
  * 0001-Don-t-use-CMake-commands-not-available-in-CMake-3.9.patch
- Move the bash completion file to its own package

OBS-URL: https://build.opensuse.org/request/show/814571
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/gmic?expand=0&rev=10
This commit is contained in:
Dominique Leuenberger 2020-06-15 18:29:22 +00:00 committed by Git OBS Bridge
commit b5afdc341b
5 changed files with 100 additions and 21 deletions

View File

@ -0,0 +1,66 @@
From a913fd2cd5512723be26704d01d9a7e7039f3491 Mon Sep 17 00:00:00 2001
From: Christophe Giboudeaux <christophe@krop.fr>
Date: Sun, 14 Jun 2020 14:57:05 +0200
Subject: [PATCH] Don't use CMake commands not available in CMake 3.9
---
cmake/FindCImg.cmake | 24 +++++++++++++++---------
1 file changed, 15 insertions(+), 9 deletions(-)
diff --git a/cmake/FindCImg.cmake b/cmake/FindCImg.cmake
index fbc3f9c..47d1771 100644
--- a/cmake/FindCImg.cmake
+++ b/cmake/FindCImg.cmake
@@ -65,7 +65,8 @@ if(ENABLE_CURL)
if(CURL_FOUND)
list(APPEND COMPILE_FLAGS "cimg_use_curl")
- list(APPEND EXTRA_LIBRARY_TARGETS CURL::libcurl)
+ list(APPEND EXTRA_LIBRARY_TARGETS ${CURL_LIBRARIES})
+ list(APPEND HEADER_DIR ${CURL_INCLUDE_DIRS})
endif()
endif()
@@ -74,10 +75,11 @@ if(ENABLE_X)
find_package(X11)
if(X11_FOUND)
- list(APPEND COMPILE_FLAGS "cimg_display=1" "cimg_appname=\"gmic\"")
- list(APPEND EXTRA_LIBRARY_TARGETS X11::X11)
+ list(APPEND COMPILE_FLAGS cimg_display=1 cimg_appname=\"gmic\")
+ list(APPEND EXTRA_LIBRARY_TARGETS ${X11_LIBRARIES})
+ list(APPEND HEADER_DIR ${X11_INCLUDE_DIR})
else()
- list(APPEND COMPILE_FLAGS "cimg_display=0" "cimg_appname=\"gmic\"")
+ list(APPEND COMPILE_FLAGS cimg_display=0 cimg_appname=\"gmic\")
endif()
if(ENABLE_XSHM AND X11_XShm_FOUND)
@@ -142,7 +144,8 @@ if(ENABLE_JPEG)
if(JPEG_FOUND)
list(APPEND CLI_COMPILE_FLAGS "cimg_use_jpeg")
- list(APPEND EXTRA_LIBRARY_TARGETS JPEG::JPEG)
+ list(APPEND EXTRA_LIBRARY_TARGETS ${JPEG_LIBRARIES})
+ list(APPEND HEADER_DIR ${JPEG_INCLUDE_DIRS})
endif()
endif()
@@ -169,7 +172,10 @@ endif()
add_library(CImg::CImg INTERFACE IMPORTED)
-target_compile_definitions(CImg::CImg INTERFACE ${COMPILE_FLAGS} ${CLI_COMPILE_FLAGS})
-target_link_options(CImg::CImg INTERFACE ${LINK_FLAGS})
-target_link_libraries(CImg::CImg INTERFACE ${EXTRA_LIBRARY_TARGETS})
-target_include_directories(CImg::CImg INTERFACE ${HEADER_DIR})
+set(CIMG_BUILD_FLAGS ${COMPILE_FLAGS} ${CLI_COMPILE_FLAGS})
+
+set_target_properties(CImg::CImg PROPERTIES
+ INTERFACE_COMPILE_DEFINITIONS "${CIMG_BUILD_FLAGS}"
+ INTERFACE_INCLUDE_DIRECTORIES "${HEADER_DIR}"
+ INTERFACE_LINK_LIBRARIES "${EXTRA_LIBRARY_TARGETS}"
+)
--
2.27.0

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Sun Jun 14 09:25:43 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>
- Update to 2.9.1. No changelog.
- Add patch to allow building gmic with older CMake versions:
* 0001-Don-t-use-CMake-commands-not-available-in-CMake-3.9.patch
- Move the bash completion file to its own package
-------------------------------------------------------------------
Sat Mar 28 19:04:56 UTC 2020 - Christophe Giboudeaux <christophe@krop.fr>

View File

@ -38,7 +38,7 @@
%bcond_with opencv
%endif
Name: gmic
Version: 2.9.0
Version: 2.9.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
@ -49,7 +49,9 @@ URL: https://gmic.eu
# Git URL: https://framagit.org/dtschump/gmic
Source0: https://gmic.eu/files/source/gmic_%{version}.tar.gz
Source1: gmic_qt.png
BuildRequires: cmake > 3.8
# PATCH-FIX-UPSTREAM
Patch: 0001-Don-t-use-CMake-commands-not-available-in-CMake-3.9.patch
BuildRequires: cmake >= 3.9.4
BuildRequires: fftw3-threads-devel
BuildRequires: pkgconfig
BuildRequires: update-desktop-files
@ -72,12 +74,12 @@ 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
%else
# gmic first looks for opencv 4 first and falls back to opencv 3 if not found.
# opencv in not available in leap <= 15.2
%if 0%{?suse_version} <= 1500
BuildRequires: pkgconfig(opencv)
%else
BuildRequires: pkgconfig(opencv4)
%endif
%endif
@ -150,16 +152,21 @@ 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 bash-completion
Summary: Bash completion for gmic
Requires: bash-completion
Supplements: (%{name} and bash-completion)
%description bash-completion
This package contain de bash completion command for gmic.
%prep
%setup -q
%autosetup -p1
# 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 \
@ -230,9 +237,6 @@ 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}
install -m 0644 resources/gmic_cluts.gmz %{buildroot}%{_gimpplugindir}/gmic_cluts.gmz
@ -272,9 +276,6 @@ popd
%{_bindir}/gmic_qt
%{_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
%if %{with opencv}
@ -308,4 +309,8 @@ popd
%{_libdir}/libgmic.so
%{_libdir}/cmake/gmic/
%files bash-completion
%dir %{_datadir}/bash-completion/completions
%{_datadir}/bash-completion/completions/gmic
%changelog

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6233695f9b27999dcc7cc3aa7480b0f192bd44de85209091a3b4b8a65ae8c4b5
size 6195597

3
gmic_2.9.1.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:50c9dd418b8d0e80c703c2e2b179b6049343567483d37d9ff6c642c6ede95d8d
size 6212626