summaryrefslogtreecommitdiff
path: root/graphics/vtk-python/Makefile
blob: f7cd760cdc1965ef75a5c54e28800d54efd32a8e (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
49
# $NetBSD: Makefile,v 1.8 2006/05/21 02:25:02 wiz Exp $
#

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

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

USE_LANGUAGES=	c c++
PYDISTUTILSPKG=			yes
PYTHON_VERSIONS_ACCEPTED=	23
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"