File: rules

package info (click to toggle)
gnudatalanguage 1.1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 80,368 kB
  • sloc: cpp: 189,797; ansic: 46,721; sh: 677; python: 474; makefile: 146; xml: 69; f90: 28
file content (49 lines) | stat: -rwxr-xr-x 1,387 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
#!/usr/bin/make -f

include /usr/share/dpkg/pkg-info.mk

export DEB_BUILD_MAINT_OPTIONS=hardening=+all

CXXFLAGS += -DBUILD_DATE="\"$(shell LC_ALL=C date -u --date=@"$(SOURCE_DATE_EPOCH)" +'%b %e %Y')\"" -std=gnu++11

# Lift the usual restrictions on the size of the global offset table.
# Taken from the gcc manpage
# earlier taken from https://bugs.debian.org/895214 (less debug info
# to avoid running out of address space)
ifneq (,$(filter $(DEB_HOST_ARCH), mips mipsel))
  export CXXFLAGS += -mxgot
endif

# Workaround for
# https://github.com/gnudatalanguage/gdl/issues/677
LDFLAGS += -Wl,--allow-multiple-definition

%:
	dh $@ -Scmake

override_dh_auto_configure:
	dh_auto_configure -- \
	  -DDEB_BUILD_MULTIARCH=`dpkg-architecture -qDEB_BUILD_MULTIARCH` \
	  -DFFTW=YES \
	  -DLIBPROJ4=YES \
	  -DGLPK=YES \
	  -DPYTHON=YES \
	  -DPYTHONVERSION=3 \
	  -DPYTHON_MODULE=YES \
	  -DWXWIDGETS=YES \
	  -DGRIB=YES \
	  -DQHULL=NO \
	  -DUDUNITS=YES \
	  -DPSLIB=YES \
	  -DGDL_LIB_DIR=/usr/lib/`dpkg-architecture -qDEB_BUILD_MULTIARCH`/gnudatalanguage

override_dh_auto_test:
ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
	( cd obj*/testsuite \
	&& $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o libtest_ce.so ../../testsuite/libtest_ce.cpp -shared -fPIC )
	LD_LIBRARY_PATH="../src" xvfb-run dh_auto_test --no-parallel -Scmake || true
endif


override_dh_compress:
	dh_compress -X.pro