Patch Detail
Show a patch.
GET /api/patches/9635/?format=api
{ "id": 9635, "url": "https://patchwork.libcamera.org/api/patches/9635/?format=api", "web_url": "https://patchwork.libcamera.org/patch/9635/", "project": { "id": 1, "url": "https://patchwork.libcamera.org/api/projects/1/?format=api", "name": "libcamera", "link_name": "libcamera", "list_id": "libcamera_core", "list_email": "libcamera-devel@lists.libcamera.org", "web_url": "", "scm_url": "", "webscm_url": "" }, "msgid": "<20200916130612.27694-1-laurent.pinchart@ideasonboard.com>", "date": "2020-09-16T13:06:12", "name": "[libcamera-devel] libcamera: Turn the android option into a feature", "commit_ref": "d5ce2679c67877295ce0096afd3d24d28ad34d16", "pull_url": null, "state": "accepted", "archived": false, "hash": "5af063d975082d2dcf427c04306120f02fd6b255", "submitter": { "id": 2, "url": "https://patchwork.libcamera.org/api/people/2/?format=api", "name": "Laurent Pinchart", "email": "laurent.pinchart@ideasonboard.com" }, "delegate": null, "mbox": "https://patchwork.libcamera.org/patch/9635/mbox/", "series": [ { "id": 1292, "url": "https://patchwork.libcamera.org/api/series/1292/?format=api", "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=1292", "date": "2020-09-16T13:06:12", "name": "[libcamera-devel] libcamera: Turn the android option into a feature", "version": 1, "mbox": "https://patchwork.libcamera.org/series/1292/mbox/" } ], "comments": "https://patchwork.libcamera.org/api/patches/9635/comments/", "check": "pending", "checks": "https://patchwork.libcamera.org/api/patches/9635/checks/", "tags": {}, "headers": { "Return-Path": "<libcamera-devel-bounces@lists.libcamera.org>", "X-Original-To": "parsemail@patchwork.libcamera.org", "Delivered-To": "parsemail@patchwork.libcamera.org", "Received": [ "from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id ADADBC3B5B\n\tfor <parsemail@patchwork.libcamera.org>;\n\tWed, 16 Sep 2020 13:06:55 +0000 (UTC)", "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 1CC0962E9F;\n\tWed, 16 Sep 2020 15:06:55 +0200 (CEST)", "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 17A2660533\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Sep 2020 15:06:54 +0200 (CEST)", "from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 234D257F\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tWed, 16 Sep 2020 15:06:45 +0200 (CEST)" ], "Authentication-Results": "lancelot.ideasonboard.com;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"v5ADE94R\"; dkim-atps=neutral", "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1600261606;\n\tbh=3vIy/5oF5YkidmRE+aya3qCJFEjFz1aXte8aq8HX2NI=;\n\th=From:To:Subject:Date:From;\n\tb=v5ADE94RR6s8GKrjyjaDz9X94PDXEJVsRNhrNYh8EMl2W7kaJZTi+lpsWV4gup578\n\tIQRhj5mLGx4bK/qmfYnUwAHzWFC/Bju9APy5jaQlxL9w4GAkmO52a+5oj+49nIXX14\n\tqEu/VTuxqY1LV30/B14Ht2/VlNne0sVeNBcBZoRw=", "From": "Laurent Pinchart <laurent.pinchart@ideasonboard.com>", "To": "libcamera-devel@lists.libcamera.org", "Date": "Wed, 16 Sep 2020 16:06:12 +0300", "Message-Id": "<20200916130612.27694-1-laurent.pinchart@ideasonboard.com>", "X-Mailer": "git-send-email 2.27.0", "MIME-Version": "1.0", "Subject": "[libcamera-devel] [PATCH] libcamera: Turn the android option into a\n\tfeature", "X-BeenThere": "libcamera-devel@lists.libcamera.org", "X-Mailman-Version": "2.1.29", "Precedence": "list", "List-Id": "<libcamera-devel.lists.libcamera.org>", "List-Unsubscribe": "<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>", "List-Archive": "<https://lists.libcamera.org/pipermail/libcamera-devel/>", "List-Post": "<mailto:libcamera-devel@lists.libcamera.org>", "List-Help": "<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>", "List-Subscribe": "<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>", "Content-Type": "text/plain; charset=\"us-ascii\"", "Content-Transfer-Encoding": "7bit", "Errors-To": "libcamera-devel-bounces@lists.libcamera.org", "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>" }, "content": "Allow disabling compilation of the Android HAL adaptation layer\nautomatically when a dependency is missing by turning the android option\ninto a feature. The default value is set to 'disabled' to match the\ncurrent behaviour.\n\nSigned-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n---\n meson_options.txt | 4 ++--\n src/android/meson.build | 19 ++++++++++++++-----\n src/libcamera/meson.build | 2 +-\n src/meson.build | 4 +---\n 4 files changed, 18 insertions(+), 11 deletions(-)", "diff": "diff --git a/meson_options.txt b/meson_options.txt\nindex e9e815fde366..d2e07ef1450f 100644\n--- a/meson_options.txt\n+++ b/meson_options.txt\n@@ -1,8 +1,8 @@\n # SPDX-License-Identifier: CC0-1.0\n \n option('android',\n- type : 'boolean',\n- value : false,\n+ type : 'feature',\n+ value : 'disabled',\n description : 'Compile libcamera with Android Camera3 HAL interface')\n \n option('documentation',\ndiff --git a/src/android/meson.build b/src/android/meson.build\nindex ecb92f6e9b3a..0293c2036561 100644\n--- a/src/android/meson.build\n+++ b/src/android/meson.build\n@@ -1,5 +1,19 @@\n # SPDX-License-Identifier: CC0-1.0\n \n+android_deps = [\n+ dependency('libexif', required : get_option('android')),\n+ dependency('libjpeg', required : get_option('android')),\n+]\n+\n+android_enabled = true\n+\n+foreach dep : android_deps\n+ if not dep.found()\n+ android_enabled = false\n+ subdir_done()\n+ endif\n+endforeach\n+\n android_hal_sources = files([\n 'camera3_hal.cpp',\n 'camera_hal_manager.cpp',\n@@ -14,11 +28,6 @@ android_camera_metadata_sources = files([\n 'metadata/camera_metadata.c',\n ])\n \n-android_deps = [\n- dependency('libexif'),\n- dependency('libjpeg'),\n-]\n-\n android_camera_metadata = static_library('camera_metadata',\n android_camera_metadata_sources,\n include_directories : android_includes)\ndiff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex af2f3d950be6..0e6ecf5060a4 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -121,7 +121,7 @@ libcamera_deps = [\n \n libcamera_link_with = []\n \n-if get_option('android')\n+if android_enabled\n libcamera_sources += android_hal_sources\n includes += android_includes\n libcamera_link_with += android_camera_metadata\ndiff --git a/src/meson.build b/src/meson.build\nindex d69b4c1ea978..0c5b64d68c15 100644\n--- a/src/meson.build\n+++ b/src/meson.build\n@@ -1,8 +1,6 @@\n # SPDX-License-Identifier: CC0-1.0\n \n-if get_option('android')\n- subdir('android')\n-endif\n+subdir('android')\n \n openssl = find_program('openssl', required : true)\n if openssl.found()\n", "prefixes": [ "libcamera-devel" ] }