Commit 7acadf6e authored by Mahesh Maddikayala's avatar Mahesh Maddikayala Committed by Facebook Github Bot

fix travis build failure for 'sigar' package

Summary: Added option to send parameters to 'configure' script from fbcode builder

Reviewed By: jstrizich

Differential Revision: D9004547

fbshipit-source-id: da54fa2dd453aab29051f37106423807a260535a
parent ff3c5f9c
......@@ -316,15 +316,26 @@ class FBCodeBuilder(object):
)),
]
def configure(self):
def configure(self, name=None):
autoconf_options = {}
if name is not None:
autoconf_options.update(
self.option('{0}:autoconf_options'.format(name), {})
)
return [
self.run(ShellQuoted(
'LDFLAGS="$LDFLAGS -L"{p}"/lib -Wl,-rpath="{p}"/lib" '
'CFLAGS="$CFLAGS -I"{p}"/include" '
'CPPFLAGS="$CPPFLAGS -I"{p}"/include" '
'PY_PREFIX={p} '
'./configure --prefix={p}'
).format(p=self.option('prefix'))),
'./configure --prefix={p} {args}'
).format(
p=self.option('prefix'),
args=shell_join(' ', (
ShellQuoted('{k}={v}').format(k=k, v=v)
for k, v in autoconf_options.items()
)),
)),
]
def autoconf_install(self, name):
......
......@@ -8,13 +8,14 @@ from shell_quoting import ShellQuoted
def fbcode_builder_spec(builder):
builder.add_option(
'hyperic/sigar:autoconf_options', {'CFLAGS' : '-fgnu89-inline'})
return {
'steps': [
builder.github_project_workdir('hyperic/sigar', '.'),
builder.step('Build and install sigar', [
builder.run(ShellQuoted('./autogen.sh')),
builder.run(ShellQuoted('CFLAGS="$CFLAGS -fgnu89-inline"')),
builder.configure(),
builder.configure('hyperic/sigar'),
builder.make_and_install(),
]),
],
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment