File: rules

package info (click to toggle)
vtk6 6.3.0+dfsg2-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 118,880 kB
  • sloc: cpp: 1,442,792; ansic: 113,395; python: 72,383; tcl: 46,998; xml: 8,119; yacc: 4,525; java: 4,239; perl: 3,108; lex: 1,694; sh: 1,093; asm: 154; makefile: 103; objc: 17
file content (125 lines) | stat: -rwxr-xr-x 4,718 bytes parent folder | download
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#!/usr/bin/make -f
BUILDDIR = $(CURDIR)/debian/build

# deduce documentation option (build-indep target)
ifeq "" "$(filter %-doc,$(shell dh_listpackages))"
  BUILDDOC = OFF
else
  BUILDDOC = ON
endif

# currently hppa and hurd-i386 default to v 1.5, but all others are 
# at least at 1.8 and 1.9 doesn't support 1.5 anymore.  
ifeq ($(DEB_BUILD_ARCH),$(filter $(DEB_BUILD_ARCH),hppa hurd-i386))
        JAVA_VERSION=1.5
else
        JAVA_VERSION=1.8
endif

export DEB_CPPFLAGS_MAINT_APPEND=-DVTK_USE_BOOST

# export JAVA_HOME to help FindJava.cmake and FindJNI.cmake
export JAVA_HOME=/usr/lib/jvm/default-java

%:
	dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR) --with python2 --with javahelper --parallel

extra_flags +=  \
  -DCMAKE_VERBOSE_MAKEFILE=ON \
	-DCMAKE_C_COMPILER=mpicc \
	-DCMAKE_CXX_COMPILER=mpic++ \
	-DBUILD_DOCUMENTATION=$(BUILDDOC) \
	-DBUILD_EXAMPLES=ON \
	-DBUILD_SHARED_LIBS=ON \
	-DBUILD_TESTING=OFF \
	-DVTK_USE_TK=ON \
	-DVTK_WRAP_JAVA=ON \
	-DVTK_JAVA_SOURCE_VERSION=$(JAVA_VERSION) \
	-DVTK_JAVA_TARGET_VERSION=$(JAVA_VERSION) \
	-DVTK_WRAP_PYTHON=ON \
	-DVTK_WRAP_TCL=ON \
	-DVTK_USE_SYSTEM_EXPAT=ON \
	-DVTK_USE_SYSTEM_FREETYPE=ON \
	-DVTK_USE_SYSTEM_GL2PS=ON \
	-DVTK_USE_SYSTEM_HDF5=ON \
	-DHDF5_PREFER_PARALLEL=ON \
	-DVTK_USE_SYSTEM_JPEG=ON \
	-DVTK_USE_SYSTEM_LIBPROJ4=ON \
	-DVTK_USE_SYSTEM_LIBXML2=ON \
	-DVTK_USE_SYSTEM_OGGTHEORA=ON \
	-DVTK_USE_SYSTEM_PNG=ON \
	-DVTK_USE_SYSTEM_TIFF=ON \
	-DVTK_USE_SYSTEM_ZLIB=ON \
	-DVTK_USE_SYSTEM_JSONCPP=ON \
	-DVTK_USE_SYSTEM_NETCDF=ON \
	-DVTK_USE_SYSTEM_GLEW=ON \
	-DVTK_EXTRA_COMPILER_WARNINGS=ON \
	-DVTK_Group_Imaging=ON \
	-DVTK_Group_MPI=ON \
	-DVTK_Group_Tk=ON \
	-DVTK_Group_Views=ON \
	-DVTK_BUILD_ALL_MODULES=ON \
	-DMPI_CXX_INCLUDE_PATH="/usr/include/mpi" \
	-DVTK_INSTALL_LIBRARY_DIR="/usr/lib/$(DEB_HOST_MULTIARCH)" \
	-DVTK_MAKE_INSTANTIATORS=ON \
	-DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed" \
	-DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed" \
	-DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed" \
	-DCMAKE_BUILD_TYPE=None \
	-DVTK_USE_GCC_VISIBILITY=ON \
	-DModule_vtkRenderingExternal=ON

extra_flags += -DVTK_QT_VERSION=5	-DVTK_Group_Qt=ON

override_dh_auto_configure:
ifneq (,$(filter $(DEB_HOST_ARCH),$(noqt_archs)))
	echo '' > $(CURDIR)/Views/Qt/module.cmake
	echo '' > $(CURDIR)/GUISupport/QtWebkit/module.cmake
	echo '' > $(CURDIR)/Rendering/Qt/module.cmake
	echo '' > $(CURDIR)/GUISupport/QtOpenGL/module.cmake
	echo '' > $(CURDIR)/Examples/GUI/Qt/SimpleView/CMakeLists.txt
endif
	dh_auto_configure -- $(extra_flags)

override_dh_auto_clean:
	dh_auto_clean
	rm -rf $(BUILDDIR)

override_dh_auto_build-indep:
	# Make doc (see http://www.vtk.org/Wiki/VTK/BuildingDoxygen)
	cd $(BUILDDIR) && make DoxygenDoc
	# remove .md5 files
	find $(BUILDDIR)/Utilities/Doxygen/doc/html/ -name "*.md5" | xargs rm -f

override_dh_auto_build-arch: 
	dh_auto_build 

override_dh_auto_install:
	pwd
	dh_auto_install -X.pyc -X.pyo
	# Modify vtkWrapJava.cmake to properly upload JavaDependencies.cmake.in	from $VTK_DIR
	perl -pi -e "s|{dir}/JavaDependencies.cmake.in\"|{VTK_DIR}/JavaDependencies.cmake.in\"|" debian/tmp/usr/lib/cmake/vtk-6.3/vtkWrapJava.cmake
	# Correct headers for paraview
	perl -pi.bak -e "s|cxx|include|g" ThirdParty/netcdf/vtk_netcdfcpp.h
	mv $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/vtk.jar $(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/vtk6.jar
	mv $(CURDIR)/debian/build/bin/vtkpython $(CURDIR)/debian/build/bin/vtk6python
	sed -i -e "s/FATAL_ERROR/STATUS/g" $(CURDIR)/debian/tmp/usr/lib/cmake/vtk-6.3/VTKTargets.cmake
	chrpath -d $(CURDIR)/debian/build/bin/vtk6python
	chrpath -d $(CURDIR)/debian/build/bin/pvtk
	chrpath -d $(CURDIR)/debian/build/bin/pvtkpython
	mv $(CURDIR)/debian/tmp/usr/bin/vtk $(CURDIR)/debian/tmp/usr/bin/vtk6
	find $(CURDIR)/debian/tmp/ -name "*.pyc" | xargs rm -f
	find $(CURDIR)/debian/tmp/ -name "*.pyo" | xargs rm -f
	sed -i -e "9 a\ append libPath /${DEB_HOST_MULTIARCH}" $(CURDIR)/debian/tmp/usr/lib/tcltk/vtk-6.3/pkgIndex.tcl

override_dh_install-arch:
	dh_install -a
	find $(CURDIR)/debian/libvtk6-dev/ -name "*Qt*" -exec rm {} \;
	find $(CURDIR)/debian/libvtk6.3/ -name "*Qt*" -exec rm {} \;
	find $(CURDIR)/debian/libvtk6-dev/ -name "libvtkRenderingPythonTkWidgets.so" -exec rm {} \;
	find $(CURDIR)/debian/libvtk6-dev/usr/include/ -name "Q*" -exec rm {} \;
	chmod 755 $(CURDIR)/debian/libvtk6-dev/usr/share/vtk-6.3/doxygen/*.pl
	rm -rf $(CURDIR)/debian/libvtk6-doc/usr/share/doc/vtk6-doc/html/_formulas.log
	mkdir -p  $(CURDIR)/debian/python-vtk6/usr/lib/$(DEB_HOST_MULTIARCH)/python2.7/site-packages/ && \
          cd $(CURDIR)/debian/python-vtk6/usr/lib/$(DEB_HOST_MULTIARCH)/python2.7/site-packages/ && \
	  ln -s  /usr/lib/python2.7/dist-packages/vtk vtk