parent
fd44ff560d
commit
81761843ae
@ -1,89 +1,103 @@ |
||||
# Copyright 1999-2016 Gentoo Foundation |
||||
# Copyright 1999-2018 Gentoo Foundation |
||||
# Distributed under the terms of the GNU General Public License v2 |
||||
# $Id$ |
||||
|
||||
EAPI="6" |
||||
EAPI=6 |
||||
|
||||
inherit scons-utils toolchain-funcs |
||||
|
||||
DESCRIPTION="A C++ library for implementing XMPP applications" |
||||
HOMEPAGE="https://www.swift.im/" |
||||
|
||||
if [[ ${PV} = "9999" ]] ; then |
||||
EGIT_REPO_URI="git://swift.im/swift" |
||||
EGIT_REPO_URI="https://github.com/swift/swift.git" |
||||
EGIT_BRANCH="swift-4.x" |
||||
inherit git-r3 |
||||
KEYWORDS="" |
||||
else |
||||
RESTRICT="mirror" |
||||
SRC_URI="http://swift.im/downloads/releases/${P}/${P}.tar.gz" |
||||
SRC_URI="https://swift.im/downloads/releases/swift-${PV}/swift-${PV}.tar.gz" |
||||
KEYWORDS="~amd64 ~x86" |
||||
fi |
||||
|
||||
DESCRIPTION="Your friendly chat client" |
||||
HOMEPAGE="http://swift.im/" |
||||
LICENSE="BSD BSD-1 CC-BY-3.0 GPL-3 OFL-1.1" |
||||
SLOT="0/4" |
||||
KEYWORDS="~amd64 ~x86" |
||||
|
||||
LICENSE="GPL-3" |
||||
SLOT="0" |
||||
IUSE="debug doc +expat gconf icu static-libs test upnp zeroconf" |
||||
IUSE="debug expat icu idn sqlite upnp zeroconf" |
||||
|
||||
# LDNS / Unbound is bundled only... |
||||
RDEPEND="dev-libs/boost:= |
||||
dev-libs/openssl:0 |
||||
sys-libs/zlib |
||||
zeroconf? ( net-dns/avahi ) |
||||
DEPEND="dev-libs/boost:= |
||||
dev-libs/openssl:0= |
||||
sys-libs/zlib:= |
||||
expat? ( dev-libs/expat ) |
||||
!expat? ( dev-libs/libxml2 ) |
||||
gconf? ( gnome-base/gconf dev-libs/glib:2 ) |
||||
!expat? ( dev-libs/libxml2:2 ) |
||||
icu? ( dev-libs/icu:= ) |
||||
!icu? ( net-dns/libidn:= ) |
||||
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 |
||||
)" |
||||
idn? ( net-dns/libidn ) |
||||
sqlite? ( dev-db/sqlite:3 ) |
||||
upnp? ( net-libs/libnatpmp |
||||
net-libs/miniupnpc:= ) |
||||
zeroconf? ( net-dns/avahi )" |
||||
|
||||
RDEPEND="${DEPEND}" |
||||
|
||||
src_prepare() { |
||||
# remove all bundled packages to ensure |
||||
# consistency of headers and linked libraries |
||||
rm -r 3rdParty || die |
||||
default |
||||
|
||||
eapply_user |
||||
# Remove '3rdParty', as the system libs should be used |
||||
# Remove 'Limber', 'Slimber' and 'Sluift', as we compile only libSwiften |
||||
rm -fr 3rdParty Limber Slimber Sluift || die |
||||
} |
||||
|
||||
src_configure() { |
||||
MYSCONS=( |
||||
ar="$(tc-getAR)" |
||||
allow_warnings="yes" |
||||
assertions="$(usex debug)" |
||||
build_examples="yes" |
||||
boost_bundled_enable="false" |
||||
boost_force_bundled="false" |
||||
cc="$(tc-getCC)" |
||||
cxx="$(tc-getCXX)" |
||||
ccache="no" |
||||
ccflags="${CFLAGS}" |
||||
coverage="$(usex debug)" |
||||
cxx="$(tc-getCXX)" |
||||
cxxflags="${CXXFLAGS}" |
||||
debug="$(usex debug)" |
||||
distcc="no" |
||||
experimental="$(usex sqlite)" |
||||
experimental_ft="$(usex upnp)" |
||||
hunspell_enable="false" |
||||
install_git_hooks="no" |
||||
libidn_bundled_enable="false" |
||||
libminiupnpc_force_bundled="false" |
||||
libnatpmp_force_bundled="false" |
||||
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) |
||||
lua_force_bundled="false" |
||||
max_jobs="no" |
||||
optimize="no" |
||||
qt5="false" |
||||
swiften_dll="true" |
||||
swift_mobile="no" |
||||
target="native" |
||||
test="none" |
||||
try_avahi="$(usex zeroconf)" |
||||
try_expat="$(usex expat)" |
||||
try_gconf="false" |
||||
try_libidn="$(usex idn)" |
||||
try_libxml="$(usex expat no yes)" |
||||
tls_backend="openssl" |
||||
unbound="no" |
||||
valgrind="no" |
||||
zlib_bundled_enable="false" |
||||
Swiften |
||||
) |
||||
} |
||||
|
||||
src_compile() { |
||||
escons V=1 "${MYSCONS[@]}" |
||||
} |
||||
|
||||
src_test() { |
||||
escons "${MYSCONS[@]}" test=unit QA |
||||
escons "${MYSCONS[@]}" PROJECTS="Swiften" Swiften |
||||
} |
||||
|
||||
src_install() { |
||||
escons "${MYSCONS[@]}" SWIFTEN_INSTALLDIR="${ED}/usr" \ |
||||
SWIFTEN_LIBDIR="${ED}/usr/$(get_libdir)" "${ED}/usr" |
||||
|
||||
use doc && dohtml "Documentation/SwiftenDevelopersGuide/Swiften Developers Guide.html" |
||||
+src_install() { |
||||
escons "${MYSCONS[@]}" SWIFTEN_INSTALLDIR="${ED%/}/usr" SWIFTEN_LIBDIR="${ED%/}/usr/$(get_libdir)" "${ED%/}/usr" Swiften |
||||
einstalldocs |
||||
} |
||||
|
Loading…
Reference in new issue