diff --git a/common/shlibs b/common/shlibs
index a9476086971..e8e08c6b8ac 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -2354,3 +2354,5 @@ libfilezilla.so.0 libfilezilla-0.3.1_1
 libtommath.so.1 libtommath-1.0_1
 libunicorn.so.0 unicorn-0.9_1
 libglyphy.so.0 glyphy-0.0.20160104_1
+libpodofo.so.0.9.3 podofo-0.9.3_1
+libSwiften.so.0 swiften-2.0_1
diff --git a/srcpkgs/swiften-devel b/srcpkgs/swiften-devel
new file mode 120000
index 00000000000..5c2f358cdc5
--- /dev/null
+++ b/srcpkgs/swiften-devel
@@ -0,0 +1 @@
+swiften
\ No newline at end of file
diff --git a/srcpkgs/swiften/patches/add-boost-optional.patch b/srcpkgs/swiften/patches/add-boost-optional.patch
new file mode 100644
index 00000000000..c6a0fc996ad
--- /dev/null
+++ b/srcpkgs/swiften/patches/add-boost-optional.patch
@@ -0,0 +1,22 @@
+--- Swiften/Serializer/StreamResumeSerializer.cpp
++++ Swiften/Serializer/StreamResumeSerializer.cpp
+@@ -22,7 +22,7 @@
+ 	XMLElement element("resume", "urn:xmpp:sm:2");
+ 	element.setAttribute("previd", e->getResumeID());
+ 	if (e->getHandledStanzasCount()) {
+-		element.setAttribute("h", boost::lexical_cast<std::string>(e->getHandledStanzasCount()));
++		element.setAttribute("h", boost::lexical_cast<std::string>(e->getHandledStanzasCount().get()));
+ 	}
+ 	return createSafeByteArray(element.serialize());
+ }
+--- Swiften/Serializer/StreamResumedSerializer.cpp
++++ Swiften/Serializer/StreamResumedSerializer.cpp
+@@ -22,7 +22,7 @@
+ 	XMLElement element("resumed", "urn:xmpp:sm:2");
+ 	element.setAttribute("previd", e->getResumeID());
+ 	if (e->getHandledStanzasCount()) {
+-		element.setAttribute("h", boost::lexical_cast<std::string>(e->getHandledStanzasCount()));
++		element.setAttribute("h", boost::lexical_cast<std::string>(e->getHandledStanzasCount().get()));
+ 	}
+ 	return createSafeByteArray(element.serialize());
+ }
diff --git a/srcpkgs/swiften/patches/fix-missing-include.patch b/srcpkgs/swiften/patches/fix-missing-include.patch
new file mode 100644
index 00000000000..de65724fe5e
--- /dev/null
+++ b/srcpkgs/swiften/patches/fix-missing-include.patch
@@ -0,0 +1,13 @@
+diff --git Swiften/Base/Algorithm.h Swiften/Base/Algorithm.h
+index 4e68e70..0382a63 100644
+--- Swiften/Base/Algorithm.h
++++ Swiften/Base/Algorithm.h
+@@ -10,6 +10,7 @@
+ #include <list>
+ #include <map>
+ #include <algorithm>
++#include <string>
+ 
+ namespace Swift {
+ 
+
diff --git a/srcpkgs/swiften/patches/fix-missing-lockguard-include.patch b/srcpkgs/swiften/patches/fix-missing-lockguard-include.patch
new file mode 100644
index 00000000000..eab42f462e4
--- /dev/null
+++ b/srcpkgs/swiften/patches/fix-missing-lockguard-include.patch
@@ -0,0 +1,12 @@
+diff --git Swiften/EventLoop/EventLoop.cpp Swiften/EventLoop/EventLoop.cpp
+index afb6858..507de0b 100644
+--- Swiften/EventLoop/EventLoop.cpp
++++ Swiften/EventLoop/EventLoop.cpp
+@@ -8,6 +8,7 @@
+ 
+ #include <algorithm>
+ #include <boost/bind.hpp>
++#include <boost/thread/locks.hpp>
+ #include <iostream>
+ #include <cassert>
+
diff --git a/srcpkgs/swiften/template b/srcpkgs/swiften/template
new file mode 100644
index 00000000000..a164ed0df55
--- /dev/null
+++ b/srcpkgs/swiften/template
@@ -0,0 +1,49 @@
+# Template file for 'swiften'
+pkgname=swiften
+version=2.0
+revision=1
+build_style=scons
+hostmakedepends="scons"
+makedepends="boost-devel libressl-devel libxml2-devel libidn-devel"
+short_desc="XMPP library for C++"
+maintainer="John Regan <john@jrjrtech.com>"
+license="GPL-3"
+homepage="http://swift.im/"
+distfiles="http://swift.im/git/swift/snapshot/swift-${version}.tar.bz2"
+checksum=4de4255e6981de031d4d8df4bd1f838222c9eb0f7c778f31963a9a7e93098ebb
+wrksrc="swift-${version}"
+make_build_targets="Swiften"
+
+CXXFLAGS="-I${XBPS_CROSS_BASE}/usr/include/libxml2 -DBOOST_FILESYSTEM_VERSION=3 -DBOOST_SIGNALS_NO_DEPRECATION_WARNING=1"
+_scons_options="assertions=1 build_examples=1 max_jobs=1 optimize=1 debug=0 swiften_dll=1"
+
+do_build() {
+	scons \
+	  cc="${CC}" \
+	  cxx="${CXX}" \
+	  linkflags="${LDFLAGS}" \
+	  ccflags="${CXXFLAGS}" \
+	  ${_scons_options} \
+	  ${make_build_targets}
+}
+
+do_install() {
+	scons \
+	  cc="${CC}" \
+	  cxx="${CXX}" \
+	  linkflags="${LDFLAGS}" \
+	  ccflags="${CXXFLAGS}" \
+	  ${_scons_options} \
+	  SWIFTEN_INSTALLDIR="${DESTDIR}/usr" \
+	  "${DESTDIR}/usr"
+}
+
+swiften-devel_package() {
+	short_desc+=" - development files"
+	depends="${sourcepkg}>=${version}_${revision}"
+	pkg_install() {
+		vmove usr/bin
+		vmove usr/include
+		vmove usr/lib/*.so
+	}
+}