diff --git a/srcpkgs/python-dbus/template b/srcpkgs/python-dbus/template index 38b2b7bc446..db07f17d6dc 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} }