2013-07-13 17:19:22 +01:00
|
|
|
version=\
|
|
|
|
(
|
2016-11-10 19:15:50 +00:00
|
|
|
"2.4.13"
|
2013-07-13 17:19:22 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
url=\
|
|
|
|
(
|
2015-03-17 18:06:10 +00:00
|
|
|
"http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/$version/opencv-$version.zip"
|
2013-07-13 17:19:22 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
md5=\
|
|
|
|
(
|
2016-11-10 19:15:50 +00:00
|
|
|
'886b0c511209b2f3129649928135967c'
|
2015-03-17 18:06:10 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
requires=\
|
|
|
|
(
|
|
|
|
'ffmpeg/default'
|
2013-07-13 17:19:22 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
maintainer=\
|
|
|
|
(
|
2015-03-17 18:06:10 +00:00
|
|
|
'Renato Caldas <rmsc@fe.up.pt>'
|
2013-07-13 17:19:22 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
configure()
|
|
|
|
{
|
2015-03-17 18:06:10 +00:00
|
|
|
LINKER_ADDED_FLAGS="-Wl,-rpath,${cfg_dir_rootfs}/usr/lib"
|
|
|
|
|
|
|
|
mkdir -p ../build
|
|
|
|
cd ../build
|
|
|
|
${cfg_dir_toolchain}/usr/local/bin/cmake \
|
2016-11-10 19:15:50 +00:00
|
|
|
-DCMAKE_SYSTEM_NAME="Linux" \
|
|
|
|
-DCMAKE_SYSTEM_PROCESSOR="$cfg_architecture" \
|
2015-03-17 18:06:10 +00:00
|
|
|
-DCMAKE_BUILD_TYPE=Release \
|
2016-11-10 19:15:50 +00:00
|
|
|
-DCMAKE_FIND_ROOT_PATH="${cfg_dir_toolchain_sysroot}/usr ${cfg_dir_rootfs}/usr" \
|
|
|
|
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
|
2015-03-17 18:06:10 +00:00
|
|
|
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
|
|
|
|
-DCMAKE_C_COMPILER="${cmd_target_cc}" \
|
|
|
|
-DCMAKE_CXX_COMPILER="${cmd_target_cxx}" \
|
|
|
|
-DCMAKE_C_FLAGS="${cfg_target_gcc_flags}" \
|
|
|
|
-DCMAKE_SHARED_LINKER_FLAGS="${LINKER_ADDED_FLAGS} ${CMAKE_SHARED_LINKER_FLAGS}" \
|
|
|
|
-DCMAKE_MODULE_LINKER_FLAGS="${LINKER_ADDED_FLAGS} ${CMAKE_MODULE_LINKER_FLAGS}" \
|
|
|
|
-DCMAKE_EXE_LINKER_FLAGS="${LINKER_ADDED_FLAGS} ${CMAKE_EXE_LINKER_FLAGS}" \
|
|
|
|
-DCMAKE_INSTALL_PREFIX="${cfg_dir_toolchain_sysroot}/usr" \
|
|
|
|
-DBUILD_DOCS=OFF \
|
|
|
|
-DBUILD_EXAMPLES=OFF \
|
|
|
|
-DBUILD_PERF_TESTS=OFF \
|
|
|
|
-DBUILD_SHARED_LIBS=ON \
|
2017-05-08 20:41:37 +01:00
|
|
|
-DBUILD_ZLIB=ON \
|
|
|
|
-DBUILD_PNG=ON \
|
|
|
|
-DWITH_1394=ON \
|
|
|
|
-DWITH_JPEG=ON \
|
|
|
|
-DWITH_PNG=ON \
|
2015-03-17 18:06:10 +00:00
|
|
|
-DBUILD_TESTS=OFF \
|
2017-05-08 20:41:37 +01:00
|
|
|
-DBUILD_WITH_DEBUG_INFO=ON \
|
2015-03-17 18:06:10 +00:00
|
|
|
../opencv-$version/
|
2013-07-13 17:19:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
build()
|
|
|
|
{
|
2015-03-17 18:06:10 +00:00
|
|
|
cd ${pkg_build_dir}/../build &&
|
|
|
|
$cmd_make VERBOSE=1
|
2013-07-13 17:19:22 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
host_install()
|
|
|
|
{
|
2015-03-17 18:06:10 +00:00
|
|
|
cd ${pkg_build_dir}/../build &&
|
2013-07-13 17:19:22 +01:00
|
|
|
$cmd_make install
|
|
|
|
}
|
|
|
|
|
|
|
|
target_install()
|
|
|
|
{
|
2015-03-17 18:06:10 +00:00
|
|
|
cd "${pkg_build_dir}/../build" &&
|
|
|
|
for f in "$cfg_dir_toolchain_sysroot/usr/lib/"libopencv*so*; do
|
|
|
|
if [ -L "$f" ]; then
|
|
|
|
cp -av "$f" "$cfg_dir_rootfs/usr/lib"
|
2013-07-13 17:19:22 +01:00
|
|
|
else
|
2015-03-17 18:06:10 +00:00
|
|
|
$cmd_target_strip -v "$f" -o "$cfg_dir_rootfs/usr/lib/$(basename "$f")"
|
2013-07-13 17:19:22 +01:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
}
|