python-dbus: rebuild for Python 3.5

Switch to python3-* pkgs.
Convert python3.4-* pkg into dummy pkg.
This commit is contained in:
Alessio Sergi 2016-10-16 18:58:14 +02:00
parent 69d57d9022
commit 16c3cb8021
2 changed files with 39 additions and 51 deletions

View file

@ -1,11 +1,11 @@
# Template file for 'python-dbus'
pkgname=python-dbus
version=1.2.0
revision=7
revision=8
lib32disabled=yes
wrksrc="dbus-python-${version}"
build_style=gnu-configure
hostmakedepends="pkg-config python-devel python3.4-devel"
hostmakedepends="pkg-config python-devel python3-devel"
makedepends="libglib-devel dbus-glib-devel ${hostmakedepends/pkg-config/}"
depends="python dbus"
pycompile_module="dbus"
@ -16,69 +16,51 @@ homepage="http://www.freedesktop.org/wiki/Software/DBusBindings"
distfiles="http://dbus.freedesktop.org/releases/dbus-python/dbus-python-${version}.tar.gz"
checksum=e12c6c8b2bf3a9302f75166952cbe41d6b38c3441bbc6767dbd498942316c6df
_do_pre_configure() {
if [ "$CROSS_BUILD" ]; then
local pyver=${1:-2.7} pysufx=
if [ "$pyver" != "2.7" ]; then
pysufx="m"
pre_configure() {
mkdir -p dbus-${py2_ver}
mv * dbus-${py2_ver} || true
cp -a dbus-${py2_ver} dbus-${py3_ver}
}
do_configure() {
for pyver in $py2_ver $py3_ver; do
if [ "$pyver" != "$py2_ver" ]; then
pyinc="$py3_inc"
else
pyinc="$py2_inc"
fi
sed -i "s,PYTHON_INCLUDES=.*,PYTHON_INCLUDES=-I${XBPS_CROSS_BASE}/usr/include/python${pyver}${pysufx},g" configure
fi
cd ${wrksrc}/dbus-${pyver}
sed -i "s,PYTHON_INCLUDES=.*,PYTHON_INCLUDES=-I${XBPS_CROSS_BASE}/${pyinc},g" configure
env PYTHON=python${pyver} ./configure ${configure_args}
done
}
pre_configure() {
mkdir -p python2
mv * python2 || true
cp -a python2 python3.4
}
do_configure() {
# python2
cd ${wrksrc}/python2
_do_pre_configure
env PYTHON=python ./configure ${configure_args}
# python3.4
cd ${wrksrc}/python3.4
_do_pre_configure 3.4
env PYTHON=python3.4 ./configure ${configure_args}
}
do_build() {
# python2
cd ${wrksrc}/python2
make ${makejobs}
# python3.4
cd ${wrksrc}/python3.4
make ${makejobs}
for pyver in $py2_ver $py3_ver; do
cd ${wrksrc}/dbus-${pyver}
make ${makejobs}
done
}
do_install() {
# python2
cd ${wrksrc}/python2
make DESTDIR=${DESTDIR} install
# python3.4
cd ${wrksrc}/python3.4
make DESTDIR=${DESTDIR} install
for pyver in $py2_ver $py3_ver; do
cd ${wrksrc}/dbus-${pyver}
make DESTDIR=${DESTDIR} install
done
}
python3.4-dbus_package() {
python3-dbus_package() {
lib32disabled=yes
depends="python3.4 dbus"
short_desc="${short_desc/Python2/Python3.4}"
replaces="python3.4-dbus>=0"
pycompile_module="dbus"
depends="python3 dbus"
short_desc="${short_desc/Python2/Python3}"
pkg_install() {
vmove usr/lib/python3.4
vmove ${py3_sitelib}
}
}
python-dbus-devel_package() {
lib32disabled=yes
depends="python-devel python3.4-devel
python-dbus>=${version}_${revision} python3.4-dbus>=${version}_${revision}"
depends="python-devel python3-devel
python-dbus>=${version}_${revision} python3-dbus>=${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
@ -86,3 +68,8 @@ python-dbus-devel_package() {
vmove usr/share/doc
}
}
python3.4-dbus_package() {
build_style=meta
short_desc="${short_desc/Python2/Python3.4} (transitional dummy package)"
depends="python3-dbus>=${version}_${revision}"
}

1
srcpkgs/python3-dbus Symbolic link
View file

@ -0,0 +1 @@
python-dbus