summaryrefslogtreecommitdiff
path: root/community/gmic/opencv-buildfix.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/gmic/opencv-buildfix.patch')
-rw-r--r--community/gmic/opencv-buildfix.patch93
1 files changed, 23 insertions, 70 deletions
diff --git a/community/gmic/opencv-buildfix.patch b/community/gmic/opencv-buildfix.patch
index 69778ac93..b204cb721 100644
--- a/community/gmic/opencv-buildfix.patch
+++ b/community/gmic/opencv-buildfix.patch
@@ -1,79 +1,32 @@
-diff -wbBur gmic-1.5.1.1/src/CImg.h gmic-1.5.1.1.my/src/CImg.h
---- gmic-1.5.1.1/src/CImg.h 2012-04-06 17:47:06.000000000 +0400
-+++ gmic-1.5.1.1.my/src/CImg.h 2012-04-10 02:10:19.000000000 +0400
-@@ -243,7 +243,11 @@
- #define _cimg_redefine_False
- #endif
- #include <cstddef>
-+#undef True
-+#undef False
- #include "cv.h"
-+#define True 1
-+#define False 0
- #include "highgui.h"
- #endif
-
-diff -wbBur gmic-1.5.1.1/src/Makefile gmic-1.5.1.1.my/src/Makefile
---- gmic-1.5.1.1/src/Makefile 2012-04-06 17:47:05.000000000 +0400
-+++ gmic-1.5.1.1.my/src/Makefile 2012-04-10 02:39:09.000000000 +0400
-@@ -164,12 +164,12 @@
- # Flags to enable native support of webcams, using the OpenCV library.
- # This requires the presence of the OpenCV include and library files.
- # (package 'libcv3-2-dev' on Debian).
--OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include -I$(USR)/include/opencv
-+OPENCV_CFLAGS = -Dcimg_use_opencv -I$(USR)/include/opencv `pkg-config --cflags opencv`
- ifeq ($(OS),Darwin)
--OPENCV_LDFLAGS = `pkg-config opencv --libs` # Use this for OpenCV 2.2.0 !
-+OPENCV_LDFLAGS = `pkg-config --libs opencv` -lopencv_core -lopencv_ml -lopencv_highgui
- else
--OPENCV_LDFLAGS = -lcv -lhighgui
--# OPENCV_LDFLAGS = -lopencv_core -lopencv_highgui # Use this for OpenCV 2.2.0 !
-+OPENCV_LDFLAGS = `pkg-config --libs opencv` -lopencv_core -lopencv_ml -lopencv_highgui
-+# OPENCV_LDFLAGS = `pkg-config --libs opencv` -lopencv_core -lopencv_ml -lopencv_highgui
- endif
-
- # Flags to enable native support of most classical image file formats, using the GraphicsMagick++ library.
-@@ -270,7 +270,6 @@
- $(MAKE) bashcompletion
- $(MAKE) gimp
- $(MAKE) lib
-- $(MAKE) zart
- else
- ifeq ($(OS),Darwin)
- @echo "**"
-@@ -297,7 +296,7 @@
+diff -wbBur gmic-1.5.1.7/src/Makefile gmic-1.5.1.7.q/src/Makefile
+--- gmic-1.5.1.7/src/Makefile 2012-07-26 12:59:34.000000000 +0400
++++ gmic-1.5.1.7.q/src/Makefile 2012-08-03 14:03:10.000000000 +0400
+@@ -296,7 +296,7 @@
zart: lib
ifneq ($(OS),Darwin)
- cd ../zart && qmake-qt4 zart.pro && $(MAKE) && strip zart
+ cd ../zart && qmake zart.pro && $(MAKE) && strip zart
else
- cd ../zart && qmake zart_mac.pro && $(MAKE)
+ cd ../zart && qmake zart.pro && $(MAKE) "CFLAGS=$(STD_MACOSX_CFLAGS) $(OPT_CFLAGS)" "LDFLAGS=$(STD_MACOSX_LDFLAGS) $(OPT_LDFLAGS)"
endif
-@@ -386,16 +385,13 @@
- # Install/uninstall/clean.
- install:
- mkdir -p $(DESTDIR)$(PLUGINDIR)/
-- cp -f gmic_gimp $(DESTDIR)$(PLUGINDIR)/
-+
- mkdir -p $(DESTDIR)$(USR)/bin/
- cp -f gmic $(DESTDIR)$(USR)/bin/
- mkdir -p $(DESTDIR)$(USR)/include/
- cp -f gmic.h $(DESTDIR)$(USR)/include/
- ifneq ($(OS),Darwin)
- mkdir -p $(DESTDIR)$(USR)/share
-- mkdir -p $(DESTDIR)$(USR)/share/zart
-- cp -f ../zart/haar*.xml $(DESTDIR)$(USR)/share/zart
-- cp -f ../zart/zart $(DESTDIR)$(USR)/bin/zart
- mkdir -p $(DESTDIR)$(USR)/lib
- cp -f libgmic.so $(DESTDIR)$(USR)/lib/libgmic.so.1.5.1.1
- ln -s libgmic.so.1.5.1.1 $(DESTDIR)$(USR)/lib/libgmic.so.1.5.1
-@@ -420,8 +416,6 @@
- rm -rf $(DESTDIR)$(USR)/share/doc/gmic/
- rm -f $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz
- rm -f $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz
-- rm -f $(DESTDIR)$(USR)/bin/zart
-- rm -rf $(DESTDIR)$(USR)/share/zart/
+@@ -403,6 +403,7 @@
+ mkdir -p $(DESTDIR)$(USR)/share/man/fr/man1/
+ cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/man1/gmic.1.gz
+ cp -f ../man/gmic.1.gz $(DESTDIR)$(USR)/share/man/fr/man1/gmic.1.gz
++ if test -d /usr/share/bash-completion/completions; then mkdir -p $(DESTDIR)/usr/share/bash-completion/completions/; cp -f gmic_bashcompletion.sh $(DESTDIR)/usr/share/bash-completion/completions/gmic; fi
+ if test -d /etc/bash_completion.d/; then mkdir -p $(DESTDIR)/etc/bash_completion.d/; cp -f gmic_bashcompletion.sh $(DESTDIR)/etc/bash_completion.d/gmic; fi
+ if test -d /opt/local/etc/bash_completion.d/; then mkdir -p $(DESTDIR)/opt/local/etc/bash_completion.d/; cp -f gmic_bashcompletion.sh $(DESTDIR)/opt/local/etc/bash_completion.d/gmic; fi
- distclean: clean
+diff -wbBur gmic-1.5.1.7/zart/zart.pro gmic-1.5.1.7.q/zart/zart.pro
+--- gmic-1.5.1.7/zart/zart.pro 2012-07-26 12:59:33.000000000 +0400
++++ gmic-1.5.1.7.q/zart/zart.pro 2012-08-03 12:32:27.000000000 +0400
+@@ -34,7 +34,7 @@
+ FORMS = ui/MainWindow.ui ui/DialogAbout.ui ui/DialogLicence.ui
+ !macx {
+- LIBS += -lX11 ../src/libgmic.a -lcxcore -lcv -lml -lhighgui -lml -lfftw3
++ LIBS += -lX11 ../src/libgmic.a `pkg-config --libs opencv` -lopencv_core -lopencv_ml -lopencv_highgui -lfftw3
+ } else {
+ LIBS += -lX11 ../src/libgmic.a `pkg-config opencv --libs` -lfftw3
+ }