blob: 0281cee4b27c6129b20fc69f10d99004a065ad42 [file] [log] [blame]
# Copyright 2019 The Chromium OS Authors. All rights reserved.
# Distributed under the terms of the GNU General Public License v2
EAPI=6
CROS_WORKON_COMMIT="bcbd9fed8f941a808090792066afe014610a971a"
CROS_WORKON_TREE="4c01e385fc17c109812665a2f20fafa57ad0be7f"
CROS_WORKON_PROJECT="chromiumos/third_party/libcamera"
CROS_WORKON_INCREMENTAL_BUILD="1"
inherit cros-workon meson
DESCRIPTION="Camera support library for Linux"
HOMEPAGE="https://www.libcamera.org"
LICENSE="LGPL-2.1+"
SLOT="0"
KEYWORDS="*"
IUSE="doc ipu3 rkisp1 test udev"
RDEPEND="
media-libs/libjpeg-turbo
media-libs/libexif
>=net-libs/gnutls-3.3:=
udev? ( virtual/libudev )
"
DEPEND="
${RDEPEND}
dev-libs/openssl
>=dev-python/pyyaml-3:=
"
src_configure() {
local pipelines=(
"uvcvideo"
$(usev ipu3)
$(usev rkisp1)
)
pipeline_list() {
printf '%s,' "$@" | sed 's:,$::'
}
BUILD_DIR="$(cros-workon_get_build_dir)"
local emesonargs=(
$(meson_use test)
$(meson_feature doc documentation)
-Dandroid="enabled"
-Dpipelines="$(pipeline_list "${pipelines[@]}")"
)
meson_src_configure
}
src_compile() {
meson_src_compile
}
src_install() {
meson_src_install
dosym ../libcamera.so "/usr/$(get_libdir)/camera_hal/libcamera.so"
}