# Distributed under the terms of the GNU General Public License v2 # Copyright 2018 Gluzskiy Alexandr SCM_REPOSITORY="git://swift.im/swift" SCM_BRANCH="swift-4.x" require scons scm-git export_exlib_phases src_prepare SUMMARY="Just a perfect C++ XMPP library" HOMEPAGE="http://swift.im/" SLOT="0" LICENCES="GPL-3" MYOPTIONS=" avahi ( providers: libressl openssl ) [[ number-selected = exactly-one ]] " DEPENDENCIES=" build+run: dev-libs/boost[>=1.65] net-dns/libidn[>=1.10] dev-libs/libxml2 dev-libs/expat net-libs/miniupnpc sys-libs/zlib avahi? ( net-dns/avahi ) providers:libressl? ( dev-libs/libressl:= ) providers:openssl? ( dev-libs/openssl ) " DEFAULT_SRC_PREPARE_PATCHES=( "${FILES}"/boost.patch ) swiften_src_prepare() { edo pushd 3rdParty edo rm -rf Boost CAres DocBook Expat LCov LibIDN OpenSSL SCons SQLite ZLib edo popd edo rm -rf Swiften/Examples default } BASE_OPTIONS=( cc=$(exhost --target)-cc cxx=$(exhost --target)-c++ ar=$(exhost --target)-ar ranlib=$(exhost --target)-ranlib Swiften ) SCONS_SRC_CONFIGURE_PARAMS=( allow_warnings=1 swiften_dll=1 ${BASE_OPTIONS[@]} ) SCONS_SRC_COMPILE_PARAMS=${BASE_OPTIONS[@]} SCONS_SRC_INSTALL_PARAMS=${BASE_OPTIONS[@]}