Skip to content

Commit

Permalink
draco: fix build with gcc
Browse files Browse the repository at this point in the history
  • Loading branch information
barracuda156 committed Dec 1, 2024
1 parent e7a4022 commit c6ce8ce
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 1 deletion.
11 changes: 10 additions & 1 deletion archivers/draco/Portfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@ checksums rmd160 8570f7264777ac166dfec8db1d09c07cd997f4ee \
patchfiles patch-gltf-decoder-cc.diff \
patch-draco-targets-cmake.diff

# https://github.com/google/draco/pull/1089
patchfiles-append patch-gltf_utils.h.diff

compiler.cxx_standard 2017
cmake.set_cxx_standard yes

depends_build-append \
port:ghc-filesystem \
port:gtest

depends_lib-append port:eigen3 \
depends_lib-append path:share/pkgconfig/eigen3.pc:eigen3 \
port:nlohmann-json \
port:stb \
port:tinygltf
Expand All @@ -51,5 +54,11 @@ configure.args-append \
-DDRACO_TRANSCODER_SUPPORTED=ON \
-DDRACO_VERBOSE=3 \

# https://trac.macports.org/ticket/71430
if {[string match *gcc* ${configure.compiler}]} {
configure.cxxflags-append \
-fpermissive
}

test.run yes
test.cmd "./draco_tests"
21 changes: 21 additions & 0 deletions archivers/draco/files/patch-gltf_utils.h.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
From a4edf44280b4456ed9d4267fff27a6040221b566 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <[email protected]>
Date: Sun, 1 Dec 2024 08:39:11 +0800
Subject: [PATCH] gltf_utils.h: add a missing <cstdint>

---
src/draco/io/gltf_utils.h | 1 +
1 file changed, 1 insertion(+)

diff --git src/draco/io/gltf_utils.h src/draco/io/gltf_utils.h
index befbacb..4547d42 100644
--- src/draco/io/gltf_utils.h
+++ src/draco/io/gltf_utils.h
@@ -21,6 +21,7 @@
#include <iomanip>
#include <sstream>
#include <string>
+#include <cstdint>

namespace draco {

0 comments on commit c6ce8ce

Please sign in to comment.