mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-04 02:52:58 +02:00
swiften: use vendored Boost
Because of old Boost.Asio usage
This commit is contained in:
parent
e0f0b1ec89
commit
c2115eb673
4 changed files with 13 additions and 81 deletions
|
@ -1,42 +0,0 @@
|
|||
--- a/Swiften/Component/CoreComponent.cpp
|
||||
+++ b/Swiften/Component/CoreComponent.cpp
|
||||
@@ -19,12 +19,26 @@
|
||||
#include <Swiften/TLS/PKCS12Certificate.h>
|
||||
#include <Swiften/TLS/TLSOptions.h>
|
||||
|
||||
+
|
||||
namespace Swift {
|
||||
|
||||
+namespace {
|
||||
+
|
||||
+void CoreComponent_onMessageReceived(CoreComponent *self, std::shared_ptr<Message> msg)
|
||||
+{
|
||||
+ self->onMessageReceived(msg);
|
||||
+}
|
||||
+
|
||||
+void CoreComponent_onPresenceReceived(CoreComponent *self, std::shared_ptr<Presence> p)
|
||||
+{
|
||||
+ self->onPresenceReceived(p);
|
||||
+}
|
||||
+}
|
||||
+
|
||||
CoreComponent::CoreComponent(const JID& jid, const std::string& secret, NetworkFactories* networkFactories) : networkFactories(networkFactories), jid_(jid), secret_(secret), disconnectRequested_(false) {
|
||||
stanzaChannel_ = new ComponentSessionStanzaChannel();
|
||||
- stanzaChannel_->onMessageReceived.connect(boost::ref(onMessageReceived));
|
||||
- stanzaChannel_->onPresenceReceived.connect(boost::ref(onPresenceReceived));
|
||||
+ stanzaChannel_->onMessageReceived.connect(boost::bind(&CoreComponent_onMessageReceived, this, _1));
|
||||
+ stanzaChannel_->onPresenceReceived.connect(boost::bind(&CoreComponent_onPresenceReceived, this, _1));
|
||||
stanzaChannel_->onAvailableChanged.connect(boost::bind(&CoreComponent::handleStanzaChannelAvailableChanged, this, _1));
|
||||
|
||||
iqRouter_ = new IQRouter(stanzaChannel_);
|
||||
@@ -38,8 +52,8 @@ CoreComponent::~CoreComponent() {
|
||||
delete iqRouter_;
|
||||
|
||||
stanzaChannel_->onAvailableChanged.disconnect(boost::bind(&CoreComponent::handleStanzaChannelAvailableChanged, this, _1));
|
||||
- stanzaChannel_->onMessageReceived.disconnect(boost::ref(onMessageReceived));
|
||||
- stanzaChannel_->onPresenceReceived.disconnect(boost::ref(onPresenceReceived));
|
||||
+ stanzaChannel_->onMessageReceived.disconnect(boost::bind(&CoreComponent_onMessageReceived, this, _1));
|
||||
+ stanzaChannel_->onPresenceReceived.disconnect(boost::bind(&CoreComponent_onPresenceReceived, this, _1));
|
||||
delete stanzaChannel_;
|
||||
}
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
--- a/Swiften/Base/Platform.h
|
||||
+++ b/Swiften/Base/Platform.h
|
||||
@@ -43,9 +43,9 @@
|
||||
#endif
|
||||
|
||||
// Endianness
|
||||
-#include <boost/detail/endian.hpp>
|
||||
-#if defined(BOOST_LITTLE_ENDIAN)
|
||||
+#include <boost/predef/other/endian.h>
|
||||
+#if BOOST_ENDIAN_LITTLE_BYTE
|
||||
#define SWIFTEN_LITTLE_ENDIAN
|
||||
-#elif defined(BOOST_BIG_ENDIAN)
|
||||
+#elif BOOST_ENDIAN_BIG_BYTE
|
||||
#define SWIFTEN_BIG_ENDIAN
|
||||
#endif
|
|
@ -1,10 +0,0 @@
|
|||
--- a/Swiften/Network/PlatformNATTraversalWorker.cpp 2020-10-24 22:55:12.152288582 +0700
|
||||
+++ b/Swiften/Network/PlatformNATTraversalWorker.cpp 2020-10-24 22:55:31.022346592 +0700
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
#include <memory>
|
||||
|
||||
+#include <boost/logic/tribool_io.hpp>
|
||||
#include <boost/numeric/conversion/cast.hpp>
|
||||
|
||||
#include <Swiften/Base/Log.h>
|
|
@ -1,9 +1,10 @@
|
|||
# Template file for 'swiften'
|
||||
pkgname=swiften
|
||||
version=4.0.3
|
||||
revision=6
|
||||
hostmakedepends="scons pkg-config"
|
||||
makedepends="boost-devel openssl-devel libxml2-devel libidn-devel
|
||||
revision=7
|
||||
hostmakedepends="pkg-config python2"
|
||||
# Use old version of Boost.Asio
|
||||
makedepends="openssl-devel libxml2-devel libidn-devel libnatpmp-devel
|
||||
lua51-devel miniupnpc-devel sqlite-devel hunspell-devel"
|
||||
short_desc="XMPP library for C++"
|
||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||
|
@ -24,21 +25,19 @@ case "$XBPS_TARGET_MACHINE" in
|
|||
ppc*) CXXFLAGS+=" -fPIC";;
|
||||
esac
|
||||
|
||||
post_patch() {
|
||||
rm -rf 3rdParty/Boost/src
|
||||
pre_patch() {
|
||||
# Use old version of Boost.Asio
|
||||
# rm -rf 3rdParty/Boost/src
|
||||
rm -rf 3rdParty/Expat/src
|
||||
rm -rf 3rdParty/LibIDN/src
|
||||
rm -rf 3rdParty/LibMiniUPnPc/src
|
||||
# rm -rf 3rdParty/LibNATPMP/src
|
||||
rm -rf 3rdParty/LibNATPMP/src
|
||||
rm -rf 3rdParty/Lua/src
|
||||
rm -rf 3rdParty/SCons
|
||||
# rm -rf 3rdParty/SCons
|
||||
rm -rf 3rdParty/SQLite/sqlite*
|
||||
rm -rf 3rdParty/ZLib/src
|
||||
find . \( \
|
||||
-name '*.py' -o -name SConscript -o -name SConstruct \
|
||||
\) -exec 2to3 -w {} +
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
vsed -i -e "s,/usr/include,$XBPS_CROSS_BASE&," \
|
||||
sed -i -e "s,/usr/include,$XBPS_CROSS_BASE&," \
|
||||
BuildTools/SCons/SConstruct
|
||||
fi
|
||||
}
|
||||
|
@ -48,13 +47,13 @@ do_build() {
|
|||
do
|
||||
if [[ "$_llib" = -llua* ]]; then
|
||||
lua_libname=${_llib#-l}
|
||||
vsed -i -e "
|
||||
sed -i -e "
|
||||
/lua_libname/s/\"lua\"/\"$lua_libname\"/
|
||||
" BuildTools/SCons/SConscript.boot
|
||||
fi
|
||||
done
|
||||
CXXFLAGS+=" $($PKG_CONFIG --cflags lua)"
|
||||
scons \
|
||||
./scons \
|
||||
cc="${CC}" \
|
||||
cxx="${CXX}" \
|
||||
linkflags="${LDFLAGS}" \
|
||||
|
@ -65,7 +64,7 @@ do_build() {
|
|||
|
||||
do_install() {
|
||||
CXXFLAGS+=" $($PKG_CONFIG --cflags lua)"
|
||||
scons \
|
||||
./scons \
|
||||
cc="${CC}" \
|
||||
cxx="${CXX}" \
|
||||
linkflags="${LDFLAGS}" \
|
||||
|
|
Loading…
Add table
Reference in a new issue