From bf0837e4a6e259d3fd54c4ff264bd2da90bbf593 Mon Sep 17 00:00:00 2001 From: yyc12345 Date: Thu, 6 Aug 2026 13:19:59 +0800 Subject: [PATCH] fix: fix packer template error --- packer/src/sarasacw_omrf_packer/renders/pkgconfig.py | 1 + packer/src/sarasacw_omrf_packer/templates/XXX.pc.jinja | 2 +- packer/src/sarasacw_omrf_packer/templates/XXXConfig.cmake.jinja | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packer/src/sarasacw_omrf_packer/renders/pkgconfig.py b/packer/src/sarasacw_omrf_packer/renders/pkgconfig.py index 35a96a7..f437434 100644 --- a/packer/src/sarasacw_omrf_packer/renders/pkgconfig.py +++ b/packer/src/sarasacw_omrf_packer/renders/pkgconfig.py @@ -89,6 +89,7 @@ class PkgConfigRender: payload: dict[str, Any] = { "name": self.__properties.name, "description": self.__properties.description, + "version": str(self.__properties.version), "artifact": self.__properties.artifact, "requires": self.__properties.requires, } diff --git a/packer/src/sarasacw_omrf_packer/templates/XXX.pc.jinja b/packer/src/sarasacw_omrf_packer/templates/XXX.pc.jinja index d3d8696..b733985 100644 --- a/packer/src/sarasacw_omrf_packer/templates/XXX.pc.jinja +++ b/packer/src/sarasacw_omrf_packer/templates/XXX.pc.jinja @@ -10,7 +10,7 @@ includedir=${prefix}/include Name: {{ name }} Description: {{ description }} Version: {{ version }} -{% if len(requires) != 0 -%} +{%- if requires | length != 0 %} Requires: {{ requires | join(", ") }} {%- endif %} Libs: -L${libdir} -l{{ artifact }} diff --git a/packer/src/sarasacw_omrf_packer/templates/XXXConfig.cmake.jinja b/packer/src/sarasacw_omrf_packer/templates/XXXConfig.cmake.jinja index 4184539..6fba128 100644 --- a/packer/src/sarasacw_omrf_packer/templates/XXXConfig.cmake.jinja +++ b/packer/src/sarasacw_omrf_packer/templates/XXXConfig.cmake.jinja @@ -32,7 +32,7 @@ else() ) endif() -{% if len(dependencies) != 0 -%} +{% if dependencies | length != 0 -%} {# Pull in declared dependencies and wire them into the imported target -#} include(CMakeFindDependencyMacro) {% for dep in dependencies -%}