Show a patch.

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

{
    "id": 25555,
    "url": "https://patchwork.libcamera.org/api/patches/25555/?format=api",
    "web_url": "https://patchwork.libcamera.org/patch/25555/",
    "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": "<20251215093706.573761-1-barnabas.pocze@ideasonboard.com>",
    "date": "2025-12-15T09:37:06",
    "name": "[v1] utils: gen-shader-headers: Fix subproject build",
    "commit_ref": null,
    "pull_url": null,
    "state": "accepted",
    "archived": false,
    "hash": "7b4dc01b2c8cbb1f3890ce6b41810d27ba27dde3",
    "submitter": {
        "id": 216,
        "url": "https://patchwork.libcamera.org/api/people/216/?format=api",
        "name": "Barnabás Pőcze",
        "email": "barnabas.pocze@ideasonboard.com"
    },
    "delegate": null,
    "mbox": "https://patchwork.libcamera.org/patch/25555/mbox/",
    "series": [
        {
            "id": 5661,
            "url": "https://patchwork.libcamera.org/api/series/5661/?format=api",
            "web_url": "https://patchwork.libcamera.org/project/libcamera/list/?series=5661",
            "date": "2025-12-15T09:37:06",
            "name": "[v1] utils: gen-shader-headers: Fix subproject build",
            "version": 1,
            "mbox": "https://patchwork.libcamera.org/series/5661/mbox/"
        }
    ],
    "comments": "https://patchwork.libcamera.org/api/patches/25555/comments/",
    "check": "pending",
    "checks": "https://patchwork.libcamera.org/api/patches/25555/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 57041C3257\n\tfor <parsemail@patchwork.libcamera.org>;\n\tMon, 15 Dec 2025 09:37:14 +0000 (UTC)",
            "from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 38A5561939;\n\tMon, 15 Dec 2025 10:37:13 +0100 (CET)",
            "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 1F278606D5\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 15 Dec 2025 10:37:11 +0100 (CET)",
            "from pb-laptop.local (185.221.143.114.nat.pool.zt.hu\n\t[185.221.143.114])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 520A8C6F;\n\tMon, 15 Dec 2025 10:37:05 +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=\"v6yu2l5/\"; dkim-atps=neutral",
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1765791425;\n\tbh=3EOwIUtnV5WrpQEPg4SIvmTVNU+s9sBtJyNdIPS6oa4=;\n\th=From:To:Subject:Date:From;\n\tb=v6yu2l5/jtXDKQoaF+rPwi/UPSYZ3lDKuh+RjJn2rP/69NoouYztY1Nr71a69x/S+\n\tQa3KG7cIe17qW7UZTTNTC20WLRkmF/R/rCPEgpKSWiWRlKVxjEGhLkxEJyl619s66D\n\tRUKZ1nqpwAZaQfv5EUYZJ89cdWJf4rGkCAHYphr0=",
        "From": "=?utf-8?q?Barnab=C3=A1s_P=C5=91cze?= <barnabas.pocze@ideasonboard.com>",
        "To": "libcamera-devel@lists.libcamera.org,\n\tBryan O'Donoghue <bryan.odonoghue@linaro.org>",
        "Subject": "[PATCH v1] utils: gen-shader-headers: Fix subproject build",
        "Date": "Mon, 15 Dec 2025 10:37:06 +0100",
        "Message-ID": "<20251215093706.573761-1-barnabas.pocze@ideasonboard.com>",
        "X-Mailer": "git-send-email 2.52.0",
        "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": "Meson already takes care of passing the proper absolute or relative\npaths to commands. There is no need do more path manipulation.\n\nSo simplify the script by using the paths as-is. This also fixes the\npath manipulation issue that prevented libcamera from building as a\nsubproject.\n\nFixes: 19371dee4146b7 (\"utils: gen-shader-headers: Add a utility to generate headers from shaders\")\nSigned-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com>\n---\n src/libcamera/meson.build   |  2 +-\n utils/gen-shader-headers.sh | 14 ++++++--------\n 2 files changed, 7 insertions(+), 9 deletions(-)",
    "diff": "diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\nindex 90d434a5a2..575408b2c7 100644\n--- a/src/libcamera/meson.build\n+++ b/src/libcamera/meson.build\n@@ -188,7 +188,7 @@ libcamera_shader_headers = custom_target(\n     'gen-shader-headers',\n     input : [shader_files],\n     output : 'glsl_shaders.h',\n-    command : [gen_shader_headers, meson.project_source_root(), meson.project_build_root(), '@OUTPUT@', '@INPUT@'],\n+    command : [gen_shader_headers, meson.project_source_root(), '@OUTPUT@', '@INPUT@'],\n )\n \n libcamera_internal_headers += libcamera_shader_headers\ndiff --git a/utils/gen-shader-headers.sh b/utils/gen-shader-headers.sh\nindex 81bf1584c9..92f6f81815 100755\n--- a/utils/gen-shader-headers.sh\n+++ b/utils/gen-shader-headers.sh\n@@ -3,14 +3,13 @@\n set -e\n \n usage() {\n-\techo \"Usage: $0 <src_dir> <build_dir> <output_header_name> <shader_file1> [shader_file2 ...]\"\n+\techo \"Usage: $0 <src_dir> <output_header> <shader_file1> [shader_file2 ...]\"\n \techo\n \techo \"Generates a C header file containing hex-encoded shader data.\"\n \techo\n \techo \"Arguments:\"\n \techo \"  src_dir             Path to the base of the source directory\"\n-\techo \"  build_dir           Directory where shader files are located and header will be written\"\n-\techo \"  output_header_name  Name of the generated header file (relative to build_dir)\"\n+\techo \"  output_header       Path to the generated header file\"\n \techo \"  shader_file(s)      One or more shader files to embed in the header\"\n \texit 1\n }\n@@ -21,8 +20,7 @@ if [ $# -lt 4 ]; then\n fi\n \n src_dir=\"$1\"; shift\n-build_dir=\"$1\"; shift\n-build_path=$build_dir/\"$1\"; shift\n+build_path=\"$1\"; shift\n \n cat <<EOF > \"$build_path\"\n /* SPDX-License-Identifier: LGPL-2.1-or-later */\n@@ -40,7 +38,7 @@ cat <<EOF >> \"$build_path\"\n EOF\n \n for file in \"$@\"; do\n-\tname=$(basename \"$build_dir/$file\" | tr '.' '_')\n+\tname=$(basename \"$file\" | tr '.' '_')\n \techo \"[SHADER-GEN] $name\"\n \techo \" * unsigned char $name;\" >> \"$build_path\"\n done\n@@ -49,7 +47,7 @@ echo \"*/\" >> \"$build_path\"\n \n echo \"/* Hex encoded shader data */\" >> \"$build_path\"\n for file in \"$@\"; do\n-\tname=$(basename \"$build_dir/$file\")\n-\t\"$src_dir/utils/gen-shader-header.py\" \"$name\" \"$build_dir/$file\" >> \"$build_path\"\n+\tname=$(basename \"$file\")\n+\t\"$src_dir/utils/gen-shader-header.py\" \"$name\" \"$file\" >> \"$build_path\"\n \techo >> \"$build_path\"\n done\n",
    "prefixes": [
        "v1"
    ]
}