dvbapp : TranscodingSetup update
[vuplus_openembedded] / recipes / curl / curl-common.inc
1 DESCRIPTION = "Command line tool and library for client-side URL transfers."
2 LICENSE = "MIT"
3 SECTION = "console/network"
4
5 SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2;name=tarball \
6            file://pkgconfig_fix.patch;patch=1"
7 S = "${WORKDIR}/curl-${PV}"
8
9 INC_PR = "r3"
10
11 CURL_FEATURES ?= "zlib,gnutls,cookies,crypto-auth,dict,file,ftp,http,telnet,tftp"
12 # other allowed features: ipv6, ares, openssl
13
14 inherit autotools pkgconfig binconfig
15
16 EXTRA_OECONF = " \
17                 --without-libssh2 \
18                 --with-random=/dev/urandom \
19                 --without-libidn \
20                 "
21
22 python __anonymous() {
23         f = bb.data.getVar("CURL_FEATURES", d, True).split(",")
24         oeconf = bb.data.getVar("EXTRA_OECONF", d, False)
25         deps = bb.data.getVar("DEPENDS", d, False).split()
26         pn = bb.data.getVar("PN", d, True)
27         if "native" in pn:
28                 native = "-native"
29         else:
30                 native = ""
31         for x in [ 'cookies', 'crypto-auth', 'dict', 'file', 'ftp', 'http', 'telnet', 'tftp', 'ipv6' ]:
32                 if x in f:
33                         oeconf += " --enable-%s" % x
34                 else:
35                         oeconf += " --disable-%s" % x
36         if 'zlib' in f:
37                 oeconf += " --with-zlib=${STAGING_LIBDIR}/../"
38                 deps.append("zlib" + native)
39         else:
40                 oeconf += " --without-zlib"
41         if 'gnutls' in f:
42                 oeconf += " --with-gnutls=${STAGING_BINDIR_CROSS}"
43                 deps.append("gnutls" + native)
44         else:
45                 oeconf += " --without-gnutls"
46         if 'openssl' in f:
47                 oeconf += " --with-ssl=${STAGING_LIBDIR}/../"
48                 deps.append("openssl" + native)
49         else:
50                 oeconf += " --without-ssl"
51         if 'ares' in f:
52                 oeconf += " --enable-ares"
53                 deps.append("c-ares" + native)
54         else:
55                 oeconf += " --disable-ares"
56         bb.data.setVar('EXTRA_OECONF', oeconf, d)
57         bb.data.setVar('DEPENDS', " ".join(deps), d)
58 }
59
60 do_configure_prepend() {
61         sed -i s:OPT_GNUTLS/bin:OPT_GNUTLS:g configure.ac
62 }
63
64 do_stage () {
65         autotools_stage_all
66 }