forked from vivienr/modulesets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jhbuildrc
128 lines (104 loc) · 4.36 KB
/
jhbuildrc
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# -*- mode: python -*-
# -*- coding: utf-8 -*-
import os
import sys
import glob
import getpass
import inspect
# edit this file to match your settings and copy or symlink it to ~/.config/jhbuildrc
# module directory
local_modulesets_dir = '~/modulesets'
# what module set should be used. The default can be found in
# jhbuild/defaults.jhbuildrc, but can be any file in the modulesets directory
# or a URL of a module set file on a web server.
moduleset = [ 'daswg', 'lsc', 'github', 'sourceforge', 'gnu', 'gnome', 'bitbucket', 'nds2', 'healpix', 'fftw' ]
moduleset = [os.path.expanduser(os.path.join(local_modulesets_dir, m + '.modules')) for m in moduleset]
# moduleset += ['bootstrap']
del m, local_modulesets_dir
#
# A list of the modules to build. Defaults to the GNOME core and tested apps.
modules = [ 'lalsuite', 'gstlal-all', 'bpython' ]
# what directory should the source be checked out to? ~/src
checkoutroot = '~/src'
# in what directory should out-of-srcdir builds be performed?
# Try, in the following order:
# /usr1/$USER/jhbuild
# /local/$USER/jhbuild
# /localscratch/$USER/jhbuild
# /var/tmp/$USER/jhbuild
_user = getpass.getuser()
buildroot = '/usr1/%s' % _user
if not os.path.isdir(buildroot):
buildroot = '/local/user/%s' % _user
if not os.path.isdir(buildroot):
buildroot = '/localscratch/%s' % _user
if not os.path.isdir(buildroot):
buildroot = '/Users/%s/Library/Caches' % _user
if not os.path.isdir(buildroot):
buildroot = '/var/tmp/%s' % _user
buildroot = os.path.join(buildroot, 'jhbuild')
# Put tarballs in build dir to save space in home directory
tarballdir = os.path.join(buildroot, 'downloads')
# Hack to support non-srcdir builds for projects in subdirectories of git repos
# See https://bugzilla.gnome.org/show_bug.cgi?id=689472
class _BuildDirPattern(object):
def __mod__(self, rhs):
parent_frame = inspect.currentframe().f_back
branch = parent_frame.f_locals['self'].branch
subdir = getattr(branch, 'subdir', None)
if subdir:
return os.path.join(rhs, subdir)
else:
return rhs
builddir_pattern = _BuildDirPattern()
del _BuildDirPattern
#
# directory for HTML build logs (run 'jhbuild tinderbox')
tinderbox_outputdir = os.path.join(buildroot, 'html')
# pretty prompt to tell user when they are in the JHBuild shell
os.environ['PS1'] = r'\[\033[0;34m\]JHBuild:\[\033[0;32m\]\h:\W \u $\[\033[0m\] '
# the prefix to configure/install modules to (must have write access)
prefix = '~/local'
# custom CFLAGS / environment pieces for the build
# os.environ['CFLAGS'] = '-Wall -g -O0'
# custom environment variables for Mac OS under MacPorts
if sys.platform == 'darwin' and os.path.isdir('/opt/local/share/macports'):
extra_prefixes.append('/opt/local')
# extra arguments to pass to all autogen.sh scripts
# to speed up builds of GNOME, try '--disable-static --disable-gtk-doc'
#autogenargs=''
# A string listing additional arguments to be passed to make.
# Set makeargs to 'V=1' for verbose build output.
#makeargs = ''
# Uncomment to use git-svn instead of svn.
# svn_program = 'git-svn'
# Set to true here or in ~/.config/*.jhbuildrc to select Intel C Compiler (icc) as the default compiler toolchain
icc = False
# The gstlal modules need these extra pkg-config paths to locate pygobject.
extra_pkg_config_path = '/opt/local/Library/Frameworks/Python.framework/Versions/Current/lib/pkgconfig'
if os.path.exists(extra_pkg_config_path):
addpath('PKG_CONFIG_PATH', extra_pkg_config_path)
del extra_pkg_config_path
# Execute other *.jhbuildrc files in the same directory as this script.
for _other_config in glob.iglob(os.path.join(os.path.dirname(__file__), "*.jhbuildrc")):
if not os.path.samefile(_other_config, __file__):
execfile(_other_config)
os.environ['CC'] = 'gcc'
os.environ['CXX'] = 'g++'
os.environ['FC'] = 'fc'
os.environ['MPICC'] = 'mpicc'
os.environ['MPICXX'] = 'mpicxx'
os.environ['MPIFC'] = 'mpifc'
if icc:
os.environ['CC'] = 'icc'
os.environ['CXX'] = 'icpc'
os.environ['FC'] = 'ifort'
os.environ['MPICC'] = 'mpiicc'
os.environ['MPICXX'] = 'mpiicpc'
os.environ['MPIFC'] = 'mpiifort'
os.environ['AR'] = 'xiar'
os.environ['CFLAGS'] = '-ipo -O3 -Wno-error -static-intel'
os.environ['CXXFLAGS'] = '-ipo -O3 -Wno-error -static-intel'
os.environ['LDSHARED'] = 'icc -pthread -shared'
# JHBuild doesn't want to see variables it doesn't recognize
del icc