From 7d9bffa226644b5e33341ada53d74668ecae7e2d Mon Sep 17 00:00:00 2001 From: Alessio Sergi Date: Sat, 15 Nov 2014 20:00:53 +0100 Subject: [PATCH] python-dbus: fix cross build --- srcpkgs/python-dbus/template | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/srcpkgs/python-dbus/template b/srcpkgs/python-dbus/template index 38b2b7bc44..db07f17d6d 100644 --- a/srcpkgs/python-dbus/template +++ b/srcpkgs/python-dbus/template @@ -17,19 +17,29 @@ update_pkgname="dbus-python" distfiles="http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${version}.tar.gz" checksum=e12c6c8b2bf3a9302f75166952cbe41d6b38c3441bbc6767dbd498942316c6df -do_configure() { +_do_pre_configure() { if [ "$CROSS_BUILD" ]; then - ln -s ${wrksrc}/.xbps/bin/python-config ${wrksrc} - fi + local pyver=${1:-2.7} pysufx= + if [ "$pyver" != "2.7" ]; then + pysufx="m" + fi + + sed -i "s,PYTHON_INCLUDES=.*,PYTHON_INCLUDES=-I${XBPS_CROSS_BASE}/usr/include/python${pyver}${pysufx},g" ../configure + fi +} + +do_configure() { # python2 mkdir ${wrksrc}/build-python2 cd ${wrksrc}/build-python2 + _do_pre_configure env PYTHON=python ../configure ${configure_args} # python3.4 mkdir ${wrksrc}/build-python3.4 cd ${wrksrc}/build-python3.4 + _do_pre_configure 3.4 env PYTHON=python3.4 ../configure ${configure_args} }