1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-20 00:21:35 +00:00

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:    linimon (mentor), yuri (maintainer timeout)
This commit is contained in:
Piotr Kubaj 2019-10-12 15:46:07 +00:00
parent 9b2049fc61
commit d0f149451d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=514338
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 {