mirror of
https://github.com/facebook/proxygen.git
synced 2025-08-07 07:02:53 +03:00
fix Watchman build on FreeBSD
Summary: Watchman advertises support for FreeBSD but it's regressed a couple ways. Ensure it builds on FreeBSD again with a Vagrantfile. Reviewed By: ahornby Differential Revision: D33989289 fbshipit-source-id: ff906bc219974bafbc349740ce6bddfe5bd2908f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
5cd35796ba
commit
ef5c19e127
@@ -173,19 +173,28 @@ class MakeBuilder(BuilderBase):
|
|||||||
self.install_args = install_args or []
|
self.install_args = install_args or []
|
||||||
self.test_args = test_args
|
self.test_args = test_args
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _make_binary(self):
|
||||||
|
return self.manifest.get("build", "make_binary", "make", ctx=self.ctx)
|
||||||
|
|
||||||
def _get_prefix(self):
|
def _get_prefix(self):
|
||||||
return ["PREFIX=" + self.inst_dir, "prefix=" + self.inst_dir]
|
return ["PREFIX=" + self.inst_dir, "prefix=" + self.inst_dir]
|
||||||
|
|
||||||
def _build(self, install_dirs, reconfigure):
|
def _build(self, install_dirs, reconfigure):
|
||||||
|
|
||||||
env = self._compute_env(install_dirs)
|
env = self._compute_env(install_dirs)
|
||||||
|
|
||||||
# Need to ensure that PREFIX is set prior to install because
|
# Need to ensure that PREFIX is set prior to install because
|
||||||
# libbpf uses it when generating its pkg-config file.
|
# libbpf uses it when generating its pkg-config file.
|
||||||
# The lowercase prefix is used by some projects.
|
# The lowercase prefix is used by some projects.
|
||||||
cmd = ["make", "-j%s" % self.num_jobs] + self.build_args + self._get_prefix()
|
cmd = (
|
||||||
|
[self._make_binary, "-j%s" % self.num_jobs]
|
||||||
|
+ self.build_args
|
||||||
|
+ self._get_prefix()
|
||||||
|
)
|
||||||
self._run_cmd(cmd, env=env)
|
self._run_cmd(cmd, env=env)
|
||||||
|
|
||||||
install_cmd = ["make"] + self.install_args + self._get_prefix()
|
install_cmd = [self._make_binary] + self.install_args + self._get_prefix()
|
||||||
self._run_cmd(install_cmd, env=env)
|
self._run_cmd(install_cmd, env=env)
|
||||||
|
|
||||||
def run_tests(
|
def run_tests(
|
||||||
@@ -196,7 +205,7 @@ class MakeBuilder(BuilderBase):
|
|||||||
|
|
||||||
env = self._compute_env(install_dirs)
|
env = self._compute_env(install_dirs)
|
||||||
|
|
||||||
cmd = ["make"] + self.test_args + self._get_prefix()
|
cmd = [self._make_binary] + self.test_args + self._get_prefix()
|
||||||
self._run_cmd(cmd, env=env)
|
self._run_cmd(cmd, env=env)
|
||||||
|
|
||||||
|
|
||||||
@@ -230,6 +239,10 @@ class AutoconfBuilder(BuilderBase):
|
|||||||
self.args = args or []
|
self.args = args or []
|
||||||
self.conf_env_args = conf_env_args or {}
|
self.conf_env_args = conf_env_args or {}
|
||||||
|
|
||||||
|
@property
|
||||||
|
def _make_binary(self):
|
||||||
|
return self.manifest.get("build", "make_binary", "make", ctx=self.ctx)
|
||||||
|
|
||||||
def _build(self, install_dirs, reconfigure):
|
def _build(self, install_dirs, reconfigure):
|
||||||
configure_path = os.path.join(self.src_dir, "configure")
|
configure_path = os.path.join(self.src_dir, "configure")
|
||||||
autogen_path = os.path.join(self.src_dir, "autogen.sh")
|
autogen_path = os.path.join(self.src_dir, "autogen.sh")
|
||||||
@@ -264,8 +277,8 @@ class AutoconfBuilder(BuilderBase):
|
|||||||
self._run_cmd(["autoreconf", "-ivf"], cwd=self.src_dir, env=env)
|
self._run_cmd(["autoreconf", "-ivf"], cwd=self.src_dir, env=env)
|
||||||
configure_cmd = [configure_path, "--prefix=" + self.inst_dir] + self.args
|
configure_cmd = [configure_path, "--prefix=" + self.inst_dir] + self.args
|
||||||
self._run_cmd(configure_cmd, env=env)
|
self._run_cmd(configure_cmd, env=env)
|
||||||
self._run_cmd(["make", "-j%s" % self.num_jobs], env=env)
|
self._run_cmd([self._make_binary, "-j%s" % self.num_jobs], env=env)
|
||||||
self._run_cmd(["make", "install"], env=env)
|
self._run_cmd([self._make_binary, "install"], env=env)
|
||||||
|
|
||||||
|
|
||||||
class Iproute2Builder(BuilderBase):
|
class Iproute2Builder(BuilderBase):
|
||||||
|
@@ -63,6 +63,7 @@ SCHEMA = {
|
|||||||
"fields": {
|
"fields": {
|
||||||
"builder": REQUIRED,
|
"builder": REQUIRED,
|
||||||
"subdir": OPTIONAL,
|
"subdir": OPTIONAL,
|
||||||
|
"make_binary": OPTIONAL,
|
||||||
"build_in_src_dir": OPTIONAL,
|
"build_in_src_dir": OPTIONAL,
|
||||||
"job_weight_mib": OPTIONAL,
|
"job_weight_mib": OPTIONAL,
|
||||||
},
|
},
|
||||||
|
@@ -22,6 +22,10 @@ sha256 = 3dc27a16c21b717bcc5de8590b564d4392a0b8577170c058729d067d95ded825
|
|||||||
builder = autoconf
|
builder = autoconf
|
||||||
subdir = flex-2.6.4
|
subdir = flex-2.6.4
|
||||||
|
|
||||||
|
[build.os=freebsd]
|
||||||
|
builder = autoconf
|
||||||
|
make_binary = gmake
|
||||||
|
|
||||||
[build.os=windows]
|
[build.os=windows]
|
||||||
builder = nop
|
builder = nop
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user