summaryrefslogtreecommitdiff
path: root/packages/net-im/swiften/swiften.exlib
blob: c96228f35ff41c56967565fab053a57696684a31 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Distributed under the terms of the GNU General Public License v2
# Copyright 2018 Gluzskiy Alexandr <sss@sss.chaoslab.ru>

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[@]}