2018-05-02 00:08:08 +02:00
|
|
|
# Copyright 1999-2018 Gentoo Foundation
|
2016-04-04 11:35:50 +02:00
|
|
|
# Distributed under the terms of the GNU General Public License v2
|
|
|
|
|
2018-05-02 00:08:08 +02:00
|
|
|
EAPI=6
|
2016-04-04 11:35:50 +02:00
|
|
|
|
2016-10-30 10:58:47 +01:00
|
|
|
inherit scons-utils toolchain-funcs
|
2016-04-04 11:35:50 +02:00
|
|
|
|
2018-05-02 00:08:08 +02:00
|
|
|
DESCRIPTION="A C++ library for implementing XMPP applications"
|
|
|
|
HOMEPAGE="https://www.swift.im/"
|
|
|
|
|
2016-04-04 11:35:50 +02:00
|
|
|
if [[ ${PV} = "9999" ]] ; then
|
2018-05-02 00:08:08 +02:00
|
|
|
EGIT_REPO_URI="https://github.com/swift/swift.git"
|
2017-12-21 14:44:26 +01:00
|
|
|
EGIT_BRANCH="swift-4.x"
|
2016-04-04 11:35:50 +02:00
|
|
|
inherit git-r3
|
|
|
|
KEYWORDS=""
|
|
|
|
else
|
|
|
|
RESTRICT="mirror"
|
2018-05-02 00:08:08 +02:00
|
|
|
SRC_URI="https://swift.im/downloads/releases/swift-${PV}/swift-${PV}.tar.gz"
|
2016-04-04 11:35:50 +02:00
|
|
|
KEYWORDS="~amd64 ~x86"
|
2018-05-02 18:01:02 +02:00
|
|
|
S="${WORKDIR}/swift-${PV}"
|
2016-04-04 11:35:50 +02:00
|
|
|
fi
|
|
|
|
|
2018-05-02 00:08:08 +02:00
|
|
|
LICENSE="BSD BSD-1 CC-BY-3.0 GPL-3 OFL-1.1"
|
|
|
|
SLOT="0/4"
|
|
|
|
IUSE="debug expat icu idn sqlite upnp zeroconf"
|
2016-04-04 11:35:50 +02:00
|
|
|
|
2018-05-02 00:08:08 +02:00
|
|
|
DEPEND="dev-libs/boost:=
|
|
|
|
dev-libs/openssl:0=
|
|
|
|
sys-libs/zlib:=
|
2016-04-04 11:35:50 +02:00
|
|
|
expat? ( dev-libs/expat )
|
2018-05-02 00:08:08 +02:00
|
|
|
!expat? ( dev-libs/libxml2:2 )
|
2016-04-04 11:35:50 +02:00
|
|
|
icu? ( dev-libs/icu:= )
|
2018-05-02 00:08:08 +02:00
|
|
|
idn? ( net-dns/libidn )
|
|
|
|
sqlite? ( dev-db/sqlite:3 )
|
|
|
|
upnp? ( net-libs/libnatpmp
|
|
|
|
net-libs/miniupnpc:= )
|
|
|
|
zeroconf? ( net-dns/avahi )"
|
|
|
|
|
|
|
|
RDEPEND="${DEPEND}"
|
2016-04-04 11:35:50 +02:00
|
|
|
|
2018-05-02 18:01:02 +02:00
|
|
|
DOCS=( "DEVELOPMENT.md" "README.md" "Swiften/ChangeLog.md" )
|
|
|
|
|
2016-04-04 11:35:50 +02:00
|
|
|
src_prepare() {
|
2018-05-02 00:08:08 +02:00
|
|
|
default
|
2016-04-04 11:35:50 +02:00
|
|
|
|
2018-05-02 00:08:08 +02:00
|
|
|
# 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
|
2016-04-04 11:35:50 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
src_configure() {
|
|
|
|
MYSCONS=(
|
2018-05-02 00:08:08 +02:00
|
|
|
ar="$(tc-getAR)"
|
|
|
|
allow_warnings="yes"
|
|
|
|
assertions="$(usex debug)"
|
|
|
|
build_examples="yes"
|
|
|
|
boost_bundled_enable="false"
|
|
|
|
boost_force_bundled="false"
|
2016-04-04 11:35:50 +02:00
|
|
|
cc="$(tc-getCC)"
|
2018-05-02 00:08:08 +02:00
|
|
|
ccache="no"
|
2016-04-04 11:35:50 +02:00
|
|
|
ccflags="${CFLAGS}"
|
2018-05-02 00:08:08 +02:00
|
|
|
coverage="$(usex debug)"
|
|
|
|
cxx="$(tc-getCXX)"
|
2016-04-04 11:35:50 +02:00
|
|
|
cxxflags="${CXXFLAGS}"
|
2018-05-02 00:08:08 +02:00
|
|
|
debug="$(usex debug)"
|
|
|
|
distcc="no"
|
|
|
|
experimental="$(usex sqlite)"
|
|
|
|
experimental_ft="$(usex upnp)"
|
|
|
|
hunspell_enable="false"
|
2018-05-02 18:01:02 +02:00
|
|
|
icu="$(usex icu)"
|
2018-05-02 00:08:08 +02:00
|
|
|
install_git_hooks="no"
|
|
|
|
libidn_bundled_enable="false"
|
|
|
|
libminiupnpc_force_bundled="false"
|
|
|
|
libnatpmp_force_bundled="false"
|
2016-04-04 11:35:50 +02:00
|
|
|
link="$(tc-getCXX)"
|
|
|
|
linkflags="${LDFLAGS}"
|
2018-05-02 00:08:08 +02:00
|
|
|
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"
|
2017-12-21 14:44:26 +01:00
|
|
|
Swiften
|
2016-04-04 11:35:50 +02:00
|
|
|
)
|
|
|
|
}
|
|
|
|
|
|
|
|
src_compile() {
|
2018-05-02 18:01:02 +02:00
|
|
|
escons V=1 "${MYSCONS[@]}" PROJECTS="Swiften" Swiften
|
2016-04-04 11:35:50 +02:00
|
|
|
}
|
|
|
|
|
2018-05-02 18:01:02 +02:00
|
|
|
src_install() {
|
2018-05-02 00:08:08 +02:00
|
|
|
escons "${MYSCONS[@]}" SWIFTEN_INSTALLDIR="${ED%/}/usr" SWIFTEN_LIBDIR="${ED%/}/usr/$(get_libdir)" "${ED%/}/usr" Swiften
|
|
|
|
einstalldocs
|
2016-04-04 11:35:50 +02:00
|
|
|
}
|