Connor Abbott 4d73a968b2 opencv: import from oe-classic and upgrade to 2.3.1
OpenCV <= 2.2 won't compile on oe-core due to the lack of v4l1 headers, and therefore wasn't included in this patch.
Also, the support for newer cv2-style python bindings is a bit hacked up at the moment due to the way OpenCV detects the Python version and Numpy headers (see 0001-Fix-CMakeLists.txt-numpy-detection.patch). In particular, it requires the native & target python to be the same version and have similar site-packages directories, which is true at least for now in OE.

Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
2011-11-01 08:35:36 +01:00

43 lines
1.3 KiB
BlitzBasic

DESCRIPTION = "Opencv : The Open Computer Vision Library"
HOMEPAGE = "http://opencv.willowgarage.com/wiki/"
SECTION = "libs"
LICENSE = "BSD"
DEPENDS = "opencv"
LIC_FILES_CHKSUM = "file://include/opencv2/opencv.hpp;endline=41;md5=6d690d8488a6fca7a2c192932466bb14 \
"
SRC_URI = "svn://code.ros.org/svn/opencv/tags/2.3.1;module=opencv;proto=https \
"
SRCREV = "6923"
PV = "2.3.1"
PR = "r0"
S = "${WORKDIR}/opencv"
do_install() {
cd samples/c
install -d ${D}/${bindir}
install -d ${D}/${datadir}/opencv/samples
cp * ${D}/${datadir}/opencv/samples || true
for i in *.c; do
echo "compiling $i"
${CXX} ${CFLAGS} ${LDFLAGS} -ggdb `pkg-config --cflags opencv` -o `basename $i .c` $i `pkg-config --libs opencv` || true
install -m 0755 `basename $i .c` ${D}/${bindir} || true
rm ${D}/${datadir}/opencv/samples/`basename $i .c` || true
done
for i in *.cpp; do
echo "compiling $i"
${CXX} ${CFLAGS} ${LDFLAGS} -ggdb `pkg-config --cflags opencv` -o `basename $i .cpp` $i `pkg-config --libs opencv` || true
install -m 0755 `basename $i .cpp` ${D}/${bindir} || true
rm ${D}/${datadir}/opencv/samples/`basename $i .cpp` || true
done
}
FILES_${PN}-dev += "${datadir}/opencv/samples/*.c* ${datadir}/opencv/samples/*.vcp* ${datadir}/opencv/samples/build*"
FILES_${PN} += "${bindir} ${datadir}/opencv"