From 1876dba72843c6c60f32c964721a5883a926d1ea Mon Sep 17 00:00:00 2001 From: ryoon Date: Sat, 23 May 2020 10:44:02 +0000 Subject: [PATCH] gmic: Update to 2.9.0 * Include zart command to process video. Changelog: Not available. --- graphics/gmic/DESCR | 2 +- graphics/gmic/Makefile | 34 +++----- graphics/gmic/PLIST | 11 ++- graphics/gmic/distinfo | 14 +-- graphics/gmic/patches/patch-src_Makefile | 105 ++++------------------- graphics/gmic/patches/patch-src_gmic.cpp | 30 +++++++ graphics/gmic/patches/patch-src_gmic.h | 13 --- 7 files changed, 74 insertions(+), 135 deletions(-) create mode 100644 graphics/gmic/patches/patch-src_gmic.cpp delete mode 100644 graphics/gmic/patches/patch-src_gmic.h diff --git a/graphics/gmic/DESCR b/graphics/gmic/DESCR index eb077f5dcb66..9ae3dd68f73e 100644 --- a/graphics/gmic/DESCR +++ b/graphics/gmic/DESCR @@ -4,4 +4,4 @@ convert/manipulate/filter/visualize generic image datasets, from 1d scalar signals to 3d+t sequences of multi-spectral volumetric images. -The package contains a command line tool and a gimp plugin. +The package contains command line tools and a gimp plugin. diff --git a/graphics/gmic/Makefile b/graphics/gmic/Makefile index 54ccfd050f9d..9e48a0b67a9f 100644 --- a/graphics/gmic/Makefile +++ b/graphics/gmic/Makefile @@ -1,41 +1,35 @@ -# $NetBSD: Makefile,v 1.18 2020/05/21 20:53:43 ryoon Exp $ +# $NetBSD: Makefile,v 1.19 2020/05/23 10:44:02 ryoon Exp $ -DISTNAME= gmic_1.5.9.3 +DISTNAME= gmic_2.9.0 PKGNAME= ${DISTNAME:S/_/-/} -PKGREVISION= 16 CATEGORIES= graphics -MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gmic/} +MASTER_SITES= https://gmic.eu/files/source/ MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= https://sourceforge.net/projects/gmic/ +HOMEPAGE= https://gmic.eu/ COMMENT= Full-featured image processing framework LICENSE= gnu-gpl-v2 WRKSRC= ${WRKDIR}/${PKGNAME_NOREV} BUILD_DIRS= src -USE_LANGUAGES= c++ -USE_TOOLS+= gmake gunzip pkg-config -CFLAGS+= -I${BUILDLINK_PREFIX.openexr}/include/OpenEXR -MAKE_ENV+= BUILDLINK_PREFIX.fftw3=${BUILDLINK_PREFIX.fftw3} +USE_LANGUAGES= c c++11 +USE_TOOLS+= gmake pkg-config +MAKE_FLAGS+= USR=${PREFIX} +MAKE_FLAGS+= QMAKE=${QTDIR}/bin/qmake +BUILD_TARGET= cli gimp lib zart -post-install: - cd ${DESTDIR}${PREFIX}/${PKGMANDIR}/fr/man1 && gunzip gmic.1.gz - cd ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1 && gunzip gmic.1.gz +MANCOMPRESSED= yes -.include "../../devel/atk/buildlink3.mk" .include "../../devel/glib2/buildlink3.mk" -.include "../../devel/pango/buildlink3.mk" -.include "../../fonts/fontconfig/buildlink3.mk" -.include "../../graphics/cairo/buildlink3.mk" -.include "../../graphics/freetype2/buildlink3.mk" -.include "../../graphics/gdk-pixbuf2/buildlink3.mk" +.include "../../devel/zlib/buildlink3.mk" +.include "../../graphics/opencv/buildlink3.mk" .include "../../mk/jpeg.buildlink3.mk" .include "../../graphics/png/buildlink3.mk" .include "../../graphics/tiff/buildlink3.mk" .include "../../graphics/openexr/buildlink3.mk" .include "../../graphics/gimp/buildlink3.mk" .include "../../math/fftw/buildlink3.mk" +.include "../../www/curl/buildlink3.mk" .include "../../x11/libX11/buildlink3.mk" -.include "../../x11/libXfixes/buildlink3.mk" -.include "../../x11/gtk2/buildlink3.mk" +.include "../../x11/qt5-qtbase/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/graphics/gmic/PLIST b/graphics/gmic/PLIST index 6c27e66b6f86..685ddb1ed636 100644 --- a/graphics/gmic/PLIST +++ b/graphics/gmic/PLIST @@ -1,9 +1,12 @@ -@comment $NetBSD: PLIST,v 1.1 2014/08/09 06:26:09 wiz Exp $ +@comment $NetBSD: PLIST,v 1.2 2020/05/23 10:44:02 ryoon Exp $ bin/gmic +bin/zart include/gmic.h -lib/gimp/2.0/plug-ins/gmic_gimp +include/gmic_libc.h +lib/gimp/2.0/plug-ins/gmic_cluts.gmz +lib/gimp/2.0/plug-ins/gmic_gimp_qt lib/libgmic.so -lib/libgmic.so.1 -lib/libgmic.so.1.5.9 +lib/libgmic.so.2 +lib/libgmic.so.290 man/fr/man1/gmic.1 man/man1/gmic.1 diff --git a/graphics/gmic/distinfo b/graphics/gmic/distinfo index 69d9fa7a29b6..2f0cfc8c097f 100644 --- a/graphics/gmic/distinfo +++ b/graphics/gmic/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.6 2017/02/18 23:17:16 joerg Exp $ +$NetBSD: distinfo,v 1.7 2020/05/23 10:44:02 ryoon Exp $ -SHA1 (gmic_1.5.9.3.tar.gz) = c795fd628a4e416538dd5521581307326d1785df -RMD160 (gmic_1.5.9.3.tar.gz) = 19f7edd3200ec1fb199d1584b2999d6137a1273f -SHA512 (gmic_1.5.9.3.tar.gz) = e8f9128ae819d07dbd87f0b13fd7b96926efad02ee8cf4371247912a47332d199aa1572fd06f62423af394f7921c4d772d8c79253f74e06a48721a4ad387829c -Size (gmic_1.5.9.3.tar.gz) = 2791352 bytes -SHA1 (patch-src_Makefile) = af1edfb239de57960f10df4974c5e9a7b2820344 -SHA1 (patch-src_gmic.h) = face3d3cc938c172090c51331a47d97488baac74 +SHA1 (gmic_2.9.0.tar.gz) = f1c4dd0c58548828fe57ca6685b384ae086f45bf +RMD160 (gmic_2.9.0.tar.gz) = f5e250c3043f811c76a74d60513a979ed09679b0 +SHA512 (gmic_2.9.0.tar.gz) = 3b3703520998e5ad547316683158d7b60541a8cea2a7c1e7118f8de88492e0961bf1fe1da360dfb26d0ba7eaf997e7005a864364297db2bb405d532dedc4241d +Size (gmic_2.9.0.tar.gz) = 6195597 bytes +SHA1 (patch-src_Makefile) = fc114d8b68691dadfa787bc06107460d1326dbb8 +SHA1 (patch-src_gmic.cpp) = f74d2f444b9b8121fce5aa14e3266a88bf749da1 diff --git a/graphics/gmic/patches/patch-src_Makefile b/graphics/gmic/patches/patch-src_Makefile index e32af352b491..268b61ac9f69 100644 --- a/graphics/gmic/patches/patch-src_Makefile +++ b/graphics/gmic/patches/patch-src_Makefile @@ -1,99 +1,24 @@ -$NetBSD: patch-src_Makefile,v 1.4 2017/02/18 23:17:17 joerg Exp $ +$NetBSD: patch-src_Makefile,v 1.5 2020/05/23 10:44:02 ryoon Exp $ -Add NetBSD. -Adapt installation paths. -Add compiler rpath flag. -Use X11BASE instead of hardcoding /usr/X11R6. +* Install man pages for pkgsrc. ---- src/Makefile.orig 2014-06-20 13:02:38.000000000 +0000 +--- src/Makefile.orig 2020-03-28 13:25:12.000000000 +0000 +++ src/Makefile -@@ -51,6 +51,9 @@ CC = g++ - ifeq ($(OS),Linux) - OS = Unix - endif -+ifeq ($(OS),NetBSD) -+OS = Unix -+endif - ifeq ($(OS),GNU/kFreeBSD) - OS = Unix - endif -@@ -62,7 +65,7 @@ PLUGINDIR = ~/Library/Application\ Suppo - USR = /opt/local - else - PLUGINDIR = `gimptool-2.0 --gimpplugindir`/plug-ins --USR = /usr -+USR = ${PREFIX} - endif - ifeq ($(OSTYPE),msys) - EXE = .exe -@@ -77,7 +80,7 @@ IS_BETA_CFLAGS = - - # Flags that are mandatory to compile 'gmic'. - MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/include --MANDATORY_LDFLAGS += -L$(USR)/lib -+MANDATORY_LDFLAGS += ${COMPILER_RPATH_FLAG}$(USR)/lib -L$(USR)/lib - ifeq ($(CC),g++) - MANDATORY_CFLAGS += -Wall -W - MANDATORY_LDFLAGS += -lm -@@ -95,7 +98,7 @@ DEBUG_CFLAGS = -Dcimg_verbosity=3 -g - - # Flags to enable optimizations. - ifeq ($(CC),g++) --OPT_CFLAGS = -O2 -fno-ipa-sra -mtune=generic # -fno-tree-pre # -ffast-math -+OPT_CFLAGS = -O2 - endif - ifeq ($(CC),clang++) - OPT_CFLAGS = -O2 -@@ -124,14 +127,14 @@ OPENMP_CFLAGS = -fopenmp -Dcimg_use_open - # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). - # This requires the presence of the X11 include and library files. - # (package 'libx11-dev' on Debian). --X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr --X11_LDFLAGS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr -+X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I$(X11BASE)/include #-Dcimg_use_xrandr -+X11_LDFLAGS = -L$(X11BASE)/lib ${COMPILER_RPATH_FLAG}$(X11BASE)/lib -lX11 -lpthread #-lXrandr - - # Flags to enable fast display, using XShm. - # This requires the presence of the X11 extension include and library files. - # (package 'libx11-dev' on Debian). - XSHM_CFLAGS = -Dcimg_use_xshm --XSHM_LDFLAGS = -L$(USR)/X11R6/lib -lXext -+XSHM_LDFLAGS = -L$(X11BASE)/lib -lXext - - # Flags to enable image display, using GDI32. - # This requires the presence of the GDI32 include and library files. -@@ -327,7 +330,7 @@ linux: - $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic - - solaris: -- $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS) -R$(USR)/X11R6/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic -+ $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS) -R$(X11BASE)/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic - - macosx: - $(MAKE) "CFLAGS=$(STD_MACOSX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_MACOSX_LDFLAGS) $(OPT_LDFLAGS)" gmic -@@ -357,7 +360,7 @@ gmic_lib: gmic_lib.o - ar rcs libgmic.a gmic_lib.o - ifneq ($(OS),Darwin) - $(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LDFLAGS) -- $(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic $(OPENMP_CFLAGS) $(FFTW_LDFLAGS) -+ $(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic $(LDFLAGS) $(OPENMP_CFLAGS) - else - $(CC) -shared -o libgmic.so gmic_lib.o $(LDFLAGS) - endif -@@ -422,11 +425,11 @@ ifneq ($(OS),Darwin) - ln -s libgmic.so.1.5.9 $(DESTDIR)$(USR)/lib/libgmic.so.1 - ln -s libgmic.so.1 $(DESTDIR)$(USR)/lib/libgmic.so +@@ -727,12 +727,12 @@ ifneq ($(OS),Darwin) + ln -fs libcgmic.so.$(VERSION1) $(DESTDIR)$(USR)/$(LIB)/libcgmic.so; \ + fi endif - mkdir -p $(DESTDIR)$(USR)/share/man/ - mkdir -p $(DESTDIR)$(USR)/share/man/man1/ - mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/ -- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz -- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz -+ mkdir -p $(DESTDIR)$(USR)/${PKGMANDIR}/ ++ mkdir -p $(DESTDIR)$(USR)/${PKGMANDIR} + mkdir -p $(DESTDIR)$(USR)/${PKGMANDIR}/man1/ + mkdir -p $(DESTDIR)$(USR)/${PKGMANDIR}/fr/man1/ -+ cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/${PKGMANDIR}/man1/gmic.1.gz -+ cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/${PKGMANDIR}/fr/man1/gmic.1.gz - if [ -d /etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/etc/bash_completion.d/gmic; fi - if [ -d /opt/local/etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/opt/local/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/opt/local/etc/bash_completion.d/gmic; fi - + @if [ -f ../man/gmic.1.gz ]; then \ +- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz; \ +- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz; \ ++ cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/${PKGMANDIR}/man1/gmic.1.gz; \ ++ cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/${PKGMANDIR}/fr/man1/gmic.1.gz; \ + fi + @if [ -f ../resources/gmic_bashcompletion.sh ]; then \ + if [ -d /usr/share/bash-completion/completions ]; then \ diff --git a/graphics/gmic/patches/patch-src_gmic.cpp b/graphics/gmic/patches/patch-src_gmic.cpp new file mode 100644 index 000000000000..2f6d1a16f225 --- /dev/null +++ b/graphics/gmic/patches/patch-src_gmic.cpp @@ -0,0 +1,30 @@ +$NetBSD: patch-src_gmic.cpp,v 1.1 2020/05/23 10:44:02 ryoon Exp $ + +* Support NetBSD. + +--- src/gmic.cpp.orig 2020-03-28 13:25:12.000000000 +0000 ++++ src/gmic.cpp +@@ -2324,7 +2324,11 @@ bool *gmic::abort_ptr(bool *const p_is_a + #if defined(__MACOSX__) || defined(__APPLE__) + void* tid = (void*)(cimg_ulong)getpid(); + #elif cimg_OS==1 ++#if defined(__NetBSD__) ++ void* tid = (void*)(cimg_ulong)pthread_self(); ++#else + void* tid = (void*)(cimg_ulong)syscall(SYS_gettid); ++#endif + #elif cimg_OS==2 + void* tid = (void*)(cimg_ulong)GetCurrentThreadId(); + #else +@@ -2677,7 +2681,11 @@ gmic::~gmic() { + #if defined(__MACOSX__) || defined(__APPLE__) + void* tid = (void*)(cimg_ulong)getpid(); + #elif cimg_OS==1 ++#if defined(__NetBSD__) ++ void* tid = (void*)(cimg_ulong)pthread_self(); ++#else + void* tid = (void*)(cimg_ulong)syscall(SYS_gettid); ++#endif + #elif cimg_OS==2 + void* tid = (void*)(cimg_ulong)GetCurrentThreadId(); + #else diff --git a/graphics/gmic/patches/patch-src_gmic.h b/graphics/gmic/patches/patch-src_gmic.h deleted file mode 100644 index 3df6ee70afbb..000000000000 --- a/graphics/gmic/patches/patch-src_gmic.h +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-src_gmic.h,v 1.1 2017/02/14 21:29:01 joerg Exp $ - ---- src/gmic.h.orig 2015-12-24 22:27:45.000000000 +0000 -+++ src/gmic.h -@@ -138,7 +138,7 @@ namespace cimg_library { - CImg *_data; // Pointer to the first image of the list. - - // Destructor. -- ~CImgList(); -+ ~CImgList() {} - // Empty constructor. - CImgList():_width(0),_allocated_width(0),_data(0) {} - // Use to allocate a new image list with specified dimension.