aboutsummaryrefslogtreecommitdiff
path: root/graphics/opensubdiv/Makefile
blob: b3138934409bc739b1d00ad108e0e4561ecfaa16 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80

PORTNAME=	opensubdiv
DISTVERSIONPREFIX=	v
DISTVERSION=	3_4_3
PORTREVISION=	2
CATEGORIES?=	graphics

MAINTAINER=	FreeBSD@Shaneware.biz
COMMENT=	High performance subdivision surface libraries

LICENSE=	APACHE20
LICENSE_FILE=	${WRKSRC}/LICENSE.txt

BUILD_DEPENDS=	glfw>2.7.0:graphics/glfw

USES=		cmake gl

USE_GITHUB=	yes
GH_ACCOUNT=	PixarAnimationStudios
GH_PROJECT=	OpenSubdiv

USE_GL=		gl glu glew
USE_LDCONFIG=	yes
CMAKE_ON=	NO_CUDA NO_DX NO_OMP

OPTIONS_DEFINE=		DOCS EXAMPLES OPENCL PTEX TBB TEST TUTORIALS
#OPTIONS_DEFAULT=	TBB -- off until onetbb support is available
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

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

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/tbb
TBB_BROKEN=		not available until transition to onetbb is complete

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>