From c4859c0033da786bbc03d4e32adb46ef33402950 Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 18 Apr 2023 12:05:00 -0500 Subject: [PATCH 1/2] Add spirv-headers --- recipes/spirv-headers/bld.bat | 9 ++++++++ recipes/spirv-headers/build.sh | 7 +++++++ recipes/spirv-headers/meta.yaml | 37 +++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 recipes/spirv-headers/bld.bat create mode 100644 recipes/spirv-headers/build.sh create mode 100644 recipes/spirv-headers/meta.yaml diff --git a/recipes/spirv-headers/bld.bat b/recipes/spirv-headers/bld.bat new file mode 100644 index 0000000000000..7cb5bb1977441 --- /dev/null +++ b/recipes/spirv-headers/bld.bat @@ -0,0 +1,9 @@ +mkdir build +cd build +cmake -GNinja ^ + -DCMAKE_BUILD_TYPE=Release ^ + -DCMAKE_INSTALL_PREFIX=%LIBRARY_PREFIX% ^ + .. + +ninja -j%CPU_COUNT% +ninja install diff --git a/recipes/spirv-headers/build.sh b/recipes/spirv-headers/build.sh new file mode 100644 index 0000000000000..9b2223643b2cd --- /dev/null +++ b/recipes/spirv-headers/build.sh @@ -0,0 +1,7 @@ +#!/bin/bash +mkdir build +cd build + +cmake ${CMAKE_ARGS} -DCMAKE_BUILD_TYPE=Release .. +make -j${CPU_COUNT} +make install diff --git a/recipes/spirv-headers/meta.yaml b/recipes/spirv-headers/meta.yaml new file mode 100644 index 0000000000000..003bd552f709b --- /dev/null +++ b/recipes/spirv-headers/meta.yaml @@ -0,0 +1,37 @@ +{% set name = "spirv-headers" %} +{% set version = "1.3.243.0" %} + +package: + name: {{ name|lower }} + version: {{ version }} + +source: + - url: https://github.com/KhronosGroup/SPIRV-Headers/archive/refs/tags/sdk-{{ version }}.tar.gz + sha256: 16927b1868e7891377d059cd549484e4158912439cf77451ae7e01e2a3bcd28b + +build: + number: 0 + +requirements: + build: + - {{ compiler('cxx') }} + - cmake + - make # [unix] + - ninja # [win] + host: + run: + +test: + commands: + - test -f ${PREFIX}/include/spirv/1.2/spirv.h # [unix] + - if not exist %LIBRARY_INC%\\spirv\\1.2\\spirv.h # [win] + +about: + home: https://github.com/KhronosGroup/SPIRV-Headers + license: BSD-3-Clause + license_file: LICENSE + summary: Machine-readable files for the SPIR-V Registry + +extra: + recipe-maintainers: + - isuruf From d16383ef5ad0dd9df7328a48ccf925fccc28255f Mon Sep 17 00:00:00 2001 From: Isuru Fernando Date: Tue, 18 Apr 2023 18:15:12 -0500 Subject: [PATCH 2/2] Fix syntax --- recipes/spirv-headers/meta.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/spirv-headers/meta.yaml b/recipes/spirv-headers/meta.yaml index 003bd552f709b..bfbe166f591cc 100644 --- a/recipes/spirv-headers/meta.yaml +++ b/recipes/spirv-headers/meta.yaml @@ -23,8 +23,8 @@ requirements: test: commands: - - test -f ${PREFIX}/include/spirv/1.2/spirv.h # [unix] - - if not exist %LIBRARY_INC%\\spirv\\1.2\\spirv.h # [win] + - test -f ${PREFIX}/include/spirv/1.2/spirv.h # [unix] + - if not exist %LIBRARY_INC%\\spirv\\1.2\\spirv.h exit 1 # [win] about: home: https://github.com/KhronosGroup/SPIRV-Headers