2008-10-31 01:25:28 -04:00
|
|
|
# -*- mode: python -*-
|
|
|
|
#
|
|
|
|
# jhbuildrc for building gnome-shell. Customizations shuld be done in
|
|
|
|
# ~/.jhbuildrc-custom
|
|
|
|
#
|
|
|
|
# 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_GNOME_SHELL - Do not edit this line (or anything else)
|
|
|
|
|
|
|
|
# Only rebuild modules that have changed
|
|
|
|
build_policy = 'updated'
|
|
|
|
|
2009-12-20 11:28:59 -05:00
|
|
|
moduleset = 'http://git.gnome.org/browse/gnome-shell/plain/tools/build/gnome-shell.modules'
|
2008-10-31 01:25:28 -04:00
|
|
|
|
2010-02-24 15:03:48 -05:00
|
|
|
modules = [ 'gnome-shell-using-gir-repository' ]
|
|
|
|
# Enable this one to use introspection built from the stack itself
|
|
|
|
# modules = [ 'gnome-shell-full' ]
|
2008-10-31 01:25:28 -04:00
|
|
|
|
|
|
|
# what directory should the source be checked out to?
|
|
|
|
checkoutroot = os.path.expanduser('~/gnome-shell/source')
|
|
|
|
|
|
|
|
# the prefix to configure/install modules to (must have write access)
|
|
|
|
prefix = os.path.expanduser('~/gnome-shell/install')
|
|
|
|
|
|
|
|
# Use system libraries for the builds
|
2009-03-10 16:25:53 -04:00
|
|
|
if use_lib64:
|
2009-03-17 16:09:06 -04:00
|
|
|
_libdir = 'lib64'
|
2009-03-10 16:25:53 -04:00
|
|
|
else:
|
2009-03-17 16:09:06 -04:00
|
|
|
_libdir = 'lib'
|
|
|
|
addpath('PKG_CONFIG_PATH', os.path.join(os.sep, 'usr', _libdir, 'pkgconfig'))
|
2008-10-31 01:25:28 -04:00
|
|
|
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', '/usr/share')
|
|
|
|
# Look in /etc/xdg for system-global autostart files
|
|
|
|
addpath('XDG_CONFIG_DIRS', '/etc/xdg')
|
|
|
|
|
2008-11-03 15:33:14 -05:00
|
|
|
#
|
2008-11-03 16:11:28 -05:00
|
|
|
# For Ubuntu Intrepid, libmozjs lives in /usr/lib/xulrunner-<version>
|
2008-11-03 15:33:14 -05:00
|
|
|
# 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
|
2008-11-03 16:11:28 -05:00
|
|
|
# this by deriving the path and adding it to LD_LIBRARY_PATH ourself.
|
2008-11-03 15:33:14 -05:00
|
|
|
#
|
|
|
|
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:
|
2008-11-03 16:11:28 -05:00
|
|
|
_libdir = re.sub('-(sdk|devel)', '', _sdkdir)
|
2008-11-03 15:33:14 -05:00
|
|
|
if os.path.exists(_libdir + '/libmozjs.so'):
|
|
|
|
addpath('LD_LIBRARY_PATH', _libdir)
|
|
|
|
|
2008-10-31 01:25:28 -04:00
|
|
|
# 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)
|
|
|
|
|