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): ...@@ -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 [ return [
self.run(ShellQuoted( self.run(ShellQuoted(
'LDFLAGS="$LDFLAGS -L"{p}"/lib -Wl,-rpath="{p}"/lib" ' 'LDFLAGS="$LDFLAGS -L"{p}"/lib -Wl,-rpath="{p}"/lib" '
'CFLAGS="$CFLAGS -I"{p}"/include" ' 'CFLAGS="$CFLAGS -I"{p}"/include" '
'CPPFLAGS="$CPPFLAGS -I"{p}"/include" ' 'CPPFLAGS="$CPPFLAGS -I"{p}"/include" '
'PY_PREFIX={p} ' 'PY_PREFIX={p} '
'./configure --prefix={p}' './configure --prefix={p} {args}'
).format(p=self.option('prefix'))), ).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): def autoconf_install(self, name):
......
...@@ -8,13 +8,14 @@ from shell_quoting import ShellQuoted ...@@ -8,13 +8,14 @@ from shell_quoting import ShellQuoted
def fbcode_builder_spec(builder): def fbcode_builder_spec(builder):
builder.add_option(
'hyperic/sigar:autoconf_options', {'CFLAGS' : '-fgnu89-inline'})
return { return {
'steps': [ 'steps': [
builder.github_project_workdir('hyperic/sigar', '.'), builder.github_project_workdir('hyperic/sigar', '.'),
builder.step('Build and install sigar', [ builder.step('Build and install sigar', [
builder.run(ShellQuoted('./autogen.sh')), builder.run(ShellQuoted('./autogen.sh')),
builder.run(ShellQuoted('CFLAGS="$CFLAGS -fgnu89-inline"')), builder.configure('hyperic/sigar'),
builder.configure(),
builder.make_and_install(), 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