From 6ae0727ee3c8c15060dbacad1c7a11cbdb2210cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Mon, 14 Dec 2020 02:15:12 +0100 Subject: [PATCH] [net-im/swift] sync with in-tree version --- .../swift-4.0.2-qt-5.15-compatibility.patch | 10 +++++++ net-im/swift/swift-9999.ebuild | 26 ++++++++++++++----- 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 net-im/swift/files/swift-4.0.2-qt-5.15-compatibility.patch diff --git a/net-im/swift/files/swift-4.0.2-qt-5.15-compatibility.patch b/net-im/swift/files/swift-4.0.2-qt-5.15-compatibility.patch new file mode 100644 index 0000000..37918db --- /dev/null +++ b/net-im/swift/files/swift-4.0.2-qt-5.15-compatibility.patch @@ -0,0 +1,10 @@ +--- a/Swift/QtUI/Roster/GroupItemDelegate.cpp ++++ b/Swift/QtUI/Roster/GroupItemDelegate.cpp +@@ -7,6 +7,7 @@ + #include + + #include ++#include + #include + #include + diff --git a/net-im/swift/swift-9999.ebuild b/net-im/swift/swift-9999.ebuild index 22d35e2..7287f51 100644 --- a/net-im/swift/swift-9999.ebuild +++ b/net-im/swift/swift-9999.ebuild @@ -3,9 +3,10 @@ EAPI=7 -PYTHON_COMPAT=( python3_{6..8} ) +LUA_COMPAT=( lua5-{1..2} luajit ) +PYTHON_COMPAT=( python3_{6..9} ) -inherit gnome2-utils python-any-r1 scons-utils toolchain-funcs +inherit lua-single python-any-r1 scons-utils toolchain-funcs xdg-utils DESCRIPTION="An elegant, secure, adaptable and intuitive XMPP Client" HOMEPAGE="https://www.swift.im/" @@ -28,6 +29,7 @@ IUSE="+client expat gconf +icu +idn lua spell test zeroconf" REQUIRED_USE=" || ( icu idn ) gconf? ( client ) + lua? ( ${LUA_REQUIRED_USE} ) spell? ( client ) " @@ -55,7 +57,7 @@ RDEPEND=" gconf? ( gnome-base/gconf:2 ) icu? ( dev-libs/icu:= ) idn? ( net-dns/libidn:= ) - lua? ( dev-lang/lua:= ) + lua? ( ${LUA_DEPS} ) spell? ( app-text/hunspell:= ) " @@ -76,9 +78,15 @@ DOCS=( ) PATCHES=( - "${FILESDIR}"/swift-4.0.2-python3-compatibility.patch + "${FILESDIR}"/${PN}-4.0.2-python3-compatibility.patch + "${FILESDIR}"/${PN}-4.0.2-qt-5.15-compatibility.patch ) +pkg_setup() { + python-any-r1_pkg_setup + use lua && lua-single_pkg_setup +} + src_unpack() { if [[ ${PV} = "9999" ]] ; then git-r3_src_unpack @@ -92,6 +100,9 @@ src_prepare() { # Don't include '/usr/lib*' in the link command line for `swiften-config` sed -e '/_LIBDIRFLAGS/d' -i Swiften/Config/SConscript || die + # Use correct LIBDIR for Lua + sed -e "s/lib/$(get_libdir)/g" -i Sluift/SConscript.variant || die + # Hack for finding Qt system libs mkdir "${T}"/qt || die ln -s "${EPREFIX}"/usr/$(get_libdir)/qt5/bin "${T}"/qt/bin || die @@ -159,6 +170,9 @@ src_configure() { libnatpmp_force_bundled="false" link="$(tc-getCXX)" linkflags="${LDFLAGS}" + lua_includedir="$(lua_get_include_dir)" + lua_libdir="${EPREFIX}/usr/$(get_libdir)" + lua_libname="$(basename -s '.so' $(lua_get_shared_lib))" max_jobs="no" optimize="no" qt="${T}/qt" @@ -220,9 +234,9 @@ src_install() { } pkg_postinst() { - use client && gnome2_icon_cache_update + use client && xdg_icon_cache_update } pkg_postrm() { - use client && gnome2_icon_cache_update + use client && xdg_icon_cache_update }