Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--config/modules/system.json4
-rw-r--r--devbot/build.py18
-rw-r--r--devbot/config.py9
-rw-r--r--devbot/environ.py6
4 files changed, 27 insertions, 10 deletions
diff --git a/config/modules/system.json b/config/modules/system.json
index 42caff4..4e03d22 100644
--- a/config/modules/system.json
+++ b/config/modules/system.json
@@ -1,6 +1,7 @@
[
{
- "name": "node",
+ "name": "node",
+ "build-system": "node",
"options_ev": [
"'--prefix=%s' % prefix"
],
@@ -123,6 +124,7 @@
},
{
"name": "b2g",
+ "build-system": "mozilla",
"out-of-source": false,
"repo": "git://github.com/mozilla/mozilla-central.git"
}
diff --git a/devbot/build.py b/devbot/build.py
index d4ed2b6..318844a 100644
--- a/devbot/build.py
+++ b/devbot/build.py
@@ -166,6 +166,13 @@ def _build_autotools(module, log):
_builders["autotools"] = _build_autotools
+def _build_node(module, log):
+ command.run(["./configure", "--prefix", config.prefix_dir], log)
+ _build_autotools(module, log)
+
+_builders["node"] = _build_node
+
+
def _build_activity(module, log):
setup = os.path.join(module.get_source_dir(), "setup.py")
command.run([setup, "install", "--prefix", config.prefix_dir], log)
@@ -173,22 +180,25 @@ def _build_activity(module, log):
_builders["activity"] = _build_activity
-def _build_node(module, log):
+def _build_node_module(module, log):
command.run(["npm", "install", "-g"], log)
-_builders["node"] = _build_node
+_builders["nodemodule"] = _build_node_module
def _build_mozilla(module, log):
obj_dir = "obj-%s" % module.name
dist_bin_dir = os.path.join(obj_dir, "dist", "bin")
install_dir = os.path.join(config.lib_dir, module.name)
+ utils.ensure_dir(config.lib_dir)
+ utils.ensure_dir(install_dir)
+
with open("mozconfig", "w") as f:
f.write("ac_add_options --enable-application=%s\n" % module.name)
f.write("mk_add_options MOZ_OBJDIR=%s" % obj_dir)
- #command.run(["make", "-f", "client.mk"], log)
- command.run(["cp", "-vRL", "%s/" % dist_bin_dir, install_dir], log)
+ command.run(["make", "-f", "client.mk"], log)
+ command.run(["cp", "-vRL", "%s/." % dist_bin_dir, install_dir], log)
_builders["mozilla"] = _build_mozilla
diff --git a/devbot/config.py b/devbot/config.py
index be1809b..e47201c 100644
--- a/devbot/config.py
+++ b/devbot/config.py
@@ -44,6 +44,8 @@ class Module:
else:
self.out_of_source = info.get("out-of-source", True)
+ self._build_system = info.get("build-system", None)
+
def get_source_dir(self):
return os.path.join(get_source_dir(), self.name)
@@ -51,17 +53,18 @@ class Module:
return os.path.join(get_build_dir(), self.name)
def get_build_system(self):
+ if self._build_system:
+ return self._build_system
+
source_dir = self.get_source_dir()
if os.path.exists(os.path.join(source_dir, "setup.py")):
return "activity"
- elif os.path.exists(os.path.join(source_dir, "mozilla-config.h.in")):
- return "mozilla"
elif os.path.exists(os.path.join(source_dir, "autogen.sh")) or \
os.path.exists(os.path.join(source_dir, "configure")) or \
os.path.exists(os.path.join(source_dir, "Makefile")):
return "autotools"
elif os.path.exists(os.path.join(source_dir, "package.json")):
- return "node"
+ return "nodemodule"
return None
diff --git a/devbot/environ.py b/devbot/environ.py
index cde6305..276b4fd 100644
--- a/devbot/environ.py
+++ b/devbot/environ.py
@@ -23,8 +23,6 @@ def setup_variables():
add_path("LD_LIBRARY_PATH", config.lib_dir)
add_path("PATH", config.bin_dir)
- add_path("B2G_PATH",
- os.path.join(config.lib_dir, "b2g"))
add_path("XCURSOR_PATH",
os.path.join(config.share_dir, "icons"))
add_path("PKG_CONFIG_PATH",
@@ -64,6 +62,10 @@ def setup_variables():
os.environ["GTK_DATA_PREFIX"] = config.prefix_dir
os.environ["GTK_PATH"] = os.path.join(config.lib_dir, "gtk-2.0")
+ os.environ["B2G_PATH"] = os.path.join(config.lib_dir, "b2g")
+ os.environ["SUGAR_HTML_PATH"] = os.path.join(config.share_dir,
+ "sugar-html")
+
os.environ["CC"] = "ccache gcc"
os.environ["GCONF_DEFAULT_SOURCE_PATH"] = _get_gconf_path()