summaryrefslogtreecommitdiff
path: root/net-im/swiften
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2013-04-18 22:18:10 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2013-04-18 22:18:10 +0300
commit95882a0533f528a9dd389fbc8b30175d6e93c232 (patch)
treebc9f4b10572dead2b4eb1a91facccc4398fb4c81 /net-im/swiften
parentc209ec9643f759303847cadf19e3151a68df8cc3 (diff)
new file: net-im/swiften/files/swiften-libdir.patch
new file: net-im/swiften/swiften-2.0.ebuild
Diffstat (limited to 'net-im/swiften')
-rw-r--r--net-im/swiften/files/swiften-libdir.patch30
-rw-r--r--net-im/swiften/swiften-2.0.ebuild85
2 files changed, 115 insertions, 0 deletions
diff --git a/net-im/swiften/files/swiften-libdir.patch b/net-im/swiften/files/swiften-libdir.patch
new file mode 100644
index 0000000..0dc2af0
--- /dev/null
+++ b/net-im/swiften/files/swiften-libdir.patch
@@ -0,0 +1,30 @@
+diff --git a/Swiften/SConscript b/Swiften/SConscript
+index 379576d..7096a9c 100644
+--- a/Swiften/SConscript
++++ b/Swiften/SConscript
+@@ -425,8 +425,11 @@ if env["SCONS_STAGE"] == "build" :
+
+ # Install swiften
+ if swiften_env.get("SWIFTEN_INSTALLDIR", "") :
+- swiften_env.Install(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], "lib"), swiften_lib)
++ libdir = os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], "lib")
++ if swiften_env.get("SWIFTEN_LIBDIR", "") :
++ libdir = swiften_env["SWIFTEN_LIBDIR"]
++ swiften_env.Install(libdir, swiften_lib)
+ for alias in myenv["SWIFTEN_LIBRARY_ALIASES"] :
+- myenv.Command(myenv.File(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], "lib", alias)), [env.Value(swiften_lib[0].name), swiften_lib[0]], symlink)
++ myenv.Command(myenv.File(os.path.join(libdir, alias)), [env.Value(swiften_lib[0].name), swiften_lib[0]], symlink)
+ for include in swiften_includes :
+ swiften_env.Install(os.path.join(swiften_env["SWIFTEN_INSTALLDIR"], "include", os.path.dirname(include)), "#/" + include)
+
+--- a/BuildTools/SCons/SConscript.boot
++++ b/BuildTools/SCons/SConscript.boot
+@@ -220,7 +220,7 @@ env["TEST_CREATE_LIBRARIES"] = "create_test_libraries" in ARGUMENTS
+
+ # Packaging
+ env["DIST"] = "dist" in ARGUMENTS or env.GetOption("clean")
+-for path in ["SWIFT_INSTALLDIR", "SWIFTEN_INSTALLDIR"] :
++for path in ["SWIFT_INSTALLDIR", "SWIFTEN_INSTALLDIR", "SWIFTEN_LIBDIR"] :
+ if ARGUMENTS.get(path, "") :
+ if os.path.isabs(ARGUMENTS[path]) :
+ env[path] = Dir(ARGUMENTS[path]).abspath
diff --git a/net-im/swiften/swiften-2.0.ebuild b/net-im/swiften/swiften-2.0.ebuild
new file mode 100644
index 0000000..045fa54
--- /dev/null
+++ b/net-im/swiften/swiften-2.0.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+EAPI="4"
+SCONS_MIN_VERSION="1.2"
+LANGS=" ca de es fr hu nl pl ru se sk"
+
+[[ ${PV} = *9999* ]] && VCS_ECLASS="git-2" || VCS_ECLASS=""
+
+inherit scons-utils toolchain-funcs ${VCS_ECLASS}
+
+DESCRIPTION="Swiften is a robust, high-quality, standards-compliant, cross-platform, and performant C++ library for implementing XMPP applications. Swiften is used as the back-end library for the Swift IM client."
+HOMEPAGE="http://swift.im/"
+MY_P="swift-${PV}"
+S="${WORKDIR}/${MY_P}"
+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 -> ${P}.tar.gz"
+fi
+
+LICENSE="GPL-3"
+SLOT="0"
+if [[ ${PV} != *9999* ]]; then
+ KEYWORDS="~amd64 ~x86"
+else
+ KEYWORDS=""
+fi
+IUSE="avahi debug doc test"
+IUSE+="${LANGS// / linguas_}"
+
+RDEPEND="
+ avahi? ( net-dns/avahi )
+ >=dev-libs/boost-1.42
+ >=dev-libs/openssl-0.9.8g
+ >=net-dns/libidn-1.10
+ dev-libs/libxml2
+ >=dev-libs/expat-2.0.1
+ sys-libs/zlib
+"
+DEPEND="${RDEPEND}
+ doc? (
+ >=app-text/docbook-xsl-stylesheets-1.75
+ >=app-text/docbook-xml-dtd-4.5
+ dev-libs/libxslt
+ )
+"
+
+src_prepare() {
+ pushd 3rdParty || die
+ # TODO CppUnit, Lua
+ rm -rf Boost CAres DocBook Expat LCov LibIDN OpenSSL SCons SQLite ZLib || die
+ popd || die
+ epatch "${FILESDIR}"/*.patch
+}
+
+src_compile() {
+ scons_vars=(
+ cc="$(tc-getCC)"
+ cxx="$(tc-getCXX)"
+ ccflags="${CFLAGS}"
+ linkflags="${LDFLAGS}"
+ allow_warnings=1
+ ccache=1
+ distcc=1
+ $(use_scons debug)
+ openssl="${EPREFIX}/usr"
+ docbook_xsl="${EPREFIX}/usr/share/sgml/docbook/xsl-stylesheets"
+ docbook_xml="${EPREFIX}/usr/share/sgml/docbook/xml-dtd-4.5"
+ swiften_dll=1
+ Swiften
+ )
+
+ escons "${scons_vars[@]}"
+}
+
+src_test() {
+ escons "${scons_vars[@]}" test="unit" QA
+}
+
+src_install() {
+ escons "${scons_vars[@]}" SWIFTEN_INSTALLDIR="${ED}/usr" SWIFTEN_LIBDIR="${ED}/usr/$(get_libdir)" "${ED}/usr"
+ use doc && dohtml "Documentation/SwiftenDevelopersGuide/Swiften Developers Guide.html"
+} \ No newline at end of file