Files
@ 9937c35f50b3
Branch filter:
Location: portage-overlay.git/net-im/swift/swift-3.0.ebuild
9937c35f50b3
4.6 KiB
application/vnd.gentoo.ebuild
cleanup and bump net-im/swift
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 | # Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=6
LANGS="ca cs de en es fr gl he hu nl pl ru sk sv"
PYTHON_COMPAT=( python2_7 )
[[ ${PV} = *9999* ]] && VCS_ECLASS="git-r3" || VCS_ECLASS=""
inherit multilib toolchain-funcs linux-info python-any-r1 scons-utils ${VCS_ECLASS} 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"
EGIT_REPO_URI="https://github.com/swift/swift.git"
else
SRC_URI="https://swift.im/git/swift/snapshot/${MY_P}.tar.bz2"
#SRC_URI="https://github.com/swift/swift/archive/${MY_P}.tar.gz"
fi
LICENSE="GPL-3"
SLOT="0"
if [[ ${PV} == *9999* ]] ; then
KEYWORDS=""
else
KEYWORDS="~amd64 ~x86"
fi
IUSE="debug doc examples expat gconf hunspell icu idn qt4 scripting ssl static-libs tests zeroconf"
for x in ${LANGS}; do
IUSE="${IUSE} linguas_${x}"
done
RDEPEND="
>=dev-libs/boost-1.56.0
sys-libs/zlib
expat? ( >=dev-libs/expat-2.0.1 )
|| ( dev-libs/libxml2 )
gconf? ( gnome-base/gconf )
hunspell? ( app-text/hunspell )
icu? ( dev-libs/icu )
idn? ( >=net-dns/libidn-1.10 )
qt4? (
dev-qt/qtcore:4
dev-qt/qtwebkit:4
>=x11-libs/libXScrnSaver-1.2
)
ssl? ( >=dev-libs/openssl-0.9.8g )
scripting? ( dev-lang/lua )
zeroconf? ( net-dns/avahi )
"
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 doc && scons_targets+=( Documentation )
use examples && scons_targets+=(
Documentation/SwiftenDevelopersGuide/Examples
Swiften/Config
Swiften/Examples
SwifTools
)
use qt4 && scons_targets+=( Swift )
use scripting && scons_targets+=( Sluift )
use tests && scons_targets+=( Swiften/QA )
use zeroconf && scons_targets+=( Limber Slimber )
}
scons_vars=()
set_scons_vars() {
scons_vars=(
V=1
allow_warnings=1
cc="$(tc-getCC)"
cxx="$(tc-getCXX)"
ccflags="${CXXFLAGS}"
linkflags="${LDFLAGS}"
debug=$(usex debug)
doc=$(usex doc)
docbook_xsl="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets"
docbook_xml="${EPREFIX}/usr/share/sgml/docbook/xml-dtd-4.5"
hunspell_enable=$(usex hunspell)
icu=$(usex icu)
need_idn=$(usex idn)
openssl=$(usex ssl ${EPREFIX}/usr)
swiften_dll=$(usex !static-libs)
test=$(usex tests all none)
try_avahi=$(usex zeroconf)
try_expat=$(usex expat)
try_gconf=$(usex gconf)
try_libxml=$(usex !expat)
)
}
scons_install_vars=()
set_scons_install_vars() {
scons_install_vars=(
force-configure=0
SWIFTEN_INSTALLDIR="${ED}/usr"
)
use qt4 && scons_install_vars+=( SWIFT_INSTALLDIR="${ED}/usr" )
use scripting && scons_install_vars+=( SLUIFT_INSTALLDIR="${ED}/usr" )
}
src_prepare() {
# TODO drop this patch for >net-im/swift-4.0_beta2
# if [[ ${PV} != *9999* ]] ; then
# epatch "${FILESDIR}/scons-qtchooser-env.patch"
# fi
rm -fr 3rdParty || die
for x in ${LANGS}; do
if use !linguas_${x}; then
rm -f Swift/Translations/swift_${x}.ts || die
fi
done
if use !qt4; then
rm -rf Swift || die
fi
if use !scripting; then
rm -rf Sluift || die
fi
if use !zeroconf; then
rm -rf Limber Slimber || die
fi
eapply_user
}
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
set_scons_install_vars
escons "${scons_vars[@]}" \
"${scons_install_vars[@]}" \
"${ED}" "${scons_targets[@]}"
if use zeroconf; then
dobin Limber/limber
newbin Slimber/CLI/slimber slimber-cli
use qt4 && newbin Slimber/Qt/slimber slimber-qt
fi
if use tests; then
for i in ClientTest NetworkTest StorageTest TLSTest ; do
newbin "Swiften/QA/${i}/${i}" "${PN}-${i}"
done
newbin SwifTools/Idle/IdleQuerierTest/IdleQuerierTest ${PN}-IdleQuerierTest
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
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
fi
if use doc; then
dodoc "Documentation/SwiftenDevelopersGuide/Swiften Developers Guide.html"
dodoc "Documentation/SwiftUserGuide/Swift Users Guide.html"
fi
}
|