Show a patch.

GET /api/1.1/patches/22774/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 22774,
    "url": "https://patchwork.libcamera.org/api/1.1/patches/22774/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/22774/",
    "project": {
        "id": 1,
        "url": "https://patchwork.libcamera.org/api/1.1/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": "<20250207135035.1104174-1-kieran.bingham@ideasonboard.com>",
    "date": "2025-02-07T13:50:35",
    "name": "[v2] libcamera: meson: Fix libyuv detection",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "cb641ca9b08ef78f5ec71f06b684617c5d0bdeb6",
    "submitter": {
        "id": 4,
        "url": "https://patchwork.libcamera.org/api/1.1/people/4/?format=api",
        "name": "Kieran Bingham",
        "email": "kieran.bingham@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/22774/mbox/",
    "series": [
        {
            "id": 4996,
            "url": "https://patchwork.libcamera.org/api/1.1/series/4996/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=4996",
            "date": "2025-02-07T13:50:35",
            "name": "[v2] libcamera: meson: Fix libyuv detection",
            "version": 2,
            "mbox": "https://patchwork.libcamera.org/series/4996/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/22774/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/22774/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 2ACB6C32F5\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri,  7 Feb 2025 13:50:42 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 30A8468608;\n\tFri,  7 Feb 2025 14:50:41 +0100 (CET)",
            "from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6B84D685AF\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri,  7 Feb 2025 14:50:39 +0100 (CET)",
            "from Monstersaurus.tail69b4.ts.net\n\t(cpc89244-aztw30-2-0-cust6594.18-1.cable.virginm.net [86.31.185.195])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id D8E60F0C;\n\tFri,  7 Feb 2025 14:49:24 +0100 (CET)"
        ],
        "Authentication-Results": "lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"FvGHsPYv\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1738936165;\n\tbh=0L03oTaR/DiiCs4KwLpjXFYVepY7ewwMHZB3VwbVUAM=;\n\th=From:To:Cc:Subject:Date:From;\n\tb=FvGHsPYvgiOuK35+ujW68pa9P9WPohq2PUcHZaNA6n/TZsFHmUuAiRe9GFnHrr0o+\n\t6C2QRY5TYz7l0vupJ3iOnXFMVCyThO/YrrO0nNO5l5AsmE6AcJYjyAnPLOFTyrdoaD\n\tF7TYxxRQBa1tlCoVY2RGGWnoGmTSVzuxAztOZL/Y=",
        "From": "Kieran Bingham <kieran.bingham@ideasonboard.com>",
        "To": "libcamera devel <libcamera-devel@lists.libcamera.org>",
        "Cc": "=?utf-8?q?Dylan_A=C3=AFssi?= <dylan.aissi@collabora.com>, Kieran Bingham\n\t<kieran.bingham@ideasonboard.com>",
        "Subject": "[PATCH v2] libcamera: meson: Fix libyuv detection",
        "Date": "Fri,  7 Feb 2025 13:50:35 +0000",
        "Message-ID": "<20250207135035.1104174-1-kieran.bingham@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.47.1",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "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>",
        "Errors-To": "libcamera-devel-bounces@lists.libcamera.org",
        "Sender": "\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"
    },
    "content": "From: Dylan Aïssi <dylan.aissi@collabora.com>\n\nWe already fall back to a subproject to support the libyuv package when\nit can not be discovered through the usual dependency() mechanism.\n\nUnfortunately libyuv may be packaged without any corresponding\npkg-config support as can be seen at [0], so further extend the\ndependency search by using an explicit cxx.find_library() call.\n\n[0] https://packages.debian.org/bookworm/amd64/libyuv-dev/filelist\n\nSigned-off-by: Dylan Aïssi <dylan.aissi@collabora.com>\nTested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n---\nv2:\nHandle review/suggestion from Barnabás:\n - include yuv.h explicitly as a header check\n - support the force_fallback_for option.\n\nSigned-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\n src/meson.build | 18 ++++++++++++++----\n 1 file changed, 14 insertions(+), 4 deletions(-)",
    "diff": "diff --git a/src/meson.build b/src/meson.build\nindex 76198e9535db..b664448699aa 100644\n--- a/src/meson.build\n+++ b/src/meson.build\n@@ -27,10 +27,20 @@ else\n     ipa_sign_module = false\n endif\n \n-# libyuv, used by the Android adaptation layer and the virtual pipeline handler.\n-# Fallback to a subproject if libyuv isn't found, as it's typically not provided\n-# by distributions.\n-libyuv_dep = dependency('libyuv', required : false)\n+# libyuv, used by the Android adaptation layer and the virtual pipeline\n+# handler. Fallback to a subproject if libyuv isn't found, as it's typically\n+# not provided by distributions. Where libyuv is provided by a distribution, it\n+# may not always supply a pkg-config implementation, requiring cxx.find_library()\n+# to search for it.\n+if not get_option('force_fallback_for').contains('libyuv')\n+    libyuv_dep = dependency('libyuv', required : false)\n+    if not libyuv_dep.found()\n+        libyuv_dep = cxx.find_library('yuv', has_headers : 'libyuv.h',\n+                                      required : false)\n+    endif\n+else\n+    libyuv_dep = dependency('', required : false)\n+endif\n \n if (pipelines.contains('virtual') or get_option('android').allowed()) and \\\n    not libyuv_dep.found()\n",
    "prefixes": [
        "v2"
    ]
}