aboutsummaryrefslogtreecommitdiff
path: root/graphics/cimg/files
diff options
context:
space:
mode:
authorThierry Thomas <thierry@FreeBSD.org>2009-02-22 17:40:58 +0000
committerThierry Thomas <thierry@FreeBSD.org>2009-02-22 17:40:58 +0000
commit8d829d251cb7c2eb9800179275a316fbbf1bcafe (patch)
tree81da4def0456ed2ead9af7521e348b69db212411 /graphics/cimg/files
parent567185543bf5651a11af2c00fcfd66a38a9ac41a (diff)
downloadports-8d829d251cb7c2eb9800179275a316fbbf1bcafe.tar.gz
ports-8d829d251cb7c2eb9800179275a316fbbf1bcafe.zip
Notes
Diffstat (limited to 'graphics/cimg/files')
-rw-r--r--graphics/cimg/files/patch-examples::Makefile216
1 files changed, 128 insertions, 88 deletions
diff --git a/graphics/cimg/files/patch-examples::Makefile b/graphics/cimg/files/patch-examples::Makefile
index 43255d7935c0..1ba85c216a23 100644
--- a/graphics/cimg/files/patch-examples::Makefile
+++ b/graphics/cimg/files/patch-examples::Makefile
@@ -1,117 +1,157 @@
---- examples/Makefile.orig 2008-06-26 14:31:17.000000000 +0200
-+++ examples/Makefile 2008-06-28 13:54:24.000000000 +0200
-@@ -75,15 +75,15 @@
+--- examples/Makefile.orig 2009-02-17 13:08:45.000000000 +0100
++++ examples/Makefile 2009-02-21 15:02:01.000000000 +0100
+@@ -78,8 +78,8 @@
# Set correct variables and paths
#---------------------------------
- CIMG_VERSION = 1.29
+ CIMG_VERSION = 1.30
-X11PATH = /usr/X11R6
-CC = g++
+#X11PATH = /usr/X11R6
+#CC = g++
+ CCVER = `$(CC) -v 2>&1 | tail -n 1`
+ EXEPFX =
+@@ -106,7 +106,7 @@
ifeq ($(CC),icc)
- CFLAGS = -ansi
- LDFLAGS = -lpthread
+ CIMG_OPT_CFLAGS = -O3 -ipo -no-prec-div
else
--CFLAGS = -Wall -W -ansi -pedantic
--LDFLAGS = -lm -lpthread
-+#CFLAGS = -Wall -W -ansi -pedantic
-+#LDFLAGS = -lm -lpthread
- endif
-
- #--------------------------------------------------
-@@ -101,7 +101,7 @@
- ifeq ($(CC),icc)
- CIMG_OPT_FLAGS = -O3 -ipo -no-prec-div
- else
--CIMG_OPT_FLAGS = -O3 -ffast-math
-+CIMG_OPT_FLAGS = -ffast-math
+-CIMG_OPT_CFLAGS = -O3 -ffast-math -fno-tree-pre
++CIMG_OPT_CFLAGS = -ffast-math -fno-tree-pre
endif
# Flags to enable OpenMP support.
-@@ -146,10 +146,10 @@
- CIMG_FFTW3_FLAGS = -Dcimg_use_fftw3 -lfftw3
+@@ -158,8 +158,8 @@
+
+ # Flags to enable native support for various video files, using the FFMPEG library.
+ # ( http://www.ffmpeg.org/ )
+-CIMG_FFMPEG_CFLAGS = -Dcimg_use_ffmpeg -I/usr/include/ffmpeg
+-CIMG_FFMPEG_LDFLAGS = -lavcodec -lavformat
++#CIMG_FFMPEG_CFLAGS = -Dcimg_use_ffmpeg -I$(LOCALBASE)/include/ffmpeg
++#CIMG_FFMPEG_LDFLAGS = -lavcodec -lavformat
+
+ # Flags to enable native support for compressed .cimgz files, using the Zlib library.
+ # ( http://www.zlib.net/ )
+@@ -182,14 +182,17 @@
# Flags to enable the use of LAPACK routines for matrix computation
--CIMG_LAPACK_FLAGS = -Dcimg_use_lapack -lblas -lg2c -llapack
-+CIMG_LAPACK_FLAGS = -Dcimg_use_lapack -lblas -llapack
+ # ( 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
--CIMG_BOARD_FLAGS = -Dcimg_use_board -I/usr/include/board -lboard
-+CIMG_BOARD_FLAGS = -Dcimg_use_board -I$(LOCALBASE)/board -lboard
-
- # Flags to compile on Solaris
- CIMG_SOLARIS_FLAGS = -R$(X11PATH)/lib -lrt -lnsl -lsocket
-@@ -157,6 +157,9 @@
- # Flags to compile on MacOSX with Carbon-based display support
- CIMG_CARBON_FLAGS = -Dcimg_display=3 -framework Carbon
+ # ( 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_FLAGS = -ansi -ffast-math -I$(X11PATH)/include $(EXTRA_FLAGS) -lX11 -L$(X11PATH)/lib
++CIMG_FREEBSD_LDFLAGS = -ansi -ffast-math -I$(X11PATH)/include $(EXTRA_FLAGS) -lX11 -L$(X11PATH)/lib
+
- # Set default compilation flags.
- # Uncomment lines here, if you want to customize your default configuration
- CIMG_DEFAULT_FLAGS = $(CIMG_VT100_FLAGS) \
-@@ -164,15 +167,15 @@
- $(CIMG_XSHM_FLAGS) \
- $(CIMG_XRANDR_FLAGS) \
- # $(CIMG_OPENMP_FLAGS) \
--# $(CIMG_PNG_FLAGS) \
--# $(CIMG_JPEG_FLAGS) \
--# $(CIMG_TIFF_FLAGS) \
-+ $(CIMG_PNG_FLAGS) \
-+ $(CIMG_JPEG_FLAGS) \
-+ $(CIMG_TIFF_FLAGS) \
- # $(CIMG_FFMPEG_FLAGS) \
--# $(CIMG_ZLIB_FLAGS) \
--# $(CIMG_MAGICK_FLAGS) \
--# $(CIMG_FFTW3_FLAGS)
--# $(CIMG_LAPACK_FLAGS)
--# $(CIMG_BOARD_FLAGS)
-+ $(CIMG_ZLIB_FLAGS) \
-+ $(CIMG_MAGICK_FLAGS) \
-+ $(CIMG_FFTW3_FLAGS) \
-+# $(CIMG_LAPACK_FLAGS) \
-+ $(CIMG_BOARD_FLAGS)
+ # Flags to compile on Sun Solaris
+ CIMG_SOLARIS_LDFLAGS = -R$(X11PATH)/lib -lrt -lnsl -lsocket
- # Set full compilation flags.
- CIMG_FULL_FLAGS = $(CIMG_OPT_FLAGS) \
-@@ -184,12 +187,12 @@
- $(CIMG_PNG_FLAGS) \
- $(CIMG_JPEG_FLAGS) \
- $(CIMG_ZLIB_FLAGS) \
-+ $(CIMG_MAGICK_FLAGS) \
-+ $(CIMG_BOARD_FLAGS) \
-+ $(CIMG_FFTW3_FLAGS) \
- # $(CIMG_FFMPEG_FLAGS) \
--# $(CIMG_MAGICK_FLAGS) \
--# $(CIMG_OPENMP_FLAGS) \
--# $(CIMG_FFTW3_FLAGS) \
- # $(CIMG_LAPACK_FLAGS) \
--# $(CIMG_BOARD_FLAGS)
-+# $(CIMG_OPENMP_FLAGS)
+@@ -205,7 +208,7 @@
+ @echo
+ @echo "** Compiling '$* ($(CIMG_VERSION))' with '`$(CC) -v 2>&1 | tail -n 1`'"
+ @echo
+- $(CC) -o $(EXEPFX)$* $< $(CFLAGS) $(LDFLAGS) $(CONF_CFLAGS) $(CONF_LDFLAGS)
++ $(CXX) -o $(EXEPFX)$* $< $(CFLAGS) $(LDFLAGS) $(CONF_CFLAGS) $(CONF_LDFLAGS)
+ ifeq ($(MACOSX_APP),true)
+ mkdir -p $(EXEPFX)${*}.app/Contents/MacOS
+ mv $(EXEPFX)${*} $(EXEPFX)${*}.app/Contents/MacOS
+@@ -227,6 +230,9 @@
+ @echo " > mlinux : Linus/BSD/MacOSX target, no display, minimal features, optimizations enabled."
+ @echo " > Mlinux : Linux/BSD/MacOSX target, X11 display, maximal features, optimizations enabled."
+ @echo
++ @echo " > dFreeBSD : FreeBSD, X11 display, debug mode."
++ @echo " > oFreeBSD : FreeBSD target, X11 display, maximal features for packages."
++ @echo
+ @echo " > solaris : Sun Solaris target, X11 display, optimizations disabled."
+ @echo " > dsolaris : Sun Solaris target, X11 display, debug mode."
+ @echo " > osolaris : Sun Solaris target, X11 display, optimizations enabled."
+@@ -270,7 +276,7 @@
+ @echo
+ @echo "** Compiling 'greycstoration4gimp ($(CIMG_VERSION))' with '$(CCVER)'"
+ @echo
+- $(CC) -I.. -I./plugins -o $(EXEPFX)greycstoration4gimp greycstoration4gimp.cpp `gimptool-2.0 --cflags` `gimptool-2.0 --libs` -lpthread $(CIMG_OPT_CFLAGS) $(CIMG_GIMP_CFLAGS)
++ $(CXX) -I.. -I./plugins -o $(EXEPFX)greycstoration4gimp greycstoration4gimp.cpp `gimptool-2.0 --cflags` `gimptool-2.0 --libs` -lpthread $(CIMG_OPT_CFLAGS) $(CIMG_GIMP_CFLAGS)
- #-------------------------
- # Define Makefile entries
-@@ -234,7 +237,7 @@
- all: $(CIMG_FILES)
+ # Specific targets for the 'gmic4gimp' plug-in for GIMP.
+ gmic4gimp_def: gmic4gimp_def.raw
+@@ -281,7 +287,7 @@
+ $(CC) -I.. -o gmic4gimp.o -c gmic.cpp -Dgmic_minimal $(CIMG_OPT_CFLAGS) $(CIMG_FFTW3_CFLAGS)
- clean:
-- rm -rf *.app *.exe *~ jpeg_buffer greycstoration4gimp $(CIMG_FILES)
-+ rm -rf *.app *.exe *~ jpeg_buffer greycstoration4gimp $(CIMG_FILES) Makefile.orig
+ gmic4gimp: gmic4gimp.o gmic4gimp.cpp
+- $(CC) -I.. -I./plugins -o $(EXEPFX)gmic4gimp gmic4gimp.cpp gmic4gimp.o `gimptool-2.0 --cflags` `gimptool-2.0 --libs` -lpthread $(CIMG_OPT_FLAGS) $(CIMG_FFTW3_LDFLAGS) $(CIMG_GIMP_CFLAGS)
++ $(CXX) -I.. -I./plugins -o $(EXEPFX)gmic4gimp gmic4gimp.cpp gmic4gimp.o `gimptool-2.0 --cflags` `gimptool-2.0 --libs` -lpthread $(CIMG_OPT_CFLAGS) $(CIMG_FFTW3_LDFLAGS) $(CIMG_GIMP_CFLAGS)
- greycstoration4gimp: greycstoration4gimp.cpp
- @echo
-@@ -254,6 +257,12 @@
- Mlinux:
- make "ARCHFLAGS=$(CIMG_FULL_FLAGS)" "STRIP_EXE=1" all jpeg_buffer greycstoration4gimp
+ # Specific targets for 'gmic'.
+ gmic_def: gmic_def.raw
+@@ -309,7 +315,7 @@
+ gmic_double.o: gmic.cpp
+ $(CC) -o gmic_double.o -c gmic.cpp -I. -Dgmic_separate_compilation -Dgmic_double $(CFLAGS) $(CONF_CFLAGS)
+ gmic: gmic_bool.o gmic_uchar.o gmic_char.o gmic_ushort.o gmic_short.o gmic_uint.o gmic_int.o gmic_float.o gmic_double.o gmic.cpp
+- $(CC) -o $(EXEPFX)gmic gmic.cpp -I. -Dgmic_separate_compilation -Dgmic_main \
++ $(CXX) -o $(EXEPFX)gmic gmic.cpp -I. -Dgmic_separate_compilation -Dgmic_main \
+ gmic_bool.o gmic_uchar.o gmic_char.o gmic_ushort.o gmic_short.o \
+ gmic_uint.o gmic_int.o gmic_float.o gmic_double.o $(CFLAGS) $(LDFLAGS) $(CONF_CFLAGS) $(CONF_LDFLAGS)
+
+@@ -399,6 +405,56 @@
+ "STRIP_EXE=true" \
+ all use_jpeg_buffer greycstoration4gimp gmic4gimp
+# FreeBSD targets
+dFreeBSD:
-+ make "ARCHFLAGS=$(CIMG_FREEBSD_FLAGS) $(CIMG_DEFAULT_FLAGS)" all
++ make \
++"CONF_CFLAGS = \
++$(CIMG_DEBUG_CFLAGS) \
++$(CIMG_VT100_CFLAGS) \
++$(CIMG_X11_CFLAGS) \
++$(CIMG_XSHM_CFLAGS) \
++$(CIMG_XRANDR_CFLAGS) \
++$(CIMG_ZLIB_CFLAGS)" \
++"CONF_LDFLAGS = \
++$(CIMG_FREEBSD_LDFLAGS) \
++$(CIMG_ZLIB_LDFLAGS) \
++$(CIMG_X11_LDFLAGS) \
++$(CIMG_XSHM_LDFLAGS) \
++$(CIMG_XRANDR_LDFLAGS)" \
++all
+
+oFreeBSD:
-+ make "ARCHFLAGS=$(CIMG_FREEBSD_FLAGS) $(CIMG_FULL_FLAGS)" all
- # Sun Solaris targets
++ make \
++"CONF_CFLAGS = \
++$(CIMG_OPT_CFLAGS) \
++$(CIMG_VT100_CFLAGS) \
++$(CIMG_X11_CFLAGS) \
++$(CIMG_XSHM_CFLAGS) \
++$(CIMG_XRANDR_CFLAGS) \
++$(CIMG_TIFF_CFLAGS) \
++$(CIMG_PNG_CFLAGS) \
++$(CIMG_JPEG_CFLAGS) \
++$(CIMG_ZLIB_CFLAGS) \
++$(CIMG_MAGICK_CFLAGS) \
++$(CIMG_FFMPEG_CFLAGS) \
++$(CIMG_LAPACK_CFLAGS) \
++$(CIMG_FFTW3_CFLAGS)" \
++"CONF_LDFLAGS = \
++$(CIMG_FREEBSD_LDFLAGS) \
++$(CIMG_X11_LDFLAGS) \
++$(CIMG_XSHM_LDFLAGS) \
++$(CIMG_XRANDR_LDFLAGS) \
++$(CIMG_TIFF_LDFLAGS) \
++$(CIMG_PNG_LDFLAGS) \
++$(CIMG_JPEG_LDFLAGS) \
++$(CIMG_ZLIB_LDFLAGS) \
++$(CIMG_MAGICK_LDFLAGS) \
++$(CIMG_FFMPEG_LDFLAGS) \
++$(CIMG_LAPACK_LDFLAGS) \
++$(CIMG_FFTW3_LDFLAGS)" \
++"STRIP_EXE=true" \
++all use_jpeg_buffer greycstoration4gimp gmic4gimp
++
+ # Sun Solaris targets, with X11 display.
solaris:
- make "ARCHFLAGS=$(CIMG_SOLARIS_FLAGS) $(CIMG_DEFAULT_FLAGS)" all
+ @make \