diff --git a/rules/base/host.bash b/rules/base/host.bash index d12370d..2e3bc3e 100644 --- a/rules/base/host.bash +++ b/rules/base/host.bash @@ -26,4 +26,5 @@ requires=\ 'parted/host' 'dosfstools/host' 'e2fsprogs/host' + 'cmake/host' ) diff --git a/rules/raspicam/default.bash b/rules/raspicam/default.bash new file mode 100644 index 0000000..35ba155 --- /dev/null +++ b/rules/raspicam/default.bash @@ -0,0 +1,57 @@ +version=\ +( + "1.0.0" +) + +url=\ +( + "https://github.com/raspberrypi/userland/archive/master.zip" +) + +md5=\ +( + "3f16bcda3928216fea779588e9e74944" +) + +maintainer=\ +( + 'Pedro Gonçalves ' +) + +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/" +}