2 Commits

Author SHA256 Message Date
656622497f Accepting request 1319962 from games
OBS-URL: https://build.opensuse.org/request/show/1319962
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/vsgXchange?expand=0&rev=4
2025-11-26 16:14:54 +00:00
ecdbc56638 - Fix building with GDAL 3.12
- Add patch:
  * 0001-Build-fixes-for-changes-to-GDAL-3.12.patch
- Migrate service file to use 'manual' instead of 'disabled' as
  suggested by osc

OBS-URL: https://build.opensuse.org/package/show/games/vsgXchange?expand=0&rev=10
2025-11-25 11:02:05 +00:00
4 changed files with 118 additions and 4 deletions

View File

@@ -0,0 +1,100 @@
From 1de624f085d12a1fb74521e6ec49997a473781ae Mon Sep 17 00:00:00 2001
From: Ralf Habacker <ralf.habacker@freenet.de>
Date: Tue, 25 Nov 2025 09:02:45 +0100
Subject: [PATCH] Build fixes for changes to GDAL 3.12
Fix #243
---
src/gdal/GDAL.cpp | 18 ++++++++----------
src/gdal/GDAL_fallback.cpp | 6 ++----
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/src/gdal/GDAL.cpp b/src/gdal/GDAL.cpp
index da3ba6a..b474604 100644
--- a/src/gdal/GDAL.cpp
+++ b/src/gdal/GDAL.cpp
@@ -15,12 +15,10 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#include <cstring>
-using namespace vsgXchange;
-
namespace vsgXchange
{
- class GDAL::Implementation
+ class vsgXchange::GDAL::Implementation
{
public:
Implementation();
@@ -36,21 +34,21 @@ namespace vsgXchange
//
// GDAL ReaderWriter fascade
//
-GDAL::GDAL() :
- _implementation(new GDAL::Implementation())
+vsgXchange::GDAL::GDAL() :
+ _implementation(new vsgXchange::GDAL::Implementation())
{
}
-GDAL::~GDAL()
+vsgXchange::GDAL::~GDAL()
{
delete _implementation;
}
-vsg::ref_ptr<vsg::Object> GDAL::read(const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> options) const
+vsg::ref_ptr<vsg::Object> vsgXchange::GDAL::read(const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> options) const
{
return _implementation->read(filename, options);
}
-bool GDAL::getFeatures(Features& features) const
+bool vsgXchange::GDAL::getFeatures(Features& features) const
{
vsgXchange::initGDAL();
@@ -103,11 +101,11 @@ bool GDAL::getFeatures(Features& features) const
//
// GDAL ReaderWriter implementation
//
-GDAL::Implementation::Implementation()
+vsgXchange::GDAL::Implementation::Implementation()
{
}
-vsg::ref_ptr<vsg::Object> GDAL::Implementation::read(const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> options) const
+vsg::ref_ptr<vsg::Object> vsgXchange::GDAL::Implementation::read(const vsg::Path& filename, vsg::ref_ptr<const vsg::Options> options) const
{
// GDAL tries to load all datatypes so up front catch VSG and OSG native formats.
vsg::Path ext = vsg::lowerCaseFileExtension(filename);
diff --git a/src/gdal/GDAL_fallback.cpp b/src/gdal/GDAL_fallback.cpp
index 6604cad..0405335 100644
--- a/src/gdal/GDAL_fallback.cpp
+++ b/src/gdal/GDAL_fallback.cpp
@@ -12,8 +12,6 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
#include <vsgXchange/gdal.h>
-using namespace vsgXchange;
-
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
// GDAL ReaderWriter fallback
@@ -28,11 +26,11 @@ GDAL::GDAL() :
GDAL::~GDAL()
{
}
-vsg::ref_ptr<vsg::Object> GDAL::read(const vsg::Path&, vsg::ref_ptr<const vsg::Options>) const
+vsg::ref_ptr<vsg::Object> vsgXchange::GDAL::read(const uint8_t*, size_t, vsg::ref_ptr<const vsg::Options>) const
{
return {};
}
-bool GDAL::getFeatures(Features&) const
+bool vsgXchange::GDAL::getFeatures(Features&) const
{
return false;
}
--
2.51.1

View File

@@ -1,14 +1,14 @@
<services>
<service name="tar_scm" mode="disabled">
<service name="tar_scm" mode="manual">
<param name="scm">git</param>
<param name="url">https://github.com/vsg-dev/vsgXchange</param>
<param name="revision">v1.0.5</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="versionrewrite-pattern">v(.*)</param>
</service>
<service name="recompress" mode="disabled">
<service name="recompress" mode="manual">
<param name="file">*.tar</param>
<param name="compression">xz</param>
</service>
<service name="set_version" mode="disabled"/>
<service name="set_version" mode="manual"/>
</services>

View File

@@ -1,3 +1,16 @@
-------------------------------------------------------------------
Tue Nov 25 08:08:18 UTC 2025 - Ralf Habacker <ralf.habacker@freenet.de>
- Fix building with GDAL 3.12
- Add patch:
* 0001-Build-fixes-for-changes-to-GDAL-3.12.patch
-------------------------------------------------------------------
Mon Oct 23 07:08:41 UTC 2023 - Ralf Habacker <ralf.habacker@freenet.de>
- Migrate service file to use 'manual' instead of 'disabled' as
suggested by osc
-------------------------------------------------------------------
Fri Sep 15 20:32:13 UTC 2023 - Ralf Habacker <ralf.habacker@freenet.de>

View File

@@ -1,7 +1,7 @@
#
# spec file for package vsgXchange
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,7 @@ License: MIT
Group: Productivity/Graphics/Other
URL: https://github.com/vsg-dev/vsgXchange
Source0: %{name}-%{version}.tar.xz
Patch0: 0001-Build-fixes-for-changes-to-GDAL-3.12.patch
# not found by default
#BuildRequires: libassimp5
BuildRequires: cmake