Files
ports/graphics/cimg/files/patch-examples__Makefile
2026-10-04 04:07:15 +00:00

51 lines
2.5 KiB
Plaintext

--- examples/Makefile.orig 2026-05-13 07:41:53 UTC
+++ examples/Makefile
@@ -78,8 +78,7 @@ FILES = CImg_demo \
use_RGBclass
# Files which requires external libraries to run.
-EXTRA_FILES = test_template_types \
- use_tiff_stream \
+EXTRA_FILES = use_tiff_stream \
use_jpeg_buffer
#---------------------------------
@@ -109,7 +108,7 @@ CXXVER := $(CXX)
endif
CXXVER := $(CXX)
-CFLAGS = -I.. -Wall -Wextra -Wfatal-errors -Werror=unknown-pragmas -Werror=unused-label
+CFLAGS = -I.. -Wall -Wextra $(CPPFLAGS)
LIBS = -lm
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 = -O3
+OPT_CFLAGS = # -O3 - handled by the port CFLAGS
ifdef IS_GCC
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 := $(shell pkg-config --cflags libtiff-4 2>/dev/null)
TIFF_CFLAGS = $(TIFF_DEFINE) $(TIFF_INCDIR)
-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 )
@@ -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)