File: rules

package info (click to toggle)
insighttoolkit4 4.12.2-dfsg1-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 424,944 kB
  • sloc: cpp: 556,475; ansic: 145,857; fortran: 34,788; python: 17,383; sh: 2,120; lisp: 2,070; tcl: 993; java: 362; perl: 200; makefile: 121; csh: 81; pascal: 69; xml: 19; ruby: 10
file content (163 lines) | stat: -rwxr-xr-x 5,341 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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
#!/usr/bin/make -f

VER_MAJOR = 4
VER_MINOR = 12
VER_REVISION = 2
VERSION = $(VER_MAJOR).$(VER_MINOR).$(VER_REVISION)
SOVERSION = $(VER_MAJOR).$(VER_MINOR)

export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed

#ITK is not properly using system provided headers
export DEB_CPPFLAGS_MAINT_APPEND = -I/usr/include/nifti 

ENABLE_PYTHON=1

ifeq ($(DEB_BUILD_ARCH),i386)
  ENABLE_FFTW=OFF
#(unsigned long) == (unsigned int) on 32 bit, since itk 4.10 or g++-5.4   
  ENABLE_UNSIGNED_LONG=OFF 
  # Tests are permanently failing, try force rounding to normal double 
  # accuracy
  export DEB_CXXFLAGS_MAINT_APPEND=-ffloat-store
else
  ENABLE_FFTW=ON
  ENABLE_UNSIGNED_LONG=ON 
endif 

CMAKE_FLAGS = \
	-DBUILD_EXAMPLES:BOOL=ON \
	-DBUILD_SHARED_LIBS:BOOL=ON \
	-DBUILD_TESTING:BOOL=ON \
	-DExternalData_OBJECT_STORES:PATH=$(CURDIR)/data/.ExternalData/ \
	-DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=ON \
	-DCMAKE_SKIP_RPATH:BOOL=ON \
	-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
	-DUSE_FFTWF=$(ENABLE_FFTW) \
	-DITK_FORBID_DOWNLOADS:BOOL=ON \
	-DITK_USE_FFTWD:BOOL=$(ENABLE_FFTW) \
	-DITK_USE_FFTWF:BOOL=$(ENABLE_FFTW) \
	-DITK_USE_STRICT_CONCEPT_CHECKING:BOOL=ON \
	-DITK_USE_SYSTEM_DCMTK:BOOL=ON \
	-DITK_USE_SYSTEM_DOUBLECONVERSION:BOOL=ON \
	-DITK_USE_SYSTEM_EXPAT:BOOL=ON \
	-DITK_USE_SYSTEM_FFTW:BOOL=$(ENABLE_FFTW) \
	-DITK_USE_SYSTEM_GDCM:BOOL=ON \
	-DITK_USE_SYSTEM_HDF5:BOOL=ON \
	-DITK_USE_SYSTEM_JPEG:BOOL=ON \
	-DITK_USE_SYSTEM_PNG:BOOL=ON \
	-DITK_USE_SYSTEM_TIFF:BOOL=ON \
	-DITK_USE_SYSTEM_VXL:BOOL=OFF \
	-DITK_USE_SYSTEM_ZLIB:BOOL=ON \
	-DITK_USE_KWSTYLE:BOOL=OFF \
	-DModule_ITKDCMTK:BOOL=ON \
	-DModule_ITKDeprecated:BOOL=ON \
	-DModule_ITKIOPhilipsREC:BOOL=OFF \
	-DModule_ITKLevelSetsv4Visualization:BOOL=OFF \
        -DModule_BridgeNumPy:BOOL=OFF \
	-DModule_ITKReview:BOOL=ON \
	-DModule_ITKVideoBridgeOpenCV:BOOL=OFF \
	-DModule_ITKVideoBridgeVXL:BOOL=OFF \
	-DModule_ITKVtkGlue:BOOL=OFF \
	-DITKV3_COMPATIBILITY:BOOL=ON \
	-DVCL_INCLUDE_CXX_0X:BOOL=ON \
	-DITK_USE_SYSTEM_SWIG:BOOL=ON \
	-DITK_USE_SYSTEM_CASTXML:BOOL=ON \
	-DITK_WRAP_IMAGE_DIMS="2;3;4" \
	-DITK_WRAP_unsigned_long:BOOL=$(ENABLE_UNSIGNED_LONG) \
	-DITK_WRAP_double:BOOL=ON \
        -DITK_WRAP_vector_double:BOOL=ON \
        -DITK_WRAP_covariant_vector_double:BOOL=ON \
        -DITK_WRAP_complex_double:BOOL=ON \
        -DITK_WRAPPING:BOOL=$(ENABLE_PYTHON) \
        -DITK_WRAP_PYTHON:BOOL=$(ENABLE_PYTHON) \
	-DPython_ADDITIONAL_VERSIONS=2.7 


pkg_lib = libinsighttoolkit$(SOVERSION)
pkg_dev = libinsighttoolkit$(VER_MAJOR)-dev
pkg_examples = insighttoolkit$(VER_MAJOR)-examples
pkg_python = insighttoolkit$(VER_MAJOR)-python


%:
	dh $@ --builddir=BUILD --parallel --with python2

override_dh_auto_configure-indep:

override_dh_auto_configure-arch: pre-build
	dh_auto_configure -- $(CMAKE_FLAGS)

override_dh_auto_build-indep:

pre-build:
	echo "Available disk space (~50GB of space is needed for the build):"
	df -h .

override_dh_auto_test-indep:

override_dh_auto_test:
	LD_LIBRARY_PATH=`pwd`/BUILD/lib:`pwd`/BUILD/Testing/Temporary dh_auto_test 

override_dh_lintian:
	echo "$(pkg_lib): package-name-doesnt-match-sonames" > debian/$(pkg_lib).lintian-overrides
	dh_lintian

override_dh_makeshlibs:
	# For new symbols when compiled with GCC 7
	dh_makeshlibs -V'libinsighttoolkit4.12 (>= 4.12.0-dfsg1-2~)'

override_dh_install-indep:

override_dh_install-arch:
	rm -rf BUILD
	# pkg_lib
	dh_install -p$(pkg_lib) -XJava -XPython -XTcl debian/tmp/usr/lib/lib*.so.* usr/lib
	cp CMake/InsightValgrind.supp Insight$(SOVERSION)Valgrind.supp
#	cp Modules/ThirdParty/VNL/src/vxl/config/valgrind.supp Insight$(SOVERSION)VxlValgrind.supp
	dh_install -p$(pkg_lib) Insight$(SOVERSION)*.supp usr/lib/valgrind
	#
	# pkg_dev
	dh_installman -p$(pkg_dev) debian/insighttoolkit.3
	dh_install -p$(pkg_dev) -XJava -XPython -XTcl debian/tmp/usr/lib/lib*.so usr/lib

	dh_install -p$(pkg_dev) --autodest debian/tmp/usr/include/ITK-$(SOVERSION)/*
	dh_install -p$(pkg_dev) --autodest debian/tmp/usr/bin/itkTestDriver

ifeq ($(ENABLE_PYTHON),1)
	# remove wrapping related cmake files, and tools. They should not be needed. 
	rm -r debian/tmp/usr/lib/cmake/ITK-$(SOVERSION)/WrapITK
endif 
	dh_install -p$(pkg_dev) --autodest debian/tmp/usr/lib/cmake
#	dh_install -p$(pkg_dev) Wrapping/WrapITK /usr/src
        #
        # pkg_python 
ifeq ($(ENABLE_PYTHON),1)
	dh_install -p$(pkg_python) debian/tmp/usr/lib/python2.7/* usr/lib/python2.7/
endif 
	# remove build directory to save space
	rm -rf debian/tmp

override_dh_installexamples:
	# pkg_examples
	dh_installexamples -p$(pkg_examples) Examples/*
ifneq (,$(filter $(pkg_examples), $(shell dh_listpackages)))
	find debian/$(pkg_examples)/usr/share/doc/$(pkg_examples)/examples \
	    -type f -print0 | xargs -0 chmod 644
endif

control-file:
	sed -e "s/@VER_MAJOR@/$(VER_MAJOR)/g" \
	    -e "s/@SOVERSION@/$(SOVERSION)/g" \
	    < debian/control.in > debian/control.tmp
	[ -e debian/control ] \
	  && cmp -s debian/control debian/control.tmp \
	  && rm -f debian/control.tmp && exit 0; \
	  mv debian/control.tmp debian/control

TARBALLDIR = "../tarballs"
get-orig-source:
	uscan --watchfile debian/data/watch --force-download --no-symlink --destdir $(TARBALLDIR)
	uscan --force-download --rename --destdir $(TARBALLDIR)
	cd $(TARBALLDIR) && mv `ls InsightData-$(VERSION).tar.xz` insighttoolkit$(VER_MAJOR)_$(VERSION)-dfsg1.orig-data.tar.xz