Rebuild with OpenEXR/Imath 3.

This commit is contained in:
Richard Shaw 2021-07-31 10:54:44 -05:00
parent 5e7f19fb93
commit 80dc95d4ac
2 changed files with 45 additions and 1 deletions

31
gmic-openexr3.patch Normal file
View File

@ -0,0 +1,31 @@
Index: gmic-2.9.7/cmake/FindCImg.cmake
===================================================================
--- gmic-2.9.7.orig/cmake/FindCImg.cmake
+++ gmic-2.9.7/cmake/FindCImg.cmake
@@ -147,7 +147,10 @@ if(ENABLE_JPEG)
endif()
if(ENABLE_OPENEXR)
- find_package(OpenEXR)
+ find_package(OpenEXR CONFIG)
+ if(NOT TARGET OpenEXR::OpenEXR)
+ find_package(OpenEXR)
+ endif()
if(OpenEXR_FOUND)
list(APPEND CLI_COMPILE_FLAGS "cimg_use_openexr")
Index: gmic-2.9.7/src/Makefile
===================================================================
--- gmic-2.9.7.orig/src/Makefile
+++ gmic-2.9.7/src/Makefile
@@ -308,8 +308,8 @@ MAGICK_LIBS = $(shell pkg-config --libs
# Enable native support of EXR image files, using the OpenEXR library.
# (http://www.openexr.com/)
-OPENEXR_CFLAGS = -Dcimg_use_openexr -I$(USR)/$(INCLUDE)/OpenEXR
-OPENEXR_LIBS = -lIlmImf -lHalf
+OPENEXR_CFLAGS = -Dcimg_use_openexr -I$(USR)/$(INCLUDE)/OpenEXR -I$(USR)/$(INCLUDE)/Imath
+OPENEXR_LIBS = -lOpenEXR -lImath
# Enable Fast Fourier Transforms, using the FFTW3 library.
# (http://www.fftw.org/)

View File

@ -10,7 +10,7 @@
Summary: GREYC's Magic for Image Computing
Name: gmic
Version: 2.9.8
Release: 2%{?dist}
Release: 3%{?dist}
Source0: https://gmic.eu/files/source/%{name}_%{version}.tar.gz
# GIT archive snapshot of https://github.com/c-koi/zart
Source1: zart-%{zart_version}.tar.gz
@ -29,7 +29,12 @@ BuildRequires: libtiff-devel
BuildRequires: libpng-devel
BuildRequires: libjpeg-devel
BuildRequires: fftw-devel
%if 0%{?fedora} > 34
BuildRequires: openexr-devel
BuildRequires: imath-devel
%else
BuildRequires: OpenEXR-devel
%endif
BuildRequires: zlib-devel
BuildRequires: gimp-devel-tools
BuildRequires: hdf5-devel
@ -45,6 +50,7 @@ BuildRequires: make
# package despite being a shared library
Obsoletes: gmic-static <= 2.1.8
Patch0: gmic-openexr3.patch
Patch2: Makefile_arch.patch
@ -81,6 +87,10 @@ Provides a plugin for using G'MIC from GIMP
%prep
%setup -q -a 1 -a 2 -a 3
%if 0%{?fedora} > 34
%patch0 -p1
%endif
%ifarch armv7hl s390x ppc64le
%patch2 -p1 -b.arch
%endif
@ -189,6 +199,9 @@ fi
%{gimpplugindir}/gmic_cluts.gmz
%changelog
* Sat Jul 31 2021 Richard Shaw <hobbes1069@gmail.com> - 2.9.8-3
- Rebuild with OpenEXR/Imath 3.
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.9.8-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild