freebsd-ports/graphics/opensubdiv/Makefile

81 lines
2.5 KiB
Makefile
Raw Normal View History

# $FreeBSD$
PORTNAME= opensubdiv
DISTVERSIONPREFIX= v
DISTVERSION= 3_3_0
CATEGORIES?= graphics
MAINTAINER= FreeBSD@Shaneware.biz
COMMENT= OpenSubdiv graphics library
LICENSE= APACHE20
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
BUILD_DEPENDS= glfw>2.7.0:graphics/glfw
USES= cmake:outsource
USE_GITHUB= yes
GH_ACCOUNT= PixarAnimationStudios
GH_PROJECT= OpenSubdiv
USE_GL= gl glu glew
CMAKE_VERBOSE= yes
USE_LDCONFIG= yes
CMAKE_ARGS+= -DNO_CUDA:BOOL=ON \
-DNO_DX:BOOL=ON \
-DNO_OMP:BOOL=ON
OPTIONS_DEFINE= DOCS EXAMPLES OPENCL PTEX TBB TEST TUTORIALS
OPTIONS_DEFAULT= TBB
OPTIONS_SUB= yes
DOCS_CMAKE_ON= -DNO_DOC:BOOL=OFF
DOCS_CMAKE_OFF= -DNO_DOC:BOOL=ON
DOCS_BUILD_DEPENDS= rst2html.py:textproc/py-docutils \
doxygen>=1.8.4:devel/doxygen
EXAMPLES_CMAKE_ON= -DNO_EXAMPLES:BOOL=OFF
EXAMPLES_CMAKE_OFF= -DNO_EXAMPLES:BOOL=ON
EXAMPLES_USE= xorg=ice,sm,x11,xcursor,xext,xi,xinerama,xrandr,xxf86vm
EXAMPLES_LIB_DEPENDS= libglfw.so:graphics/glfw
OPENCL_CMAKE_ON= -DNO_OPENCL:BOOL=OFF
OPENCL_CMAKE_OFF= -DNO_OPENCL:BOOL=ON
OPENCL_CFLAGS= -pthread
OPENCL_CXXFLAGS= -pthread
OPENCL_BUILD_DEPENDS= ${LOCALBASE}/include/CL/cl.h:devel/opencl
OPENCL_LIB_DEPENDS= libOpenCL.so:devel/ocl-icd
PTEX_DESC= ptex support
PTEX_CMAKE_ON= -DNO_PTEX:BOOL=OFF -DPTEX_LOCATION:STRING=${LOCALBASE} \
-DPTEX_INCLUDE_DIR:STRING=${LOCALBASE}/include/ptex
PTEX_CMAKE_OFF= -DNO_PTEX:BOOL=ON
PTEX_LIB_DEPENDS= libPtex.so:graphics/ptex
TBB_DESC= Intel threading building blocks
TBB_CMAKE_ON= -DNO_TBB:BOOL=OFF
TBB_CMAKE_OFF= -DNO_TBB:BOOL=ON
TBB_LIB_DEPENDS= libtbb.so:devel/tbb
TEST_CMAKE_ON= -DNO_REGRESSION:BOOL=OFF -DNO_TESTS:BOOL=OFF -DNO_GLTESTS:BOOL=OFF
TEST_CMAKE_OFF= -DNO_REGRESSION:BOOL=ON -DNO_TESTS:BOOL=ON -DNO_GLTESTS:BOOL=ON
TEST_LIB_DEPENDS= libglfw.so:graphics/glfw
TEST_USE= xorg=ice,sm,x11,xcursor,xext,xi,xinerama,xrandr,xxf86vm
TUTORIALS_DESC= Install tutorial programs
TUTORIALS_CMAKE_ON= -DNO_TUTORIALS:BOOL=OFF
TUTORIALS_CMAKE_OFF= -DNO_TUTORIALS:BOOL=ON
PLIST_SUB+= LIBVERS=${PORTVERSION}
post-patch:
${FIND} ${WRKSRC}/tutorials -name CMakeLists.txt | ${XARGS} ${REINPLACE_CMD} \
-e 's|{CMAKE_BINDIR_BASE}/tutorials|{CMAKE_INSTALL_PREFIX}/share/${PORTNAME}/tutorials|g'
${FIND} ${WRKSRC}/examples -name CMakeLists.txt | ${XARGS} ${REINPLACE_CMD} \
-e 's|{CMAKE_BINDIR_BASE}|{CMAKE_INSTALL_PREFIX}/share/${PORTNAME}/examples|g'
${FIND} ${WRKSRC}/regression -name CMakeLists.txt | ${XARGS} ${REINPLACE_CMD} \
-e 's|{CMAKE_BINDIR_BASE}|{CMAKE_INSTALL_PREFIX}/share/${PORTNAME}/test|g'
.include <bsd.port.mk>