commit 88d50b2c1907b3b337c00cc977c0396ba32c2617 Author: Jakub Bogusz <qbo...@pld-linux.org> Date: Sat Apr 27 07:55:37 2024 +0200
- new tinygltf-system-libs.patch | 46 ++++++++++++++++++++++++++ tinygltf.spec | 80 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 126 insertions(+) --- diff --git a/tinygltf.spec b/tinygltf.spec new file mode 100644 index 0000000..5e363af --- /dev/null +++ b/tinygltf.spec @@ -0,0 +1,80 @@ +# TODO: use common system stb package (stb_image.h, stb_image_write.h) +Summary: Tiny glTF library (loader/saver) +Summary(pl.UTF-8): Mała biblioteka glTF (ładująca/zapisująca) +Name: tinygltf +Version: 2.8.21 +Release: 1 +License: MIT +Group: Libraries +#Source0Download: https://github.com/syoyo/tinygltf/releases +Source0: https://github.com/syoyo/tinygltf/archive/v%{version}/%{name}-%{version}.tar.gz +# Source0-md5: 268fa79521795f4e067e5df34d898533 +Patch0: %{name}-system-libs.patch +URL: https://github.com/syoyo/tinygltf +BuildRequires: cmake >= 3.6 +BuildRequires: libstdc++-devel >= 6:4.7 +BuildRequires: nlohmann-json-devel +BuildRequires: rpmbuild(macros) >= 1.605 +BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) + +%description +TinyGLTF is a header only C++11 glTF 2.0 +(<https://github.com/KhronosGroup/glTF>) library. + +%description -l pl.UTF-8 +TinyGLTF to składająca się z samych nagłówków, napisana w C++11 +bibliotek glTF 2.0 (<https://github.com/KhronosGroup/glTF>). + +%package devel +Summary: Header files for TinyGLTF library +Summary(pl.UTF-8): Pliki nagłówkowe biblioteki TinyGLTF +Group: Development/Libraries +Requires: libstdc++-devel >= 6:4.7 +Requires: nlohmann-json-devel +# no base dependency: prebuilt library is optional (can be used as header-only) + +%description devel +Header files for TinyGLTF library. + +%description devel -l pl.UTF-8 +Pliki nagłówkowe biblioteki TinyGLTF. + +%prep +%setup -q +%patch0 -p1 + +%build +install -d build +cd build +%cmake .. + +%{__make} + +%install +rm -rf $RPM_BUILD_ROOT + +%{__make} -C build install \ + DESTDIR=$RPM_BUILD_ROOT + +# nlohmann-json +%{__rm} $RPM_BUILD_ROOT%{_includedir}/json.hpp + +%clean +rm -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(644,root,root,755) +%doc LICENSE README.md +%attr(755,root,root) %{_libdir}/libtinygltf.so + +%files devel +%defattr(644,root,root,755) +%doc LICENSE README.md +# TODO: common system stb_image +%{_includedir}/stb_image.h +%{_includedir}/stb_image_write.h +%{_includedir}/tiny_gltf.h +%{_libdir}/cmake/TinyGLTF*.cmake diff --git a/tinygltf-system-libs.patch b/tinygltf-system-libs.patch new file mode 100644 index 0000000..d49f8ce --- /dev/null +++ b/tinygltf-system-libs.patch @@ -0,0 +1,46 @@ +# TODO: use system stb_image* includes +--- tinygltf-2.8.21/tiny_gltf.h.orig 2024-02-06 15:22:38.000000000 +0100 ++++ tinygltf-2.8.21/tiny_gltf.h 2024-04-27 07:28:47.574428456 +0200 +@@ -1705,32 +1705,32 @@ class TinyGLTF { + + #ifndef TINYGLTF_NO_INCLUDE_JSON + #ifndef TINYGLTF_USE_RAPIDJSON +-#include "json.hpp" ++#include <nlohmann/json.hpp> + #else + #ifndef TINYGLTF_NO_INCLUDE_RAPIDJSON +-#include "document.h" +-#include "prettywriter.h" +-#include "rapidjson.h" +-#include "stringbuffer.h" +-#include "writer.h" ++#include <rapidjson/document.h> ++#include <rapidjson/prettywriter.h> ++#include <rapidjson/rapidjson.h> ++#include <rapidjson/stringbuffer.h> ++#include <rapidjson/writer.h> + #endif + #endif + #endif + + #ifdef TINYGLTF_ENABLE_DRACO +-#include "draco/compression/decode.h" +-#include "draco/core/decoder_buffer.h" ++#include <draco/compression/decode.h> ++#include <draco/core/decoder_buffer.h> + #endif + + #ifndef TINYGLTF_NO_STB_IMAGE + #ifndef TINYGLTF_NO_INCLUDE_STB_IMAGE +-#include "stb_image.h" ++#include "stb_image.h" + #endif + #endif + + #ifndef TINYGLTF_NO_STB_IMAGE_WRITE + #ifndef TINYGLTF_NO_INCLUDE_STB_IMAGE_WRITE +-#include "stb_image_write.h" ++#include "stb_image_write.h" + #endif + #endif + ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/tinygltf.git/commitdiff/88d50b2c1907b3b337c00cc977c0396ba32c2617 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit