From 6ed22852e562917cb2338b7cbe02f6d728a1c56d0c3fecd1430a6b8dbb418f40 Mon Sep 17 00:00:00 2001 From: Martin Hauke Date: Sat, 22 Mar 2025 08:34:15 +0000 Subject: [PATCH] - Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to fix FTBFS with cmake4 - Add %check section - Remove Group: declarations, no longer used OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/tinyobjloader?expand=0&rev=9 --- .gitattributes | 23 ++++++++ .gitignore | 1 + tinyobjloader-2.0.0rc9.tar.gz | 3 ++ tinyobjloader-fix-cmake-path.patch | 13 +++++ tinyobjloader.changes | 44 +++++++++++++++ tinyobjloader.spec | 87 ++++++++++++++++++++++++++++++ 6 files changed, 171 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 tinyobjloader-2.0.0rc9.tar.gz create mode 100644 tinyobjloader-fix-cmake-path.patch create mode 100644 tinyobjloader.changes create mode 100644 tinyobjloader.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/tinyobjloader-2.0.0rc9.tar.gz b/tinyobjloader-2.0.0rc9.tar.gz new file mode 100644 index 0000000..8284405 --- /dev/null +++ b/tinyobjloader-2.0.0rc9.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f9061d790905416a8a6c6f3dbfee77c7665636de0a9dc750ce799b513ddba83c +size 957074 diff --git a/tinyobjloader-fix-cmake-path.patch b/tinyobjloader-fix-cmake-path.patch new file mode 100644 index 0000000..03342f8 --- /dev/null +++ b/tinyobjloader-fix-cmake-path.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index acfcd3a..d696e22 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -38,7 +38,7 @@ set(tinyobjloader-examples-objsticher + #Install destinations + include(GNUInstallDirs) + +-set(TINYOBJLOADER_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/${PROJECT_NAME}/cmake) ++set(TINYOBJLOADER_CMAKE_DIR ${CMAKE_INSTALL_LIBDIR}/cmake) + set(TINYOBJLOADER_DOC_DIR ${CMAKE_INSTALL_DOCDIR}) + set(TINYOBJLOADER_INCLUDE_DIR ${CMAKE_INSTALL_INCLUDEDIR}) + set(TINYOBJLOADER_LIBRARY_DIR ${CMAKE_INSTALL_LIBDIR}) diff --git a/tinyobjloader.changes b/tinyobjloader.changes new file mode 100644 index 0000000..8fe98a1 --- /dev/null +++ b/tinyobjloader.changes @@ -0,0 +1,44 @@ +------------------------------------------------------------------- +Sat Mar 22 01:04:15 UTC 2025 - Shawn Dunn + +- Add -DCMAKE_POLICY_VERSION_MINIMUM=3.5 to fix FTBFS with cmake4 +- Add %check section +- Remove Group: declarations, no longer used + +------------------------------------------------------------------- +Mon Feb 26 14:56:21 UTC 2024 - pgajdos@suse.com + +- Use %autosetup macro. Allows to eliminate the usage of deprecated + %patchN + +------------------------------------------------------------------- +Fri May 20 13:00:13 UTC 2022 - Ferdinand Thiessen + +- Update to version 2.0.0rc9 + * Latest release candidate + * Minor documentation updates + +------------------------------------------------------------------- +Mon Aug 23 09:51:21 UTC 2021 - mardnh@gmx.de + +- Update to version 2.0.0rc8+git.20210821: + * Add new object oriented API. 1.x API is still provided. + * Support line primitive. + * Support points primitive. + * Support multiple search path for .mtl(v1 API). + * Support vertex weight `vw`(as an tinyobj extension) + * Support escaped whitespece in mtllib + * Add robust triangulation using Mapbox + earcut(TINYOBJLOADER_USE_MAPBOX_EARCUT). + * Fix CVE-2020-28589: tinyobjloader: An improper array index + validation could lead to code execution. + +------------------------------------------------------------------- +Mon Aug 6 22:41:02 UTC 2018 - jengelh@inai.de + +- Ensure neutrality of descriptions. + +------------------------------------------------------------------- +Sat Aug 4 18:18:36 UTC 2018 - mardnh@gmx.de + +- Initial package, version 1.0.6 diff --git a/tinyobjloader.spec b/tinyobjloader.spec new file mode 100644 index 0000000..35605bb --- /dev/null +++ b/tinyobjloader.spec @@ -0,0 +1,87 @@ +# +# spec file for package tinyobjloader +# +# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2018-2021, Martin Hauke +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%define sover 2 +%define lname libtinyobjloader%{sover} +Name: tinyobjloader +Version: 2.0.0rc9 +Release: 0 +Summary: Wavefront .obj file loader +License: MIT +URL: https://github.com/tinyobjloader/tinyobjloader +Source: %{url}/archive/refs/tags/v%{version}.tar.gz#/%{name}-%{version}.tar.gz +Patch0: tinyobjloader-fix-cmake-path.patch +BuildRequires: cmake >= 3.5 +BuildRequires: gcc-c++ +BuildRequires: pkgconfig + +%description +A single-file Wavefront .obj loader written in C++. +It can parse over 10M polygons with moderate memory and time. + +%package -n %{lname} +Summary: Wavefront .obj file loader + +%description -n %{lname} +A single-file Wavefront .obj loader written in C++. +It can parse over 10M polygons with moderate memory and time. + +%package devel +Summary: Development files for tinyobjloader +Requires: %{lname} = %{version} + +%description devel +A single-file Wavefront .obj file loader written in C++. +No dependency except for C++ STL. It can parse over 10M polygons with +moderate memory and time. + +This subpackage contains libraries and header files for developing +applications that want to make use of tinyobjloader. + +%prep +%autosetup -p1 + +%build +%cmake \ + -DTINYOBJLOADER_COMPILATION_SHARED=ON \ + -DCMAKE_POLICY_VERSION_MINIMUM=3.5 +%make_jobs + +%install +%cmake_install +rm -f %{buildroot}/%{_datadir}/doc/packages/tinyobjloader/LICENSE + +%check +%ctest + +%post -n %{lname} -p /sbin/ldconfig +%postun -n %{lname} -p /sbin/ldconfig + +%files -n %{lname} +%license LICENSE +%doc README.md +%{_libdir}/libtinyobjloader.so.%{sover}* + +%files devel +%{_includedir}/tiny_obj_loader.h +%{_libdir}/libtinyobjloader.so +%{_libdir}/pkgconfig/tinyobjloader.pc +%{_libdir}/cmake/tinyobjloader-*.cmake + +%changelog