| # Copyright 2021 The ChromiumOS Authors |
| # Distributed under the terms of the GNU General Public License v2 |
| |
| EAPI=7 |
| |
| CROS_WORKON_PROJECT="chromiumos/platform2" |
| CROS_WORKON_LOCALNAME="platform2" |
| CROS_WORKON_SUBTREE=".gn common-mk metrics camera/build camera/common camera/features camera/gpu camera/include camera/mojo chromeos-config iioservice/libiioservice_ipc iioservice/mojo ml_core mojo_service_manager" |
| CROS_WORKON_OUTOFTREE_BUILD="1" |
| CROS_WORKON_INCREMENTAL_BUILD="1" |
| |
| PLATFORM_SUBDIR="camera/common" |
| |
| inherit cros-camera cros-constants cros-workon platform |
| |
| DESCRIPTION="Chrome OS camera common libraries." |
| |
| LICENSE="BSD-Google" |
| KEYWORDS="~*" |
| |
| # 'camera_feature_*' and 'ipu6*' are passed to and used in BUILD.gn files. |
| IUSE="camera_feature_auto_framing camera_feature_diagnostics camera_feature_face_detection camera_feature_frame_annotator camera_feature_hdrnet camera_feature_portrait_mode camera_feature_effects ipu6 ipu6ep ipu6se qualcomm_camx" |
| |
| # Auto face framing depends on the face detection feature. |
| REQUIRED_USE="camera_feature_auto_framing? ( camera_feature_face_detection )" |
| |
| BDEPEND="virtual/pkgconfig" |
| |
| # TODO: Remove the conflicting packages |
| CONFLICTING_PACKAGES=" |
| !media-libs/cros-camera-libcab |
| !media-libs/cros-camera-libcam_gpu_algo |
| !media-libs/cros-camera-libcamera_common |
| !media-libs/cros-camera-libcamera_connector |
| !media-libs/cros-camera-libcamera_exif |
| !media-libs/cros-camera-libcamera_ipc |
| !media-libs/cros-camera-libcamera_timezone |
| !media-libs/cros-camera-libcamera_v4l2_device |
| !media-libs/cros-camera-libcbm |
| !media-libs/cros-camera-libjda |
| " |
| |
| RDEPEND=" |
| ${CONFLICTING_PACKAGES} |
| chromeos-base/chromeos-config-tools:= |
| chromeos-base/cros-camera-android-deps:= |
| chromeos-base/mojo_service_manager:= |
| dev-libs/ml-core:= |
| media-libs/cros-camera-libfs:= |
| media-libs/libexif:= |
| media-libs/libsync:= |
| media-libs/minigbm:= |
| virtual/libudev:= |
| virtual/opengles:= |
| x11-libs/libdrm:= |
| " |
| |
| DEPEND=" |
| ${RDEPEND} |
| >=chromeos-base/metrics-0.0.1-r3152:= |
| media-libs/cros-camera-libcamera_connector_headers:= |
| media-libs/libyuv:= |
| x11-base/xorg-proto:= |
| x11-drivers/opengles-headers:= |
| " |
| |
| src_configure() { |
| cros_optimize_package_for_speed |
| platform_src_configure |
| } |
| |
| src_install() { |
| local fuzzer_component_id="167281" |
| platform_fuzzer_install "${S}"/OWNERS \ |
| "${OUT}"/camera_still_capture_processor_impl_fuzzer \ |
| --comp "${fuzzer_component_id}" |
| platform_src_install |
| } |
| |
| platform_pkg_test() { |
| platform test_all |
| } |