File: rules

package info (click to toggle)
qt6-webengine 6.9.2%2Bdfsg-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,111,640 kB
  • sloc: cpp: 21,437,331; ansic: 8,087,115; javascript: 2,747,888; python: 856,615; asm: 848,149; xml: 616,344; java: 222,847; sh: 105,209; objc: 99,183; perl: 70,870; cs: 51,103; sql: 40,087; makefile: 26,384; pascal: 25,140; fortran: 24,137; tcl: 9,609; yacc: 8,132; php: 7,051; lisp: 3,462; lex: 1,327; ruby: 914; awk: 339; csh: 120; sed: 36
file content (104 lines) | stat: -rwxr-xr-x 3,582 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
#!/usr/bin/make -f

include /usr/share/dpkg/architecture.mk

export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=+lto

PARALLEL_OPTION = $(filter parallel=%,$(DEB_BUILD_OPTIONS))
ifneq (,$(PARALLEL_OPTION))
	NUMJOBS = $(patsubst parallel=%,%,$(PARALLEL_OPTION))
	export NINJAJOBS = -j$(NUMJOBS)
endif

# Reduce memory consumption & parallelism on certain architectures
ifeq (armhf, $(DEB_HOST_ARCH))
	export LDFLAGS+=-Wl,--no-keep-memory
	export NINJAJOBS = -j2
endif

ifeq (i386, $(DEB_HOST_ARCH))
	export LDFLAGS+=-Wl,--no-keep-memory
	export NINJAJOBS = -j2
endif

ifeq (i386, $(DEB_HOST_ARCH_CPU))
	export DEB_CFLAGS_MAINT_APPEND = -msse -msse2
	export DEB_CXXFLAGS_MAINT_APPEND = -msse -msse2
endif

# Force build with GCC-14 on arm64
ifeq (arm64, $(DEB_HOST_ARCH))
	export CC=gcc-14
	export CXX=g++-14
endif

# enable ccache with corresponding build-profile
ifneq ($(filter ccache,$(DEB_BUILD_PROFILES)),)
	extra_cmake_args += -DQT_USE_CCACHE=ON
endif

%:
	dh $@ --buildsystem=cmake+ninja

touch_files = src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/lighthouse/lighthouse-dt-bundle.js \
	      src/3rdparty/chromium/third_party/devtools-frontend/src/front_end/third_party/lighthouse/report-assets/report-generator.js

override_dh_auto_clean:
	dh_auto_clean

	# Remove the system version of rollup, which is copied in during build to replace the bundled version that is remove by the copyright file.
	rm -rf src/3rdparty/chromium/third_party/node/node_modules/rollup/

	rm -f $(CURDIR)/src/3rdparty/chromium/third_party/jstemplate/jstemplate_compiled.js
	for fname in $(touch_files); do \
		rm -f $(CURDIR)/$${fname}; \
	done

# Turn on system FFmpeg libraries for 6.3
override_dh_auto_configure:
	# Create js files, that are needed for building step for arch and indep builds
	cd $(CURDIR)/src/3rdparty/chromium/third_party/jstemplate/; \
		cat util.js jsevalcontext.js jstemplate.js exports.js > jstemplate_compiled.js

	# Use the system rollup.
	cp -a /usr/share/nodejs/rollup src/3rdparty/chromium/third_party/node/node_modules/rollup/

	# jQuery
	cp /usr/share/javascript/jquery/jquery.min.js examples/webenginewidgets/contentmanipulation/
	cp /usr/share/javascript/jquery/jquery.min.js src/3rdparty/chromium/third_party/pycoverage/coverage/htmlfiles/
	cp /usr/share/javascript/jquery-tablesorter/jquery.tablesorter.min.js src/3rdparty/chromium/third_party/pycoverage/coverage/htmlfiles/

	set -ex; for fname in $(touch_files); do \
		mkdir -p $(CURDIR)/$$(dirname $${fname}); \
		touch $(CURDIR)/$${fname}; \
	done

	dh_auto_configure -- \
		--log-level=STATUS \
		-DCMAKE_LIBRARY_PATH=$(DEB_HOST_MULTIARCH) \
		-DFEATURE_webengine_system_icu=ON \
		-DFEATURE_webengine_system_libevent=ON \
		-DFEATURE_webengine_system_libopenjpeg2=ON \
		-DFEATURE_webengine_system_libpng=ON \
		-DFEATURE_webengine_system_libtiff=ON \
		-DFEATURE_qtpdf_build=ON \
		-DFEATURE_qtpdf_widgets_build=ON \
		-DFEATURE_qtpdf_quick_build=ON \
		-DFEATURE_webengine_proprietary_codecs=ON \
		-DFEATURE_webengine_kerberos=ON \
		$(extra_cmake_args)

override_dh_auto_build:
	dh_auto_build
	dh_auto_build -- docs

execute_after_dh_auto_install:
	# Reproducible builds: remove build paths from .prl files
	sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)/libQt6*.prl
	# Install documentation.
	DESTDIR=$(CURDIR)/debian/tmp dh_auto_build -- install_docs
	# Remove build path from index files.
	find $(CURDIR)/debian/tmp/usr/share/qt6/doc -type f -name *.index -exec \
               sed -i 's@$(CURDIR)/@@g' {} \;

override_dh_dwz: