git: 0cc44b495ddf - main - graphics/gmic: Restore gmic executable

From: Yuri Victorovich <yuri_at_FreeBSD.org>
Date: Sun, 17 Jul 2022 15:52:51 UTC
The branch main has been updated by yuri:

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

commit 0cc44b495ddff468691ec05fc84e53a59c11635d
Author:     Yuri Victorovich <yuri@FreeBSD.org>
AuthorDate: 2022-07-17 15:50:03 +0000
Commit:     Yuri Victorovich <yuri@FreeBSD.org>
CommitDate: 2022-07-17 15:52:49 +0000

    graphics/gmic: Restore gmic executable
    
    ... that got removed from the port after the upstream refactored
    the build and switched to GNU Make. Special target 'cli' should
    be added for gmic executable to be built.
    
    Reported by:    Andrea Venturoli <ml@netfence.it>
---
 graphics/gmic/Makefile                 | 9 ++++++---
 graphics/gmic/files/patch-Makefile     | 8 --------
 graphics/gmic/files/patch-src_gmic.cpp | 4 ++--
 graphics/gmic/pkg-plist                | 1 +
 4 files changed, 9 insertions(+), 13 deletions(-)

diff --git a/graphics/gmic/Makefile b/graphics/gmic/Makefile
index a788f94cf3cc..21d326cfc23a 100644
--- a/graphics/gmic/Makefile
+++ b/graphics/gmic/Makefile
@@ -1,5 +1,6 @@
 PORTNAME=	gmic
 DISTVERSION=	3.1.5
+PORTREVISION=	1
 CATEGORIES=	graphics
 MASTER_SITES=	https://gmic.eu/files/source/
 DISTNAME=	${PORTNAME}_${DISTVERSION}
@@ -9,7 +10,7 @@ COMMENT=	Framework for image processing
 
 LICENSE=	CeCILL
 LICENSE_NAME=	CeCILL
-LICENSE_FILE=	${WRKSRC}/COPYING
+LICENSE_FILE=	${WRKSRC}/../COPYING
 LICENSE_PERMS=	dist-mirror dist-sell pkg-mirror pkg-sell auto-accept
 
 BROKEN_i386=	error: "c++ crashes, clang-5 and 6 fail: undefined reference to `__atomic_load'"
@@ -30,9 +31,11 @@ USE_XORG=	x11 xau xcb xdmcp
 
 WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVERSION}
 
-MAKE_JOBS_UNSAFE=	yes
+WRKSRC_SUBDIR=	src # because of makefile issues, see https://github.com/dtschump/gmic/issues/405
 
-ALL_TARGET=	lib
+MAKE_JOBS_UNSAFE=	yes # see https://github.com/dtschump/gmic/issues/406
+
+ALL_TARGET=	lib cli # cli is bundled here until https://github.com/dtschump/gmic/issues/407 is fixed, afvter which is would be moved to gmic-cli
 
 PORTSCOUT=	limit:[0-9]\..* # not v.220 and similar
 
diff --git a/graphics/gmic/files/patch-Makefile b/graphics/gmic/files/patch-Makefile
deleted file mode 100644
index 9f3a3102fd42..000000000000
--- a/graphics/gmic/files/patch-Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
---- Makefile.orig	2022-05-16 23:01:27 UTC
-+++ Makefile
-@@ -76,4 +76,4 @@
- all: all
- 
- %:
--	cd src && make $*
-+	cd src && $(MAKE) $*
diff --git a/graphics/gmic/files/patch-src_gmic.cpp b/graphics/gmic/files/patch-src_gmic.cpp
index 4444e383d9ba..aecf74a10055 100644
--- a/graphics/gmic/files/patch-src_gmic.cpp
+++ b/graphics/gmic/files/patch-src_gmic.cpp
@@ -1,5 +1,5 @@
---- src/gmic.cpp.orig	2022-06-30 12:35:34 UTC
-+++ src/gmic.cpp
+--- gmic.cpp.orig	2022-06-30 12:35:34 UTC
++++ gmic.cpp
 @@ -2314,7 +2314,7 @@ inline CImgList<void*>& gmic_runs() {
  }
  
diff --git a/graphics/gmic/pkg-plist b/graphics/gmic/pkg-plist
index b99da8d9407d..ed86a481cb83 100644
--- a/graphics/gmic/pkg-plist
+++ b/graphics/gmic/pkg-plist
@@ -1,3 +1,4 @@
+bin/gmic
 include/gmic.h
 include/gmic_libc.h
 lib/libgmic.so