From 6e570b14162acad4add0f1ec87bbd44e389296a7 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Thu, 26 Jul 2018 11:26:17 +0300 Subject: swiften: build fix --- packages/net-im/swiften/files/ranlib.patch | 12 ++++++++++++ packages/net-im/swiften/files/sconstruct.patch | 13 +++++++++++++ packages/net-im/swiften/swiften.exlib | 26 +++++++++++++++++++------- 3 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 packages/net-im/swiften/files/ranlib.patch create mode 100644 packages/net-im/swiften/files/sconstruct.patch diff --git a/packages/net-im/swiften/files/ranlib.patch b/packages/net-im/swiften/files/ranlib.patch new file mode 100644 index 0000000..c5978e8 --- /dev/null +++ b/packages/net-im/swiften/files/ranlib.patch @@ -0,0 +1,12 @@ +diff --git a/BuildTools/SCons/SConscript.boot b/BuildTools/SCons/SConscript.boot +index 3b21dde88..a226432e4 100644 +--- a/BuildTools/SCons/SConscript.boot ++++ b/BuildTools/SCons/SConscript.boot +@@ -158,6 +158,7 @@ env["PLATFORM_FLAGS"] = { + "LIBS": [], + "FRAMEWORKS": [], + } ++env["RANLIB"] = "ranlib" + + # Default custom tools + env.Tool("Test", toolpath = ["#/BuildTools/SCons/Tools"]) diff --git a/packages/net-im/swiften/files/sconstruct.patch b/packages/net-im/swiften/files/sconstruct.patch new file mode 100644 index 0000000..963ffd1 --- /dev/null +++ b/packages/net-im/swiften/files/sconstruct.patch @@ -0,0 +1,13 @@ +diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct +index 6d63d5bcf..a2ad4fd7a 100644 +--- a/BuildTools/SCons/SConstruct ++++ b/BuildTools/SCons/SConstruct +@@ -242,7 +242,7 @@ elif not env.get("boost_bundled_enable", True) : + Exit(1) + else : + env["BOOST_BUNDLED"] = True +-boost_version = GetVersion(conf, "BOOST_VERSION", "boost/version.hpp") ++boost_version = 106500 + if boost_version == 106400 : + #Version 1.64 has some issues with the serialization of boost::optional, see https://svn.boost.org/trac10/ticket/13050 + env["BOOST_1_64_DETECTED"] = True diff --git a/packages/net-im/swiften/swiften.exlib b/packages/net-im/swiften/swiften.exlib index c96228f..20303be 100644 --- a/packages/net-im/swiften/swiften.exlib +++ b/packages/net-im/swiften/swiften.exlib @@ -6,7 +6,7 @@ SCM_BRANCH="swift-4.x" require scons scm-git -export_exlib_phases src_prepare +export_exlib_phases src_prepare src_install SUMMARY="Just a perfect C++ XMPP library" HOMEPAGE="http://swift.im/" @@ -29,11 +29,15 @@ DEPENDENCIES=" avahi? ( net-dns/avahi ) providers:libressl? ( dev-libs/libressl:= ) providers:openssl? ( dev-libs/openssl ) + build: + sys-apps/sed " DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/boost.patch + "${FILES}"/sconstruct.patch + "${FILES}"/ranlib.patch ) swiften_src_prepare() { @@ -42,22 +46,30 @@ swiften_src_prepare() { edo popd edo rm -rf Swiften/Examples default + edo sed -i -e "s/\"ranlib\"/\"$(exhost --target)-ranlib\"/g" BuildTools/SCons/SConscript.boot } BASE_OPTIONS=( cc=$(exhost --target)-cc cxx=$(exhost --target)-c++ ar=$(exhost --target)-ar - ranlib=$(exhost --target)-ranlib + link=$(exhost --target)-c++ + swiften_dll=1 + allow_warnings=1 + optimize=1 Swiften ) -SCONS_SRC_CONFIGURE_PARAMS=( - allow_warnings=1 - swiften_dll=1 - ${BASE_OPTIONS[@]} -) +SCONS_SRC_CONFIGURE_PARAMS=${BASE_OPTIONS[@]} SCONS_SRC_COMPILE_PARAMS=${BASE_OPTIONS[@]} SCONS_SRC_INSTALL_PARAMS=${BASE_OPTIONS[@]} + +swiften_src_install() { + escons --config=cache \ + ${SCONS_SRC_INSTALL_PARAMS[@]} \ + SWIFTEN_INSTALLDIR=${IMAGE}/usr/$(exhost --target) \ + SWIFTEN_LIBDIR=${IMAGE}/usr/$(exhost --target)/lib \ + ${IMAGE}/usr/$(exhost --target) +} -- cgit v1.2.3