Name: azslc Version: 1.8.22 Release: 6%{?dist} Summary: Amazon Shading Language Compiler for Open 3D Engine License: Apache-2.0 OR MIT URL: https://github.com/o3de/o3de-azslc Source0: %{url}/archive/%{version}/o3de-azslc-%{version}.tar.gz # Bundled dependencies (Copr mock chroots have no network access) # CLI11 2.1.1 (commit 3ce61a169297f5fe7d4b08bdbfa82290950d6f7f) Source1: https://github.com/CLIUtils/CLI11/archive/3ce61a169297f5fe7d4b08bdbfa82290950d6f7f/CLI11-3ce61a16.tar.gz # ANTLR4 C++ runtime (o3de fork, branch o3de-4.13.2) Source2: https://github.com/o3de/antlr4/archive/refs/heads/o3de-4.13.2.tar.gz#/antlr4-o3de-4.13.2.tar.gz BuildRequires: cmake >= 3.20 BuildRequires: gcc-c++ BuildRequires: java-devel >= 1.6.0 BuildRequires: libuuid-devel BuildRequires: python3 # Bundled dependencies (sources included, built offline via CMake FetchContent) Provides: bundled(antlr4-runtime) = 4.13.2 Provides: bundled(cli11) = 2.1.1 %description AZSLc (Amazon Shading Language Compiler) is a stand-alone command-line compiler that converts Amazon Shading Language (AZSL) shaders to High Level Shading Language Shader Model 6+ (HLSL) shaders. It is the front-end compiler of the Atom Renderer shader build pipeline used by Open 3D Engine (O3DE). AZSLc extracts reflection data from .azsl files including shader constants layout, resource binding information, and shader variant options. %prep %autosetup -n o3de-azslc-%{version} # Extract bundled dependencies for offline build tar xzf %{SOURCE1} -C %{_builddir} tar xzf %{SOURCE2} -C %{_builddir} # CLI11 has cmake_minimum_required < 3.5 which CMake 4.x rejects sed -i 's/cmake_minimum_required(VERSION [0-9.]*)/cmake_minimum_required(VERSION 3.5)/' \ %{_builddir}/CLI11-3ce61a169297f5fe7d4b08bdbfa82290950d6f7f/CMakeLists.txt # GCC 16 no longer transitively includes ; add explicit include sed -i '1s/^/#include \n/' src/StreamableInterface.h sed -i '1s/^/#include \n/' src/GenericUtils.h %build %cmake -S src \ -DFETCHCONTENT_FULLY_DISCONNECTED=ON \ -DFETCHCONTENT_SOURCE_DIR_CLI11=%{_builddir}/CLI11-3ce61a169297f5fe7d4b08bdbfa82290950d6f7f \ -DFETCHCONTENT_SOURCE_DIR_ANTLR4=%{_builddir}/antlr4-o3de-4.13.2 \ -DCMAKE_POLICY_VERSION_MINIMUM=3.5 \ -DANTLR_BUILD_CPP_TESTS=OFF \ -DANTLR4_INSTALL=OFF %cmake_build %install install -Dpm 0755 %{__cmake_builddir}/azslc %{buildroot}%{_bindir}/azslc %files %license LICENSE.txt LICENSE_APACHE2.TXT LICENSE_MIT.TXT %doc README.md %{_bindir}/azslc %changelog * Wed Feb 11 2026 O3DE Builder - 1.8.22-6 - Disable ANTLR4 test builds (gtest not available in mock chroot) * Wed Feb 11 2026 O3DE Builder - 1.8.22-5 - Fix GCC 16: add missing #include for uint32_t - Fix CLI11 cmake_minimum_required: replace version instead of prepending cmake_policy * Wed Feb 11 2026 O3DE Builder - 1.8.22-4 - Fix CLI11 cmake_minimum_required < 3.5 error with CMake 4.x - Add CMAKE_POLICY_VERSION_MINIMUM=3.5 * Wed Feb 11 2026 O3DE Builder - 1.8.22-3 - Bundle CLI11 and ANTLR4 sources for offline Copr builds (no network in mock) * Tue Feb 11 2025 O3DE Builder - 1.8.22-1 - Initial package of AZSLc (Amazon Shading Language Compiler) - Built from release 1.8.22