Skip to content

Commit

Permalink
[libe57format] Fix compilation with gcc-13
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-ogre committed Jan 29, 2025
1 parent a9b270f commit 5a098e2
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
3 changes: 3 additions & 0 deletions recipes/libe57format/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
patches:
"2.3.0":
- patch_file: patches/0001-Fix-gcc13-compilation.patch
sources:
"3.1.1":
url: "https://github.com/asmaloney/libE57Format/archive/refs/tags/v3.1.1.tar.gz"
Expand Down
6 changes: 5 additions & 1 deletion recipes/libe57format/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import copy, get, rmdir, save, replace_in_file
from conan.tools.files import apply_conandata_patches, copy, export_conandata_patches, get, rmdir, save, replace_in_file
from conan.tools.scm import Version

required_conan_version = ">=1.53.0"
Expand All @@ -30,6 +30,9 @@ class LibE57FormatConan(ConanFile):
"fPIC": True,
}

def export_sources(self):
export_conandata_patches(self)

def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
Expand Down Expand Up @@ -77,6 +80,7 @@ def _patch_sources(self):

def build(self):
self._patch_sources()
apply_conandata_patches(self)
cmake = CMake(self)
cmake.configure()
cmake.build()
Expand Down
10 changes: 10 additions & 0 deletions recipes/libe57format/all/patches/0001-Fix-gcc13-compilation.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- a/include/E57Format.h
+++ b/include/E57Format.h
@@ -32,6 +32,7 @@
//! @file E57Format.h Header file for the E57 API.

#include <cfloat>
+#include <cstdint>
#include <memory>
#include <vector>

0 comments on commit 5a098e2

Please sign in to comment.