gentoo/net-im/swiften/swiften-9999.ebuild

90 lines
2.0 KiB
Bash
Raw Normal View History

2016-04-04 11:35:50 +02:00
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="6"
inherit scons-utils toolchain-funcs
2016-04-04 11:35:50 +02:00
if [[ ${PV} = "9999" ]] ; then
EGIT_REPO_URI="git://swift.im/swift"
EGIT_BRANCH="swift-4.x"
2016-04-04 11:35:50 +02:00
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"
IUSE="debug doc +expat gconf icu static-libs test upnp zeroconf"
# LDNS / Unbound is bundled only...
2016-04-04 11:35:50 +02:00
RDEPEND="dev-libs/boost:=
dev-libs/openssl:0
sys-libs/zlib
zeroconf? ( net-dns/avahi )
expat? ( dev-libs/expat )
!expat? ( dev-libs/libxml2 )
gconf? ( gnome-base/gconf dev-libs/glib:2 )
icu? ( dev-libs/icu:= )
2017-12-21 15:11:32 +01:00
!icu? ( net-dns/libidn:= )
2016-04-04 11:35:50 +02:00
upnp? ( net-libs/libnatpmp net-libs/miniupnpc:= )"
DEPEND="${RDEPEND}
doc? (
>=app-text/docbook-xsl-stylesheets-1.75
>=app-text/docbook-xml-dtd-4.5
dev-libs/libxslt
)"
src_prepare() {
# remove all bundled packages to ensure
# consistency of headers and linked libraries
rm -r 3rdParty || die
2016-04-04 11:35:50 +02:00
eapply_user
}
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)
Swiften
2016-04-04 11:35:50 +02:00
)
}
src_compile() {
escons V=1 "${MYSCONS[@]}"
2016-04-04 11:35:50 +02:00
}
src_test() {
escons "${MYSCONS[@]}" test=unit QA
}
src_install() {
escons "${MYSCONS[@]}" SWIFTEN_INSTALLDIR="${ED}/usr" \
SWIFTEN_LIBDIR="${ED}/usr/$(get_libdir)" "${ED}/usr"
2016-04-04 11:35:50 +02:00
use doc && dohtml "Documentation/SwiftenDevelopersGuide/Swiften Developers Guide.html"
}