File: rules

package info (click to toggle)
vtk7 7.1.1+dfsg1-12
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 125,776 kB
  • sloc: cpp: 1,539,582; ansic: 106,521; python: 78,038; tcl: 47,013; xml: 8,142; yacc: 5,040; java: 4,439; perl: 3,132; lex: 1,926; sh: 1,500; makefile: 122; objc: 83
file content (146 lines) | stat: -rwxr-xr-x 5,256 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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
#!/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

ifeq ($(DEB_BUILD_ARCH),i386)
  # Tests are permanently failing, try force rounding to normal double 
  # accuracy
  export DEB_CXXFLAGS_MAINT_APPEND=-ffloat-store
endif 

ifeq ($(DEB_BUILD_ARCH),$(filter $(DEB_BUILD_ARCH),hppa hurd-i386))
        JAVA_VERSION=1.5
else
        JAVA_VERSION=1.8
endif

noqt_archs="" 
ifeq ($(DEB_BUILD_ARCH),$(filter $(DEB_BUILD_ARCH), $(noqt_archs)))
        extra_flags=-DVTK_Group_Qt=OFF \
                    -DMODULE_vtkParseOGLExt=ON  \
                    -DModule_vtkWrappingTools=ON \
                    -DModule_vtkRenderingSceneGraph=ON \
                    -DModule_vtkIOExportOpenGL2=ON \
                    -DModule_vtkPython=ON \
                    -DVTK_BUILD_ALL_MODULES=OFF
else
        extra_flags += -DVTK_QT_VERSION=5 \
                       -DVTK_Group_Qt=ON \
                       -DVTK_BUILD_ALL_MODULES=ON
endif


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

%:
	dh $@ --buildsystem=cmake --builddirectory=$(BUILDDIR) --with python3 --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_JAVA_SOURCE_VERSION=$(JAVA_VERSION) \
        -DVTK_JAVA_TARGET_VERSION=$(JAVA_VERSION) \
	-DVTK_USE_TK=ON \
	-DVTK_WRAP_JAVA=ON \
	-DVTK_WRAP_PYTHON=ON \
        -DVTK_PYTHON_VERSION:STRING=3 \
	-DVTK_WRAP_TCL=ON \
	-DVTK_USE_SYSTEM_AUTOBAHN=ON \
	-DVTK_USE_SYSTEM_CONSTANTLY=ON \
	-DVTK_USE_SYSTEM_EXPAT=ON \
	-DVTK_USE_SYSTEM_FREETYPE=ON \
	-DVTK_USE_SYSTEM_GL2PS=ON \
	-DVTK_USE_SYSTEM_GLEW=ON \
	-DVTK_USE_SYSTEM_HDF5=ON \
        -DHDF5_PREFER_PARALLEL=ON \
	-DVTK_USE_SYSTEM_INCREMENTAL=ON \
	-DVTK_USE_SYSTEM_JPEG=ON \
	-DVTK_USE_SYSTEM_JSONCPP=ON \
	-DVTK_USE_SYSTEM_LIBPROJ4=ON \
	-DVTK_USE_SYSTEM_LIBXML2=ON \
	-DVTK_USE_SYSTEM_MPI4PY=ON \
	-DVTK_USE_SYSTEM_NETCDF=ON \
	-DVTK_USE_SYSTEM_OGGTHEORA=ON \
	-DVTK_USE_SYSTEM_PNG=ON \
	-DVTK_USE_SYSTEM_SIX=ON \
	-DVTK_USE_SYSTEM_TIFF=ON \
	-DVTK_USE_SYSTEM_TWISTED=ON \
	-DVTK_USE_SYSTEM_ZLIB=ON \
	-DVTK_USE_SYSTEM_ZOPE=ON \
	-DVTK_EXTRA_COMPILER_WARNINGS=ON \
	-DVTK_Group_Imaging=ON \
	-DVTK_Group_MPI=ON \
	-DVTK_Group_Tk=ON \
	-DVTK_Group_Views=ON \
	-DVTK_INSTALL_LIBRARY_DIR="/usr/lib/$(DEB_HOST_MULTIARCH)" \
	-DVTK_INSTALL_PYTHON_MODULE_DIR="/usr/lib/python3/dist-packages" \
	-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


override_dh_auto_configure:
ifeq (,$(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-7.1/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)/vtk7.jar
	mv $(CURDIR)/debian/build/bin/vtkpython $(CURDIR)/debian/build/bin/vtk7python
	sed -i -e "s/FATAL_ERROR/STATUS/g" $(CURDIR)/debian/tmp/usr/lib/cmake/vtk-7.1/VTKTargets.cmake
	chrpath -d $(CURDIR)/debian/build/bin/vtk7python
	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/vtk7
	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-7.1/pkgIndex.tcl

override_dh_install-arch:
	dh_install -a
	find $(CURDIR)/debian/libvtk7-dev/ -name "*Qt*" -exec rm {} \;
	find $(CURDIR)/debian/libvtk7.1/ -name "*Qt*" -exec rm {} \;
	find $(CURDIR)/debian/libvtk7-dev/usr/include/ -name "Q*" -exec rm {} \;
	find $(CURDIR)/debian/libvtk7-dev/ -name "libvtkRenderingPythonTkWidgets.so" -exec rm {} \;
	chmod 755 $(CURDIR)/debian/libvtk7-dev/usr/share/vtk-7.1/doxygen/*.pl
	rm -rf $(CURDIR)/debian/libvtk7-doc/usr/share/doc/vtk7-doc/html/_formulas.log