2016-02-07 01:53:34 +01:00
|
|
|
# Copyright 1999-2016 Gentoo Foundation
|
2014-03-18 11:00:56 +01:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
2015-08-21 16:02:53 +02:00
|
|
|
# $Id$
|
2014-03-18 11:00:56 +01:00
|
|
|
|
2016-02-11 12:41:21 +01:00
|
|
|
EAPI="6"
|
2014-03-18 11:00:56 +01:00
|
|
|
|
2016-10-29 13:30:06 +02:00
|
|
|
inherit scons-utils toolchain-funcs
|
2014-03-18 11:00:56 +01:00
|
|
|
|
|
|
|
if [[ ${PV} = "9999" ]] ; then
|
|
|
|
EGIT_REPO_URI="git://swift.im/swift"
|
|
|
|
inherit git-r3
|
|
|
|
KEYWORDS=""
|
|
|
|
else
|
|
|
|
RESTRICT="mirror"
|
|
|
|
SRC_URI="http://swift.im/downloads/releases/${P}/${P}.tar.gz"
|
|
|
|
KEYWORDS="~amd64 ~x86"
|
|
|
|
fi
|
|
|
|
|
|
|
|
DESCRIPTION="Your friendly chat client"
|
|
|
|
HOMEPAGE="http://swift.im/"
|
|
|
|
|
|
|
|
LICENSE="GPL-3"
|
|
|
|
SLOT="0"
|
2016-03-24 10:35:17 +01:00
|
|
|
IUSE="debug doc +expat gconf icu static-libs test upnp zeroconf"
|
2014-03-18 11:00:56 +01:00
|
|
|
|
2016-03-24 10:35:17 +01:00
|
|
|
# TODO: Swiften deps: qt, ldns, unbound. Sluift: lua,
|
|
|
|
RDEPEND="dev-libs/boost:=
|
|
|
|
dev-libs/openssl:0
|
2014-03-18 11:00:56 +01:00
|
|
|
net-dns/libidn
|
|
|
|
sys-libs/zlib
|
2016-03-24 10:35:17 +01:00
|
|
|
zeroconf? ( net-dns/avahi )
|
|
|
|
expat? ( dev-libs/expat )
|
|
|
|
!expat? ( dev-libs/libxml2 )
|
|
|
|
gconf? ( gnome-base/gconf dev-libs/glib:2 )
|
|
|
|
icu? ( dev-libs/icu:= )
|
|
|
|
upnp? ( net-libs/libnatpmp net-libs/miniupnpc:= )"
|
2014-03-18 11:00:56 +01:00
|
|
|
DEPEND="${RDEPEND}
|
|
|
|
doc? (
|
|
|
|
>=app-text/docbook-xsl-stylesheets-1.75
|
|
|
|
>=app-text/docbook-xml-dtd-4.5
|
|
|
|
dev-libs/libxslt
|
2016-03-24 11:21:15 +01:00
|
|
|
)"
|
2016-02-07 15:09:02 +01:00
|
|
|
LANGS="ca de es fr gl he hu nl pl ru sk sv"
|
|
|
|
for X in ${LANGS} ; do
|
2016-06-23 13:08:16 +02:00
|
|
|
IUSE="${IUSE} l10n_${X}"
|
2016-02-07 15:09:02 +01:00
|
|
|
done
|
|
|
|
|
2014-03-18 11:00:56 +01:00
|
|
|
scons_targets=()
|
|
|
|
set_scons_targets() {
|
|
|
|
scons_targets=( Swiften )
|
|
|
|
use zeroconf && scons_targets+=( Slimber )
|
|
|
|
}
|
|
|
|
|
|
|
|
src_prepare() {
|
2016-03-24 10:35:17 +01:00
|
|
|
# remove all bundled packages to ensure
|
|
|
|
# consistency of headers and linked libraries
|
2016-10-29 13:30:06 +02:00
|
|
|
rm -r 3rdparty || die
|
2014-03-18 11:00:56 +01:00
|
|
|
|
|
|
|
for x in ${LANGS}; do
|
2016-06-23 13:08:16 +02:00
|
|
|
if use !l10n_${x}; then
|
2016-10-29 13:30:06 +02:00
|
|
|
rm Swift/Translations/swift_${x}.ts || die
|
2014-03-18 11:00:56 +01:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if use !zeroconf; then
|
2016-10-29 13:30:06 +02:00
|
|
|
rm -r Slumber || die
|
2014-03-18 11:00:56 +01:00
|
|
|
fi
|
|
|
|
|
2016-10-29 13:30:06 +02:00
|
|
|
rm -r Swift || die
|
2014-03-18 11:00:56 +01:00
|
|
|
|
2016-02-12 12:58:33 +01:00
|
|
|
eapply_user
|
2014-03-18 11:00:56 +01:00
|
|
|
}
|
|
|
|
|
2016-03-24 10:35:17 +01:00
|
|
|
src_configure() {
|
|
|
|
MYSCONS=(
|
|
|
|
cc="$(tc-getCC)"
|
|
|
|
cxx="$(tc-getCXX)"
|
|
|
|
ccflags="${CFLAGS}"
|
|
|
|
cxxflags="${CXXFLAGS}"
|
|
|
|
link="$(tc-getCXX)"
|
|
|
|
linkflags="${LDFLAGS}"
|
|
|
|
ar="$(tc-getAR)"
|
|
|
|
swiften_dll=$(usex static-libs false true)
|
|
|
|
zlib_includedir=/usr/include
|
|
|
|
zlib_libdir=/$(get_libdir)
|
|
|
|
{boost,libidn,zlib}_bundled_enable=false
|
|
|
|
icu=$(usex icu true false)
|
|
|
|
try_avahi=$(usex zeroconf true false)
|
|
|
|
try_gconf=$(usex gconf true false)
|
|
|
|
try_expat=$(usex expat true false)
|
|
|
|
try_libxml=$(usex expat false true)
|
|
|
|
experimental_ft=$(usex upnp true false)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
|
2014-03-18 11:00:56 +01:00
|
|
|
src_compile() {
|
|
|
|
set_scons_targets
|
|
|
|
|
2016-03-24 10:35:17 +01:00
|
|
|
escons V=1 "${MYSCONS[@]}" "${scons_targets[@]}"
|
2014-03-18 11:00:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
src_test() {
|
|
|
|
set_scons_targets
|
|
|
|
|
2016-03-24 10:35:17 +01:00
|
|
|
escons "${MYSCONS[@]}" test=unit QA
|
2014-03-18 11:00:56 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
src_install() {
|
|
|
|
set_scons_targets
|
|
|
|
|
2016-03-24 10:35:17 +01:00
|
|
|
escons "${MYSCONS[@]}" SWIFT_INSTALLDIR="${D}/usr" SWIFTEN_INSTALLDIR="${D}/usr" "${D}" "${scons_targets[@]}"
|
2014-03-18 11:00:56 +01:00
|
|
|
|
|
|
|
if use zeroconf ; then
|
|
|
|
newbin Slimber/Qt/slimber slimber-qt
|
|
|
|
newbin Slimber/CLI/slimber slimber-cli
|
|
|
|
fi
|
|
|
|
|
|
|
|
use doc && dohtml "Documentation/SwiftenDevelopersGuide/Swiften Developers Guide.html"
|
|
|
|
}
|