MFH: r514338

misc/openvdb: fix build on GCC architectures

Compiling on GCC architectures fails:
/wrkdirs/usr/ports/misc/openvdb/work/openvdb-6.1.0/openvdb/points/AttributeSet.cc: In member function 'openvdb::v6_1::points::AttributeSet::Descriptor::Ptr openvdb::v6_1::points::AttributeSet::Descriptor::duplicateDrop(const std::vector<long unsigned int>&) const':
/wrkdirs/usr/ports/misc/openvdb/work/openvdb-6.1.0/openvdb/points/AttributeSet.cc:875:59: error: 'CHAR_BIT' was not declared in this scope
  875 |             const size_t GROUP_BITS = sizeof(GroupType) * CHAR_BIT;
      |                                                           ^~~~~~~~
/wrkdirs/usr/ports/misc/openvdb/work/openvdb-6.1.0/openvdb/points/AttributeSet.cc:35:1: note: 'CHAR_BIT' is defined in header '<climits>'; did you forget to '#include <climits>'?
   34 | #include "AttributeGroup.h"
  +++ |+#include <climits>
   35 |

While here, add USES=xorg for TOOLS option.

PR:             240630
Approved by:    portmgr (tier-2 blanket)
This commit is contained in:
Mark Linimon 2019-12-07 12:14:22 +00:00
parent 7e13e7bc17
commit e2577670a7
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2019Q4/; revision=519203
2 changed files with 11 additions and 1 deletions

View File

@ -40,7 +40,7 @@ TOOLS_CMAKE_BOOL= OPENVDB_BUILD_BINARIES OPENVDB_BUILD_VDB_LOD \
OPENVDB_BUILD_VDB_RENDER OPENVDB_BUILD_VDB_VIEW
TOOLS_LIB_DEPENDS= libglfw.so:graphics/glfw \
libIlmImf.so:graphics/openexr
TOOLS_USES= gl
TOOLS_USES= gl xorg
TOOLS_USE= GL=gl,glu XORG=x11,xcursor,xi,xinerama,xrandr,xxf86vm
DOCS_CMAKE_BOOL= OPENVDB_BUILD_DOCS

View File

@ -0,0 +1,10 @@
--- openvdb/points/AttributeSet.cc.orig 2019-09-16 16:50:50 UTC
+++ openvdb/points/AttributeSet.cc
@@ -34,6 +34,7 @@
#include "AttributeGroup.h"
#include <algorithm> // std::equal
+#include <climits> // CHAR_BIT
#include <string>
namespace openvdb {