package: libdecodeqr
severity: serious
tags: patch
version: 0.9.3-6

libdecodeqr FTBFS in unstable with the following errors. This was initially seen on the armhf and s390x buildds
and I have reproduced it locally on amd64.

checking for ln... ln
checking for cvCreateImage in -lcv... no
configure: error: libcv.la not found.

If your system already has OpenCV, append place of the libcv.la
to your LDFLAGS environment variables. eg,

LDFLAGS="$LDFLAGS -L/usr/local/opencv/lib";export LDFLAGS

dh_auto_configure: ./configure --build=arm-linux-gnueabihf --prefix=/usr 
--includedir=${prefix}/include --mandir=${prefix}/share/man 
--infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var 
--libexecdir=${prefix}/lib/libdecodeqr --disable-maintainer-mode 
--disable-dependency-tracking returned exit code 1
make[1]: *** [override_dh_auto_configure] Error 2
make[1]: Leaving directory 
`/build/buildd-libdecodeqr_0.9.3-6-armhf-sT8VVJ/libdecodeqr-0.9.3'
make: *** [build] Error 2

It appears this is caused by restructuring of the opencv libraries.
The attatched patch to debian/rules and debian/control makes
the package build.
diff -ur libdecodeqr-0.9.3/debian/control libdecodeqr-0.9.3.new/debian/control
--- libdecodeqr-0.9.3/debian/control	2011-09-15 23:18:38.000000000 +0000
+++ libdecodeqr-0.9.3.new/debian/control	2011-12-21 01:58:14.000000000 +0000
@@ -1,7 +1,7 @@
 Source: libdecodeqr
 Priority: optional
 Maintainer: Nobuhiro Iwamatsu <iwama...@debian.org>
-Build-Depends: debhelper (>= 8), libhighgui-dev, quilt
+Build-Depends: debhelper (>= 8), libhighgui-dev, quilt, libcv-dev
 Standards-Version: 3.9.2
 Section: libs
 Homepage: http://trac.koka-in.org/libdecodeqr
diff -ur libdecodeqr-0.9.3/debian/rules libdecodeqr-0.9.3.new/debian/rules
--- libdecodeqr-0.9.3/debian/rules	2011-09-15 23:22:25.000000000 +0000
+++ libdecodeqr-0.9.3.new/debian/rules	2011-12-21 02:17:57.000000000 +0000
@@ -16,11 +16,16 @@
 	- $(MAKE) -C src distclean
 	rm -rf src/Makefile src/libdecodeqr/Makefile src/sample/Makefile src/sample/simple/Makefile src/sample/webcam/Makefile src/test/Makefile
 	rm -rf modules/python/src2/hdr_parser.pyc
-
+	rm -f src/config.log
 	dh_clean
 
+export CPPFLAGS += -I/usr/include/opencv
+
 override_dh_auto_configure:
-	dh_auto_configure --sourcedirectory=src
+	dh_auto_configure --sourcedirectory=src -- --with-cv=opencv_core --with-highgui=opencv_highgui 
+	sed -i s/cxcore/opencv_imgproc/ src/libdecodeqr/Makefile
+	sed -i s/cxcore/opencv_imgproc/ src/sample/simple/Makefile
+	sed -i s/cxcore/opencv_imgproc/ src/sample/webcam/Makefile
 
 override_dh_auto_build:
 	$(MAKE) -C src DESTDIR=$(CURDIR)/debian/tmp

Reply via email to