From 679782e587d8011ea46cc834916842928b62040b Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 15 Mar 2026 08:54:08 +0000 Subject: [PATCH 1/4] Improve a conditional in the spec file [skip changelog] --- v-hacd.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v-hacd.spec b/v-hacd.spec index 9f91fd6..08fb3c6 100644 --- a/v-hacd.spec +++ b/v-hacd.spec @@ -1,6 +1,6 @@ # TODO: Can we find a package with a suitable .obj file that we can use to run # the tests in EPEL10? -%bcond tests %{expr:!0%{?el10}} +%bcond tests %{undefined el10} Name: v-hacd Version: 4.1.0 From b32e3035edd5953859db0e28901e8c808864c1b5 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Sun, 15 Mar 2026 08:55:20 +0000 Subject: [PATCH 2/4] Reduce macro indirection in the spec file [skip changelog] --- v-hacd.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/v-hacd.spec b/v-hacd.spec index 08fb3c6..af6978b 100644 --- a/v-hacd.spec +++ b/v-hacd.spec @@ -10,7 +10,7 @@ Summary: Decomposes a 3D surface into a set of “near” convex parts # The entire source is BSD-3-Clause, except: # - app/wavefront.{h,cpp} are MIT License: BSD-3-Clause AND MIT -URL: https://github.com/kmammou/%{name} +URL: https://github.com/kmammou/v-hacd # This has the app/meshes/ directory stripped out. The .obj files therein have # unclear or unspecified licenses, which makes them unsuitable for Fedora. # @@ -18,7 +18,7 @@ URL: https://github.com/kmammou/%{name} # README.rst as a sanity check. # # Generated with ./get_source.sh %%{version} -Source0: %{name}-%{version}-filtered.tar.zst +Source0: v-hacd-%{version}-filtered.tar.zst # Script to generate Source0; see comments above. Source1: get_source.sh # Man page hand-written for Fedora in groff_man(7) format based on help output @@ -75,11 +75,11 @@ License: BSD-3-Clause BuildArch: noarch # https://docs.fedoraproject.org/en-US/packaging-guidelines/#_packaging_header_only_libraries -Provides: %{name}-static = %{?epoch:%{epoch}:}%{version}-%{release} +Provides: v-hacd-static = %{?epoch:%{epoch}:}%{version}-%{release} %description devel %{common_description} -The %{name}-devel package contains the header-only library for developing +The v-hacd-devel package contains the header-only library for developing applications that use V-HACD. @@ -95,13 +95,13 @@ License: BSD-3-Clause AND MIT %description tools %{common_description} -The %{name}-tools package contains command-line tools based on the V-HACD +The v-hacd-tools package contains command-line tools based on the V-HACD library. Currently, this means TestVHACD; despite the name, this tool has general utility beyond testing. %prep -%autosetup -n %{name}-%{version} +%autosetup -p1 %build From 5155440ce4e44fb7ef52c077bd20aa3d1d48733c Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 20 May 2026 06:40:36 +0100 Subject: [PATCH 3/4] Use various long options --- v-hacd.spec | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/v-hacd.spec b/v-hacd.spec index af6978b..3341511 100644 --- a/v-hacd.spec +++ b/v-hacd.spec @@ -115,12 +115,15 @@ popd >/dev/null pushd app >/dev/null # There are currently no install targets in app/CMakeLists.txt, so # %%cmake_install will not work. We install the executable manually instead. -install -t '%{buildroot}%{_bindir}' -p -D '%{_vpath_builddir}/TestVHACD' +install -D --preserve-timestamps \ + --target='%{buildroot}%{_bindir}' '%{_vpath_builddir}/TestVHACD' popd >/dev/null -install -t '%{buildroot}%{_includedir}' -m 0644 -p -D 'include/VHACD.h' +install -D --preserve-timestamps --mode=0644 \ + --target='%{buildroot}%{_includedir}' 'include/VHACD.h' -install -t '%{buildroot}%{_mandir}/man1' -m 0644 -p -D '%{SOURCE2}' +install -D --preserve-timestamps --mode=0644 \ + --target='%{buildroot}%{_mandir}/man1' '%{SOURCE2}' %if %{with tests} From bd7d43bd29785196af0c5b05023cb6a29a429005 Mon Sep 17 00:00:00 2001 From: "Benjamin A. Beasley" Date: Wed, 20 May 2026 06:47:36 +0100 Subject: [PATCH 4/4] Include a freely licensed .obj file in the SRPM for testing --- cube.obj | 18 ++++++++++++++++++ v-hacd.spec | 22 ++++++---------------- 2 files changed, 24 insertions(+), 16 deletions(-) create mode 100644 cube.obj diff --git a/cube.obj b/cube.obj new file mode 100644 index 0000000..3f91d36 --- /dev/null +++ b/cube.obj @@ -0,0 +1,18 @@ +# Blender v2.83.4 OBJ File: '' +# www.blender.org +o Cube_Cube.001 +v -1.000000 -1.000000 1.000000 +v -1.000000 1.000000 1.000000 +v -1.000000 1.000000 -1.000000 +v -1.000000 -1.000000 -1.000000 +v 1.000000 1.000000 -1.000000 +v 1.000000 -1.000000 -1.000000 +v 1.000000 1.000000 1.000000 +v 1.000000 -1.000000 1.000000 +s off +f 1 2 3 4 +f 4 3 5 6 +f 6 5 7 8 +f 8 7 2 1 +f 4 6 8 1 +f 5 3 2 7 diff --git a/v-hacd.spec b/v-hacd.spec index 3341511..3b26bd4 100644 --- a/v-hacd.spec +++ b/v-hacd.spec @@ -1,7 +1,3 @@ -# TODO: Can we find a package with a suitable .obj file that we can use to run -# the tests in EPEL10? -%bcond tests %{undefined el10} - Name: v-hacd Version: 4.1.0 Release: %autorelease @@ -10,6 +6,8 @@ Summary: Decomposes a 3D surface into a set of “near” convex parts # The entire source is BSD-3-Clause, except: # - app/wavefront.{h,cpp} are MIT License: BSD-3-Clause AND MIT +# We use an OBJ file from mcut, which is LGPL-3.0-only, for testing: Source3 +SourceLicense: %{license} AND LGPL-3.0-only URL: https://github.com/kmammou/v-hacd # This has the app/meshes/ directory stripped out. The .obj files therein have # unclear or unspecified licenses, which makes them unsuitable for Fedora. @@ -24,6 +22,8 @@ Source1: get_source.sh # Man page hand-written for Fedora in groff_man(7) format based on help output # and README.md contents. Source2: TestVHACD.1 +# Very trivial OBJ mesh file from mcut, which is LGPL-3.0-only +Source3: https://github.com/cutdigital/mcut/raw/refs/tags/v1.3.0/tutorials/BasicCmdLineApp/data/cube.obj # https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval ExcludeArch: %{ix86} @@ -33,10 +33,6 @@ BuildRequires: cmake # Our choice; the make backend would work just fine. BuildRequires: ninja-build -%if %{with tests} -BuildRequires: vtk-data -%endif - %global common_description %{expand: The V-HACD library decomposes a 3D surface into a set of “near” convex parts. @@ -126,16 +122,10 @@ install -D --preserve-timestamps --mode=0644 \ --target='%{buildroot}%{_mandir}/man1' '%{SOURCE2}' -%if %{with tests} %check # Use the example from README.md as a sanity check, but use an arbitrary mesh -# from vtk as input since we cannot ship upstream’s sample meshes. Decrease the -# max recursion depth from 15 to the default (10) so this doesn’t explode on -# 32-bit ARM in Fedora 36. -%{buildroot}%{_bindir}/TestVHACD \ - %{_datadir}/vtkdata/Testing/Data/Viewpoint/cow.obj \ - -e 0.01 -d 10 -r 10000000 -r 128 -%endif +# as input since we cannot ship upstream’s sample meshes. +%{buildroot}%{_bindir}/TestVHACD '%{SOURCE3}' -e 0.01 -d 15 -r 10000000 -r 128 %files devel