git: ebc45c65d8a0 - main - graphics/krita: make compatible with OpenEXR/Imath 3.0

Matthias Andree mandree at FreeBSD.org
Mon Apr 12 00:34:29 UTC 2021


The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ebc45c65d8a00399d3cea9e68c8310f5e97f9b99

commit ebc45c65d8a00399d3cea9e68c8310f5e97f9b99
Author:     Matthias Andree <mandree at FreeBSD.org>
AuthorDate: 2021-04-11 04:05:34 +0000
Commit:     Matthias Andree <mandree at FreeBSD.org>
CommitDate: 2021-04-12 00:33:42 +0000

    graphics/krita: make compatible with OpenEXR/Imath 3.0
    
    While here, add HEIF as a hard requisite for consistency
    because it is automatically picked up by the build if present
    and becomes more commonplace these days.
---
 graphics/krita/Makefile                            | 10 ++++---
 .../files/patch-cmake_modules_FindOpenEXR.cmake    | 33 ++++++++++++++++++++++
 .../patch-plugins_impex_exr_exr__converter.cc      | 11 ++++++++
 graphics/krita/pkg-plist                           |  3 ++
 4 files changed, 53 insertions(+), 4 deletions(-)

diff --git a/graphics/krita/Makefile b/graphics/krita/Makefile
index 3959d2f73f2f..7e4bfec1f5a8 100644
--- a/graphics/krita/Makefile
+++ b/graphics/krita/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	krita
 DISTVERSION=	4.4.1
-PORTREVISION=	11
+PORTREVISION=	12
 CATEGORIES=	graphics kde
 MASTER_SITES=	KDE/stable/${PORTNAME}/${DISTVERSION}
 DIST_SUBDIR=	KDE/${PORTNAME}
@@ -11,7 +11,7 @@ COMMENT=	Sketching and painting program
 LICENSE=	GPLv2
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-LIB_DEPENDS=	libImath.so:graphics/ilmbase \
+LIB_DEPENDS=	libImath.so:math/Imath \
 		libOpenColorIO.so:graphics/opencolorio \
 		libX11.so:x11/libX11 \
 		libboost_system.so:devel/boost-libs \
@@ -20,6 +20,7 @@ LIB_DEPENDS=	libImath.so:graphics/ilmbase \
 		libcurl.so:ftp/curl \
 		libgif.so:graphics/giflib \
 		libgsl.so:math/gsl \
+		libheif.so:graphics/libheif \
 		liblcms2.so:graphics/lcms2 \
 		libpng.so:graphics/png \
 		libpoppler.so:graphics/poppler \
@@ -50,7 +51,7 @@ OPTIONS_SUB=		yes
 GMIC_DESC=		Depend on the G'Mic plugin #'
 GMIC_RUN_DEPENDS=	gmic_krita_qt:graphics/gmic-qt at krita
 
-OPENEXR_LIB_DEPENDS=	libIlmImf.so:graphics/openexr \
+OPENEXR_LIB_DEPENDS=	libOpenEXR.so:graphics/openexr \
 			libSeExpr2.so:graphics/seexpr
 OPENEXR_CMAKE_BOOL_OFF=	CMAKE_DISABLE_FIND_PACKAGE_OpenEXR
 
@@ -59,6 +60,7 @@ CONFLICTS_INSTALL=	calligra-2*
 PLIST_SUB=	SHLIB_VER=20.0.0 \
 		SHLIB_SHVER=20
 
-LDFLAGS=	-lpthread
+CFLAGS+=	-I${LOCALBASE}/include/Imath
+LDFLAGS+=	-lpthread
 
 .include <bsd.port.mk>
diff --git a/graphics/krita/files/patch-cmake_modules_FindOpenEXR.cmake b/graphics/krita/files/patch-cmake_modules_FindOpenEXR.cmake
new file mode 100644
index 000000000000..24d095385c2e
--- /dev/null
+++ b/graphics/krita/files/patch-cmake_modules_FindOpenEXR.cmake
@@ -0,0 +1,33 @@
+--- cmake/modules/FindOpenEXR.cmake.orig	2020-10-28 11:42:28 UTC
++++ cmake/modules/FindOpenEXR.cmake
+@@ -23,7 +23,7 @@
+ #
+ 
+ find_path(OPENEXR_INCLUDE_DIR
+-    OpenEXR/half.h
++    OpenEXR/ImfHeader.h
+ HINTS
+     "${OPENEXR_LOCATION}"
+     "$ENV{OPENEXR_LOCATION}"
+@@ -57,11 +57,10 @@ if(OPENEXR_INCLUDE_DIR)
+ endif()
+ 
+ foreach(OPENEXR_LIB
+-    Half
+     Iex
+-    Imath
+-    IlmImf
++    OpenEXR
+     IlmThread
++    Imath
+     )
+ 
+     # OpenEXR libraries may be suffixed with the version number, so we search
+@@ -87,6 +86,7 @@ endforeach(OPENEXR_LIB)
+ # So #include <half.h> works
+ list(APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR})
+ list(APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR}/OpenEXR)
++list(APPEND OPENEXR_INCLUDE_DIRS ${OPENEXR_INCLUDE_DIR}/Imath)
+ 
+ include(FindPackageHandleStandardArgs)
+ find_package_handle_standard_args(OpenEXR
diff --git a/graphics/krita/files/patch-plugins_impex_exr_exr__converter.cc b/graphics/krita/files/patch-plugins_impex_exr_exr__converter.cc
new file mode 100644
index 000000000000..9633eb3962b8
--- /dev/null
+++ b/graphics/krita/files/patch-plugins_impex_exr_exr__converter.cc
@@ -0,0 +1,11 @@
+--- plugins/impex/exr/exr_converter.cc.orig	2020-10-28 11:42:28 UTC
++++ plugins/impex/exr/exr_converter.cc
+@@ -24,6 +24,8 @@
+ 
+ #include <ImfAttribute.h>
+ #include <ImfChannelList.h>
++#include <ImfFrameBuffer.h>
++#include <ImfHeader.h>
+ #include <ImfInputFile.h>
+ #include <ImfOutputFile.h>
+ 
diff --git a/graphics/krita/pkg-plist b/graphics/krita/pkg-plist
index 6d586007501f..ded32bdf7da7 100644
--- a/graphics/krita/pkg-plist
+++ b/graphics/krita/pkg-plist
@@ -1038,3 +1038,6 @@ share/locale/xh/LC_MESSAGES/krita.mo
 share/locale/zh_CN/LC_MESSAGES/krita.mo
 share/locale/zh_TW/LC_MESSAGES/krita.mo
 share/metainfo/org.kde.krita.appdata.xml
+lib/kritaplugins/kritaheifexport.so
+lib/kritaplugins/kritaheifimport.so
+share/applications/krita_heif.desktop


More information about the dev-commits-ports-all mailing list