gnu: Add collada-dom.

* gnu/packages/cpp.scm (collada-dom): New variable.
* gnu/packages/patches/collada-dom-boost.patch: New file.
* gnu/local.mk: Add collada-dom-boost patch.

Change-Id: Iace655f10004d7face86f29afb1606fa3bb16628
Signed-off-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
This commit is contained in:
Rodion Goritskov 2026-01-11 23:32:36 +01:00 committed by Liliana Marie Prikler
parent acb2ca2712
commit 2a9e61ba60
No known key found for this signature in database
GPG key ID: 442A84B8C70E2F87
3 changed files with 96 additions and 0 deletions

View file

@ -1120,6 +1120,7 @@ dist_patch_DATA = \
%D%/packages/patches/clucene-pkgconfig.patch \
%D%/packages/patches/coda-use-system-libs.patch \
%D%/packages/patches/cogl-fix-double-free.patch \
%D%/packages/patches/collada-dom-boost.patch \
%D%/packages/patches/collectd-5.11.0-noinstallvar.patch \
%D%/packages/patches/combinatorial-blas-awpm.patch \
%D%/packages/patches/combinatorial-blas-io-fix.patch \

View file

@ -332,6 +332,31 @@ This project is maintained by Kitware in support of ITK, the Insight
Segmentation and Registration Toolkit.")
(license license:asl2.0)))
(define-public collada-dom
(package
(name "collada-dom")
(version "2.5.0")
(source
(origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/rdiankov/collada-dom.git")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32 "1npz3yynv02g7w70c39zqn5w0g4sb438bmkkw0x7gj8cknjnwv9z"))
(patches (search-patches "collada-dom-boost.patch"))))
(build-system cmake-build-system)
(arguments (list #:tests? #f)) ; No tests present
(native-inputs (list pkg-config))
(inputs (list boost libxml2 minizip zlib))
(home-page "https://github.com/rdiankov/collada-dom")
(synopsis "COLLADA DOM C++ library")
(description "COLLADA-DOM is a C++ library for loading
and saving COLLADA documents that can contain 2D, 3D, physics
and other types of content.")
(license license:expat)))
(define-public cpp-utilities
(package
(name "cpp-utilities")

View file

@ -0,0 +1,70 @@
From 8d2b96e36e4b1a32544fb78e5d92c2e4c3c482c1 Mon Sep 17 00:00:00 2001
From: Rodion Goritskov <rodion@goritskov.com>
Date: Sun, 11 Jan 2026 18:52:39 +0100
Subject: [PATCH] Fix building with the fresh Boost.
Merged patches from:
https://github.com/rdiankov/collada-dom/pull/43.patch
https://gitlab.archlinux.org/archlinux/packaging/packages/collada-dom/-/blob/main/boost-1.89.patch
---
CMakeLists.txt | 2 +-
dom/include/dae.h | 2 +-
dom/src/dae/daeUtils.cpp | 2 +-
dom/src/dae/daeZAEUncompressHandler.cpp | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2596a23..0c8caca 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -159,7 +159,7 @@ endif()
if( NOT $ENV{BOOST_LIBRARYDIR} STREQUAL "" )
set(Boost_LIBRARY_DIRS $ENV{BOOST_LIBRARYDIR})
endif()
-find_package(Boost COMPONENTS filesystem system REQUIRED)
+find_package(Boost COMPONENTS filesystem REQUIRED)
message(STATUS "found boost version: ${Boost_VERSION}")
diff --git a/dom/include/dae.h b/dom/include/dae.h
index e53388b..03e72f9 100644
--- a/dom/include/dae.h
+++ b/dom/include/dae.h
@@ -25,7 +25,7 @@
#pragma warning(disable: 4180 4245)
#endif
#ifndef NO_BOOST
-#include <boost/filesystem/convenience.hpp>
+#include <boost/filesystem.hpp>
#endif
#ifdef _MSC_VER
#pragma warning(pop)
diff --git a/dom/src/dae/daeUtils.cpp b/dom/src/dae/daeUtils.cpp
index 7e3dc9a..f4ddea3 100644
--- a/dom/src/dae/daeUtils.cpp
+++ b/dom/src/dae/daeUtils.cpp
@@ -18,7 +18,7 @@
#endif
#ifndef NO_BOOST
-#include <boost/filesystem/convenience.hpp> // THIS WAS NOT COMMENTED.
+#include <boost/filesystem.hpp> // THIS WAS NOT COMMENTED.
#endif
#include <cstdio> // for tmpnam
diff --git a/dom/src/dae/daeZAEUncompressHandler.cpp b/dom/src/dae/daeZAEUncompressHandler.cpp
index da2a344..2550000 100644
--- a/dom/src/dae/daeZAEUncompressHandler.cpp
+++ b/dom/src/dae/daeZAEUncompressHandler.cpp
@@ -271,7 +271,7 @@ bool daeZAEUncompressHandler::checkAndExtractInternalArchive( const std::string&
bool error = false;
boost::filesystem::path archivePath(filePath);
- std::string dir = archivePath.branch_path().string();
+ std::string dir = archivePath.parent_path().string();
const std::string& randomSegment = cdom::getRandomFileName();
std::string tmpDir = dir + cdom::getFileSeparator() + randomSegment + cdom::getFileSeparator();
--
2.52.0