summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorMatthias Klose <doko@ubuntu.com>2014-07-09 05:37:58 +0800
committerAron Xu <aron@debian.org>2014-07-09 06:46:15 +0800
commita0adc7100eb2948fb35fa69315f4d66ef077dfa8 (patch)
tree8f4a6b5908c30a0bc858803016ec270bd026bfde /debian
parent31231ea4641af8a1c69fad7ef16386456d2be29b (diff)
downloadlibxml2-a0adc7100eb2948fb35fa69315f4d66ef077dfa8.tar.gz
Set PYTHON_LIBS for cross builds
Diffstat (limited to 'debian')
-rwxr-xr-xdebian/rules7
1 files changed, 5 insertions, 2 deletions
diff --git a/debian/rules b/debian/rules
index dcd4905..55b006d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -55,8 +55,11 @@ dobuild-%: doconfigure-%
dh_auto_build --builddirectory=$(BUILD_DIR) -- $(BUILD_FLAGS)
dobuild-python%: BUILD_DIR=builddir/main/$*
-dobuild-python%: BUILD_FLAGS = libxml2mod_la_LIBADD='$$(mylibs)'
-dobuild-python%-dbg: BUILD_FLAGS += PYTHON_INCLUDES=/usr/include/$(*:-dbg=_d) \
+dobuild-python%: BUILD_FLAGS = libxml2mod_la_LIBADD='$$(mylibs)' \
+ PYTHON_INCLUDES="$(shell $(DEB_HOST_GNU_TYPE)-python-config --includes)" \
+ PYTHON_LIBS="$(shell $(DEB_HOST_GNU_TYPE)-python-config --ldflags)"
+dobuild-python%-dbg: BUILD_FLAGS += PYTHON_INCLUDES="$(shell $(DEB_HOST_GNU_TYPE)-python-dbg-config --includes)" \
+ PYTHON_LIBS="$(shell $(DEB_HOST_GNU_TYPE)-python-dbg-config --ldflags)" \
CFLAGS="$(CFLAGS) -Wall -g -O0" CPPFLAGS="$(CPPFLAGS)" LDFLAGS="$(LDFLAGS) \
-L$(CURDIR)/debian/tmp/usr/lib/$(DEB_HOST_MULTIARCH)"
build-arch: $(TARGETS:%=dobuild-%)