[libcamera-devel] [PATCH] media-libs/libcamera: Split out the Android camera HAL

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Jun 25 17:44:07 CEST 2021


The camera HAL interface has historically been linked directly into the
libcamera shared library.

The HAL is now built as it's own .so file, so install accordingly.
Switch from using dosym to making use of the cros-camera_dohal to aim
for consistency with other HAL installations.

BUG=None
TEST=cros deploy ${DUT} libcamera && cros_camera_service

Change-Id: I0d3f02218306e10f7d73a08a1546a2b89596127b
---
Now that the libcamera split series is merged, this change is required
to build libcamera on ChromeOS.

For all the chrome users out there, you will need this patch to apply to
your tree.

This patch has already been submitted to chrome, and can be expected to
be merged through those processes - but until then - here's what you'll
need.

--
Kieran


 media-libs/libcamera/libcamera-9999.ebuild | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/media-libs/libcamera/libcamera-9999.ebuild b/media-libs/libcamera/libcamera-9999.ebuild
index c6b2ea63d74d..1e28d2e5c8ac 100644
--- a/media-libs/libcamera/libcamera-9999.ebuild
+++ b/media-libs/libcamera/libcamera-9999.ebuild
@@ -6,7 +6,7 @@ EAPI=7
 CROS_WORKON_PROJECT="chromiumos/third_party/libcamera"
 CROS_WORKON_INCREMENTAL_BUILD="1"
 
-inherit cros-workon meson
+inherit cros-camera cros-workon meson
 
 DESCRIPTION="Camera support library for Linux"
 HOMEPAGE="https://www.libcamera.org"
@@ -67,7 +67,7 @@ src_compile() {
 src_install() {
 	meson_src_install
 
-	dosym ../libcamera.so "/usr/$(get_libdir)/camera_hal/libcamera.so"
+	cros-camera_dohal "${D}/usr/$(get_libdir)/libcamera-hal.so" libcamera-hal.so
 
 	dostrip -x "/usr/$(get_libdir)/libcamera/"
 }
-- 
2.30.2



More information about the libcamera-devel mailing list