mirror of
https://git.freebsd.org/ports.git
synced 2025-05-29 09:26:27 -04:00
126 lines
4.5 KiB
Text
126 lines
4.5 KiB
Text
--- examples/Makefile.orig 2022-08-19 17:18:04 UTC
|
|
+++ examples/Makefile
|
|
@@ -89,7 +89,7 @@ VERSION2 = $(shell grep 'cimg_version\ ' ../CImg.h | t
|
|
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 @@ IS_ICPC = 1
|
|
endif
|
|
|
|
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)
|
|
@@ -151,7 +151,7 @@ DEBUG_CFLAGS = -Dcimg_verbosity=3 -Dcimg_strict_warnin
|
|
VT100_CFLAGS = -Dcimg_use_vt100
|
|
|
|
# Flags to enable code optimization by the compiler.
|
|
-OPT_CFLAGS = -Ofast
|
|
+OPT_CFLAGS = # -Ofast - 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 $$?)
|
|
@@ -176,9 +176,9 @@ endif
|
|
|
|
# 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)
|
|
+OPENCV_LIBS = $(shell pkg-config opencv4 --libs || echo -lopencv_core -lopencv_highgui)
|
|
|
|
# Flags used to disable display capablities of CImg
|
|
NODISPLAY_CFLAGS = -Dcimg_display=0
|
|
@@ -228,7 +228,7 @@ JPEG_LIBS = -ljpeg
|
|
TIFF_DEFINE = -Dcimg_use_tiff
|
|
TIFF_INCDIR =
|
|
TIFF_CFLAGS = $(TIFF_DEFINE) $(TIFF_INCDIR)
|
|
-TIFF_LIBS = -ltiff
|
|
+TIFF_LIBS = -ltiff -ltiffxx
|
|
|
|
# Flags to enable native support for loading HEIF image files, using the libheif library.
|
|
# ( https://github.com/strukturag/libheif )
|
|
@@ -247,16 +247,16 @@ MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -
|
|
# 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/ )
|
|
@@ -292,17 +292,17 @@ endif
|
|
|
|
# Flags to enable the use of LAPACK routines for matrix computation
|
|
# ( http://www.netlib.org/lapack/ )
|
|
-LAPACK_DEFINE = -Dcimg_use_lapack
|
|
+#LAPACK_DEFINE = -Dcimg_use_lapack
|
|
LAPACK_INCDIR =
|
|
-LAPACK_CFLAGS = $(LAPACK_DEFINE) $(LAPACK_INCDIR)
|
|
-LAPACK_LIBS = -lblas -llapack
|
|
+#LAPACK_CFLAGS = $(LAPACK_DEFINE) $(LAPACK_INCDIR)
|
|
+#LAPACK_LIBS = -lblas -llapack
|
|
|
|
# Flags to enable the use of the Board library
|
|
# ( https://github.com/c-koi/libboard )
|
|
BOARD_DEFINE = -Dcimg_use_board
|
|
-BOARD_INCDIR = -I/usr/include/board
|
|
-BOARD_CFLAGS = $(BOARD_DEFINE) $(BOARD_INCDIR)
|
|
-BOARD_LIBS = -lboard
|
|
+BOARD_INCDIR = -I$(LOCALBASE)/include/board
|
|
+#BOARD_CFLAGS = $(BOARD_DEFINE) $(BOARD_INCDIR)
|
|
+#BOARD_LIBS = -lboard
|
|
|
|
# Flags to compile GIMP plug-ins.
|
|
ifeq ($(MSYSTEM),MINGW32)
|
|
@@ -372,6 +372,7 @@ $(TIFF_LIBS) \
|
|
$(HEIF_LIBS) \
|
|
$(LAPACK_LIBS) \
|
|
$(XSHM_LIBS)" \
|
|
+$(PTHREAD_LIBS)" \
|
|
all $(EXTRA_FILES)
|
|
|
|
# Linux/BSD/Mac OSX targets, with X11 display.
|
|
@@ -465,8 +466,11 @@ $(ZLIB_CFLAGS) \
|
|
$(CURL_CFLAGS) \
|
|
$(OPENCV_CFLAGS) \
|
|
$(MAGICK_CFLAGS) \
|
|
+$(LAPACK_CFLAGS) \
|
|
+$(BOARD_CFLAGS) \
|
|
$(FFTW3_CFLAGS)" \
|
|
"CONF_LIBS = \
|
|
+$(FREEBSD_LDFLAGS) \
|
|
$(X11_LIBS) \
|
|
$(XSHM_LIBS) \
|
|
$(XRANDR_LIBS) \
|
|
@@ -479,6 +483,8 @@ $(ZLIB_LIBS) \
|
|
$(CURL_LIBS) \
|
|
$(OPENCV_LIBS) \
|
|
$(MAGICK_LIBS) \
|
|
+$(LAPACK_LIBS) \
|
|
+$(BOARD_LIBS) \
|
|
$(FFTW3_LIBS)" \
|
|
"STRIP_EXE=true" \
|
|
all $(EXTRA_FILES)
|