Add net-im/swift-2.0

This commit is contained in:
Sergey Morozov 2015-08-29 13:27:30 +03:00
parent d1e07729e7
commit d078e5d35e
2 changed files with 188 additions and 0 deletions

View File

@ -1,3 +1,5 @@
DIST swift-2.0.tar.gz 8816954 SHA256 cbcdbe527dc4d112a38f3cdec5f1051d3beba0b97f8082f90debd04a5b45a41f SHA512 852304b330cbdae1550101de3fa8932ba525497abd86a1fe81e65ba56ba7412ce7f5795a2c0023b87c7a77e84a0f9405a8e77fab79d55d76bece55fa7f983946 WHIRLPOOL fe77b66d403871a5d1671453e569f154b2a1598cd0e4a46663058ba370e3ab317c6ccf94db727669cba5264c19f606869542f6a08051129964b2568c20ab1d1c
DIST swift-2.0rc1.tar.gz 8810733 SHA256 e7c046d2be03c6decbb0cea2887a1d79675b1dd7a9331acfc7838251cff004c6 SHA512 efe1d4e25afd2eeed873690acc7f6ba1d893b924cfa045b3cdaabbc103fe75e411ad693124f41fcd2c603e013ad3c1e73e0040e3383d62ddb115be8c485ddf51 WHIRLPOOL 10e204813e6ce2061e1c286e290d23088b969f2ae721d90cd0f28b9734b389435b5b09a6e93b745b9a755bf08df45b912be52c4fad6c0c0494b3e3c2714fa6cb
EBUILD swift-2.0.ebuild 4284 SHA256 d61c5017ae23da832f61a63ff2555019f0501728ccc0f9f86a9bc857ed87cf38 SHA512 7229e8122848239abee24d782d62b09bf62d86f22b4b296f71d9e6fd63137950370b8feece8b95eaf7d71dd088e3d581d7597b8b04ccf06947b0dbfe001e0442 WHIRLPOOL 0a89d4d415fcfc104c8518ef4426a97041323c9a443de069704ff17589282d7c7cedcc01cea389c8e5a1aefb2740e69e3b48a02cd5a5194c7c777199d819dd59
EBUILD swift-2.0_rc1.ebuild 4284 SHA256 d61c5017ae23da832f61a63ff2555019f0501728ccc0f9f86a9bc857ed87cf38 SHA512 7229e8122848239abee24d782d62b09bf62d86f22b4b296f71d9e6fd63137950370b8feece8b95eaf7d71dd088e3d581d7597b8b04ccf06947b0dbfe001e0442 WHIRLPOOL 0a89d4d415fcfc104c8518ef4426a97041323c9a443de069704ff17589282d7c7cedcc01cea389c8e5a1aefb2740e69e3b48a02cd5a5194c7c777199d819dd59
EBUILD swift-9999.ebuild 4155 SHA256 533bace0697943443c90bc72ca82ee33ad7725e0d8865d1ad5d019606e48d69e SHA512 6549a448751125ad2fb37d3e87531cac1a22c6a6160bc730d64417ab6da69c9a76ec1fbe8599eca3b8f2c8b55fcb425bf4617a1704d7e7b108e98395af20412c WHIRLPOOL 6278eae38502b789dc84707176df51e20dc2baa5f56ccfaa1328701b0699c107d654d047d6efcce0e58f40b7d04af2eb91f186c39298de14e78d8f224fd995a5

View File

@ -0,0 +1,186 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $
EAPI=4
LANGS=" ca de es fr hu nl pl ru se sk"
[[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS=""
inherit multilib toolchain-funcs linux-info qt4-r2 scons-utils ${VCS_ECLASS}
inherit versionator
MY_PN="swift"
MY_PV=$(replace_version_separator 2 '')
MY_P="${MY_PN}-${MY_PV}"
S="${WORKDIR}/${MY_P}"
DESCRIPTION="Your friendly chat client"
HOMEPAGE="http://swift.im/"
if [[ ${PV} == *9999* ]] ; then
EGIT_REPO_URI="git://swift.im/swift"
else
SRC_URI="http://swift.im/downloads/releases/${MY_P}/${MY_P}.tar.gz"
fi
LICENSE="GPL-3"
SLOT="0"
if [[ ${PV} == *9999* ]] ; then
KEYWORDS=""
else
KEYWORDS="~amd64 ~x86"
fi
IUSE="avahi debug doc examples +expat qt4 ssl static-libs zeroconf"
RDEPEND="
dev-libs/boost
expat? ( dev-libs/expat )
!expat? ( dev-libs/libxml2 )
ssl? ( dev-libs/openssl )
zeroconf? (
avahi? ( net-dns/avahi )
!avahi? ( net-misc/mDNSResponder )
)
net-dns/libidn
sys-libs/zlib
qt4? (
x11-libs/libXScrnSaver
x11-libs/qt-gui
x11-libs/qt-webkit
)
"
DEPEND="${RDEPEND}
doc? (
>=app-text/docbook-xsl-stylesheets-1.75
>=app-text/docbook-xml-dtd-4.5
dev-libs/libxslt
)
"
scons_targets=()
set_scons_targets() {
scons_targets=( Swiften )
use qt4 && scons_targets+=( Swift )
use avahi && 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="${EPREFIX}/usr"
docbook_xsl="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets"
docbook_xml="${EPREFIX}/usr/share/sgml/docbook/xml-dtd-4.5"
$(use_scons debug)
$(use !static-libs && use_scons !static-libs swiften_dll)
$(use_scons ssl openssl)
$(use zeroconf && use_scons !avahi bonjour)
)
}
src_prepare() {
mkdir local-qt
ln -s "${EPREFIX}"/usr/$(get_libdir)/qt4 local-qt/lib || die
ln -s "${EPREFIX}"/usr/include/qt4 local-qt/include || die
cd 3rdParty || die
# TODO CppUnit, Lua
rm -rf Boost CAres DocBook Expat LCov LibIDN OpenSSL SCons SQLite ZLib || die
cd .. || die
for x in ${LANGS}; do
if use !linguas_${x}; then
rm -f Swift/Translations/swift_${x}.ts || die
fi
done
# Richard H. <chain@rpgfiction.net> (2012-03-29): SCons ignores us,
# just delete unneeded stuff!
if use !avahi; then
rm -rf Slumber || die
fi
if use !examples; then
rm -rf Documentation/SwiftenDevelopersGuide/Examples \
Limber \
Slimber \
Sluift \
Swiften/Examples \
Swiften/QA \
Swiftob || die
fi
if use !qt4; then
rm -rf Swift || die
fi
sed -i BuildTools/SCons/Tools/qt4.py \
-e "s/linux2/linux${KV_MAJOR}/" \
|| die
}
src_compile() {
set_scons_targets
set_scons_vars
escons "${scons_vars[@]}" "${scons_targets[@]}"
}
src_test() {
set_scons_targets
set_scons_vars
escons "${scons_vars[@]}" test=unit QA
}
src_install() {
set_scons_targets
set_scons_vars
escons "${scons_vars[@]}" SWIFT_INSTALLDIR="${D}/usr" SWIFTEN_INSTALLDIR="${D}/usr" "${D}" "${scons_targets[@]}"
if use avahi ; then
newbin Slimber/Qt/slimber slimber-qt
newbin Slimber/CLI/slimber slimber-cli
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
dobin Swiften/Config/swiften-config
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 avahi && 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"
}