freebsd-ports/graphics/cimg/files/patch-examples::Makefile
2014-04-20 21:12:51 +00:00

117 lines
4.1 KiB
Text

--- examples/Makefile.orig 2014-04-17 15:41:13.000000000 +0200
+++ examples/Makefile 2014-04-20 21:51:43.000000000 +0200
@@ -84,8 +84,8 @@
# Set correct variables and paths
#---------------------------------
CIMG_VERSION = 1.5.8
-X11PATH = /usr/X11R6
-CC = g++
+#X11PATH = $(X11PATH)
+CC = $(CXX)
EXEPFX =
CCVER = $(CC)
ifeq ($(CC),g++)
@@ -99,8 +99,8 @@
CFLAGS = -I..
LDFLAGS =
else
-CFLAGS = -I.. -Wall -W
-LDFLAGS = -lm
+CFLAGS = -I.. -Wall -W $(CPPFLAGS)
+LDFLAGS += -lm
endif
#--------------------------------------------------
@@ -125,7 +125,7 @@
ifeq ($(CC),icc)
CIMG_OPT_CFLAGS = -O3 -ipo -no-prec-div
else
-CIMG_OPT_CFLAGS = -O3 -fno-tree-pre
+CIMG_OPT_CFLAGS =
endif
# Flags to enable OpenMP support.
@@ -136,7 +136,7 @@
endif
# Flags to enable OpenCV support.
-CIMG_OPENCV_CFLAGS = -Dcimg_use_opencv -I/usr/include/opencv
+CIMG_OPENCV_CFLAGS = -Dcimg_use_opencv -I$(LOCALBASE)/include/opencv
CIMG_OPENCV_LDFLAGS = -lopencv_core -lopencv_highgui
#CIMG_OPENCV_LDFLAGS = -lcv -lhighgui #-> Use this for OpenCV < 2.2.0
@@ -147,7 +147,7 @@
# (X11 is used by CImg to handle display windows)
# !!! For 64bits systems : replace -L$(X11PATH)/lib by -L$(X11PATH)/lib64 !!!
CIMG_X11_CFLAGS = -I$(X11PATH)/include
-CIMG_X11_LDFLAGS = -L$(X11PATH)/lib -lpthread -lX11
+CIMG_X11_LDFLAGS = -L$(X11PATH)/lib -lX11 $(PTHREAD_LIBS)
# Flags to enable fast image display, using the XSHM library (when using X11).
# !!! Seems to randomly crash when used on MacOSX and 64bits systems, so use it only when necessary !!!
@@ -177,7 +177,7 @@
# Flags to enable native support for TIFF image files, using the TIFF library.
# ( http://www.libtiff.org/ )
CIMG_TIFF_CFLAGS = -Dcimg_use_tiff
-CIMG_TIFF_LDFLAGS = -ltiff
+CIMG_TIFF_LDFLAGS = -ltiff -ltiffxx
# Flags to enable native support for MINC2 image files, using the MINC2 library.
# ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide )
@@ -186,7 +186,7 @@
# Flags to enable native support for EXR image files, using the OpenEXR library.
# ( http://www.openexr.com/ )
-CIMG_EXR_CFLAGS = -Dcimg_use_openexr -I/usr/include/OpenEXR
+CIMG_EXR_CFLAGS = -Dcimg_use_openexr -I/$(LOCALBASE)/include/OpenEXR
CIMG_EXR_LDFLAGS = -lIlmImf -lHalf
# Flags to enable native support for various video files, using the FFMPEG library.
@@ -201,8 +201,8 @@
# Flags to enable native support of most classical image file formats, using the Magick++ library.
# ( http://www.imagemagick.org/Magick++/ )
-CIMG_MAGICK_CFLAGS = -Dcimg_use_magick `Magick++-config --cppflags` `Magick++-config --cxxflags`
-CIMG_MAGICK_LDFLAGS = `Magick++-config --ldflags` `Magick++-config --libs`
+CIMG_MAGICK_CFLAGS = -Dcimg_use_magick `GraphicsMagick++-config --cppflags` `GraphicsMagick++-config --cxxflags`
+CIMG_MAGICK_LDFLAGS = `GraphicsMagick++-config --ldflags` `GraphicsMagick++-config --libs`
# Flags to enable faster Discrete Fourier Transform computation, using the FFTW3 library
# ( http://www.fftw.org/ )
@@ -215,14 +215,17 @@
# Flags to enable the use of LAPACK routines for matrix computation
# ( http://www.netlib.org/lapack/ )
-CIMG_LAPACK_CFLAGS = -Dcimg_use_lapack
-CIMG_LAPACK_LDFLAGS = -lblas -lg2c -llapack
+#CIMG_LAPACK_CFLAGS = -Dcimg_use_lapack
+#CIMG_LAPACK_LDFLAGS = -lblas -llapack
# Flags to enable the use of the Board library
# ( http://libboard.sourceforge.net/ )
-CIMG_BOARD_CFLAGS = -Dcimg_use_board -I/usr/include/board
+CIMG_BOARD_CFLAGS = -Dcimg_use_board -I$(LOCALBASE)/include/board
CIMG_BOARD_LDFLAGS = -lboard
+# Flags to compile on FreeBSD
+CIMG_FREEBSD_LDFLAGS = -ansi -ffast-math -I$(X11PATH)/include $(EXTRA_FLAGS) -lX11 -L$(X11PATH)/lib
+
# Flags to compile on Sun Solaris
CIMG_SOLARIS_LDFLAGS = -R$(X11PATH)/lib -lrt -lnsl -lsocket
@@ -366,6 +369,7 @@
$(CIMG_ZLIB_CFLAGS) \
$(CIMG_OPENCV_CFLAGS) \
$(CIMG_MAGICK_CFLAGS) \
+$(CIMG_LAPACK_CFLAGS) \
$(CIMG_FFTW3_CFLAGS)" \
"CONF_LDFLAGS = \
$(CIMG_X11_LDFLAGS) \
@@ -376,6 +380,7 @@
$(CIMG_PNG_LDFLAGS) \
$(CIMG_JPEG_LDFLAGS) \
$(CIMG_ZLIB_LDFLAGS) \
+$(CIMG_LAPACK_LDFLAGS) \
$(CIMG_OPENCV_LDFLAGS) \
$(CIMG_MAGICK_LDFLAGS) \
$(CIMG_FFTW3_LDFLAGS)" \