Commit bfd9ab56 authored by IOhannes zmölnig's avatar IOhannes zmölnig

Prepare d/rules for cross-compilation

Thanks: Helmut Grohne <helmut@subdivi.de>
Closes: #893650
parent 29f4ab44
......@@ -9,8 +9,8 @@ export DEB_BUILD_MAINT_OPTIONS=hardening=+all
## use hardening flags
DPKG_EXPORT_BUILDFLAGS = 1
include /usr/share/dpkg/buildflags.mk
include /usr/share/dpkg/architecture.mk
BUILD_ARCH_CPU := $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
DATE_FMT = %Y/%m/%d at %H:%M:%S UTC
ifdef SOURCE_DATE_EPOCH
BUILD_DATE ?= $(shell date -u -d "@$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u -r "$(SOURCE_DATE_EPOCH)" "+$(DATE_FMT)" 2>/dev/null || date -u "+$(DATE_FMT)")
......@@ -20,7 +20,6 @@ endif
archconfflags := \
--prefix=/usr \
--with-pd=/usr/include/pd \
--with-extension=pd_linux \
--enable-mmx \
......@@ -54,10 +53,10 @@ DEB_COPYRIGHT_CHECK_IGNORE_REGEX = \
dh $@
override_dh_auto_configure:
ifeq ($(BUILD_ARCH_CPU), ppc64el)
CXXFLAGS="$(CXXFLAGS) -m64 -mcpu=powerpc" CFLAGS="$(CFLAGS) -m64 -mcpu=powerpc" ./configure $(archconfflags)
ifeq ($(DEB_HOST_ARCH_CPU), ppc64el)
CXXFLAGS="$(CXXFLAGS) -m64 -mcpu=powerpc" CFLAGS="$(CFLAGS) -m64 -mcpu=powerpc" dh_auto_configure -- $(archconfflags)
else
CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS)" ./configure $(archconfflags)
CXXFLAGS="$(CXXFLAGS)" CFLAGS="$(CFLAGS)" dh_auto_configure -- $(archconfflags)
endif
override_dh_auto_test:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment