blob: 69238f4460fbe89e931a0b4f52641103a63a7054 [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="7415c139cd1cab73fdd91785a7816eab51e7a567"
CROS_WORKON_TREE="f7f0bc84eaa536e1c7ed7ecf20284545e19023b0"
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"
}