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

106 lines
2.4 KiB
Bash
Raw Normal View History

# Copyright 1999-2018 Gentoo Foundation
2016-04-04 11:35:50 +02:00
# Distributed under the terms of the GNU General Public License v2
EAPI=6
2016-04-04 11:35:50 +02:00
inherit scons-utils toolchain-funcs
2016-04-04 11:35:50 +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
EGIT_REPO_URI="https://github.com/swift/swift.git"
EGIT_BRANCH="swift-4.x"
2016-04-04 11:35:50 +02:00
inherit git-r3
KEYWORDS=""
else
RESTRICT="mirror"
SRC_URI="https://swift.im/downloads/releases/swift-${PV}/swift-${PV}.tar.gz"
2016-04-04 11:35:50 +02:00
KEYWORDS="~amd64 ~x86"
S="${WORKDIR}/swift-${PV}"
2016-04-04 11:35:50 +02:00
fi
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
DEPEND="dev-libs/boost:=
dev-libs/openssl:0=
sys-libs/zlib:=
2016-04-04 11:35:50 +02:00
expat? ( dev-libs/expat )
!expat? ( dev-libs/libxml2:2 )
2016-04-04 11:35:50 +02:00
icu? ( dev-libs/icu:= )
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
DOCS=( "DEVELOPMENT.md" "README.md" "Swiften/ChangeLog.md" )
2016-04-04 11:35:50 +02:00
src_prepare() {
default
2016-04-04 11:35:50 +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=(
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)"
ccache="no"
2016-04-04 11:35:50 +02:00
ccflags="${CFLAGS}"
coverage="$(usex debug)"
cxx="$(tc-getCXX)"
2016-04-04 11:35:50 +02:00
cxxflags="${CXXFLAGS}"
debug="$(usex debug)"
distcc="no"
experimental="$(usex sqlite)"
experimental_ft="$(usex upnp)"
hunspell_enable="false"
icu="$(usex icu)"
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}"
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
2016-04-04 11:35:50 +02:00
)
}
src_compile() {
escons V=1 "${MYSCONS[@]}" PROJECTS="Swiften" Swiften
2016-04-04 11:35:50 +02:00
}
src_install() {
escons "${MYSCONS[@]}" SWIFTEN_INSTALLDIR="${ED%/}/usr" SWIFTEN_LIBDIR="${ED%/}/usr/$(get_libdir)" "${ED%/}/usr" Swiften
einstalldocs
2016-04-04 11:35:50 +02:00
}