diff --git a/graphics/opensubdiv/Makefile b/graphics/opensubdiv/Makefile index beeada4c14f8..a299dd239333 100644 --- a/graphics/opensubdiv/Makefile +++ b/graphics/opensubdiv/Makefile @@ -1,79 +1,85 @@ PORTNAME= opensubdiv DISTVERSIONPREFIX= v DISTVERSION= 3_5_0 +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 USE_GITHUB= yes GH_ACCOUNT= PixarAnimationStudios GH_PROJECT= OpenSubdiv USE_GL= egl gl glu glew USE_LDCONFIG= yes CMAKE_ON= NO_CLEW NO_CUDA NO_DX -OPTIONS_DEFINE= DOCS EXAMPLES OPENCL PTEX TBB TEST TUTORIALS +OPTIONS_DEFINE= DOCS EXAMPLES OPENCL OPENMP PTEX TBB TEST TUTORIALS OPTIONS_DEFAULT= TBB +#OPTIONS_EXCLUDE= EXAMPLES OPTIONS_SUB= yes DOCS_CMAKE_BOOL_OFF= NO_DOC DOCS_BUILD_DEPENDS= rst2html.py:textproc/py-docutils \ doxygen>=1.8.4:devel/doxygen DOCS_USES= python:build DOCS_PORTDOCS= * -EXAMPLES_BROKEN= ld: error: undefined symbol: glXGetCurrentContext +#EXAMPLES_BROKEN= ld: error: undefined symbol: glXGetCurrentContext +#Examples cannot utilize the latest opencl headers EXAMPLES_CMAKE_BOOL_OFF= NO_EXAMPLES EXAMPLES_USES= xorg EXAMPLES_USE= xorg=ice,sm,x11,xcursor,xext,xi,xinerama,xrandr,xxf86vm EXAMPLES_LIB_DEPENDS= libglfw.so:graphics/glfw 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 + +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 TBB_DESC= Intel threading building blocks TBB_CMAKE_BOOL_OFF= NO_TBB TBB_LIB_DEPENDS= libtbb.so:devel/onetbb 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 # 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 <bsd.port.mk> diff --git a/graphics/opensubdiv/files/patch-opensubdiv_CMakeLists.txt b/graphics/opensubdiv/files/patch-opensubdiv_CMakeLists.txt new file mode 100644 index 000000000000..b47916caa6bb --- /dev/null +++ b/graphics/opensubdiv/files/patch-opensubdiv_CMakeLists.txt @@ -0,0 +1,11 @@ +--- opensubdiv/CMakeLists.txt.orig 2022-09-26 18:17:44 UTC ++++ opensubdiv/CMakeLists.txt +@@ -45,6 +45,8 @@ if (NOT NO_LIB) + 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() + diff --git a/graphics/opensubdiv/files/patch-opensubdiv_osd_CMakeLists.txt b/graphics/opensubdiv/files/patch-opensubdiv_osd_CMakeLists.txt new file mode 100644 index 000000000000..8b02e0d7f6a0 --- /dev/null +++ b/graphics/opensubdiv/files/patch-opensubdiv_osd_CMakeLists.txt @@ -0,0 +1,22 @@ +--- opensubdiv/osd/CMakeLists.txt.orig 2022-09-26 18:17:44 UTC ++++ opensubdiv/osd/CMakeLists.txt +@@ -76,6 +76,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 ) + ) + + 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} diff --git a/graphics/opensubdiv/files/patch-regression_CMakeLists.txt b/graphics/opensubdiv/files/patch-regression_CMakeLists.txt index 903aa9619672..f43ec0abe32f 100644 --- a/graphics/opensubdiv/files/patch-regression_CMakeLists.txt +++ b/graphics/opensubdiv/files/patch-regression_CMakeLists.txt @@ -1,22 +1,22 @@ ---- regression/CMakeLists.txt.orig 2020-06-30 16:02:18 UTC +--- regression/CMakeLists.txt.orig 2022-09-26 18:17:44 UTC +++ regression/CMakeLists.txt -@@ -26,14 +26,16 @@ add_subdirectory(common) +@@ -28,14 +28,16 @@ if (NOT NO_REGRESSION) - 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()