File: rules

package info (click to toggle)
gimp 3.2.0~RC2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 220,336 kB
  • sloc: ansic: 866,755; lisp: 10,855; python: 10,511; cpp: 7,330; perl: 4,469; sh: 1,439; xml: 965; yacc: 609; lex: 348; javascript: 150; makefile: 42
file content (60 lines) | stat: -rwxr-xr-x 1,975 bytes parent folder | download | duplicates (2)
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
#!/usr/bin/make -f

# Temporarily disable LTO https://gitlab.gnome.org/GNOME/gimp/-/issues/9633
export DEB_BUILD_MAINT_OPTIONS = hardening=+all optimize=-lto
export DEB_LDFLAGS_MAINT_APPEND = -Wl,-O1
export DPKG_GENSYMBOLS_CHECK_LEVEL = 4

ifeq (yes,$(shell dpkg-vendor --derives-from Ubuntu && echo yes))
	BUGTRACKER = https://bugs.launchpad.net/ubuntu/+source/gimp/+filebug?no-redirect
else
	BUGTRACKER = https://www.debian.org/Bugs/Reporting
endif

# Check Filters > Development > Plug-in Examples
# If this is enabled, a JavaScript version is installed but there is no menu button for it
# Therefore, we disable it
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armhf i386 mips64el ppc64el riscv64 s390x loong64 ppc64 sparc64))
	JS = disabled
else
	JS = disabled
endif

# Upstream has marked the Lua plugins as experimental and disabled by default
# One of the plugins is an example like JavaScript but there is no menu button for it either
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armel armhf i386 mips64el riscv64 s390x loong64 powerpc))
	LUA = false
else
	LUA = false
endif

ifneq ($(DEB_HOST_ARCH_OS), linux)
	NON_LINUX = -Dalsa=disabled -Dgudev=disabled
endif

%:
	dh $@

override_dh_auto_configure:
	dh_auto_configure -- \
		-Dlibexecdir=/usr/lib/$(DEB_HOST_MULTIARCH)/gimp \
		-Dauto_features=enabled \
		-Dappdata-test=disabled \
		-Dbug-report-url=$(BUGTRACKER) \
		-Dcheck-update=no \
		-Dgi-docgen=$(if $(filter %-doc,$(shell dh_listpackages)),enabled,disabled) \
		-Dheadless-tests=$(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),disabled,enabled) \
		-Dilbm=disabled \
		-Djavascript=$(JS) \
		-Dlua=$(LUA) \
		$(NON_LINUX)

override_dh_auto_build:
	localehelper LANG=en_US.UTF-8 dh_auto_build

override_dh_makeshlibs:
	dh_makeshlibs -X/usr/lib/$(DEB_HOST_MULTIARCH)/gimp/3.0/modules

# Give tests more time on slow architectures like riscv64
override_dh_auto_test:
	NO_AT_BRIDGE=1 xvfb-run -s -noreset -a dh_auto_test --  --verbose --timeout-multiplier 5