| 1 |
#!/usr/bin/make -f |
| 2 |
|
| 3 |
include /usr/share/dpkg/architecture.mk |
| 4 |
|
| 5 |
ifeq (${DEB_HOST_ARCH_CPU},i386) |
| 6 |
export DEB_CFLAGS_MAINT_APPEND=-fexcess-precision=fast -ffloat-store |
| 7 |
export DEB_CXXFLAGS_MAINT_APPEND=-fexcess-precision=fast -ffloat-store |
| 8 |
endif |
| 9 |
|
| 10 |
ifeq (${DEB_HOST_ARCH_CPU},ppc64el) |
| 11 |
export DEB_CFLAGS_MAINT_STRIP=-O3 |
| 12 |
export DEB_CXXFLAGS_MAINT_STRIP=-O3 |
| 13 |
export DEB_CFLAGS_MAINT_APPEND=-O2 |
| 14 |
export DEB_CXXFLAGS_MAINT_APPEND=-O2 |
| 15 |
endif |
| 16 |
|
| 17 |
%: |
| 18 |
dh $@ --buildsystem cmake+ninja |
| 19 |
|
| 20 |
override_dh_auto_configure: |
| 21 |
dh_auto_configure -- \ |
| 22 |
-D2GEOM_BUILD_SHARED=ON \ |
| 23 |
-DCMAKE_SKIP_RPATH:BOOL=ON \ |
| 24 |
|
| 25 |
execute_before_dh_auto_build: |
| 26 |
# If ragel is present then this file will be rebuilt at build time. |
| 27 |
# Restore the original file on clean if that's the case. |
| 28 |
# https://bugs.debian.org/1048245 |
| 29 |
set -e; [ ! -e $(shell command -v ragel) ] || \ |
| 30 |
perl -MDebian::Debhelper::Dh_Lib=restore_file_on_clean \ |
| 31 |
-e 'restore_file_on_clean("src/2geom/svg-path-parser.cpp")' |
| 32 |
|
| 33 |
# needed to pass the tests, as without rpath somhow the tests can't find the library anymore |
| 34 |
override_dh_auto_test: |
| 35 |
LD_LIBRARY_PATH=$(CURDIR)/obj-$(DEB_HOST_GNU_TYPE)/src/2geom dh_auto_test |