[net-im/swiften] replace with reviewed version from a g-x86 PR

This commit is contained in:
Robert Förster 2018-05-02 00:08:08 +02:00
parent fd44ff560d
commit 81761843ae
1 changed files with 65 additions and 51 deletions

View File

@ -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 # Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI="6" EAPI=6
inherit scons-utils toolchain-funcs inherit scons-utils toolchain-funcs
DESCRIPTION="A C++ library for implementing XMPP applications"
HOMEPAGE="https://www.swift.im/"
if [[ ${PV} = "9999" ]] ; then 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" EGIT_BRANCH="swift-4.x"
inherit git-r3 inherit git-r3
KEYWORDS="" KEYWORDS=""
else else
RESTRICT="mirror" 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" KEYWORDS="~amd64 ~x86"
fi fi
DESCRIPTION="Your friendly chat client" LICENSE="BSD BSD-1 CC-BY-3.0 GPL-3 OFL-1.1"
HOMEPAGE="http://swift.im/" SLOT="0/4"
KEYWORDS="~amd64 ~x86"
LICENSE="GPL-3" IUSE="debug expat icu idn sqlite upnp zeroconf"
SLOT="0"
IUSE="debug doc +expat gconf icu static-libs test upnp zeroconf"
# LDNS / Unbound is bundled only... DEPEND="dev-libs/boost:=
RDEPEND="dev-libs/boost:= dev-libs/openssl:0=
dev-libs/openssl:0 sys-libs/zlib:=
sys-libs/zlib
zeroconf? ( net-dns/avahi )
expat? ( dev-libs/expat ) expat? ( dev-libs/expat )
!expat? ( dev-libs/libxml2 ) !expat? ( dev-libs/libxml2:2 )
gconf? ( gnome-base/gconf dev-libs/glib:2 )
icu? ( dev-libs/icu:= ) icu? ( dev-libs/icu:= )
!icu? ( net-dns/libidn:= ) idn? ( net-dns/libidn )
upnp? ( net-libs/libnatpmp net-libs/miniupnpc:= )" sqlite? ( dev-db/sqlite:3 )
DEPEND="${RDEPEND} upnp? ( net-libs/libnatpmp
doc? ( net-libs/miniupnpc:= )
>=app-text/docbook-xsl-stylesheets-1.75 zeroconf? ( net-dns/avahi )"
>=app-text/docbook-xml-dtd-4.5
dev-libs/libxslt RDEPEND="${DEPEND}"
)"
src_prepare() { src_prepare() {
# remove all bundled packages to ensure default
# consistency of headers and linked libraries
rm -r 3rdParty || die
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() { src_configure() {
MYSCONS=( MYSCONS=(
ar="$(tc-getAR)"
allow_warnings="yes"
assertions="$(usex debug)"
build_examples="yes"
boost_bundled_enable="false"
boost_force_bundled="false"
cc="$(tc-getCC)" cc="$(tc-getCC)"
cxx="$(tc-getCXX)" ccache="no"
ccflags="${CFLAGS}" ccflags="${CFLAGS}"
coverage="$(usex debug)"
cxx="$(tc-getCXX)"
cxxflags="${CXXFLAGS}" 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)" link="$(tc-getCXX)"
linkflags="${LDFLAGS}" linkflags="${LDFLAGS}"
ar="$(tc-getAR)" lua_force_bundled="false"
swiften_dll=$(usex static-libs false true) max_jobs="no"
zlib_includedir=/usr/include optimize="no"
zlib_libdir=/$(get_libdir) qt5="false"
{boost,libidn,zlib}_bundled_enable=false swiften_dll="true"
icu=$(usex icu true false) swift_mobile="no"
try_avahi=$(usex zeroconf true false) target="native"
try_gconf=$(usex gconf true false) test="none"
try_expat=$(usex expat true false) try_avahi="$(usex zeroconf)"
try_libxml=$(usex expat false true) try_expat="$(usex expat)"
experimental_ft=$(usex upnp true false) 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 Swiften
) )
} }
src_compile() { src_compile() {
escons V=1 "${MYSCONS[@]}" escons "${MYSCONS[@]}" PROJECTS="Swiften" Swiften
} }
src_test() { +src_install() {
escons "${MYSCONS[@]}" test=unit QA escons "${MYSCONS[@]}" SWIFTEN_INSTALLDIR="${ED%/}/usr" SWIFTEN_LIBDIR="${ED%/}/usr/$(get_libdir)" "${ED%/}/usr" Swiften
} einstalldocs
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"
} }