-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
graphics/opensubdiv: sort out Makefile, pet portclippy, fix build on …
…32bit - Remove unnecessary libs from USE_GL and add required. - Fix build on 32bit ARCHS, upstream issue: PixarAnimationStudios/OpenSubdiv#1198 (comment) - Make options OPENMP (for supported ARCHS) and PTEX default. - EXAMPLES and OPENCL can build together without errors. - Remove NO_GL_TESTS - upstream removed it. - Sort options and pet portclippy. PR: 279472 Approved by: Shane <[email protected]> (maintainer)
- Loading branch information
Showing
7 changed files
with
51 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
PORTNAME= opensubdiv | ||
DISTVERSIONPREFIX= v | ||
DISTVERSION= 3_6_0 | ||
CATEGORIES?= graphics | ||
PORTREVISION= 1 | ||
CATEGORIES= graphics | ||
|
||
MAINTAINER= [email protected] | ||
COMMENT= High performance subdivision surface libraries | ||
|
@@ -12,64 +13,64 @@ LICENSE_FILE= ${WRKSRC}/LICENSE.txt | |
|
||
BUILD_DEPENDS= glfw>3.0.0:graphics/glfw | ||
|
||
USES= cmake gl localbase | ||
USES= cmake gl localbase:ldflags | ||
|
||
USE_GITHUB= yes | ||
GH_ACCOUNT= PixarAnimationStudios | ||
GH_PROJECT= OpenSubdiv | ||
|
||
USE_GL= egl gl glu glew | ||
USE_GL= opengl | ||
USE_LDCONFIG= yes | ||
CMAKE_ON= NO_CLEW NO_CUDA NO_DX NO_METAL | ||
|
||
PLIST_SUB+= LIBVERS=${PORTVERSION} | ||
|
||
OPTIONS_DEFINE= DOCS EXAMPLES OPENCL OPENMP PTEX TBB TEST TUTORIALS | ||
OPTIONS_DEFAULT= TBB | ||
OPTIONS_DEFAULT= PTEX TBB | ||
OPTIONS_DEFAULT_armv6= | ||
OPTIONS_DEFAULT_armv7= | ||
OPTIONS_DEFAULT_OTHER_ARCHS= OPENMP | ||
OPTIONS_SUB= yes | ||
|
||
DOCS_CMAKE_BOOL_OFF= NO_DOC | ||
PTEX_DESC= ptex support | ||
TBB_DESC= Intel threading building blocks | ||
TUTORIALS_DESC= Install tutorial programs | ||
|
||
DOCS_BUILD_DEPENDS= rst2html.py:textproc/py-docutils \ | ||
doxygen>=1.8.4:devel/doxygen | ||
DOCS_USES= python:build | ||
DOCS_CMAKE_BOOL_OFF= NO_DOC | ||
DOCS_PORTDOCS= * | ||
|
||
EXAMPLES_CMAKE_BOOL_OFF= NO_EXAMPLES | ||
EXAMPLES_LIB_DEPENDS= libglfw.so:graphics/glfw | ||
EXAMPLES_USES= xorg | ||
EXAMPLES_USE= xorg=ice,sm,x11,xcursor,xext,xi,xinerama,xrandr,xxf86vm | ||
EXAMPLES_LIB_DEPENDS= libglfw.so:graphics/glfw | ||
EXAMPLES_CMAKE_BOOL_OFF= NO_EXAMPLES | ||
|
||
OPENCL_CMAKE_BOOL_OFF= NO_OPENCL | ||
OPENCL_CFLAGS= -pthread | ||
OPENCL_BUILD_DEPENDS= ${LOCALBASE}/include/CL/cl.h:devel/opencl | ||
OPENCL_LIB_DEPENDS= libOpenCL.so:devel/ocl-icd | ||
OPENCL_PREVENTS= EXAMPLES | ||
OPENCL_USE= gl=gl | ||
OPENCL_CMAKE_BOOL_OFF= NO_OPENCL | ||
OPENCL_CFLAGS= -pthread | ||
OPENCL_LDFLAGS= -lGLX | ||
|
||
OPENMP_CMAKE_BOOL_OFF= NO_OMP | ||
|
||
PTEX_DESC= ptex support | ||
PTEX_CMAKE_BOOL_OFF= NO_PTEX | ||
PTEX_CMAKE_ON= -DPTEX_LOCATION:STRING=${LOCALBASE} \ | ||
-DPTEX_INCLUDE_DIR:STRING=${LOCALBASE}/include/ptex | ||
PTEX_LIB_DEPENDS= libPtex.so:graphics/ptex | ||
PTEX_CMAKE_BOOL_OFF= NO_PTEX | ||
PTEX_CMAKE_ON= -DPTEX_INCLUDE_DIR:STRING=${LOCALBASE}/include/ptex \ | ||
-DPTEX_LOCATION:STRING=${LOCALBASE} | ||
|
||
TBB_DESC= Intel threading building blocks | ||
TBB_CMAKE_BOOL_OFF= NO_TBB | ||
TBB_LIB_DEPENDS= libtbb.so:devel/onetbb | ||
TBB_CMAKE_BOOL_OFF= NO_TBB | ||
|
||
TEST_CMAKE_BOOL_OFF= NO_REGRESSION NO_TESTS NO_GL_TESTS | ||
TEST_LIB_DEPENDS= libglfw.so:graphics/glfw | ||
TEST_USES= xorg | ||
TEST_USE= xorg=ice,sm,x11,xcursor,xext,xi,xinerama,xrandr,xxf86vm | ||
TEST_CMAKE_BOOL_OFF= NO_REGRESSION NO_TESTS | ||
|
||
# the tutorials and tests include use of deprecated parts of the library | ||
# using clang 10 on 32 bit fails to build all tutorials and tests | ||
# currently 12.1 still works - 11.4 and current fail | ||
# CMake files and pkg-plist are patched to prevent failing builds | ||
|
||
TUTORIALS_DESC= Install tutorial programs | ||
TUTORIALS_CMAKE_BOOL_OFF= NO_TUTORIALS | ||
|
||
PLIST_SUB+= LIBVERS=${PORTVERSION} | ||
|
||
post-patch: | ||
${FIND} ${WRKSRC}/tutorials -name CMakeLists.txt -exec \ | ||
${REINPLACE_CMD} -e 's|{CMAKE_BINDIR_BASE}/tutorials|{CMAKE_INSTALL_PREFIX}/${DATADIR_REL}/tutorials|g' {} + | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- opensubdiv/hbr/mesh.h.orig 2023-09-14 19:19:06 UTC | ||
+++ opensubdiv/hbr/mesh.h | ||
@@ -215,7 +215,7 @@ template <class T> class HbrMesh { (public) | ||
void SetFVarPropagateCorners(bool p) { fvarpropagatecorners = p; } | ||
|
||
// Register routines for keeping track of memory usage | ||
- void RegisterMemoryRoutines(void (*increment)(unsigned long bytes), void (*decrement)(unsigned long bytes)) { | ||
+ void RegisterMemoryRoutines(void (*increment)(size_t bytes), void (*decrement)(size_t bytes)) { | ||
m_faceAllocator.SetMemStatsIncrement(increment); | ||
m_faceAllocator.SetMemStatsDecrement(decrement); | ||
m_vertexAllocator.SetMemStatsIncrement(increment); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters