-
Notifications
You must be signed in to change notification settings - Fork 0
/
jhbuildrc-meego
79 lines (65 loc) · 2.76 KB
/
jhbuildrc-meego
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
74
75
76
77
78
79
# -*- mode: python -*-
#
# jhbuildrc for building MeeGo. 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_MOBLIN2 - Do not edit this line (or anything else)
# use local copies of modulesets from jhbuild installation
use_local_modulesets = True
# Only rebuild modules that have changed
build_policy = 'updated'
modules = [ 'meta-meego-netbook' ]
moduleset = 'http://meego.gitorious.org/meego-netbook-ux/meego-jhbuild-netbook/blobs/raw/master/build/meego.modules'
# what directory should the source be checked out to?
checkoutroot = os.path.expanduser(os.path.join('~', 'meego', 'source'))
# the prefix to configure/install modules to (must have write access)
prefix = os.path.expanduser(os.path.join('~', 'meego', 'install'))
autogenargs='--enable-introspection'
################ load custom rc
# 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-meego-custom')
if os.path.exists(_userrc):
execfile(_userrc)
################ load custom rc before this point
# Use system libraries for the builds
addpath('PKG_CONFIG_PATH', prefix + '/install/lib/pkgconfig')
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'))
# Add GI typelibs
os.environ['GI_TYPELIB_PATH'] = prefix + '/share/gir-1.0/'
# 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)
# Use the standard system bus
os.environ['DBUS_SYSTEM_BUS_ADDRESS'] = 'unix:path=/var/run/dbus/system_bus_socket'