diff options
Diffstat (limited to 'graphics/php-facedetect')
-rw-r--r-- | graphics/php-facedetect/Makefile | 7 | ||||
-rw-r--r-- | graphics/php-facedetect/files/patch-config.m4 | 21 | ||||
-rw-r--r-- | graphics/php-facedetect/files/patch-facedetect.c | 20 |
3 files changed, 43 insertions, 5 deletions
diff --git a/graphics/php-facedetect/Makefile b/graphics/php-facedetect/Makefile index cbd78d3ecc6a..ffd8ee396467 100644 --- a/graphics/php-facedetect/Makefile +++ b/graphics/php-facedetect/Makefile @@ -7,7 +7,7 @@ PORTNAME= facedetect PORTVERSION= 1.0.1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics MASTER_SITES= http://www.xarg.org/download/ PKGNAMEPREFIX= php- @@ -15,7 +15,7 @@ PKGNAMEPREFIX= php- MAINTAINER= mm@FreeBSD.org COMMENT= Face detection extension for PHP using OpenCV library -LIB_DEPENDS= cv.2:${PORTSDIR}/graphics/opencv +LIB_DEPENDS= opencv_legacy.2:${PORTSDIR}/graphics/opencv LICENSE= PHP30 @@ -37,7 +37,4 @@ CONFIGURE_ENV+= LDFLAGS="${LDFLAGS}" USE_GCC= 4.2+ .endif -post-patch: - @${TOUCH} ${WRKSRC}/cvconfig.h - .include <bsd.port.post.mk> diff --git a/graphics/php-facedetect/files/patch-config.m4 b/graphics/php-facedetect/files/patch-config.m4 new file mode 100644 index 000000000000..9ef19afebcc5 --- /dev/null +++ b/graphics/php-facedetect/files/patch-config.m4 @@ -0,0 +1,21 @@ +--- config.m4.orig 2011-06-28 15:05:08.566341757 +0200 ++++ config.m4 2011-06-28 15:06:08.526112463 +0200 +@@ -25,15 +25,12 @@ + PHP_ADD_INCLUDE($FACEDETECT_DIR/include) + + AC_CHECK_HEADER([$FACEDETECT_DIR/include/opencv/cv.h], [], AC_MSG_ERROR('opencv/cv.h' header not found)) +- AC_CHECK_HEADER([$FACEDETECT_DIR/include/opencv/cvver.h], [], AC_MSG_ERROR('opencv/cvver.h' header not found)) ++ AC_CHECK_HEADER([$FACEDETECT_DIR/include/opencv2/core/version.hpp], [], AC_MSG_ERROR('opencv2/core/version.hpp' header not found)) + AC_CHECK_HEADER([$FACEDETECT_DIR/include/opencv/highgui.h], [], AC_MSG_ERROR('opencv/highgui.h' header not found)) + +- PHP_CHECK_LIBRARY(cv, cvLoad, ++ PHP_CHECK_LIBRARY(opencv_legacy, cvLoad, + [ +- PHP_ADD_LIBRARY_WITH_PATH(cv, $FACEDETECT_DIR/lib, FACEDETECT_SHARED_LIBADD) +- PHP_ADD_LIBRARY_WITH_PATH(cvaux, $FACEDETECT_DIR/lib, FACEDETECT_SHARED_LIBADD) +- PHP_ADD_LIBRARY_WITH_PATH(highgui, $FACEDETECT_DIR/lib, FACEDETECT_SHARED_LIBADD) +- PHP_ADD_LIBRARY_WITH_PATH(cxcore, $FACEDETECT_DIR/lib, FACEDETECT_SHARED_LIBADD) ++ PHP_ADD_LIBRARY_WITH_PATH(opencv_legacy, $FACEDETECT_DIR/lib, FACEDETECT_SHARED_LIBADD) + AC_DEFINE(HAVE_FACEDETECT, 1, [ ]) + ],[ + AC_MSG_ERROR([wrong OpenCV version or OpenCV not found]) diff --git a/graphics/php-facedetect/files/patch-facedetect.c b/graphics/php-facedetect/files/patch-facedetect.c new file mode 100644 index 000000000000..fc83012c89db --- /dev/null +++ b/graphics/php-facedetect/files/patch-facedetect.c @@ -0,0 +1,20 @@ +--- facedetect.c.orig 2010-03-15 01:07:12.000000000 +0100 ++++ facedetect.c 2011-06-28 15:08:27.134914621 +0200 +@@ -21,7 +21,7 @@ + #include "php_facedetect.h" + + #include <opencv/cv.h> +-#include <opencv/cvver.h> ++#include <opencv2/core/version.hpp> + #include <opencv/highgui.h> + + /* {{{ facedetect_functions[] +@@ -104,7 +104,7 @@ + + storage = cvCreateMemStorage(0); + +- faces = cvHaarDetectObjects(gray, cascade, storage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize(0, 0)); ++ faces = cvHaarDetectObjects(gray, cascade, storage, 1.1, 2, CV_HAAR_DO_CANNY_PRUNING, cvSize(0, 0), cvSize(0, 0)); + + if(return_type) { + |