## START: Set by rpmautospec ## (rpmautospec version 0.8.1) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec # https://github.com/syoyo/tinygltf/issues/484 %ifarch ppc64le s390x %bcond tests 0 %else %bcond tests 1 %endif %global common_description %{expand: TinyGLTF is a header only C++11 glTF 2.0 library.} Name: tinygltf Version: 2.9.7 Release: %autorelease Summary: Header only C++11 tiny glTF 2.0 library License: MIT URL: https://github.com/syoyo/tinygltf Source: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: make BuildRequires: sed BuildRequires: catch1-devel BuildRequires: json-devel # Minimum version to contain fixes for upstream issues # https://github.com/nothings/stb/issues/1860 # https://github.com/nothings/stb/issues/1861 BuildRequires: stb_image-devel >= 2.30^20251025gitf1c79c0-2 BuildRequires: stb_image_write-devel %description %{common_description} %package devel Summary: %{summary} Provides: %{name}-static = %{version}-%{release} Requires: cmake-filesystem Requires: json-devel Requires: stb_image-devel >= 2.30^20251025gitf1c79c0-2 Requires: stb_image_write-devel %description devel %{common_description} %package examples Summary: Examples for %{name} %description examples %{common_description} This package provides examples exercising %{name}. %prep %autosetup -p1 # Replace bundled headers with system versions ln -sf %{_includedir}/catch/catch.hpp tests/ rm json.hpp stb_image.h stb_image_write.h tests/catch.hpp sed -i CMakeLists.txt \ -e '/json.hpp/d' \ -e '/stb_image.h/d' \ -e '/stb_image_write.h/d' sed -i tiny_gltf.h tests/tester.cc \ -e 's:#include "catch.hpp":#include :' \ -e 's:#include "json.hpp":#include :' \ -e 's:#include "stb_image.h":#include :' \ -e 's:#include "stb_image_write.h":#include :' # The examples bundle a slew of third party libraries; these aren't built by # default, so we just clobber them for now instead of unbundling rm -r examples # Drop unused bundled deps rm -r deps tools # Use our compiler and build flags to build the tests sed -i tests/Makefile \ -e 's:clang++:%{__cxx}:g' \ -e 's:-O0:%{build_cxxflags} %{build_ldflags}:g' %build %cmake -DTINYGLTF_HEADER_ONLY=ON %cmake_build %make_build -C tests %install %cmake_install # Install the examples install -Dpm0755 %{_vpath_builddir}/loader_example \ %{buildroot}%{_bindir}/%{name}_loader_example %if %{with tests} %check for t in tester tester_noexcept; do echo "Running $t" (cd tests && ./"$t") done %endif %files devel %license LICENSE %doc README.md %{_includedir}/tiny_gltf.h %{_libdir}/cmake/%{name}/ %files examples %license LICENSE %{_bindir}/%{name}_loader_example %changelog ## START: Generated by rpmautospec * Thu Nov 27 2025 Jonathan Steffan - 2.9.7-1 - Update to 2.9.7 (fedora#2411819) - Update to 2.9.7 - Fix -devel deps (fedora#2406792) * Tue Nov 25 2025 Benjamin A. Beasley - 2.9.6-3 - Rebuilt with latest patched stb_image: memory-safety fixes * Fri Jul 25 2025 Fedora Release Engineering - 2.9.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild * Sat May 24 2025 Jonathan Steffan - 2.9.6-1 - Update to 2.9.6 (fedora#2367408). * Mon Mar 31 2025 Davide Cavalca - 2.9.5-1 - Initial import; Fixes: RHBZ#2276294 ## END: Generated by rpmautospec