summaryrefslogtreecommitdiff
path: root/build-aux/jhbuildrc-clutter
blob: 144c7856bf5eab870c64890bb69ea41a746ab28f (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
64
65
66
67
68
69
70
71
72
73
# -*- mode: python -*-
#
# jhbuildrc for building Clutter. Customizations shuld be done in
# ~/.jhbuildrc-custom
#
# Copyright (C) Intel Corp.
#
# Based on the gnome-shell variant
#
# Copyright (C) 2008 Red Hat, Inc.
#
# Some ideas and a bit of code taken from gtk-osx-build
#
# Copyright (C) 2006, 2007, 2008 Imendio AB
#
# Use .jhbuildrc-custom to override the moduleset, modules to build,
# the source checkout location, installation prefix, or svn usernames
# etc.
#
# JHBUILDRC_CLUTTER - Do not edit this line (or anything else)

# Only rebuild modules that have changed
build_policy = 'updated'

moduleset = 'https://git.gnome.org/browse/clutter/plain/build-aux/clutter.modules'

modules = [ 'meta-clutter' ]

# what directory should the source be checked out to?
checkoutroot = os.path.expanduser('~/clutter/source')

# the prefix to configure/install modules to (must have write access)
prefix = os.path.expanduser('~/clutter/install')

# Use system libraries for the builds
#addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'lib', 'pkgconfig'))
#addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', 'share', 'pkgconfig'))

# Look in /usr/share for icons, D-BUS service files, etc
addpath('XDG_DATA_DIRS', os.path.join(os.sep, 'usr', 'share'))
# Look in /etc/xdg for system-global autostart files
addpath('XDG_CONFIG_DIRS', os.path.join(os.sep, 'etc', 'xdg'))

#
# For Ubuntu Intrepid, libmozjs lives in /usr/lib/xulrunner-<version>
# However, that path isn't in ld.so.conf, meaning that it's basically
# impossible to use the xulrunner .pc files and libraries. Work around
# this by deriving the path and adding it to LD_LIBRARY_PATH ourself.
#
import re
import subprocess
_pkgconfig = subprocess.Popen(['pkg-config', '--variable=sdkdir', 'mozilla-js'],
                              stdout=subprocess.PIPE)
_sdkdir = _pkgconfig.communicate()[0].strip()
_pkgconfig.wait()
if _pkgconfig.returncode == 0:
    _libdir = re.sub('-(sdk|devel)', '', _sdkdir)
    if os.path.exists(_libdir + '/libmozjs.so'):
        addpath('LD_LIBRARY_PATH', _libdir)

# Rebuild faster
os.environ['INSTALL'] = os.path.expanduser('~/bin/install-check')

# Use the standard system bus
os.environ['DBUS_SYSTEM_BUS_ADDRESS'] = 'unix:path=/var/run/dbus/system_bus_socket'

# Import optional user RC for further customization. You can override
# the prefix or default build setup for example, or CFLAGS or
# module_autogenargs, etc.
#
_userrc = os.path.join(os.environ['HOME'], '.jhbuildrc-custom')
if os.path.exists(_userrc):
    execfile(_userrc)