1 |
radhermit 14/12/03 08:04:56 |
2 |
|
3 |
Added: gmic-1.6.0.2-makefile.patch |
4 |
Log: |
5 |
Version bump (bug #516012). Add openmp flag and drop to ffmpeg only since the external binary is called instead of linking against the library. |
6 |
|
7 |
(Portage version: 2.2.14/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3) |
8 |
|
9 |
Revision Changes Path |
10 |
1.1 media-gfx/gmic/files/gmic-1.6.0.2-makefile.patch |
11 |
|
12 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/gmic/files/gmic-1.6.0.2-makefile.patch?rev=1.1&view=markup |
13 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/media-gfx/gmic/files/gmic-1.6.0.2-makefile.patch?rev=1.1&content-type=text/plain |
14 |
|
15 |
Index: gmic-1.6.0.2-makefile.patch |
16 |
=================================================================== |
17 |
--- gmic-1.6.0.2/src/Makefile |
18 |
+++ gmic-1.6.0.2/src/Makefile |
19 |
@@ -85,7 +85,6 @@ |
20 |
else |
21 |
MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/$(INCLUDE) |
22 |
endif |
23 |
-MANDATORY_LIBS += -L$(USR)/$(LIB) |
24 |
ifeq ($(notdir $(CC)),g++) |
25 |
MANDATORY_CFLAGS += -Wall -W |
26 |
MANDATORY_LIBS += -lm |
27 |
@@ -142,14 +141,14 @@ |
28 |
# (keep /usr/ dirname here since X11 is located in /usr/ on Mac too). |
29 |
# This requires the presence of the X11 include and library files. |
30 |
# (package 'libx11-dev' on Debian). |
31 |
-X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr |
32 |
-X11_LIBS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr |
33 |
+X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr |
34 |
+X11_LIBS = -lX11 -lpthread #-lXrandr |
35 |
|
36 |
# Flags to enable fast display, using XShm. |
37 |
# This requires the presence of the X11 extension include and library files. |
38 |
# (package 'libx11-dev' on Debian). |
39 |
XSHM_CFLAGS = -Dcimg_use_xshm |
40 |
-XSHM_LIBS = -L$(USR)/X11R6/lib -lXext |
41 |
+XSHM_LIBS = -lXext |
42 |
|
43 |
# Flags to enable image display, using GDI32. |
44 |
# This requires the presence of the GDI32 include and library files. |
45 |
@@ -177,8 +176,8 @@ |
46 |
# Flags to enable native support for MINC2 image files, using the MINC2 library. |
47 |
# ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide ) |
48 |
# (package 'libminc-dev' on Debian). |
49 |
-MINC2_CFLAGS = -Dcimg_use_minc2 -I${HOME}/local/include |
50 |
-MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib |
51 |
+MINC2_CFLAGS = -Dcimg_use_minc2 |
52 |
+MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz |
53 |
|
54 |
# Flags to enable native support for compressed .cimgz files, using the Zlib library. |
55 |
# This requires the presence of the Zlib include and library files. |
56 |
@@ -345,10 +344,10 @@ |
57 |
endif |
58 |
|
59 |
gimp: |
60 |
- $(MAKE) "CFLAGS=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS) $(OPT_LIBS)" "STRIP_EXE=1" gmic_gimp |
61 |
+ $(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS) $(OPT_LIBS)" gmic_gimp |
62 |
|
63 |
lib: |
64 |
- $(MAKE) "CFLAGS=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_LIB_LIBS) $(OPT_LIBS)" gmic_lib |
65 |
+ $(MAKE) "CFLAGS+=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_LIB_LIBS) $(OPT_LIBS)" gmic_lib |
66 |
|
67 |
zart: lib |
68 |
ifneq ($(OS),Darwin) |
69 |
@@ -359,7 +358,7 @@ |
70 |
|
71 |
# Entries for other configurations. |
72 |
linux: |
73 |
- $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(STD_UNIX_LIBS)" "STRIP_EXE=1" gmic |
74 |
+ $(MAKE) "CFLAGS+=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(STD_UNIX_LIBS)" gmic |
75 |
|
76 |
solaris: |
77 |
$(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(STD_UNIX_LIBS) -R$(USR)/X11R6/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic |
78 |
@@ -386,28 +385,27 @@ |
79 |
$(MAKE) "CFLAGS+=$(MINIMAL_MACOSX_CFLAGS)" "LIBS+=$(MINIMAL_MACOSX_LIBS)" gmic |
80 |
|
81 |
custom: |
82 |
- $(MAKE) "CFLAGS=$(CUSTOM_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(CUSTOM_UNIX_LIBS)" "STRIP_EXE=1" gmic |
83 |
+ $(MAKE) "CFLAGS+=$(CUSTOM_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(CUSTOM_UNIX_LIBS)" gmic |
84 |
|
85 |
# Internal rules to build compilation modules. |
86 |
gmic_lib.o: gmic.cpp |
87 |
$(CC) -o gmic_lib.o -c gmic.cpp -fPIC $(CFLAGS) |
88 |
gmic_lib: gmic_lib.o |
89 |
- ar rcs libgmic.a gmic_lib.o |
90 |
+ $(AR) rcs libgmic.a gmic_lib.o |
91 |
ifneq ($(OS),Darwin) |
92 |
- $(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LIBS) |
93 |
+ $(CC) $(LDFLAGS) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LIBS) |
94 |
$(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic $(FFTW_LIBS) |
95 |
else |
96 |
- $(CC) -shared -o libgmic.so gmic_lib.o $(LIBS) |
97 |
+ $(CC) $(LDFLAGS) -shared -o libgmic.so gmic_lib.o $(LIBS) |
98 |
endif |
99 |
|
100 |
gmic_gimp.o: gmic.cpp CImg.h |
101 |
$(CC) -o gmic_gimp.o -c gmic.cpp $(CFLAGS) -Dgmic_gimp |
102 |
gmic_gimp : gmic_gimp.o gmic_gimp.cpp |
103 |
- $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS) |
104 |
- strip gmic_gimp$(EXE) |
105 |
+ $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) $(LDFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS) |
106 |
|
107 |
gmic: gmic.cpp gmic.h CImg.h |
108 |
- $(CC) -o gmic gmic.cpp $(CFLAGS) -Dgmic_main $(LIBS) |
109 |
+ $(CC) -o gmic gmic.cpp $(CFLAGS) $(LDFLAGS) -Dgmic_main $(LIBS) |
110 |
|
111 |
gmic_def.h: gmic_def.gmic |
112 |
@echo "#ifndef gmic_gimp" > gmic_def.h |
113 |
@@ -422,20 +420,25 @@ |
114 |
# Generate bash completion script. |
115 |
bashcompletion: |
116 |
@mkdir -p ../resources |
117 |
- @\gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh |
118 |
+ @./gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh |
119 |
|
120 |
# Generate man page. |
121 |
man: |
122 |
@mkdir -p ../man |
123 |
- @\gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -__help man 2> ../man/gmic.1 |
124 |
- @gzip -f ../man/gmic.1 |
125 |
+ @./gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -__help man 2> ../man/gmic.1 |
126 |
+ |
127 |
+install: install-gimp install-bin install-lib install-man install-bash |
128 |
|
129 |
# Install/uninstall/clean procedures. |
130 |
-install: |
131 |
+install-gimp: |
132 |
mkdir -p $(DESTDIR)$(PLUGINDIR)/ |
133 |
cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/ |
134 |
+ |
135 |
+install-bin: |
136 |
mkdir -p $(DESTDIR)$(USR)/$(BIN)/ |
137 |
cp -f gmic $(DESTDIR)$(USR)/$(BIN)/ |
138 |
+ |
139 |
+install-lib: |
140 |
mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/ |
141 |
cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/ |
142 |
ifneq ($(OS),Darwin) |
143 |
@@ -445,13 +448,14 @@ |
144 |
ln -s libgmic.so.1.6.0 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
145 |
ln -s libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
146 |
endif |
147 |
+ |
148 |
+install-man: |
149 |
mkdir -p $(DESTDIR)$(USR)/share/man/ |
150 |
mkdir -p $(DESTDIR)$(USR)/share/man/man1/ |
151 |
- mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/ |
152 |
- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz |
153 |
- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz |
154 |
+ cp -f ../man/gmic.1 $(DESTDIR)$(USR)/share/man/man1/gmic.1 |
155 |
+ |
156 |
+install-bash: |
157 |
if [ -d /etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/etc/bash_completion.d/gmic; fi |
158 |
- if [ -d /opt/local/etc/bash_completion.d/ ]; then mkdir -p $(DESTDIR)/opt/local/etc/bash_completion.d/; cp -f ../resources/gmic_bashcompletion.sh $(DESTDIR)/opt/local/etc/bash_completion.d/gmic; fi |
159 |
|
160 |
uninstall: |
161 |
rm -f $(DESTDIR)$(USR)/$(BIN)/gmic |
162 |
@@ -460,8 +464,7 @@ |
163 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1 |
164 |
rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so |
165 |
rm -rf $(DESTDIR)$(USR)/share/doc/gmic/ |
166 |
- rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz |
167 |
- rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz |
168 |
+ rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1 |
169 |
|
170 |
distclean: clean |