swiften: update to 4.0.3.

This commit is contained in:
Đoàn Trần Công Danh 2020-10-21 23:00:48 +07:00
parent 5be88dc498
commit b1e7dbd715
2 changed files with 50 additions and 12 deletions

View file

@ -0,0 +1,10 @@
--- Swiften/Network/PlatformNATTraversalWorker.cpp.orig 2020-10-24 22:55:12.152288582 +0700
+++ 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>

View file

@ -1,16 +1,17 @@
# Template file for 'swiften'
pkgname=swiften
version=3.0
revision=14
version=4.0.3
revision=1
wrksrc="swift-${version}"
build_style=scons
makedepends="boost-devel libressl-devel libxml2-devel libidn-devel"
hostmakedepends="scons pkg-config"
makedepends="boost-devel libressl-devel libxml2-devel libidn-devel
lua51-devel miniupnpc-devel sqlite-devel"
short_desc="XMPP library for C++"
maintainer="John Regan <john@jrjrtech.com>"
license="GPL-3"
license="GPL-3.0-only"
homepage="http://swift.im/"
distfiles="http://swift.im/git/swift/snapshot/swift-${version}.tar.bz2"
checksum=2e48f081d337f471b4eba7c0c807a7b640216a76ed3568ced55abb5b927c7fd2
checksum=6a3f93e807afb51f1b8ab6ec8fef379dfcc50ba71fef6abeee7c123348da66b0
if [ "$XBPS_TARGET_LIBC" = "musl" ]; then
makedepends+=" musl-legacy-compat"
@ -24,13 +25,36 @@ case "$XBPS_TARGET_MACHINE" in
ppc*) CXXFLAGS+=" -fPIC";;
esac
post_patch() {
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/Lua/src
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&," \
BuildTools/SCons/SConstruct
fi
}
do_build() {
case "$XBPS_TARGET_MACHINE" in
armv6*) sed -i 3rdParty/Boost/src/libs/atomic/src/lockpool.cpp \
-e "s;BOOST_ATOMIC_THREAD_FENCE > 0;0;" \
-e "s;BOOST_ATOMIC_SIGNAL_FENCE > 0;0;"
;;
esac
for _llib in $($PKG_CONFIG --libs lua)
do
if [[ "$_llib" = -llua* ]]; then
lua_libname=${_llib#-l}
vsed -i -e "
/lua_libname/s/\"lua\"/\"$lua_libname\"/
" BuildTools/SCons/SConscript.boot
fi
done
CXXFLAGS+=" $($PKG_CONFIG --cflags lua)"
scons \
cc="${CC}" \
cxx="${CXX}" \
@ -41,6 +65,7 @@ do_build() {
}
do_install() {
CXXFLAGS+=" $($PKG_CONFIG --cflags lua)"
scons \
cc="${CC}" \
cxx="${CXX}" \
@ -49,6 +74,9 @@ do_install() {
${_scons_options} \
SWIFTEN_INSTALLDIR="${DESTDIR}/usr" \
"${DESTDIR}/usr"
# bundled 3rd party BSD-3-Clause
vlicense 3rdParty/LibNATPMP/src/libnatpmp/LICENSE
}
swiften-devel_package() {