[net-im/swift] rewrited based on work done in the dev-zero overlay, drop examples use, temp drop swift backend
This commit is contained in:
parent
42110c9b22
commit
b945e9de8d
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
EAPI="6"
|
EAPI="6"
|
||||||
|
|
||||||
inherit toolchain-funcs linux-info scons-utils
|
inherit scons-utils toolchain-funcs linux-info
|
||||||
|
|
||||||
if [[ ${PV} = "9999" ]] ; then
|
if [[ ${PV} = "9999" ]] ; then
|
||||||
EGIT_REPO_URI="git://swift.im/swift"
|
EGIT_REPO_URI="git://swift.im/swift"
|
||||||
@ -21,29 +21,19 @@ HOMEPAGE="http://swift.im/"
|
|||||||
|
|
||||||
LICENSE="GPL-3"
|
LICENSE="GPL-3"
|
||||||
SLOT="0"
|
SLOT="0"
|
||||||
IUSE="debug doc examples +expat qt5 ssl static-libs zeroconf"
|
IUSE="debug doc +expat gconf icu static-libs test upnp zeroconf"
|
||||||
|
|
||||||
RDEPEND="
|
# TODO: Swiften deps: qt, ldns, unbound. Sluift: lua,
|
||||||
dev-libs/boost:=
|
RDEPEND="dev-libs/boost:=
|
||||||
|
dev-libs/openssl:0
|
||||||
|
net-dns/libidn
|
||||||
|
sys-libs/zlib
|
||||||
|
zeroconf? ( net-dns/avahi )
|
||||||
expat? ( dev-libs/expat )
|
expat? ( dev-libs/expat )
|
||||||
!expat? ( dev-libs/libxml2 )
|
!expat? ( dev-libs/libxml2 )
|
||||||
ssl? ( dev-libs/openssl )
|
gconf? ( gnome-base/gconf dev-libs/glib:2 )
|
||||||
zeroconf? ( net-dns/avahi )
|
icu? ( dev-libs/icu:= )
|
||||||
dev-lang/lua
|
upnp? ( net-libs/libnatpmp net-libs/miniupnpc:= )"
|
||||||
net-dns/libidn
|
|
||||||
net-dns/unbound
|
|
||||||
net-libs/ldns
|
|
||||||
net-libs/libnatpmp
|
|
||||||
net-libs/miniupnpc
|
|
||||||
sys-libs/zlib
|
|
||||||
qt5? (
|
|
||||||
x11-libs/libXScrnSaver
|
|
||||||
dev-qt/qtgui:5
|
|
||||||
dev-qt/qtwebkit:5
|
|
||||||
dev-qt/qtwidgets:5
|
|
||||||
dev-qt/qtmultimedia:5
|
|
||||||
dev-qt/qtx11extras:5
|
|
||||||
)
|
|
||||||
"
|
"
|
||||||
DEPEND="${RDEPEND}
|
DEPEND="${RDEPEND}
|
||||||
doc? (
|
doc? (
|
||||||
@ -60,46 +50,13 @@ done
|
|||||||
scons_targets=()
|
scons_targets=()
|
||||||
set_scons_targets() {
|
set_scons_targets() {
|
||||||
scons_targets=( Swiften )
|
scons_targets=( Swiften )
|
||||||
use qt5 && scons_targets+=( Swift )
|
|
||||||
use zeroconf && scons_targets+=( Slimber )
|
use zeroconf && scons_targets+=( Slimber )
|
||||||
use examples && scons_targets+=(
|
|
||||||
Documentation/SwiftenDevelopersGuide/Examples
|
|
||||||
Limber
|
|
||||||
Sluift
|
|
||||||
Swiften/Config
|
|
||||||
Swiften/Examples
|
|
||||||
Swiften/QA
|
|
||||||
SwifTools
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
scons_vars=()
|
|
||||||
set_scons_vars() {
|
|
||||||
scons_vars=(
|
|
||||||
V=1
|
|
||||||
allow_warnings=1
|
|
||||||
cc="$(tc-getCC)"
|
|
||||||
cxx="$(tc-getCXX)"
|
|
||||||
ccflags="${CXXFLAGS}"
|
|
||||||
linkflags="${LDFLAGS}"
|
|
||||||
qt="${S}/local-qt"
|
|
||||||
openssl="$(usex ssl ${EPREFIX}/usr)"
|
|
||||||
docbook_xsl="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets"
|
|
||||||
docbook_xml="${EPREFIX}/usr/share/sgml/docbook/xml-dtd-4.5"
|
|
||||||
debug="$(usex debug)"
|
|
||||||
swiften_dll="$(usex static-libs "no" "yes")"
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
mkdir local-qt
|
# remove all bundled packages to ensure
|
||||||
ln -s "${EPREFIX}"/usr/$(get_libdir)/qt5 local-qt/lib || die
|
# consistency of headers and linked libraries
|
||||||
ln -s "${EPREFIX}"/usr/include/qt5 local-qt/include || die
|
rm -rf 3rdparty || die
|
||||||
|
|
||||||
cd 3rdParty || die
|
|
||||||
# TODO CppUnit
|
|
||||||
rm -r Boost DocBook Expat LCov Ldns LibIDN Lua LibMiniUPnPc LibNATPMP OpenSSL SCons SQLite Unbound ZLib || die
|
|
||||||
cd .. || die
|
|
||||||
|
|
||||||
for x in ${LANGS}; do
|
for x in ${LANGS}; do
|
||||||
if use !linguas_${x}; then
|
if use !linguas_${x}; then
|
||||||
@ -107,24 +64,11 @@ src_prepare() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# Richard H. <chain@rpgfiction.net> (2012-03-29): SCons ignores us,
|
|
||||||
# just delete unneeded stuff!
|
|
||||||
if use !zeroconf; then
|
if use !zeroconf; then
|
||||||
rm -rf Slumber || die
|
rm -rf Slumber || die
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use !examples; then
|
rm -rf Swift || die
|
||||||
rm -rf Documentation/SwiftenDevelopersGuide/Examples \
|
|
||||||
Limber \
|
|
||||||
Slimber \
|
|
||||||
Sluift \
|
|
||||||
Swiften/Examples \
|
|
||||||
Swiften/QA || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
if use !qt5; then
|
|
||||||
rm -rf Swift || die
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i BuildTools/SCons/Tools/qt4.py \
|
sed -i BuildTools/SCons/Tools/qt4.py \
|
||||||
-e "s/linux2/linux${KV_MAJOR}/" \
|
-e "s/linux2/linux${KV_MAJOR}/" \
|
||||||
@ -132,51 +76,49 @@ src_prepare() {
|
|||||||
eapply_user
|
eapply_user
|
||||||
}
|
}
|
||||||
|
|
||||||
|
src_configure() {
|
||||||
|
MYSCONS=(
|
||||||
|
cc="$(tc-getCC)"
|
||||||
|
cxx="$(tc-getCXX)"
|
||||||
|
ccflags="${CFLAGS}"
|
||||||
|
cxxflags="${CXXFLAGS}"
|
||||||
|
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)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
src_compile() {
|
src_compile() {
|
||||||
set_scons_targets
|
set_scons_targets
|
||||||
set_scons_vars
|
|
||||||
|
|
||||||
escons "${scons_vars[@]}" "${scons_targets[@]}"
|
escons V=1 "${MYSCONS[@]}" "${scons_targets[@]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
src_test() {
|
src_test() {
|
||||||
set_scons_targets
|
set_scons_targets
|
||||||
set_scons_vars
|
|
||||||
|
|
||||||
escons "${scons_vars[@]}" test=unit QA
|
escons "${MYSCONS[@]}" test=unit QA
|
||||||
}
|
}
|
||||||
|
|
||||||
src_install() {
|
src_install() {
|
||||||
set_scons_targets
|
set_scons_targets
|
||||||
set_scons_vars
|
|
||||||
|
|
||||||
escons "${scons_vars[@]}" SWIFT_INSTALLDIR="${D}/usr" SWIFTEN_INSTALLDIR="${D}/usr" "${D}" "${scons_targets[@]}"
|
escons "${MYSCONS[@]}" SWIFT_INSTALLDIR="${D}/usr" SWIFTEN_INSTALLDIR="${D}/usr" "${D}" "${scons_targets[@]}"
|
||||||
|
|
||||||
if use zeroconf ; then
|
if use zeroconf ; then
|
||||||
newbin Slimber/Qt/slimber slimber-qt
|
newbin Slimber/Qt/slimber slimber-qt
|
||||||
newbin Slimber/CLI/slimber slimber-cli
|
newbin Slimber/CLI/slimber slimber-cli
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if use examples ; then
|
|
||||||
for i in EchoBot{1,2,3,4,5,6} EchoComponent ; do
|
|
||||||
newbin "Documentation/SwiftenDevelopersGuide/Examples/EchoBot/${i}" "${PN}-${i}"
|
|
||||||
done
|
|
||||||
|
|
||||||
dobin Limber/limber
|
|
||||||
dobin Sluift/sluift
|
|
||||||
|
|
||||||
for i in BenchTool ConnectivityTest LinkLocalTool ParserTester SendFile SendMessage ; do
|
|
||||||
newbin "Swiften/Examples/${i}/${i}" "${PN}-${i}"
|
|
||||||
done
|
|
||||||
newbin Swiften/Examples/SendFile/ReceiveFile "${PN}-ReceiveFile"
|
|
||||||
use zeroconf && dobin Swiften/Examples/LinkLocalTool/LinkLocalTool
|
|
||||||
|
|
||||||
for i in ClientTest NetworkTest StorageTest TLSTest ; do
|
|
||||||
newbin "Swiften/QA/${i}/${i}" "${PN}-${i}"
|
|
||||||
done
|
|
||||||
|
|
||||||
newbin SwifTools/Idle/IdleQuerierTest/IdleQuerierTest ${PN}-IdleQuerierTest
|
|
||||||
fi
|
|
||||||
|
|
||||||
use doc && dohtml "Documentation/SwiftenDevelopersGuide/Swiften Developers Guide.html"
|
use doc && dohtml "Documentation/SwiftenDevelopersGuide/Swiften Developers Guide.html"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user