Gentoo Archives: gentoo-commits

From: "Tim Harder (radhermit)" <radhermit@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in media-gfx/gmic/files: gmic-1.5.5.1-makefile.patch
Date: Mon, 01 Apr 2013 08:00:17
Message-Id: 20130401080009.3D9702171F@flycatcher.gentoo.org
1 radhermit 13/04/01 08:00:09
2
3 Added: gmic-1.5.5.1-makefile.patch
4 Log:
5 Link against libavutil (fixes bug #463826).
6
7 (Portage version: 2.2.0_alpha169/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
8
9 Revision Changes Path
10 1.1 media-gfx/gmic/files/gmic-1.5.5.1-makefile.patch
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/gmic/files/gmic-1.5.5.1-makefile.patch?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/gmic/files/gmic-1.5.5.1-makefile.patch?rev=1.1&content-type=text/plain
14
15 Index: gmic-1.5.5.1-makefile.patch
16 ===================================================================
17 --- gmic-1.5.5.1/src/Makefile
18 +++ gmic-1.5.5.1/src/Makefile
19 @@ -77,7 +77,7 @@
20
21 # Flags that are mandatory to compile 'gmic'.
22 MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/include
23 -MANDATORY_LDFLAGS += -L$(USR)/lib
24 +MANDATORY_LDFLAGS +=
25 ifeq ($(IS_GCC),yes)
26 MANDATORY_CFLAGS += -Wall -W
27 MANDATORY_LDFLAGS += -lm
28 @@ -85,28 +85,20 @@
29 MANDATORY_CFLAGS+=$(IS_BETA_CFLAGS)
30
31 # Flags to enable debugging.
32 -DEBUG_CFLAGS = -Dcimg_use_vt100 -Dcimg_verbosity=3 -g
33 -
34 -# Flags to enable optimizations.
35 -ifeq ($(IS_GCC),yes)
36 -OPT_CFLAGS = -O3 # -fno-tree-pre # -ffast-math
37 -endif
38 -ifeq ($(CC),icc)
39 -OPT_CFLAGS = -O3 -ipo -no-prec-div -override-limits
40 -endif
41 +DEBUG_CFLAGS = -Dcimg_use_vt100 -Dcimg_verbosity=3
42
43 # Flags to enable image display, using X11
44 # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too).
45 # This requires the presence of the X11 include and library files.
46 # (package 'libx11-dev' on Debian).
47 -X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr
48 -X11_LDFLAGS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr
49 +X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr
50 +X11_LDFLAGS = -lX11 -lpthread #-lXrandr
51
52 # Flags to enable fast display, using XShm.
53 # This requires the presence of the X11 extension include and library files.
54 # (package 'libx11-dev' on Debian).
55 XSHM_CFLAGS = -Dcimg_use_xshm
56 -XSHM_LDFLAGS = -L$(USR)/X11R6/lib -lXext
57 +XSHM_LDFLAGS = -lXext
58
59 # Flags to enable image display, using GDI32.
60 # This requires the presence of the GDI32 include and library files.
61 @@ -141,7 +133,7 @@
62 # This requires the presence of the FFMPEG include and library files.
63 # (packages 'libavcodec-dev', 'libavutil-dev', 'libavformat-dev' and 'libswscale-dev' on Debian).
64 FFMPEG_CFLAGS = -Dcimg_use_ffmpeg -D__STDC_CONSTANT_MACROS -I$(USR)/include/libavcodec -I$(USR)/include/libavformat -I$(USR)/include/libswscale -I$(USR)/include/ffmpeg
65 -FFMPEG_LDFLAGS = -lavcodec -lavformat -lswscale
66 +FFMPEG_LDFLAGS = -lavcodec -lavformat -lavutil -lswscale
67
68 # Flags to enable native support for compressed .cimgz files, using the Zlib library.
69 # This requires the presence of the Zlib include and library files.
70 @@ -152,14 +144,8 @@
71 # Flags to enable native support of webcams, using the OpenCV library.
72 # This requires the presence of the OpenCV include and library files.
73 # (package 'libcv3-2-dev' on Debian).
74 -ifeq ($(OS),Darwin)
75 OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include -I$(USR)/include/opencv
76 OPENCV_LDFLAGS = `pkg-config opencv --libs` #-> Use this for OpenCV 2.2.0 !
77 -else
78 -OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include -I$(USR)/include/opencv
79 -# OPENCV_LDFLAGS = -lcv -lhighgui
80 -OPENCV_LDFLAGS = -lopencv_core -lopencv_highgui #-> Use this for OpenCV >= 2.2.0 !
81 -endif
82
83 # Flags to enable native support of most classical image file formats, using the GraphicsMagick++ library.
84 # This requires the presence of the GraphicsMagick++ include and library files.
85 @@ -287,10 +273,10 @@
86 endif
87
88 gimp:
89 - $(MAKE) "CFLAGS=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS) $(OPT_LDFLAGS)" "STRIP_EXE=1" gmic_gimp
90 + $(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_GIMP_LDFLAGS) $(OPT_LDFLAGS)" gmic_gimp
91
92 lib:
93 - $(MAKE) "CFLAGS=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_LIB_LDFLAGS) $(OPT_LDFLAGS)" gmic_lib
94 + $(MAKE) "CFLAGS+=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_LIB_LDFLAGS) $(OPT_LDFLAGS)" gmic_lib
95
96 zart: lib
97 ifneq ($(OS),Darwin)
98 @@ -313,10 +299,10 @@
99 $(MAKE) "CFLAGS+=$(DEBUG_UNIX_CFLAGS)" "LDFLAGS+=$(DEBUG_UNIX_LDFLAGS)" gmic_minimal
100
101 linux:
102 - $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic
103 + $(MAKE) "CFLAGS+=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(STD_UNIX_LDFLAGS)" gmic_gmic
104
105 custom:
106 - $(MAKE) "CFLAGS=$(CUST_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(CUST_UNIX_LDFLAGS)" "STRIP_EXE=1" gmic_gmic
107 + $(MAKE) "CFLAGS+=$(CUST_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS+=$(CUST_UNIX_LDFLAGS)" gmic_gmic
108
109 solaris:
110 $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_UNIX_LDFLAGS) -R$(USR)/X11R6/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic_gmic
111 @@ -337,7 +323,6 @@
112 ar rcs libgmic.a gmic_lib.o
113 ifneq ($(OS),Darwin)
114 $(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LDFLAGS)
115 - $(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic $(FFTW_LDFLAGS)
116 else
117 $(CC) -shared -o libgmic.so gmic_lib.o $(LDFLAGS)
118 endif
119 @@ -346,7 +331,6 @@
120 $(CC) -o gmic_gimp.o -c gmic.cpp $(CFLAGS) -Dgmic_gimp -Dgmic_float_only
121 gmic_gimp : gmic_gimp.o gmic_gimp.cpp
122 $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LDFLAGS)
123 - strip gmic_gimp$(EXE)
124
125 gmic_minimal: gmic.cpp
126 $(CC) -o gmic gmic.cpp $(CFLAGS) -Dgmic_float_only -Dgmic_main $(LDFLAGS)
127 @@ -371,7 +355,6 @@
128 $(CC) -o gmic_double.o -c gmic.cpp $(CFLAGS) -Dgmic_split_compilation -Dgmic_double
129 gmic_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_def.h
130 $(CC) -o 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 $(LDFLAGS)
131 - strip gmic$(EXE)
132
133 def:
134 @echo "#ifndef gmic_gimp" > gmic_def.h