+++ /dev/null
---- gmic-1.6.0.2/src/Makefile
-+++ gmic-1.6.0.2/src/Makefile
-@@ -85,7 +85,6 @@
- else\r
- MANDATORY_CFLAGS += -Dgmic_build -I$(USR)/$(INCLUDE)\r
- endif\r
--MANDATORY_LIBS += -L$(USR)/$(LIB)\r
- ifeq ($(notdir $(CC)),g++)\r
- MANDATORY_CFLAGS += -Wall -W\r
- MANDATORY_LIBS += -lm\r
-@@ -142,14 +141,14 @@
- # (keep /usr/ dirname here since X11 is located in /usr/ on Mac too).\r
- # This requires the presence of the X11 include and library files.\r
- # (package 'libx11-dev' on Debian).\r
--X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" -I/usr/X11R6/include #-Dcimg_use_xrandr\r
--X11_LIBS = -L/usr/X11R6/lib -lX11 -lpthread #-lXrandr\r
-+X11_CFLAGS = -Dcimg_display=1 -Dcimg_appname=\\\"gmic\\\" #-Dcimg_use_xrandr\r
-+X11_LIBS = -lX11 -lpthread #-lXrandr\r
- \r
- # Flags to enable fast display, using XShm.\r
- # This requires the presence of the X11 extension include and library files.\r
- # (package 'libx11-dev' on Debian).\r
- XSHM_CFLAGS = -Dcimg_use_xshm\r
--XSHM_LIBS = -L$(USR)/X11R6/lib -lXext\r
-+XSHM_LIBS = -lXext\r
- \r
- # Flags to enable image display, using GDI32.\r
- # This requires the presence of the GDI32 include and library files.\r
-@@ -177,8 +176,8 @@
- # Flags to enable native support for MINC2 image files, using the MINC2 library.\r
- # ( http://en.wikibooks.org/wiki/MINC/Reference/MINC2.0_Users_Guide )\r
- # (package 'libminc-dev' on Debian).\r
--MINC2_CFLAGS = -Dcimg_use_minc2 -I${HOME}/local/include\r
--MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz -L${HOME}/local/lib\r
-+MINC2_CFLAGS = -Dcimg_use_minc2\r
-+MINC2_LIBS = -lminc_io -lvolume_io2 -lminc2 -lnetcdf -lhdf5 -lz\r
- \r
- # Flags to enable native support for compressed .cimgz files, using the Zlib library.\r
- # This requires the presence of the Zlib include and library files.\r
-@@ -345,10 +344,10 @@
- endif\r
- \r
- gimp:\r
-- $(MAKE) "CFLAGS=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS) $(OPT_LIBS)" "STRIP_EXE=1" gmic_gimp\r
-+ $(MAKE) "CFLAGS+=$(STD_GIMP_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_GIMP_LIBS) $(OPT_LIBS)" gmic_gimp\r
- \r
- lib:\r
-- $(MAKE) "CFLAGS=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_LIB_LIBS) $(OPT_LIBS)" gmic_lib\r
-+ $(MAKE) "CFLAGS+=$(STD_LIB_CFLAGS) $(OPT_CFLAGS)" "LIBS+=$(STD_LIB_LIBS) $(OPT_LIBS)" gmic_lib\r
- \r
- zart: lib\r
- ifneq ($(OS),Darwin)\r
-@@ -359,7 +358,7 @@
- \r
- # Entries for other configurations.\r
- linux:\r
-- $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(STD_UNIX_LIBS)" "STRIP_EXE=1" gmic\r
-+ $(MAKE) "CFLAGS+=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(STD_UNIX_LIBS)" gmic\r
- \r
- solaris:\r
- $(MAKE) "CFLAGS=$(STD_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(STD_UNIX_LIBS) -R$(USR)/X11R6/lib -lrt -lnsl -lsocket" "STRIP_EXE=1" gmic\r
-@@ -386,28 +385,27 @@
- $(MAKE) "CFLAGS+=$(MINIMAL_MACOSX_CFLAGS)" "LIBS+=$(MINIMAL_MACOSX_LIBS)" gmic\r
- \r
- custom:\r
-- $(MAKE) "CFLAGS=$(CUSTOM_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(CUSTOM_UNIX_LIBS)" "STRIP_EXE=1" gmic\r
-+ $(MAKE) "CFLAGS+=$(CUSTOM_UNIX_CFLAGS) $(OPT_CFLAGS)" "LIBS=$(CUSTOM_UNIX_LIBS)" gmic\r
- \r
- # Internal rules to build compilation modules.\r
- gmic_lib.o: gmic.cpp\r
- $(CC) -o gmic_lib.o -c gmic.cpp -fPIC $(CFLAGS)\r
- gmic_lib: gmic_lib.o\r
-- ar rcs libgmic.a gmic_lib.o\r
-+ $(AR) rcs libgmic.a gmic_lib.o\r
- ifneq ($(OS),Darwin)\r
-- $(CC) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LIBS)\r
-+ $(CC) $(LDFLAGS) -shared -Wl,-soname,libgmic.so.1 -o libgmic.so gmic_lib.o $(LIBS)\r
- $(CC) -o gmic_use_lib gmic_use_lib.cpp -L. -lgmic $(FFTW_LIBS)\r
- else\r
-- $(CC) -shared -o libgmic.so gmic_lib.o $(LIBS)\r
-+ $(CC) $(LDFLAGS) -shared -o libgmic.so gmic_lib.o $(LIBS)\r
- endif\r
- \r
- gmic_gimp.o: gmic.cpp CImg.h\r
- $(CC) -o gmic_gimp.o -c gmic.cpp $(CFLAGS) -Dgmic_gimp\r
- gmic_gimp : gmic_gimp.o gmic_gimp.cpp\r
-- $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS)\r
-- strip gmic_gimp$(EXE)\r
-+ $(CC) -o gmic_gimp gmic_gimp.cpp gmic_gimp.o `gimptool-2.0$(EXE) --cflags` $(CFLAGS) $(LDFLAGS) `gimptool-2.0$(EXE) --libs` $(LIBS)\r
- \r
- gmic: gmic.cpp gmic.h CImg.h\r
-- $(CC) -o gmic gmic.cpp $(CFLAGS) -Dgmic_main $(LIBS)\r
-+ $(CC) -o gmic gmic.cpp $(CFLAGS) $(LDFLAGS) -Dgmic_main $(LIBS)\r
- \r
- gmic_def.h: gmic_def.gmic\r
- @echo "#ifndef gmic_gimp" > gmic_def.h\r
-@@ -422,20 +420,25 @@
- # Generate bash completion script.\r
- bashcompletion:\r
- @mkdir -p ../resources\r
-- @\gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh\r
-+ @./gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -document_gmic bash 2> ../resources/gmic_bashcompletion.sh\r
- \r
- # Generate man page.\r
- man:\r
- @mkdir -p ../man\r
-- @\gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -__help man 2> ../man/gmic.1\r
-- @gzip -f ../man/gmic.1\r
-+ @./gmic -v - gmic_def.gmic raw:gmic_def.gmic,uchar -__help man 2> ../man/gmic.1\r
-+\r
-+install: install-gimp install-bin install-lib install-man install-bash\r
- \r
- # Install/uninstall/clean procedures.\r
--install:\r
-+install-gimp:\r
- mkdir -p $(DESTDIR)$(PLUGINDIR)/\r
- cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/\r
-+\r
-+install-bin:\r
- mkdir -p $(DESTDIR)$(USR)/$(BIN)/\r
- cp -f gmic $(DESTDIR)$(USR)/$(BIN)/\r
-+\r
-+install-lib:\r
- mkdir -p $(DESTDIR)$(USR)/$(INCLUDE)/\r
- cp -f gmic.h $(DESTDIR)$(USR)/$(INCLUDE)/\r
- ifneq ($(OS),Darwin)\r
-@@ -445,13 +448,14 @@
- ln -s libgmic.so.1.6.0 $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1\r
- ln -s libgmic.so.1 $(DESTDIR)$(USR)/$(LIB)/libgmic.so\r
- endif\r
-+\r
-+install-man:\r
- mkdir -p $(DESTDIR)$(USR)/share/man/\r
- mkdir -p $(DESTDIR)$(USR)/share/man/man1/\r
-- mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/\r
-- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz\r
-- cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz\r
-+ cp -f ../man/gmic.1 $(DESTDIR)$(USR)/share/man/man1/gmic.1\r
-+\r
-+install-bash:\r
- 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\r
-- 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\r
- \r
- uninstall:\r
- rm -f $(DESTDIR)$(USR)/$(BIN)/gmic\r
-@@ -460,8 +464,7 @@
- rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so.1\r
- rm -f $(DESTDIR)$(USR)/$(LIB)/libgmic.so\r
- rm -rf $(DESTDIR)$(USR)/share/doc/gmic/\r
-- rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz\r
-- rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz\r
-+ rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1\r
- \r
- distclean: clean\r
- \r