Mercurial > audlegacy-plugins
annotate src/daap/xmms2-daap/wscript @ 2143:4610f14103e4
fixed some memory leaks and dangling file descriptor pointers in the aac/mp4 plugin
author | Ben Tucker <ben.tucker@gmail.com> |
---|---|
date | Sun, 28 Oct 2007 16:31:12 -0700 |
parents | 776dd8fc2b38 |
children |
rev | line source |
---|---|
1407
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
1 from waftools.plugin import plugin |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
2 from Params import g_platform |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
3 |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
4 def plugin_configure(conf): |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
5 # Set the default fallthrough, if no "intelligent" backend is found. |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
6 conf.env['XMMS_DAAP_BACKEND'] = 'dummy' |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
7 |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
8 # First look for Avahi mdns support |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
9 if (conf.check_pkg("avahi-glib", destvar='avahiglib') and |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
10 conf.check_pkg("avahi-client", destvar='avahiclient')): |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
11 # Avahi found |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
12 conf.env['XMMS_DAAP_BACKEND'] = 'avahi' |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
13 elif conf.check_header('dns_sd.h'): |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
14 # We might have dnssd support. If we're not on OSX, check for the |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
15 # presence of the lib. |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
16 if g_platform == 'darwin': |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
17 conf.env['XMMS_DAAP_BACKEND'] = 'dnssd' |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
18 elif conf.check_library2('dns_sd', uselib='dnssd', mandatory=0): |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
19 conf.env['XMMS_DAAP_BACKEND'] = 'dnssd' |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
20 return True |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
21 |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
22 def plugin_build(bld, obj): |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
23 daap_backend = bld.env_of_name('default')['XMMS_DAAP_BACKEND'] |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
24 obj.source.append("daap_mdns_%s.c" % daap_backend) |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
25 if daap_backend == 'avahi': |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
26 obj.uselib += ' avahiglib avahiclient' |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
27 elif daap_backend == 'dnssd': |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
28 obj.uselib += ' dnssd' |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
29 if g_platform == 'win32': |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
30 obj.uselib += ' socket' |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
31 |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
32 configure, build = plugin('daap', configure=plugin_configure, |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
33 extra_libs=['curl'], build=plugin_build, |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
34 source="""daap_xform.c daap_cmd.c daap_conn.c |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
35 daap_util.c daap_md5.c cc_handlers.c |
776dd8fc2b38
DAAP plugin (work in progress)
Cristi Magherusan <majeru@atheme-project.org>
parents:
diff
changeset
|
36 """.split()) |