[net-im/swift] sync

This commit is contained in:
Robert Förster 2020-12-21 05:05:50 +01:00
parent 2eaa0570b8
commit 430412f29b
1 changed files with 8 additions and 41 deletions

View File

@ -6,7 +6,7 @@ EAPI=7
LUA_COMPAT=( lua5-{1..2} luajit ) LUA_COMPAT=( lua5-{1..2} luajit )
PYTHON_COMPAT=( python3_{6..9} ) PYTHON_COMPAT=( python3_{6..9} )
inherit lua-single python-any-r1 scons-utils toolchain-funcs xdg-utils inherit lua-single python-any-r1 scons-utils toolchain-funcs
DESCRIPTION="An elegant, secure, adaptable and intuitive XMPP Client" DESCRIPTION="An elegant, secure, adaptable and intuitive XMPP Client"
HOMEPAGE="https://www.swift.im/" HOMEPAGE="https://www.swift.im/"
@ -25,12 +25,10 @@ fi
LICENSE="BSD BSD-1 CC-BY-3.0 GPL-3 OFL-1.1" LICENSE="BSD BSD-1 CC-BY-3.0 GPL-3 OFL-1.1"
SLOT="4/0" SLOT="4/0"
IUSE="+client expat gconf +icu +idn lua spell test zeroconf" IUSE="expat +icu +idn lua test zeroconf"
REQUIRED_USE=" REQUIRED_USE="
|| ( icu idn ) || ( icu idn )
gconf? ( client )
lua? ( ${LUA_REQUIRED_USE} ) lua? ( ${LUA_REQUIRED_USE} )
spell? ( client )
" "
RDEPEND=" RDEPEND="
@ -40,31 +38,16 @@ RDEPEND="
net-libs/libnatpmp net-libs/libnatpmp
net-libs/miniupnpc:= net-libs/miniupnpc:=
sys-libs/zlib sys-libs/zlib
client? (
dev-qt/qtcore:5
dev-qt/qtdbus:5
dev-qt/qtgui:5
dev-qt/qtmultimedia:5
dev-qt/qtnetwork:5
dev-qt/qtsvg:5
dev-qt/qtwidgets:5
dev-qt/qtwebkit:5
dev-qt/qtx11extras:5
net-dns/avahi
)
expat? ( dev-libs/expat ) expat? ( dev-libs/expat )
!expat? ( dev-libs/libxml2:2 ) !expat? ( dev-libs/libxml2:2 )
gconf? ( gnome-base/gconf:2 )
icu? ( dev-libs/icu:= ) icu? ( dev-libs/icu:= )
idn? ( net-dns/libidn:= ) idn? ( net-dns/libidn:= )
lua? ( ${LUA_DEPS} ) lua? ( ${LUA_DEPS} )
spell? ( app-text/hunspell:= )
" "
DEPEND=" DEPEND="
${RDEPEND} ${RDEPEND}
>=dev-util/scons-3.0.1-r3 >=dev-util/scons-3.0.1-r3
client? ( dev-qt/linguist-tools:5 )
test? ( net-dns/avahi ) test? ( net-dns/avahi )
" "
@ -110,12 +93,9 @@ src_prepare() {
ln -s "${EPREFIX}"/usr/include/qt5 "${T}"/qt/include || die ln -s "${EPREFIX}"/usr/include/qt5 "${T}"/qt/include || die
# Remove parts of Swift, which a user don't want to compile # Remove parts of Swift, which a user don't want to compile
if ! use client; then rm -fr Swift Slimber || die; fi rm -fr Swift Slimber || die
if ! use lua; then rm -fr Sluift || die; fi if ! use lua; then rm -fr Sluift || die; fi
if ! use zeroconf; then if ! use zeroconf; then rm -fr Limber || die; fi
rm -fr Limber || die
if use client; then rm -fr Slimber || die; fi
fi
# Remove '3rdParty', as the system libs should be used # Remove '3rdParty', as the system libs should be used
# `CppUnit`, `GoogleTest` and `HippoMocks` are needed for tests # `CppUnit`, `GoogleTest` and `HippoMocks` are needed for tests
@ -162,7 +142,7 @@ src_configure() {
distcc="no" distcc="no"
experimental="yes" experimental="yes"
experimental_ft="yes" experimental_ft="yes"
hunspell_enable="$(usex spell)" hunspell_enable="no"
icu="$(usex icu)" icu="$(usex icu)"
install_git_hooks="no" install_git_hooks="no"
libidn_bundled_enable="false" libidn_bundled_enable="false"
@ -176,14 +156,14 @@ src_configure() {
max_jobs="no" max_jobs="no"
optimize="no" optimize="no"
qt="${T}/qt" qt="${T}/qt"
qt5="$(usex client)" qt5="no"
swiften_dll="true" swiften_dll="true"
swift_mobile="no" swift_mobile="no"
target="native" target="native"
test="none" test="none"
try_avahi="$(usex client)" try_avahi="no"
try_expat="$(usex expat)" try_expat="$(usex expat)"
try_gconf="$(usex gconf)" try_gconf="no"
try_libidn="$(usex idn)" try_libidn="$(usex idn)"
try_libxml="$(usex !expat)" try_libxml="$(usex !expat)"
tls_backend="openssl" tls_backend="openssl"
@ -197,10 +177,8 @@ src_configure() {
src_compile() { src_compile() {
local myesconsinstall=( local myesconsinstall=(
Swiften Swiften
$(usex client Swift '')
$(usex lua Sluift '') $(usex lua Sluift '')
$(usex zeroconf Limber '') $(usex zeroconf Limber '')
$(usex zeroconf "$(usex client Slimber '')" '')
) )
escons "${MYSCONS[@]}" "${myesconsinstall[@]}" escons "${MYSCONS[@]}" "${myesconsinstall[@]}"
@ -218,7 +196,6 @@ src_install() {
local myesconsinstall=( local myesconsinstall=(
SWIFTEN_INSTALLDIR="${ED}/usr" SWIFTEN_INSTALLDIR="${ED}/usr"
SWIFTEN_LIBDIR="${ED}/usr/$(get_libdir)" SWIFTEN_LIBDIR="${ED}/usr/$(get_libdir)"
$(usex client "SWIFT_INSTALLDIR=${ED}/usr" '')
$(usex lua "SLUIFT_DIR=${ED}/usr" '') $(usex lua "SLUIFT_DIR=${ED}/usr" '')
$(usex lua "SLUIFT_INSTALLDIR=${ED}/usr" '') $(usex lua "SLUIFT_INSTALLDIR=${ED}/usr" '')
"${ED}" "${ED}"
@ -227,16 +204,6 @@ src_install() {
escons "${MYSCONS[@]}" "${myesconsinstall[@]}" escons "${MYSCONS[@]}" "${myesconsinstall[@]}"
use zeroconf && dobin Limber/limber use zeroconf && dobin Limber/limber
use zeroconf && use client && newbin Slimber/CLI/slimber slimber-cli
use zeroconf && use client && newbin Slimber/Qt/slimber slimber-qt
einstalldocs einstalldocs
} }
pkg_postinst() {
use client && xdg_icon_cache_update
}
pkg_postrm() {
use client && xdg_icon_cache_update
}