Source: php-facedetect
Version: 1.1.0+git20160406-2
Severity: important
Justification: fails to build from source
Tags: patch

Dear Maintainer,

I am scheduled to transition of opencv.
This package is target to transition. I tested build with opencv 3.1.
As a result, this FTBFS with opencv 3.1.
Because libhighgui-dev and libcv-dev has been removed from opencv 3.1 package.
We need to use libopencv-dev instead of these package. And currenct
package disable
support of opencv 3 by patches/0002-Revert-opencv3-support.patch.

-----
make[1]: Entering directory '/build/php-facedetect-1.1.0+git20160406'
/bin/bash /build/php-facedetect-1.1.0+git20160406/libtool
--mode=compile cc  -I. -I/build/php-facedetect-1.1.0+git20160406
-DPHP_ATOM_INC -I/build/php-facedetect-1.1.0+git20160406/include
-I/build/php-facedetect-1.1.0+git20160406/main
-I/build/php-facedetect-1.1.0+git20160406 -I/usr/include/php/20151012
-I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM
-I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext
-I/usr/include/php/20151012/ext/date/lib  -Wdate-time
-D_FORTIFY_SOURCE=2 -DHAVE_CONFIG_H  -g -O2
-fdebug-prefix-map=/build/php-facedetect-1.1.0+git20160406=. -fPIE
-fstack-protector-strong -Wformat -Werror=format-security   -c
/build/php-facedetect-1.1.0+git20160406/facedetect.c -o facedetect.lo
libtool: compile:  cc -I. -I/build/php-facedetect-1.1.0+git20160406
-DPHP_ATOM_INC -I/build/php-facedetect-1.1.0+git20160406/include
-I/build/php-facedetect-1.1.0+git20160406/main
-I/build/php-facedetect-1.1.0+git20160406 -I/usr/include/php/20151012
-I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM
-I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext
-I/usr/include/php/20151012/ext/date/lib -Wdate-time
-D_FORTIFY_SOURCE=2 -DHAVE_CONFIG_H -g -O2
-fdebug-prefix-map=/build/php-facedetect-1.1.0+git20160406=.
-fstack-protector-strong -Wformat -Werror=format-security -c
/build/php-facedetect-1.1.0+git20160406/facedetect.c  -fPIC -DPIC -o
.libs/facedetect.o
/build/php-facedetect-1.1.0+git20160406/facedetect.c: In function
'zm_info_facedetect':
/build/php-facedetect-1.1.0+git20160406/facedetect.c:69:48: error:
'CV_VERSION' undeclared (first use in this function)
  php_info_print_table_row(2, "OpenCV version", CV_VERSION);
                                                ^~~~~~~~~~
/build/php-facedetect-1.1.0+git20160406/facedetect.c:69:48: note: each
undeclared identifier is reported only once for each function it
appears in
Makefile:194: recipe for target 'facedetect.lo' failed
-----

I attached a patch that revice this problem.
Could you check this patch and apply?

Best regards,
  Nobuhiro
diff -Nru php-facedetect-1.1.0+git20160406/debian/changelog php-facedetect-1.1.0+git20160406/debian/changelog
--- php-facedetect-1.1.0+git20160406/debian/changelog	2016-04-20 04:23:11.000000000 +0900
+++ php-facedetect-1.1.0+git20160406/debian/changelog	2016-10-18 00:35:24.000000000 +0900
@@ -1,3 +1,13 @@
+php-facedetect (1.1.0+git20160406-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Update B-D.
+    Change from libhighgui-dev and libcv-dev to libopencv-dev.
+  * Support OpenCV 3.
+    Remove 0002-Revert-opencv3-support.patch
+
+ -- Nobuhiro Iwamatsu <iwama...@debian.org>  Tue, 18 Oct 2016 00:35:24 +0900
+
 php-facedetect (1.1.0+git20160406-2) unstable; urgency=medium
 
   * Add ${php:Depends} to d/control (Closes: #821824)
diff -Nru php-facedetect-1.1.0+git20160406/debian/control php-facedetect-1.1.0+git20160406/debian/control
--- php-facedetect-1.1.0+git20160406/debian/control	2016-04-20 04:23:11.000000000 +0900
+++ php-facedetect-1.1.0+git20160406/debian/control	2016-10-18 00:35:24.000000000 +0900
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Debian PHP PECL Maintainers <pkg-php-p...@lists.alioth.debian.org>
 Uploaders: Mathieu Parent <sath...@debian.org>
-Build-Depends: debhelper (>= 9), php-dev, dh-php, libhighgui-dev, libcv-dev
+Build-Depends: debhelper (>= 9), php-dev, dh-php, libopencv-dev
 Standards-Version: 3.9.7
 Vcs-Git: https://anonscm.debian.org/git/pkg-php/php-facedetect.git
 Vcs-Browser: https://anonscm.debian.org/cgit/pkg-php/php-facedetect.git
diff -Nru php-facedetect-1.1.0+git20160406/debian/patches/0002-Revert-opencv3-support.patch php-facedetect-1.1.0+git20160406/debian/patches/0002-Revert-opencv3-support.patch
--- php-facedetect-1.1.0+git20160406/debian/patches/0002-Revert-opencv3-support.patch	2016-04-20 04:23:11.000000000 +0900
+++ php-facedetect-1.1.0+git20160406/debian/patches/0002-Revert-opencv3-support.patch	1970-01-01 09:00:00.000000000 +0900
@@ -1,84 +0,0 @@
-From f84448f210b7999fd94a6dd76ee2eec0f2eab600 Mon Sep 17 00:00:00 2001
-From: Mathieu Parent <math.par...@gmail.com>
-Date: Thu, 7 Apr 2016 06:40:27 +0200
-Subject: [PATCH] Revert "opencv3 support"
-
-This reverts commit 2a5056742a038f0de419376738fef81a184323a0.
-
-Until OpenCV 3 is in sid
----
- config.m4    |  8 +++-----
- config.w32   |  2 +-
- facedetect.c | 10 ++--------
- 3 files changed, 6 insertions(+), 14 deletions(-)
-
-diff --git a/config.m4 b/config.m4
-index 9bb60d8..1b58b07 100644
---- a/config.m4
-+++ b/config.m4
-@@ -2,7 +2,7 @@ PHP_ARG_WITH(facedetect, for facedetect support, [  --with-facedetect     Enable
- 
- if test "$PHP_FACEDETECT" != "no"; then
-   SEARCH_PATH="/usr/local /usr /opt/local"
--  SEARCH_FOR="/include/opencv2/core/core_c.h"
-+  SEARCH_FOR="/include/opencv/cv.h"
- 
-   if test -r $PHP_FACEDETECT/$SEARCH_FOR; then
-     FACEDETECT_DIR=$PHP_FACEDETECT
-@@ -24,10 +24,8 @@ if test "$PHP_FACEDETECT" != "no"; then
- 
-   PHP_ADD_INCLUDE($FACEDETECT_DIR/include)
- 
--  AC_CHECK_HEADER([$FACEDETECT_DIR/include/opencv2/core/core_c.h], [], AC_MSG_ERROR('opencv/core/core_c.h' header not found))
--  AC_CHECK_HEADER([$FACEDETECT_DIR/include/opencv2/imgproc/imgproc_c.h], [], AC_MSG_ERROR('opencv/imgproc/imgproc_c.h' header not found))
--  AC_CHECK_HEADER([$FACEDETECT_DIR/include/opencv2/photo/photo_c.h], [], AC_MSG_ERROR('opencv/photo/photo_c.h' header not found))
--  AC_CHECK_HEADER([$FACEDETECT_DIR/include/opencv2/objdetect/objdetect_c.h], [], AC_MSG_ERROR('opencv/objdetect/objdetect_c.h' header not found))
-+  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/highgui.h], [], AC_MSG_ERROR('opencv/highgui.h' header not found))
- 
-   PHP_CHECK_LIBRARY(opencv_core, cvLoad,
-   [
-diff --git a/config.w32 b/config.w32
-index 78306d1..1a79f55 100644
---- a/config.w32
-+++ b/config.w32
-@@ -8,7 +8,7 @@ if (PHP_FACEDETECT == "yes") {
- 		CHECK_LIB("opencv_core*.lib", "facedetect", PHP_FACEDETECT) &&
- 		CHECK_LIB("opencv_imgproc*.lib", "facedetect", PHP_FACEDETECT) &&
- 		CHECK_LIB("opencv_highgui*.lib", "facedetect", PHP_FACEDETECT) &&
--		CHECK_HEADER_ADD_INCLUDE("opencv2/core/core_c.h", "CFLAGS_FFACEDETECT")) {
-+		CHECK_HEADER_ADD_INCLUDE("opencv/cv.h", "CFLAGS_FFACEDETECT")) {
- 
- 		AC_DEFINE("HAVE_FACEDETECT", 1);
- 
-diff --git a/facedetect.c b/facedetect.c
-index 6bc73f6..32aa860 100644
---- a/facedetect.c
-+++ b/facedetect.c
-@@ -21,12 +21,8 @@
- #include "ext/standard/info.h"
- #include "php_facedetect.h"
- 
--#include "opencv2/core/core_c.h"
--#include "opencv2/imgproc/imgproc_c.h"
--#include "opencv2/photo/photo_c.h"
--#include "opencv2/objdetect/objdetect_c.h"
--
--#include "opencv2/core/version.hpp"
-+#include <opencv/cv.h>
-+#include <opencv/highgui.h>
- 
- /* {{{ facedetect_functions[]
-  *
-@@ -75,8 +71,6 @@ PHP_MINFO_FUNCTION(facedetect)
- }
- /* }}} */
- 
--IplImage* cvLoadImage(char *file, int number);
--
- static void php_facedetect(INTERNAL_FUNCTION_PARAMETERS, int return_type)
- {
- 	char *file, *casc;
--- 
-2.8.0.rc3
-
diff -Nru php-facedetect-1.1.0+git20160406/debian/patches/series php-facedetect-1.1.0+git20160406/debian/patches/series
--- php-facedetect-1.1.0+git20160406/debian/patches/series	2016-04-20 04:23:11.000000000 +0900
+++ php-facedetect-1.1.0+git20160406/debian/patches/series	2016-10-18 00:35:24.000000000 +0900
@@ -1,2 +1 @@
 0001-Fix-configure-script-syntax.patch
-0002-Revert-opencv3-support.patch

Reply via email to