summaryrefslogtreecommitdiff
path: root/graphics/vtk-python/Makefile
blob: 5448ae8595a35108460768610d043b92052e41d0 (plain)
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
# $NetBSD: Makefile,v 1.4 2004/12/03 15:14:59 wiz Exp $
#

PKGNAME=	vtk-python-${VTKDIST_VERSION}
PKGREVISION=	1

COMMENT=	Python wrapper libraries for vtk; see vtk package for details

VTK_CMAKE_OPT=  -DPYTHON_INCLUDE_PATH:STRING=${PREFIX}/${PYINC} \
		-DPYTHON_LIBRARY:STRING=${PREFIX}/lib/libpython${PYVERSSUFFIX}.so \
		-DVTK_WRAP_PYTHON:BOOL=ON

PYDISTUTILSPKG=			yes
PYTHON_VERSIONS_ACCEPTED=	23pth
PYSETUPSUBDIR=			Wrapping/Python

VTK_PY_LIBS=	bin/libvtkCommonPython.so \
		bin/libvtkFilteringPython.so \
		bin/libvtkImagingPython.so \
		bin/libvtkGraphicsPython.so \
		bin/libvtkIOPython.so \
		bin/libvtkRenderingPython.so \
		bin/libvtkRenderingPythonTkWidgets.so \
		bin/libvtkHybridPython.so

BUILD_TARGET=	default_target_Wrapping_Python

pre-build:
	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${BUILD_TARGET}

pre-install:
	for lib in ${VTK_PY_LIBS}; do \
		${INSTALL_DATA} ${WRKSRC}/$$lib ${VTK_LIBDIR}; \
	done

# XXX this doesn't get linked with correct RPATH, and is unnecessary anyway
post-install:
	${RM} -f ${PREFIX}/bin/vtkpython
	${LN} -s ${PYTHONBIN} ${PREFIX}/bin/vtkpython

DEPENDS=	vtk>=${VTK_VERSION}:../../graphics/vtk

.include "../../graphics/vtk/Makefile.vtkdist"

.include "../../lang/python/application.mk"
.include "../../lang/python/extension.mk"
.include "../../x11/tk/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"