diff --git a/graphics/opensubdiv/Makefile b/graphics/opensubdiv/Makefile index ce5302b8356f..227f215263ab 100644 --- a/graphics/opensubdiv/Makefile +++ b/graphics/opensubdiv/Makefile @@ -1,81 +1,82 @@ PORTNAME= opensubdiv DISTVERSIONPREFIX= v DISTVERSION= 3_6_0 -CATEGORIES?= graphics +PORTREVISION= 1 +CATEGORIES= graphics MAINTAINER= FreeBSD@Shaneware.biz COMMENT= High performance subdivision surface libraries WWW= https://graphics.pixar.com/opensubdiv LICENSE= APACHE20 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' {} + ${FIND} ${WRKSRC}/examples -name CMakeLists.txt -exec \ ${REINPLACE_CMD} -e 's|{CMAKE_BINDIR_BASE}|{CMAKE_INSTALL_PREFIX}/${EXAMPLESDIR_REL}|g' {} + ${FIND} ${WRKSRC}/regression -name CMakeLists.txt -exec \ ${REINPLACE_CMD} -e 's|{CMAKE_BINDIR_BASE}|{CMAKE_INSTALL_PREFIX}/tests/${PORTNAME}|g' {} + .include diff --git a/graphics/opensubdiv/files/patch-examples_CMakeLists.txt b/graphics/opensubdiv/files/patch-examples_CMakeLists.txt deleted file mode 100644 index 980d4c45437e..000000000000 --- a/graphics/opensubdiv/files/patch-examples_CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ ---- examples/CMakeLists.txt.orig 2020-06-30 16:05:15 UTC -+++ examples/CMakeLists.txt -@@ -32,7 +32,8 @@ if (OPENGL_FOUND AND GLFW_FOUND) - add_subdirectory(glFVarViewer) - add_subdirectory(glStencilViewer) - add_subdirectory(glImaging) -- add_subdirectory(farViewer) -+# uses deprecated api -+# add_subdirectory(farViewer) - - if (OPENGL_4_2_FOUND) - add_subdirectory(glPaintTest) diff --git a/graphics/opensubdiv/files/patch-opensubdiv_hbr_mesh.h b/graphics/opensubdiv/files/patch-opensubdiv_hbr_mesh.h new file mode 100644 index 000000000000..3fde42177d7c --- /dev/null +++ b/graphics/opensubdiv/files/patch-opensubdiv_hbr_mesh.h @@ -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 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); diff --git a/graphics/opensubdiv/files/patch-opensubdiv_osd_CMakeLists.txt b/graphics/opensubdiv/files/patch-opensubdiv_osd_CMakeLists.txt index 8b02e0d7f6a0..192d3e2a9dc8 100644 --- a/graphics/opensubdiv/files/patch-opensubdiv_osd_CMakeLists.txt +++ b/graphics/opensubdiv/files/patch-opensubdiv_osd_CMakeLists.txt @@ -1,22 +1,22 @@ ---- opensubdiv/osd/CMakeLists.txt.orig 2022-09-26 18:17:44 UTC +--- opensubdiv/osd/CMakeLists.txt.orig 2023-09-14 19:19:06 UTC +++ opensubdiv/osd/CMakeLists.txt -@@ -76,6 +76,8 @@ if(OPENMP_FOUND ) +@@ -81,6 +81,8 @@ if(OPENMP_FOUND ) if (CMAKE_COMPILER_IS_GNUCXX) list(APPEND PLATFORM_CPU_LIBRARIES gomp) + else() + list(APPEND PLATFORM_CPU_LIBRARIES OpenMP::OpenMP_CXX) endif() endif() -@@ -96,10 +98,6 @@ if( TBB_FOUND ) +@@ -99,10 +101,6 @@ if( TBB_FOUND ) ) list(APPEND PUBLIC_HEADER_FILES ${TBB_PUBLIC_HEADERS}) - - if (CMAKE_COMPILER_IS_GNUCXX) - list(APPEND PLATFORM_CPU_LIBRARIES gomp) - endif() list(APPEND PLATFORM_CPU_LIBRARIES - ${TBB_LIBRARIES} + TBB::tbb diff --git a/graphics/opensubdiv/files/patch-regression_CMakeLists.txt b/graphics/opensubdiv/files/patch-regression_CMakeLists.txt deleted file mode 100644 index f43ec0abe32f..000000000000 --- a/graphics/opensubdiv/files/patch-regression_CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ ---- regression/CMakeLists.txt.orig 2022-09-26 18:17:44 UTC -+++ regression/CMakeLists.txt -@@ -28,14 +28,16 @@ if (NOT NO_REGRESSION) - - add_subdirectory(bfr_evaluate) - -- add_subdirectory(hbr_regression) -+# uses deprecated api -+# add_subdirectory(hbr_regression) - -- add_subdirectory(far_regression) -+# add_subdirectory(far_regression) - - add_subdirectory(far_perf) - - if(OPENGL_FOUND AND GLFW_FOUND) -- add_subdirectory(osd_regression) -+# uses deprecated api -+# add_subdirectory(osd_regression) - endif() - - endif() diff --git a/graphics/opensubdiv/files/patch-tutorials_CMakeLists.txt b/graphics/opensubdiv/files/patch-tutorials_CMakeLists.txt deleted file mode 100644 index ed49630dccc1..000000000000 --- a/graphics/opensubdiv/files/patch-tutorials_CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ ---- tutorials/CMakeLists.txt.orig 2020-06-30 16:03:59 UTC -+++ tutorials/CMakeLists.txt -@@ -27,7 +27,8 @@ include_directories( - "${OPENSUBDIV_INCLUDE_DIR}/" - ) - --add_subdirectory(hbr) -+# uses deprecated api -+#add_subdirectory(hbr) - - add_subdirectory(far) - diff --git a/graphics/opensubdiv/pkg-plist b/graphics/opensubdiv/pkg-plist index 35210bb87985..4191927a8491 100644 --- a/graphics/opensubdiv/pkg-plist +++ b/graphics/opensubdiv/pkg-plist @@ -1,137 +1,137 @@ include/opensubdiv/bfr/irregularPatchType.h include/opensubdiv/bfr/limits.h include/opensubdiv/bfr/parameterization.h include/opensubdiv/bfr/refinerSurfaceFactory.h include/opensubdiv/bfr/surface.h include/opensubdiv/bfr/surfaceData.h include/opensubdiv/bfr/surfaceFactory.h include/opensubdiv/bfr/surfaceFactoryCache.h include/opensubdiv/bfr/surfaceFactoryMeshAdapter.h include/opensubdiv/bfr/tessellation.h include/opensubdiv/bfr/vertexDescriptor.h include/opensubdiv/far/error.h include/opensubdiv/far/patchDescriptor.h include/opensubdiv/far/patchMap.h include/opensubdiv/far/patchParam.h include/opensubdiv/far/patchTable.h include/opensubdiv/far/patchTableFactory.h include/opensubdiv/far/primvarRefiner.h include/opensubdiv/far/ptexIndices.h include/opensubdiv/far/stencilTable.h include/opensubdiv/far/stencilTableFactory.h include/opensubdiv/far/topologyDescriptor.h include/opensubdiv/far/topologyLevel.h include/opensubdiv/far/topologyRefiner.h include/opensubdiv/far/topologyRefinerFactory.h include/opensubdiv/far/types.h include/opensubdiv/hbr/allocator.h include/opensubdiv/hbr/bilinear.h include/opensubdiv/hbr/catmark.h include/opensubdiv/hbr/cornerEdit.h include/opensubdiv/hbr/creaseEdit.h include/opensubdiv/hbr/face.h include/opensubdiv/hbr/faceEdit.h include/opensubdiv/hbr/fvarData.h include/opensubdiv/hbr/fvarEdit.h include/opensubdiv/hbr/halfedge.h include/opensubdiv/hbr/hierarchicalEdit.h include/opensubdiv/hbr/holeEdit.h include/opensubdiv/hbr/loop.h include/opensubdiv/hbr/mesh.h include/opensubdiv/hbr/subdivision.h include/opensubdiv/hbr/vertex.h include/opensubdiv/hbr/vertexEdit.h include/opensubdiv/osd/bufferDescriptor.h %%OPENCL%%include/opensubdiv/osd/clEvaluator.h %%OPENCL%%include/opensubdiv/osd/clGLVertexBuffer.h %%OPENCL%%include/opensubdiv/osd/clPatchTable.h %%OPENCL%%include/opensubdiv/osd/clVertexBuffer.h include/opensubdiv/osd/cpuEvaluator.h include/opensubdiv/osd/cpuGLVertexBuffer.h include/opensubdiv/osd/cpuPatchTable.h include/opensubdiv/osd/cpuVertexBuffer.h include/opensubdiv/osd/glComputeEvaluator.h include/opensubdiv/osd/glLegacyGregoryPatchTable.h include/opensubdiv/osd/glMesh.h include/opensubdiv/osd/glPatchTable.h include/opensubdiv/osd/glVertexBuffer.h include/opensubdiv/osd/glXFBEvaluator.h include/opensubdiv/osd/glslPatchShaderSource.h include/opensubdiv/osd/mesh.h include/opensubdiv/osd/nonCopyable.h -@comment include/opensubdiv/osd/ompEvaluator.h -@comment include/opensubdiv/osd/ompKernel.h +%%OPENMP%%include/opensubdiv/osd/ompEvaluator.h +%%OPENMP%%include/opensubdiv/osd/ompKernel.h %%OPENCL%%include/opensubdiv/osd/opencl.h include/opensubdiv/osd/opengl.h include/opensubdiv/osd/patchBasis.h include/opensubdiv/osd/patchBasisTypes.h %%TBB%%include/opensubdiv/osd/tbbEvaluator.h %%TBB%%include/opensubdiv/osd/tbbKernel.h include/opensubdiv/osd/types.h include/opensubdiv/sdc/bilinearScheme.h include/opensubdiv/sdc/catmarkScheme.h include/opensubdiv/sdc/crease.h include/opensubdiv/sdc/loopScheme.h include/opensubdiv/sdc/options.h include/opensubdiv/sdc/scheme.h include/opensubdiv/sdc/types.h include/opensubdiv/version.h include/opensubdiv/vtr/array.h include/opensubdiv/vtr/componentInterfaces.h include/opensubdiv/vtr/fvarLevel.h include/opensubdiv/vtr/fvarRefinement.h include/opensubdiv/vtr/level.h include/opensubdiv/vtr/refinement.h include/opensubdiv/vtr/sparseSelector.h include/opensubdiv/vtr/stackBuffer.h include/opensubdiv/vtr/types.h lib/cmake/OpenSubdiv/OpenSubdivConfig.cmake lib/cmake/OpenSubdiv/OpenSubdivConfigVersion.cmake lib/cmake/OpenSubdiv/OpenSubdivTargets-%%CMAKE_BUILD_TYPE%%.cmake lib/cmake/OpenSubdiv/OpenSubdivTargets.cmake lib/libosdCPU.a lib/libosdCPU.so lib/libosdCPU.so.%%LIBVERS%% lib/libosdGPU.a lib/libosdGPU.so lib/libosdGPU.so.%%LIBVERS%% -@comment %%EXAMPLES%%%%EXAMPLESDIR%%/farViewer +%%EXAMPLES%%%%EXAMPLESDIR%%/farViewer %%EXAMPLES%%%%EXAMPLESDIR%%/glEvalLimit %%EXAMPLES%%%%EXAMPLESDIR%%/glFVarViewer %%EXAMPLES%%%%EXAMPLESDIR%%/glImaging %%EXAMPLES%%%%EXAMPLESDIR%%/glPaintTest %%EXAMPLES%%%%PTEX%%%%EXAMPLESDIR%%/glPtexViewer %%EXAMPLES%%%%EXAMPLESDIR%%/glShareTopology %%EXAMPLES%%%%EXAMPLESDIR%%/glStencilViewer %%EXAMPLES%%%%EXAMPLESDIR%%/glViewer %%TEST%%tests/opensubdiv/bfr_evaluate %%TEST%%tests/opensubdiv/far_perf -@comment %%TEST%%tests/opensubdiv/far_regression -@comment %%TEST%%tests/opensubdiv/hbr_baseline -@comment %%TEST%%tests/opensubdiv/hbr_regression -@comment %%TEST%%tests/opensubdiv/osd_regression +%%TEST%%tests/opensubdiv/far_regression +%%TEST%%tests/opensubdiv/hbr_baseline +%%TEST%%tests/opensubdiv/hbr_regression +%%TEST%%tests/opensubdiv/osd_regression %%TUTORIALS%%%%DATADIR%%/tutorials/bfr_tutorial_1_1 %%TUTORIALS%%%%DATADIR%%/tutorials/bfr_tutorial_1_2 %%TUTORIALS%%%%DATADIR%%/tutorials/bfr_tutorial_1_3 %%TUTORIALS%%%%DATADIR%%/tutorials/bfr_tutorial_1_4 %%TUTORIALS%%%%DATADIR%%/tutorials/bfr_tutorial_1_5 %%TUTORIALS%%%%DATADIR%%/tutorials/bfr_tutorial_2_1 %%TUTORIALS%%%%DATADIR%%/tutorials/bfr_tutorial_2_2 %%TUTORIALS%%%%DATADIR%%/tutorials/bfr_tutorial_3_1 %%TUTORIALS%%%%DATADIR%%/tutorials/bfr_tutorial_3_2 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_1_1 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_1_2 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_2_1 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_2_2 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_2_3 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_3_1 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_4_1 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_4_2 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_4_3 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_5_1 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_5_2 %%TUTORIALS%%%%DATADIR%%/tutorials/far_tutorial_5_3 -@comment %%TUTORIALS%%%%DATADIR%%/tutorials/hbr_tutorial_0 -@comment %%TUTORIALS%%%%DATADIR%%/tutorials/hbr_tutorial_1 -@comment %%TUTORIALS%%%%DATADIR%%/tutorials/hbr_tutorial_2 +%%TUTORIALS%%%%DATADIR%%/tutorials/hbr_tutorial_0 +%%TUTORIALS%%%%DATADIR%%/tutorials/hbr_tutorial_1 +%%TUTORIALS%%%%DATADIR%%/tutorials/hbr_tutorial_2 %%TUTORIALS%%%%DATADIR%%/tutorials/osd_tutorial_0