git: 08be7df55951 - main - graphics/gmic-qt: Update to 3.2.6

From: Jason E. Hale <jhale_at_FreeBSD.org>
Date: Fri, 14 Jul 2023 15:00:30 UTC
The branch main has been updated by jhale:

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

commit 08be7df55951c645512c20e7231ccdda2f6fc2a0
Author:     Jason E. Hale <jhale@FreeBSD.org>
AuthorDate: 2023-07-14 14:21:37 +0000
Commit:     Jason E. Hale <jhale@FreeBSD.org>
CommitDate: 2023-07-14 14:59:01 +0000

    graphics/gmic-qt: Update to 3.2.6
    
    Remove the krita flavor. The Krita plugin is now maintained as a
    separate fork, so a new port graphics/krita-gmic-plugin has been
    created for it.
    
    The GMIC option has also been removed from graphics/krita to avoid
    circular dependencies, because the plugin now requires libraries
    provided by the krita package.
---
 MOVED                                              |  1 +
 graphics/Makefile                                  |  1 +
 graphics/gmic-qt/Makefile                          | 34 +++++++++------
 graphics/gmic-qt/distinfo                          | 20 ++++-----
 graphics/gmic-qt/files/patch-CMakeLists.txt        | 29 ++++++++-----
 graphics/gmic-qt/files/patch-gmic_src_gmic.cpp     | 20 ---------
 graphics/krita-gmic-plugin/Makefile                | 50 ++++++++++++++++++++++
 graphics/krita-gmic-plugin/distinfo                |  3 ++
 .../krita-gmic-plugin/files/patch-CMakeLists.txt   | 31 ++++++++++++++
 graphics/krita-gmic-plugin/pkg-descr               |  6 +++
 graphics/krita/Makefile                            |  7 +--
 11 files changed, 141 insertions(+), 61 deletions(-)

diff --git a/MOVED b/MOVED
index a83cfa7062a2..093c6f03d39a 100644
--- a/MOVED
+++ b/MOVED
@@ -7772,3 +7772,4 @@ devel/rubygem-grape15|devel/rubygem-grape|2023-07-09|Remove obsoleted port. Use
 net/rubygem-net-ldap017|net/rubygem-net-ldap|2023-07-09|Remove obsoleted port. Use net/rubygem-net-ldap instead
 textproc/rubygem-nokogiri114|textproc/rubygem-nokogiri|2023-07-09|Remove obsoleted port. Use textproc/rubygem-nokogiri instead
 japanese/kterm||2023-07-12|Has expired: Last upstream release was in 2011
+graphics/gmic-qt@krita|graphics/krita-gmic-plugin|2023-07-14|Forked to a seperate project
diff --git a/graphics/Makefile b/graphics/Makefile
index 0843c50195b9..7a5011259ce2 100644
--- a/graphics/Makefile
+++ b/graphics/Makefile
@@ -426,6 +426,7 @@
     SUBDIR += kqtquickcharts
     SUBDIR += kquickimageeditor
     SUBDIR += krita
+    SUBDIR += krita-gmic-plugin
     SUBDIR += ksanecore
     SUBDIR += kseexpr
     SUBDIR += ksnip
diff --git a/graphics/gmic-qt/Makefile b/graphics/gmic-qt/Makefile
index 3b0c80b69cff..c216f2858d8d 100644
--- a/graphics/gmic-qt/Makefile
+++ b/graphics/gmic-qt/Makefile
@@ -1,31 +1,32 @@
 PORTNAME=	gmic-qt
 DISTVERSIONPREFIX=	v.
-DISTVERSION=	2.9.8
+DISTVERSION=	3.2.6
 PORTEPOCH=	1
 CATEGORIES=	graphics kde
 MASTER_SITES=	http://gmic.eu/:stdlib \
 		LOCAL/tcberner/${PORTNAME}/${PORTVERSION}:stdlib
-DISTFILES=	gmic_stdlib${DISTVERSION:S/.//g}.h:stdlib
+DISTFILES=	gmic_stdlib_community${DISTVERSION:S/.//g}.h:stdlib
 DIST_SUBDIR=	KDE/${PORTNAME}/${PORTVERSION}
 EXTRACT_ONLY=	${DISTNAME}.tar.gz ${DISTFILE_gmic} ${DISTFILE_cimg}
 
 MAINTAINER=	kde@FreeBSD.org
-COMMENT=	Versatile Qt front-end to GMIC
+COMMENT=	Versatile Qt front-end to G'MIC
 WWW=		https://github.com/c-koi/gmic-qt
 
 LICENSE=	GPLv3+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
+BUILD_DEPENDS=	bash:shells/bash \
+		gmake:devel/gmake
 LIB_DEPENDS=	libcurl.so:ftp/curl \
 		libfftw3.so:math/fftw3 \
 		libpng.so:graphics/png
 
-FLAVORS=	none krita gimp # reflect the value of GMIC_QT_HOST for simplicity
+FLAVORS=	none gimp # reflect the value of GMIC_QT_HOST for simplicity
 FLAVOR?=	${FLAVORS:[1]}
-krita_PKGNAMESUFFIX=	-krita
 gimp_PKGNAMESUFFIX=	-gimp
 
-USES=		cmake pkgconfig qt:5 xorg
+USES=		cmake pkgconfig qt:5 shebangfix xorg
 .if !exists(/usr/include/omp.h)
 USES+=		compiler:gcc-c++11-lib
 .else
@@ -37,15 +38,18 @@ USE_XORG=	ice sm x11 xext
 
 USE_GITHUB=	yes
 GH_ACCOUNT=	c-koi
-GH_TUPLE=	dtschump:gmic:${DISTVERSIONFULL}:gmic/gmic \
-		dtschump:CImg:${DISTVERSIONFULL}:cimg
+GH_TUPLE=	GreycLab:gmic:${DISTVERSIONFULL}:gmic/gmic \
+		GreycLab:CImg:${DISTVERSIONFULL}:cimg
+
+SHEBANG_FILES=	translations/lrelease.sh \
+		translations/filters/csv2ts.sh \
+		translations/filters/ts2csv.sh
 
 # Use the extracted cimg/gmic & Co, as we do not want to depend on graphics/gimp
 # which would get pulled in by graphics/cimg.
 CMAKE_ARGS=	-DGMIC_QT_HOST:STRING="${FLAVOR}" \
 		-DGMIC_PATH:STRING="${WRKSRC_gmic}/src"
-
-PLIST_FILES=	bin/gmic_${FLAVOR:S/$/_/:S/none_//}qt
+CMAKE_OFF=	ENABLE_SYSTEM_GMIC
 
 PORTSCOUT=	limit:[0-9]\..*
 
@@ -56,14 +60,16 @@ LIB_DEPENDS+=	libbabl-0.1.so:x11/babl \
 		libjson-glib-1.0.so:devel/json-glib
 USES+=		gettext-runtime gnome
 USE_GNOME=	cairo gdkpixbuf2 glib20
+PLUGINS_DIR=	libexec/gimp/2.2/plug-ins/gmic_gimp_qt
+.else
+PLUGINS_DIR=	bin
 .endif
 
+PLIST_FILES=	${PLUGINS_DIR}/gmic_${FLAVOR:S/$/_/:S/none_//}qt
+
 pre-configure:
 # Copy the necessary files
 	${CP} ${WRKSRC_cimg}/CImg.h ${WRKSRC_gmic}/src
-	${CP} ${DISTDIR}/${DIST_SUBDIR}/gmic_stdlib${DISTVERSION:S/.//g}.h ${WRKSRC_gmic}/src/gmic_stdlib.h
-
-do-install:
-	${INSTALL_PROGRAM} ${BUILD_WRKSRC}/gmic_${FLAVOR:S/$/_/:S/none_//}qt ${STAGEDIR}${PREFIX}/bin
+	${CP} ${DISTDIR}/${DIST_SUBDIR}/gmic_stdlib_community${DISTVERSION:S/.//g}.h ${WRKSRC_gmic}/src/gmic_stdlib_community.h
 
 .include <bsd.port.mk>
diff --git a/graphics/gmic-qt/distinfo b/graphics/gmic-qt/distinfo
index 44a9b160245f..946c4b7fbdc2 100644
--- a/graphics/gmic-qt/distinfo
+++ b/graphics/gmic-qt/distinfo
@@ -1,11 +1,9 @@
-TIMESTAMP = 1626846718
-SHA256 (KDE/gmic-qt/2.9.8/gmic_stdlib298.h) = 733cbf91bccffc3b309125cb2bd95abc4bf2ba28afafa2e1bd31c567357808c0
-SIZE (KDE/gmic-qt/2.9.8/gmic_stdlib298.h) = 2663736
-SHA256 (KDE/gmic-qt/2.9.8/c-koi-gmic-qt-v.2.9.8_GH0.tar.gz) = ba7d2dcc6463456f492b85b4ea14794bf080f423c57ff022567611daa47095a6
-SIZE (KDE/gmic-qt/2.9.8/c-koi-gmic-qt-v.2.9.8_GH0.tar.gz) = 1391496
-SHA256 (KDE/gmic-qt/2.9.8/dtschump-gmic-v.2.9.8_GH0.tar.gz) = f45c254f39c076e3f58adddff7a25c24bf85aad7a0b8e410b961f39ee17ce5d9
-SIZE (KDE/gmic-qt/2.9.8/dtschump-gmic-v.2.9.8_GH0.tar.gz) = 104274071
-SHA256 (KDE/gmic-qt/2.9.8/dtschump-CImg-v.2.9.8_GH0.tar.gz) = 0fac49fca534fd5e1c116da538a49fb2be52fb01f61101f87d35b8fa52a81290
-SIZE (KDE/gmic-qt/2.9.8/dtschump-CImg-v.2.9.8_GH0.tar.gz) = 11271978
-SHA256 (KDE/gmic-qt/2.9.8/64cdd2cdd416ec43171753eddf55a7b3fda0d33b.patch) = 656494c72f5a2b380a637070eacc1924bc372db5bd0ab25892a835a941ed389e
-SIZE (KDE/gmic-qt/2.9.8/64cdd2cdd416ec43171753eddf55a7b3fda0d33b.patch) = 692
+TIMESTAMP = 1689283287
+SHA256 (KDE/gmic-qt/3.2.6/gmic_stdlib_community326.h) = 50f3dd2232077b23f6bc45dd439d5d3286f6cdb28ef9ea9bf78b2824944e3e94
+SIZE (KDE/gmic-qt/3.2.6/gmic_stdlib_community326.h) = 7259311
+SHA256 (KDE/gmic-qt/3.2.6/c-koi-gmic-qt-v.3.2.6_GH0.tar.gz) = f2339dadf6c1976f493fa580fe6a70ce750cf93dc366c7c7e50af16db0ae8275
+SIZE (KDE/gmic-qt/3.2.6/c-koi-gmic-qt-v.3.2.6_GH0.tar.gz) = 1249360
+SHA256 (KDE/gmic-qt/3.2.6/GreycLab-gmic-v.3.2.6_GH0.tar.gz) = eb5169e98909951fc14775da249f87cde545abb93fa9ff69df0f78800b9af593
+SIZE (KDE/gmic-qt/3.2.6/GreycLab-gmic-v.3.2.6_GH0.tar.gz) = 107572168
+SHA256 (KDE/gmic-qt/3.2.6/GreycLab-CImg-v.3.2.6_GH0.tar.gz) = 1fcca9a7a453aa278660c10d54c6db9b4c614b6a29250adeb231e95a0be209e7
+SIZE (KDE/gmic-qt/3.2.6/GreycLab-CImg-v.3.2.6_GH0.tar.gz) = 12661485
diff --git a/graphics/gmic-qt/files/patch-CMakeLists.txt b/graphics/gmic-qt/files/patch-CMakeLists.txt
index e8f974239750..13905de59bf0 100644
--- a/graphics/gmic-qt/files/patch-CMakeLists.txt
+++ b/graphics/gmic-qt/files/patch-CMakeLists.txt
@@ -1,15 +1,22 @@
---- CMakeLists.txt.orig	2021-07-21 06:15:34 UTC
+--- CMakeLists.txt.orig	2023-06-22 09:41:32 UTC
 +++ CMakeLists.txt
-@@ -233,6 +233,12 @@ if(ENABLE_CURL)
+@@ -309,6 +309,7 @@ if (UNIX)
+         set(gmic_qt_LIBRARIES
+             ${gmic_qt_LIBRARIES}
+             ${X11_LIBRARIES} # XXX: Search for X11: Wayland is coming!
++            Threads::Threads
+         )
      endif()
  endif()
+@@ -622,9 +623,9 @@ message("Producing translation .qm files")
+ endif(ENABLE_DYNAMIC_LINKING)
  
-+find_package(Threads)
-+set(gmic_qt_LIBRARIES
-+    ${gmic_qt_LIBRARIES}
-+    Threads::Threads
-+)
-+
- add_definitions(-Dgmic_build)
- add_definitions(-Dcimg_use_abort)
- add_definitions(-Dgmic_is_parallel)
+ message("Producing translation .qm files")
+-execute_process(COMMAND make WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/translations OUTPUT_QUIET)
++execute_process(COMMAND gmake WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/translations OUTPUT_QUIET)
+ message("Producing filter translation .qm files")
+-execute_process(COMMAND make WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/translations/filters OUTPUT_QUIET)
++execute_process(COMMAND gmake WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/translations/filters OUTPUT_QUIET)
+ 
+ set(gmic_qt_QRC
+     gmic_qt.qrc
diff --git a/graphics/gmic-qt/files/patch-gmic_src_gmic.cpp b/graphics/gmic-qt/files/patch-gmic_src_gmic.cpp
deleted file mode 100644
index 6163681b3ef8..000000000000
--- a/graphics/gmic-qt/files/patch-gmic_src_gmic.cpp
+++ /dev/null
@@ -1,20 +0,0 @@
---- gmic/src/gmic.cpp.orig	2021-07-16 09:15:32 UTC
-+++ gmic/src/gmic.cpp
-@@ -2443,7 +2443,7 @@ double gmic::mp_store(const Ts *const ptr, const unsig
- // Manage correspondence between abort pointers and thread ids.
- CImgList<void*> gmic::list_p_is_abort = CImgList<void*>();
- bool *gmic::abort_ptr(bool *const p_is_abort) {
--#if defined(__MACOSX__) || defined(__APPLE__)
-+#if defined(__MACOSX__) || defined(__APPLE__) || defined(__FreeBSD__)
-   void* tid = (void*)(cimg_ulong)getpid();
- #elif cimg_OS==1
-   void* tid = (void*)(cimg_ulong)syscall(SYS_gettid);
-@@ -2781,7 +2781,7 @@ gmic::~gmic() {
-   cimg::exception_mode(cimg_exception_mode);
-   cimg_forX(display_windows,l) delete &display_window(l);
-   cimg::mutex(21);
--#if defined(__MACOSX__) || defined(__APPLE__)
-+#if defined(__MACOSX__) || defined(__APPLE__) || defined(__FreeBSD__)
-   void* tid = (void*)(cimg_ulong)getpid();
- #elif cimg_OS==1
-   void* tid = (void*)(cimg_ulong)syscall(SYS_gettid);
diff --git a/graphics/krita-gmic-plugin/Makefile b/graphics/krita-gmic-plugin/Makefile
new file mode 100644
index 000000000000..6c3bc48e2892
--- /dev/null
+++ b/graphics/krita-gmic-plugin/Makefile
@@ -0,0 +1,50 @@
+PORTNAME=	gmic
+DISTVERSIONPREFIX=	v
+DISTVERSION=	3.2.4.1
+CATEGORIES=	graphics kde
+PKGNAMEPREFIX=	krita-
+PKGNAMESUFFIX=	-plugin
+DIST_SUBDIR=	KDE/${PKGBASE}/${PORTVERSION}
+
+MAINTAINER=	kde@FreeBSD.org
+COMMENT=	Krita native plugin for G'MIC
+WWW=		https://github.com/amyspark/gmic
+
+LICENSE=	GPLv3+
+LICENSE_FILE=	${WRKSRC}/COPYING
+
+BUILD_DEPENDS=	bash:shells/bash \
+		gmake:devel/gmake
+LIB_DEPENDS=	libcurl.so:ftp/curl \
+		libfftw3.so:math/fftw3 \
+		libkritaqmicinterface.so:graphics/krita \
+		libpng.so:graphics/png
+
+USES=		cmake kde:5 pkgconfig qt:5 shebangfix xorg
+.if !exists(/usr/include/omp.h)
+USES+=		compiler:gcc-c++11-lib
+.else
+USES+=		compiler:c++14-lang
+.endif
+USE_KDE=	coreaddons ecm:build
+USE_QT=		core gui network widgets \
+		buildtools:build linguisttools:build qmake:build
+USE_XORG=	ice sm x11 xext
+
+USE_GITHUB=	yes
+GH_ACCOUNT=	amyspark
+
+SHEBANG_FILES=	translations/lrelease.sh \
+		translations/filters/csv2ts.sh \
+		translations/filters/ts2csv.sh
+
+CMAKE_ARGS=	-DGMIC_QT_HOST:STRING="krita-plugin"
+CMAKE_OFF=	ENABLE_SYSTEM_GMIC
+
+WRKSRC_SUBDIR=	gmic-qt
+
+PLIST_FILES=	lib/kritaplugins/krita_gmic_qt.so \
+		share/gmic/gmic_cluts.gmz \
+		share/gmic/gmic_denoise_cnn.gmz
+
+.include <bsd.port.mk>
diff --git a/graphics/krita-gmic-plugin/distinfo b/graphics/krita-gmic-plugin/distinfo
new file mode 100644
index 000000000000..43a63b62b1a1
--- /dev/null
+++ b/graphics/krita-gmic-plugin/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1689342192
+SHA256 (KDE/krita-gmic-plugin/3.2.4.1/amyspark-gmic-v3.2.4.1_GH0.tar.gz) = e3da2bb4eacf18812abbf673e40aed42ab21a72d493ec0cc9da029ad5d4cb37b
+SIZE (KDE/krita-gmic-plugin/3.2.4.1/amyspark-gmic-v3.2.4.1_GH0.tar.gz) = 11805689
diff --git a/graphics/krita-gmic-plugin/files/patch-CMakeLists.txt b/graphics/krita-gmic-plugin/files/patch-CMakeLists.txt
new file mode 100644
index 000000000000..fee865a8d5dd
--- /dev/null
+++ b/graphics/krita-gmic-plugin/files/patch-CMakeLists.txt
@@ -0,0 +1,31 @@
+--- CMakeLists.txt.orig	2023-05-04 22:27:01 UTC
++++ CMakeLists.txt
+@@ -153,7 +153,7 @@ find_package(Threads REQUIRED)
+ #
+ # Qt
+ #
+-find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Core)
++find_package(QT NAMES Qt5 REQUIRED COMPONENTS Core)
+ find_package(Qt${QT_VERSION_MAJOR} ${MIN_QT_VERSION}
+         REQUIRED COMPONENTS
+         Core
+@@ -328,6 +328,7 @@ if (UNIX)
+         set(gmic_qt_LIBRARIES
+             ${gmic_qt_LIBRARIES}
+             ${X11_LIBRARIES} # XXX: Search for X11: Wayland is coming!
++            Threads::Threads
+         )
+     endif()
+ endif()
+@@ -645,9 +646,9 @@ if (UNIX OR APPLE OR MSYS)
+ 
+ if (UNIX OR APPLE OR MSYS)
+   message("Producing translation .qm files")
+-  execute_process(COMMAND make WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/translations OUTPUT_QUIET)
++  execute_process(COMMAND gmake WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/translations OUTPUT_QUIET)
+   message("Producing filter translation .qm files")
+-  execute_process(COMMAND make WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/translations/filters OUTPUT_QUIET)
++  execute_process(COMMAND gmake WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/translations/filters OUTPUT_QUIET)
+ else()
+   set(gmic_translation_files
+       translations/cs.ts
diff --git a/graphics/krita-gmic-plugin/pkg-descr b/graphics/krita-gmic-plugin/pkg-descr
new file mode 100644
index 000000000000..a403726f12c8
--- /dev/null
+++ b/graphics/krita-gmic-plugin/pkg-descr
@@ -0,0 +1,6 @@
+Native Krita plugin for the image processing framework G'MIC.
+
+More than 500 filters are already available, sorted by category
+(Artistic, Black & white, Colors, Contours, Deformations, Degradations,
+Details, Film emulation, Frames, Layers, Light & shadows, Patterns,
+Rendering, Repair, Sequences, etc.).
diff --git a/graphics/krita/Makefile b/graphics/krita/Makefile
index 5bc4cf1a2c4e..a1c51ea116ca 100644
--- a/graphics/krita/Makefile
+++ b/graphics/krita/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	krita
 DISTVERSION=	5.1.5
-PORTREVISION=	14
+PORTREVISION=	15
 CATEGORIES=	graphics kde
 MASTER_SITES=	KDE/stable/${PORTNAME}/${DISTVERSION}
 DIST_SUBDIR=	KDE/${PORTNAME}
@@ -53,13 +53,10 @@ USE_XORG=	ice sm xcb xext xi
 
 CMAKE_ARGS=	-DCMAKE_DISABLE_FIND_PACKAGE_PyQt5:BOOL=true
 
-OPTIONS_DEFINE=		GMIC OPENEXR
+OPTIONS_DEFINE=		OPENEXR
 OPTIONS_DEFAULT=	OPENEXR
 OPTIONS_SUB=		yes
 
-GMIC_DESC=		Depend on the G'Mic plugin #'
-GMIC_RUN_DEPENDS=	gmic_krita_qt:graphics/gmic-qt@krita
-
 OPENEXR_LIB_DEPENDS=	libOpenEXR.so:graphics/openexr \
 			libKSeExpr.so:graphics/kseexpr
 OPENEXR_CMAKE_BOOL_OFF=	CMAKE_DISABLE_FIND_PACKAGE_OpenEXR