raspicam: add new rule for raspicam camera.

This commit is contained in:
Pedro Gonçalves 2017-01-04 19:45:51 +00:00
parent 61dc4d2094
commit 28372cd2fd
2 changed files with 58 additions and 0 deletions

View File

@ -26,4 +26,5 @@ requires=\
'parted/host'
'dosfstools/host'
'e2fsprogs/host'
'cmake/host'
)

View File

@ -0,0 +1,57 @@
version=\
(
"1.0.0"
)
url=\
(
"https://github.com/raspberrypi/userland/archive/master.zip"
)
md5=\
(
"3f16bcda3928216fea779588e9e74944"
)
maintainer=\
(
'Pedro Gonçalves <pedro@lsts.pt>'
)
configure()
{
LINKER_ADDED_FLAGS="-Wl,-rpath,${cfg_dir_rootfs}/usr/lib"
mkdir -p ../build
cd ../userland-master
${cfg_dir_toolchain}/usr/local/bin/cmake \
-DCMAKE_SYSTEM_NAME="Linux" \
-DCMAKE_SYSTEM_VERSION="1" \
-DCMAKE_FIND_ROOT_PATH="${cfg_dir_toolchain_sysroot}/usr ${cfg_dir_rootfs}/usr" \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-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}" \
.
}
build()
{
cd ../userland-master
$cmd_make VERBOSE=1
}
host_install()
{
cd ../userland-master/build/
$cmd_cp -r "lib/"* "$cfg_dir_toolchain_sysroot/usr/lib/"
$cmd_cp -r "inc/"* "$cfg_dir_toolchain_sysroot/usr/include/"
}
target_install()
{
cd ../userland-master/build/
$cmd_cp -r "lib/"* "$cfg_dir_rootfs/usr/lib/"
$cmd_cp -r "bin/"* "$cfg_dir_rootfs/usr/bin/"
}