[net-im/swift] python3 fix

This commit is contained in:
2020-08-14 20:28:41 +02:00
parent 51c66eb3b1
commit 7cf160fa23
2 changed files with 1017 additions and 10 deletions

View File

@@ -1,11 +1,11 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=6
EAPI=7
PYTHON_COMPAT=( python2_7 )
PYTHON_COMPAT=( python3_{6..8} )
inherit python-any-r1 gnome2-utils scons-utils toolchain-funcs
inherit gnome2-utils python-any-r1 scons-utils toolchain-funcs
DESCRIPTION="An elegant, secure, adaptable and intuitive XMPP Client"
HOMEPAGE="https://www.swift.im/"
@@ -19,11 +19,12 @@ else
RESTRICT="mirror"
SRC_URI="https://swift.im/downloads/releases/${P}/${P}.tar.gz"
KEYWORDS="~amd64 ~x86"
fi
LICENSE="BSD BSD-1 CC-BY-3.0 GPL-3 OFL-1.1"
SLOT="4/0"
IUSE="client expat gconf +icu +idn lua spell test zeroconf"
IUSE="+client expat gconf +icu +idn lua spell test zeroconf"
REQUIRED_USE="
|| ( icu idn )
gconf? ( client )
@@ -36,7 +37,7 @@ RDEPEND="
dev-libs/openssl:0=
net-libs/libnatpmp
net-libs/miniupnpc:=
sys-libs/zlib:=
sys-libs/zlib
client? (
dev-qt/qtcore:5
dev-qt/qtdbus:5
@@ -74,9 +75,23 @@ DOCS=(
"Swiften/ChangeLog.md"
)
PATCHES=(
"${FILESDIR}"/swift-4.0.2-python3-compatibility.patch
)
src_unpack() {
if [[ ${PV} = "9999" ]] ; then
git-r3_src_unpack
fi
default
}
src_prepare() {
default
# Don't include '/usr/lib*' in the link command line for `swiften-config`
sed -e '/_LIBDIRFLAGS/d' -i Swiften/Config/SConscript || die
# Hack for finding Qt system libs
mkdir "${T}"/qt || die
ln -s "${EPREFIX}"/usr/$(get_libdir)/qt5/bin "${T}"/qt/bin || die
@@ -187,11 +202,11 @@ src_test() {
src_install() {
local myesconsinstall=(
SWIFTEN_INSTALLDIR="${ED%/}/usr"
SWIFTEN_LIBDIR="${ED%/}/usr/$(get_libdir)"
$(usex client "SWIFT_INSTALLDIR=${ED%/}/usr" '')
$(usex lua "SLUIFT_DIR=${ED%/}/usr" '')
$(usex lua "SLUIFT_INSTALLDIR=${ED%/}/usr" '')
SWIFTEN_INSTALLDIR="${ED}/usr"
SWIFTEN_LIBDIR="${ED}/usr/$(get_libdir)"
$(usex client "SWIFT_INSTALLDIR=${ED}/usr" '')
$(usex lua "SLUIFT_DIR=${ED}/usr" '')
$(usex lua "SLUIFT_INSTALLDIR=${ED}/usr" '')
"${ED}"
)