summaryrefslogtreecommitdiff
path: root/exlibs/wafsamba.exlib
blob: 802d6acb18295a7fdb24be972d70b20bc95c5d9d (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
# Copyright 2011 Pierre Lejeune <superheron@gmail.com>
# Distributed under the terms of the GNU General Public License v2

myexparam wafdir='./'buildtools/bin

require waf [ waf_executable="python2 $(exparam wafdir)/waf" ]
require python [ blacklist='3' multibuild=false ]

export_exlib_phases src_prepare src_configure

DEPENDENCIES="
    build:
        app-text/docbook-xml-dtd:4.2
        app-text/docbook-xsl-stylesheets
        dev-libs/libxslt
"

EWAF_ENVIRONMENT=(
    PATH="$(exparam wafdir)${PATH+:}${PATH}"
    LD_LIBRARY_PATH="bin/default${LD_LIBRARY_PATH+:}${LD_LIBRARY_PATH}"
)

# You should add items to
# WAF_SRC_CONFIGURE_PARAMS using +=
WAF_SRC_CONFIGURE_PARAMS=(
    --bundled-libraries=NONE
    --mandir=/usr/share/man
    --infodir=/usr/share/info
    --docdir=/usr/share/doc/${PNVR}
    --localstatedir=/var
    --sysconfdir=/etc
    --disable-dependency-tracking
    --disable-rpath
    --disable-rpath-install
)

wafsamba_src_prepare() {
    default

    if test -f buildtools/wafadmin/Tools/config_c.py; then
        # use prefixed pkg-config
        edo sed -i \
            -e "s:pkg-config:$(exhost --tool-prefix)&:" \
            buildtools/wafadmin/Tools/config_c.py
    fi
}

wafsamba_src_configure() {
    PYTHONARCHDIR="$(python_get_sitedir)" \
        waf_src_configure
}