diff --git a/graphics/cimg/Makefile b/graphics/cimg/Makefile index 21693573f6a1..3bfc74934ea4 100644 --- a/graphics/cimg/Makefile +++ b/graphics/cimg/Makefile @@ -1,123 +1,124 @@ PORTNAME= cimg DISTVERSIONPREFIX= v. -DISTVERSION= 3.7.5 +DISTVERSION= 3.7.6 PORTEPOCH= 3 CATEGORIES= graphics devel MAINTAINER= thierry@FreeBSD.org COMMENT= C++ Template Image Processing Library WWW= https://cimg.eu/ LICENSE= CeCILL_C CeCILL LICENSE_COMB= dual LICENSE_NAME_CeCILL_C= CeCILL-C LICENSE_NAME_CeCILL= CeCILL LICENSE_FILE_CeCILL_C= ${WRKSRC}/Licence_CeCILL-C_V1-en.txt LICENSE_FILE_CeCILL= ${WRKSRC}/Licence_CeCILL_V2-en.txt LICENSE_PERMS_CeCILL_C= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept LICENSE_PERMS_CeCILL= dist-mirror dist-sell pkg-mirror pkg-sell auto-accept USE_GITHUB= yes GH_ACCOUNT= GreycLab GH_PROJECT= CImg BUILD_WRKSRC= ${WRKSRC}/examples OPTIONS_DEFINE= DOCS EXAMPLES .include .if ${PORT_OPTIONS:MDOCS} || ${PORT_OPTIONS:MEXAMPLES} USES+= compiler:c11 gmake pkgconfig:build xorg .endif .if ${PORT_OPTIONS:MDOCS} REINPLACE_ARGS= -i "" . if !defined(WITH_DEBUG) LIB_DEPENDS+= libcurl.so:ftp/curl \ libpng.so:graphics/png \ libtiff.so:graphics/tiff \ libImath.so:math/Imath \ libheif.so:graphics/libheif \ libOpenEXR.so:graphics/openexr \ libfftw3.so:math/fftw3 \ libwebp.so:graphics/webp \ libopencv_core.so:graphics/opencv \ libGraphicsMagick.so:graphics/GraphicsMagick RUN_DEPENDS+= dcraw:graphics/dcraw USES+= jpeg magick:7 ALL_TARGET= Mlinux . else ALL_TARGET= dlinux WITHOUT_MEDCON= yes WITHOUT_FFMPEG= yes . endif . if !defined(WITHOUT_MEDCON) RUN_DEPENDS+= medcon:graphics/xmedcon . endif . if !defined(WITHOUT_FFMPEG) LIB_DEPENDS+= libavformat.so:multimedia/ffmpeg . endif USE_XORG+= x11 xrandr . if defined(WITH_XSHM) USE_XORG+= xext . endif DOCBASE= README.txt CFLAGS+= -I${LOCALBASE}/include/Imath -I${LOCALBASE}/include/OpenEXR MAKE_ARGS+= CPPFLAGS="${CFLAGS}" FREEBSD_LDFLAGS="${LDFLAGS}" . if !exists(/usr/include/omp.h) MAKE_ARGS+= OPENMP_CFLAGS= . endif PROGS= CImg_demo captcha curve_editor2d dtmri_view3d \ edge_explorer2d fade_images gaussian_fit1d generate_loop_macros \ hough_transform2d image2ascii image_registration2d image_surface3d \ jawbreaker mcf_levelsets2d mcf_levelsets3d odykill \ pde_TschumperleDeriche2d pde_heatflow2d plotter1d radon_transform2d \ scene3d spherical_function3d tetris tron tutorial use_RGBclass \ use_chlpca use_draw_gradient use_jpeg_buffer use_nlmeans use_skeleton \ wavelet_atrous .else NO_BUILD= yes .endif .include -pre-configure-DOCS-on: +pre-configure: ${REINPLACE_CMD} -e 's|make|${MAKE_CMD}|' ${BUILD_WRKSRC}/Makefile pre-configure-DOCS-off: - ${REINPLACE_CMD} -e 's|^OPTFLAGS|#OPTFLAGS|' ${BUILD_WRKSRC}/Makefile + ${REINPLACE_CMD} -e 's|^OPTFLAGS|#OPTFLAGS|;s|/usr/X11R6|${LOCALBASE}| \' + ${BUILD_WRKSRC}/Makefile pre-configure: . if !defined(WITHOUT_FFMPEG) ${REINPLACE_CMD} -e 's|#FFMPEG_CFLAGS|FFMPEG_CFLAGS|' \ -e 's|#FFMPEG_DEFINE|FFMPEG_DEFINE|' \ -e 's|#FFMPEG_LIBS|FFMPEG_LIBS|' \ ${BUILD_WRKSRC}/Makefile . endif . if defined(WITH_XSHM) ${REINPLACE_CMD} -e 's|XSHM_CFLAGS = #|XSHM_CFLAGS =|' \ -e 's|XSHM_LDFLAGS = #|XSHM_LDFLAGS =|' \ ${BUILD_WRKSRC}/Makefile . endif do-install: ${INSTALL_DATA} ${WRKSRC}/CImg.h ${STAGEDIR}${PREFIX}/include do-install-DOCS-on: ${INSTALL_PROGRAM} ${PROGS:C|^|${BUILD_WRKSRC}/|} ${STAGEDIR}${PREFIX}/bin ${MKDIR} ${STAGEDIR}${DOCSDIR} ${INSTALL_DATA} ${DOCBASE:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} do-install-EXAMPLES-on: ${MKDIR} ${STAGEDIR}${EXAMPLESDIR} ${CP} -R ${WRKSRC}/examples/* ${STAGEDIR}${EXAMPLESDIR} @(cd ${STAGEDIR}${EXAMPLESDIR} && ${MAKE_CMD} clean) @${RM} ${STAGEDIR}${EXAMPLESDIR}/*.orig .include diff --git a/graphics/cimg/distinfo b/graphics/cimg/distinfo index 9e88096e8592..c0beccfe4e25 100644 --- a/graphics/cimg/distinfo +++ b/graphics/cimg/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1777673567 -SHA256 (GreycLab-CImg-v.3.7.5_GH0.tar.gz) = 18ad7f70dfbfd3a1ce968dec0c29eeafcaecc9570e5e59565055c2d40fddeb98 -SIZE (GreycLab-CImg-v.3.7.5_GH0.tar.gz) = 12698702 +TIMESTAMP = 1779113392 +SHA256 (GreycLab-CImg-v.3.7.6_GH0.tar.gz) = b655a0135ef937164896a0f66bbfb7e2b688b36f2529bd49c4deb9ee2c352757 +SIZE (GreycLab-CImg-v.3.7.6_GH0.tar.gz) = 12699286 diff --git a/graphics/cimg/files/patch-examples__Makefile b/graphics/cimg/files/patch-examples__Makefile index a02bd41c1868..444d7de48cd2 100644 --- a/graphics/cimg/files/patch-examples__Makefile +++ b/graphics/cimg/files/patch-examples__Makefile @@ -1,117 +1,50 @@ ---- examples/Makefile.orig 2025-11-21 07:26:29 UTC +--- examples/Makefile.orig 2026-05-13 07:41:53 UTC +++ examples/Makefile -@@ -78,7 +78,7 @@ FILES = CImg_demo \ - use_RGBclass \ +@@ -78,8 +78,7 @@ FILES = CImg_demo \ + use_RGBclass # Files which requires external libraries to run. --EXTRA_FILES = test_template_types use_tiff_stream use_jpeg_buffer -+EXTRA_FILES = use_tiff_stream use_jpeg_buffer +-EXTRA_FILES = test_template_types \ +- use_tiff_stream \ ++EXTRA_FILES = use_tiff_stream \ + use_jpeg_buffer #--------------------------------- - # Set correct variables and paths -@@ -89,7 +89,7 @@ SVERSION = $(VERSION1).$(VERSION2).$(VERSION3) - VERSION3 = $(shell grep 'cimg_version\ ' ../CImg.h | tail -c2 | head -c1) - SVERSION = $(VERSION1).$(VERSION2).$(VERSION3) - --X11PATH = /usr/X11R6 -+X11PATH = $(LOCALBASE) - - EXE_PRE = - EXE_EXT = -@@ -111,7 +111,7 @@ CXXVER = $(CXX) +@@ -109,7 +108,7 @@ CXXVER := $(CXX) endif - CXXVER = $(CXX) + CXXVER := $(CXX) -CFLAGS = -I.. -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label +CFLAGS = -I.. -Wall -Wextra $(CPPFLAGS) LIBS = -lm - ifdef IS_GCC - CXXVER = $(shell $(CXX) -v 2>&1 | tail -n 1) -@@ -152,7 +152,7 @@ VT100_CFLAGS = -Dcimg_use_vt100 - VT100_CFLAGS = -Dcimg_use_vt100 + ifdef IS_CLANG + CXXVER := $(shell $(CXX) -v 2>&1 | head -n 1) +@@ -153,7 +152,7 @@ endif + endif # Flags to enable code optimization by the compiler. --OPT_CFLAGS = -Ofast -+OPT_CFLAGS = # -Ofast - handled by the port CFLAGS +-OPT_CFLAGS = -O3 ++OPT_CFLAGS = # -O3 - handled by the port CFLAGS ifdef IS_GCC - # Add -mtune=generic for GCC if supported. - NO_MTUNE_GENERIC = $(shell $(CXX) -mtune=generic -E - < /dev/null > /dev/null 2>&1; echo $$?) -@@ -177,9 +177,9 @@ OPENCV_DEFINE = -Dcimg_use_opencv - - # Flags to enable OpenCV support. - OPENCV_DEFINE = -Dcimg_use_opencv --OPENCV_INCDIR = $(shell pkg-config opencv --cflags || echo -I/usr/include/opencv) -I/usr/include/opencv -I/usr/include/opencv4 -+OPENCV_INCDIR = $(shell pkg-config opencv4 --cflags || echo -I/usr/include/opencv) -I/usr/include/opencv -I/usr/include/opencv4 - OPENCV_CFLAGS = $(OPENCV_DEFINE) $(OPENCV_INCDIR) --OPENCV_LIBS = $(shell pkg-config opencv --libs || echo -lopencv_core -lopencv_highgui -lopencv_videoio) -+OPENCV_LIBS = $(shell pkg-config opencv4 --libs || echo -lopencv_core -lopencv_highgui -lopencv_videoio) - - # Flags used to disable display capablities of CImg - NODISPLAY_CFLAGS = -Dcimg_display=0 -@@ -242,7 +242,7 @@ TIFF_CFLAGS = $(TIFF_DEFINE) $(TIFF_INCDIR) + ifeq ($(EXE_EXT),) + NO_MTUNE_GENERIC := $(shell echo | $(CXX) -mtune=generic -E - > /dev/null 2>&1; echo $$?) +@@ -244,7 +243,7 @@ TIFF_CFLAGS = $(TIFF_DEFINE) $(TIFF_INCDIR) TIFF_DEFINE = -Dcimg_use_tiff - TIFF_INCDIR = + TIFF_INCDIR := $(shell pkg-config --cflags libtiff-4 2>/dev/null) TIFF_CFLAGS = $(TIFF_DEFINE) $(TIFF_INCDIR) --TIFF_LIBS = -ltiff -+TIFF_LIBS = -ltiff -ltiffxx +-TIFF_LIBS := $(shell pkg-config --libs libtiff-4 2>/dev/null || echo -ltiff) ++TIFF_LIBS := $(shell pkg-config --libs libtiff-4 2>/dev/null || echo -ltiff) -ltiffxx # Flags to enable native support for loading HEIF image files, using the libheif library. # ( https://github.com/strukturag/libheif ) -@@ -261,16 +261,16 @@ OPENEXR_DEFINE = -Dcimg_use_openexr - # Flags to enable native support for EXR image files, using the OpenEXR library. - # ( http://www.openexr.com/ ) - OPENEXR_DEFINE = -Dcimg_use_openexr --OPENEXR_INCDIR = -I/usr/include/OpenEXR -+OPENEXR_INCDIR = -I$(LOCALBASE)/include/OpenEXR - OPENEXR_CFLAGS = $(OPENEXR_DEFINE) $(OPENEXR_INCDIR) --OPENEXR_LIBS = -lIlmImf -lHalf -+OPENEXR_LIBS = -lOpenEXR -lImath - - # Flags to enable native support for various video files, using the FFMPEG library. - # ( http://www.ffmpeg.org/ ) --FFMPEG_DEFINE = -Dcimg_use_ffmpeg -D__STDC_CONSTANT_MACROS --FFMPEG_INCDIR = -I/usr/include/libavcodec -I/usr/include/libavformat -I/usr/include/libswscale -I/usr/include/ffmpeg --FFMPEG_CFLAGS = $(FFMPEG_DEFINE) $(FFMPEG_INCDIR) --FFMPEG_LIBS = -lavcodec -lavformat -lswscale -+#FFMPEG_DEFINE = -Dcimg_use_ffmpeg -D__STDC_CONSTANT_MACROS -+FFMPEG_INCDIR = -I$(LOCALBASE)/include/libavcodec -I$(LOCALBASE)/include/libavformat -I$(LOCALBASE)/include/libswscale -I$(LOCALBASE)/include/ffmpeg -+#FFMPEG_CFLAGS = $(FFMPEG_DEFINE) $(FFMPEG_INCDIR) -+#FFMPEG_LIBS = -lavcodec -lavformat -lswscale - - # Flags to enable native support for compressed .cimgz files, using the Zlib library. - # ( http://www.zlib.net/ ) -@@ -377,6 +377,7 @@ $(XSHM_LIBS)" \ - $(TIFF_LIBS) \ - $(HEIF_LIBS) \ - $(XSHM_LIBS)" \ -+$(PTHREAD_LIBS)" \ - all $(EXTRA_FILES) - - # Linux/BSD/Mac OSX targets, with X11 display. -@@ -455,6 +456,7 @@ $(OPT_CFLAGS) \ - @$(MAKE) \ - "CONF_CFLAGS = \ - $(OPT_CFLAGS) \ -+$(OPENMP_CFLAGS) \ - $(VT100_CFLAGS) \ - $(X11_CFLAGS) \ - $(XSHM_CFLAGS) \ -@@ -468,8 +470,10 @@ $(MAGICK_CFLAGS) \ - $(CURL_CFLAGS) \ - $(OPENCV_CFLAGS) \ - $(MAGICK_CFLAGS) \ -+$(WEBP_CFLAGS) \ - $(FFTW3_CFLAGS)" \ - "CONF_LIBS = \ -+$(FREEBSD_LDFLAGS) \ - $(X11_LIBS) \ - $(XSHM_LIBS) \ - $(XRANDR_LIBS) \ -@@ -482,6 +486,7 @@ $(MAGICK_LIBS) \ - $(CURL_LIBS) \ - $(OPENCV_LIBS) \ - $(MAGICK_LIBS) \ -+$(WEBP_LIBS) \ - $(FFTW3_LIBS)" \ +@@ -405,8 +404,8 @@ Mlinux: + + Mlinux: + @$(MAKE) --no-print-directory $(MAKEFLAGS) \ +-"CONF_CFLAGS = $(OPT_CFLAGS) $(VT100_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) $(XRANDR_CFLAGS) $(TIFF_CFLAGS) $(HEIF_CFLAGS) $(OPENEXR_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(ZLIB_CFLAGS) $(CURL_CFLAGS) $(OPENCV_CFLAGS) $(MAGICK_CFLAGS) $(FFTW3_CFLAGS)" \ +-"CONF_LIBS = $(X11_LIBS) $(XSHM_LIBS) $(XRANDR_LIBS) $(TIFF_LIBS) $(HEIF_LIBS) $(OPENEXR_LIBS) $(PNG_LIBS) $(JPEG_LIBS) $(ZLIB_LIBS) $(CURL_LIBS) $(OPENCV_LIBS) $(MAGICK_LIBS) $(FFTW3_LIBS)" \ ++"CONF_CFLAGS = $(OPT_CFLAGS) $(OPENMP_CFLAGS) $(VT100_CFLAGS) $(X11_CFLAGS) $(XSHM_CFLAGS) $(XRANDR_CFLAGS) $(TIFF_CFLAGS) $(HEIF_CFLAGS) $(OPENEXR_CFLAGS) $(PNG_CFLAGS) $(JPEG_CFLAGS) $(ZLIB_CFLAGS) $(CURL_CFLAGS) $(OPENCV_CFLAGS) $(MAGICK_CFLAGS) $(WEBP_CFLAGS) $(FFTW3_CFLAGS)" \ ++"CONF_LIBS = $(FREEBSD_LDFLAGS) $(X11_LIBS) $(XSHM_LIBS) $(XRANDR_LIBS) $(TIFF_LIBS) $(HEIF_LIBS) $(OPENEXR_LIBS) $(PNG_LIBS) $(JPEG_LIBS) $(ZLIB_LIBS) $(CURL_LIBS) $(OPENCV_LIBS) $(MAGICK_LIBS) $(WEBP_LIBS) $(FFTW3_LIBS) $(PTHREAD_LIBS)" \ "STRIP_EXE=true" \ all $(EXTRA_FILES) +