diff --git a/net-im/swift/swift-9999.ebuild b/net-im/swift/swift-9999.ebuild index 9996263..6d3fbbd 100644 --- a/net-im/swift/swift-9999.ebuild +++ b/net-im/swift/swift-9999.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2018 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=6 @@ -9,31 +9,34 @@ DESCRIPTION="An elegant, secure, adaptable and intuitive XMPP Client" HOMEPAGE="https://www.swift.im/" if [[ ${PV} = "9999" ]] ; then - EGIT_REPO_URI="https://github.com/swift/swift.git" + EGIT_REPO_URI="https://github.com/${PN}/${PN}.git" EGIT_BRANCH="swift-4.x" inherit git-r3 KEYWORDS="" else RESTRICT="mirror" - SRC_URI="https://swift.im/downloads/releases/swift-${PV}/swift-${PV}.tar.gz" + SRC_URI="https://swift.im/downloads/releases/${P}/${P}.tar.gz" KEYWORDS="~amd64 ~x86" fi LICENSE="BSD BSD-1 CC-BY-3.0 GPL-3 OFL-1.1" -SLOT="0/4" -IUSE="client expat examples experimental ft gconf hunspell lua icu idn test tools unbound zeroconf" -REQUIRED_USE="ft? ( experimental ) +SLOT="4/0" +IUSE="client expat gconf +icu +idn lua spell test zeroconf" +REQUIRED_USE=" + || ( icu idn ) gconf? ( client ) - hunspell? ( client )" + spell? ( client ) +" -RDEPEND="dev-lang/lua:= +RDEPEND=" + dev-db/sqlite:3 dev-libs/boost:= dev-libs/openssl:0= + net-libs/libnatpmp + net-libs/miniupnpc:= sys-libs/zlib:= - expat? ( dev-libs/expat ) - !expat? ( dev-libs/libxml2:2 ) - experimental? ( dev-db/sqlite:3 ) - client? ( dev-qt/qtcore:5 + client? ( + dev-qt/qtcore:5 dev-qt/qtdbus:5 dev-qt/qtgui:5 dev-qt/qtmultimedia:5 @@ -41,20 +44,27 @@ RDEPEND="dev-lang/lua:= dev-qt/qtsvg:5 dev-qt/qtwidgets:5 dev-qt/qtwebkit:5 - dev-qt/qtx11extras:5 ) - ft? ( net-libs/libnatpmp - net-libs/miniupnpc:= ) - hunspell? ( app-text/hunspell:= ) - icu? ( dev-libs/icu:= ) + dev-qt/qtx11extras:5 + net-dns/avahi + ) + expat? ( dev-libs/expat ) + !expat? ( dev-libs/libxml2:2 ) gconf? ( gnome-base/gconf:2 ) + icu? ( dev-libs/icu:= ) idn? ( net-dns/libidn:= ) - unbound? ( net-dns/unbound - net-libs/ldns ) - zeroconf? ( net-dns/avahi )" + lua? ( dev-lang/lua:= ) + spell? ( app-text/hunspell:= ) +" -DEPEND="${RDEPEND} +DEPEND=" + ${RDEPEND} >=dev-util/scons-3.0.1-r3 - client? ( dev-qt/linguist-tools:5 )" + client? ( dev-qt/linguist-tools:5 ) + test? ( net-dns/avahi ) +" + +# Tests don't run, as they fail with a "KeyError: 'CPPUNIT_FLAGS'". +RESTRICT="test" DOCS=( "DEVELOPMENT.md" @@ -65,24 +75,22 @@ DOCS=( src_prepare() { default - # Hack for finding qt system libs - #mkdir "${T}"/qt || die - #ln -s "${EPREFIX%/}"/usr/$(get_libdir)/qt5/bin "${T}"/qt/bin || die - #ln -s "${EPREFIX%/}"/usr/$(get_libdir)/qt5 "${T}"/qt/lib || die - #ln -s "${EPREFIX%/}"/usr/include/qt5 "${T}"/qt/include || die + # Hack for finding Qt system libs + mkdir "${T}"/qt || die + ln -s "${EPREFIX%/}"/usr/$(get_libdir)/qt5/bin "${T}"/qt/bin || die + ln -s "${EPREFIX%/}"/usr/$(get_libdir)/qt5 "${T}"/qt/lib || die + ln -s "${EPREFIX%/}"/usr/include/qt5 "${T}"/qt/include || die # Remove parts of Swift, which a user don't want to compile - ! use client && rm -fr Swift Slimber - ! use lua && rm -fr Sluift - ! use tools && rm -fr SwiftTools - ! use zeroconf && rm -fr Limber + if ! use client; then rm -fr Swift Slimber || die; fi + if ! use lua; then rm -fr Sluift || die; fi + if ! use zeroconf; then rm -fr Limber || die; fi # Remove '3rdParty', as the system libs should be used rm -fr 3rdParty || die } src_configure() { - use client && local QT_SELECT=qt5 MYSCONS=( ar="$(tc-getAR)" allow_warnings="yes" @@ -93,14 +101,15 @@ src_configure() { cc="$(tc-getCC)" ccache="no" ccflags="${CFLAGS}" + CPPUNIT_FLAGS="QA" coverage="no" cxx="$(tc-getCXX)" cxxflags="${CXXFLAGS}" debug="no" distcc="no" - experimental="$(usex experimental)" - experimental_ft="$(usex ft)" - hunspell_enable="$(usex hunspell)" + experimental="yes" + experimental_ft="yes" + hunspell_enable="$(usex spell)" icu="$(usex icu)" install_git_hooks="no" libidn_bundled_enable="false" @@ -110,18 +119,19 @@ src_configure() { linkflags="${LDFLAGS}" max_jobs="no" optimize="no" + qt="${T}/qt" qt5="$(usex client)" swiften_dll="true" swift_mobile="no" target="native" test="none" - try_avahi="$(usex zeroconf)" + try_avahi="$(usex client)" try_expat="$(usex expat)" try_gconf="$(usex gconf)" try_libidn="$(usex idn)" try_libxml="$(usex !expat)" tls_backend="openssl" - unbound="$(usex unbound)" + unbound="no" V="1" valgrind="no" zlib_bundled_enable="false" @@ -129,16 +139,15 @@ src_configure() { } src_compile() { - local MYSCONSTARGETS=( + local myesconsinstall=( Swiften - $(usex client Slimber '') $(usex client Swift '') $(usex lua Sluift '') - $(usex tools SwifTools '') $(usex zeroconf Limber '') + $(usex zeroconf "$(usex client Slimber '')" '') ) - escons "${MYSCONS[@]}" "${MYSCONSTARGETS[@]}" + escons "${MYSCONS[@]}" "${myesconsinstall[@]}" } src_test() { @@ -146,22 +155,21 @@ src_test() { } src_install() { - local mysconsinstall=( - "${MYSCONS[@]}" - SLUIFT_DIR="${ED%/}/usr" + local myesconsinstall=( SWIFTEN_INSTALLDIR="${ED%/}/usr" SWIFTEN_LIBDIR="${ED%/}/usr/$(get_libdir)" - "${ED%/}" + $(usex client "SWIFT_INSTALLDIR=${ED%/}/usr" '') + $(usex lua "SLUIFT_DIR=${ED%/}/usr" '') + $(usex lua "SLUIFT_INSTALLDIR=${ED%/}/usr" '') + "${ED}" ) - escons "${mysconsinstall[@]}" + escons "${MYSCONS[@]}" "${myesconsinstall[@]}" use client && newbin Slimber/CLI/slimber slimber-cli use client && newbin Slimber/Qt/slimber slimber-qt - use lua && dobin Sluift/exe/sluift use zeroconf && dobin Limber/limber - local HTML_DOCS=( "Documentation/SwiftenDevelopersGuide/Swiften Developers Guide.xml" ) einstalldocs }