From 1df51c324c13178b060c4968d244677af069948d Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Tue, 29 Jan 2013 09:38:19 +0000 Subject: Add node --- diff --git a/config/modules/system.json b/config/modules/system.json index db6f1ed..eda65a9 100644 --- a/config/modules/system.json +++ b/config/modules/system.json @@ -5,30 +5,38 @@ "repo": "git://github.com/dnarvaez/automake.git" }, { + "name": "node", + "options_ev": [ + "'--prefix=%s' % prefix" + ], + "out-of-source": false, + "repo": "git://github.com/joyent/node.git" + }, + { "branch": "gnome-3-4", - "if": "gnome_version == '3.4'", - "name": "gnome-keyring", - "options_evaluated": [ + "extra_options_ev": [ "'--with-pkcs11-config=%s/etc' % prefix", "'--with-pkcs11-modules=%s/etc' % prefix" ], + "if": "gnome_version == '3.4'", + "name": "gnome-keyring", "repo": "git://github.com/dnarvaez/gnome-keyring.git" }, { - "if": "gnome_version == '3.4' or distro == 'ubuntu-12.10'", - "name": "glib", - "options": [ + "extra_options": [ "--disable-modular-tests" ], + "if": "gnome_version == '3.4' or distro == 'ubuntu-12.10'", + "name": "glib", "repo": "git://git.gnome.org/glib", "tag": "2.34.3" }, { - "if": "gnome_version == '3.4' or distro == 'ubuntu-12.10'", - "name": "gobject-introspection", - "options": [ + "extra_options": [ "--disable-tests" ], + "if": "gnome_version == '3.4' or distro == 'ubuntu-12.10'", + "name": "gobject-introspection", "repo": "git://git.gnome.org/gobject-introspection", "tag": "GOBJECT_INTROSPECTION_1_34_2" }, @@ -63,31 +71,31 @@ "tag": "3.6.2" }, { - "if": "gstreamer_version != '1.0'", - "name": "gstreamer", - "options": [ + "extra_options": [ "--disable-gtk-doc" ], + "if": "gstreamer_version != '1.0'", + "name": "gstreamer", "out-of-source": false, "repo": "git://anongit.freedesktop.org/gstreamer/gstreamer", "tag": "1.0.3" }, { - "if": "gstreamer_version != '1.0'", - "name": "gst-plugins-base", - "options": [ + "extra_options": [ "--disable-gtk-doc" ], + "if": "gstreamer_version != '1.0'", + "name": "gst-plugins-base", "out-of-source": false, "repo": "git://anongit.freedesktop.org/gstreamer/gst-plugins-base", "tag": "1.0.3" }, { - "if": "gstreamer_version != '1.0'", - "name": "gst-plugins-good", - "options": [ + "extra_options": [ "--disable-gtk-doc" ], + "if": "gstreamer_version != '1.0'", + "name": "gst-plugins-good", "out-of-source": false, "repo": "git://anongit.freedesktop.org/gstreamer/gst-plugins-good", "tag": "1.0.3" @@ -99,11 +107,11 @@ "tag": "libxklavier-5.3" }, { - "if": "gnome_version == '3.4' or distro == 'ubuntu-12.10'", - "name": "metacity", - "options": [ + "extra_options": [ "--disable-themes-documentation" ], + "if": "gnome_version == '3.4' or distro == 'ubuntu-12.10'", + "name": "metacity", "repo": "git://git.gnome.org/metacity", "tag": "METACITY_2_34_13" } diff --git a/devbot/build.py b/devbot/build.py index 211cc88..bfb2ce8 100644 --- a/devbot/build.py +++ b/devbot/build.py @@ -135,18 +135,30 @@ def _build_autotools(module, log): makefile_path = os.path.join(module.get_build_dir(), "Makefile") + source_dir = module.get_source_dir() if not os.path.exists(makefile_path): - configure = os.path.join(module.get_source_dir(), "autogen.sh") + configure = os.path.join(source_dir, "autogen.sh") + + if not os.path.exists(makefile_path): + configure = os.path.join(source_dir, "configure") + + if module.options: + options = module.options + elif module.options_ev: + options = [_eval_option(option) + for option in module.options_ev] + else: + options = ["--prefix", config.prefix_dir, + "--libdir", config.lib_dir] - args = [configure, - "--prefix", config.prefix_dir, - "--libdir", config.lib_dir] - args.extend(module.options) + options.extend(module.extra_options) + for option in module.extra_options_ev: + options.append(_eval_option(option)) - for option in module.options_evaluated: - args.append(_eval_option(option)) + args = [configure] + args.extend(options) - command.run(args, log) + command.run(args, log) jobs = multiprocessing.cpu_count() * 2 diff --git a/devbot/config.py b/devbot/config.py index d444869..17283c8 100644 --- a/devbot/config.py +++ b/devbot/config.py @@ -33,7 +33,9 @@ class Module: self.tag = info.get("tag", None) self.auto_install = info.get("auto-install", False) self.options = info.get("options", []) - self.options_evaluated = info.get("options_evaluated", []) + self.options_ev = info.get("options_ev", []) + self.extra_options = info.get("extra_options", []) + self.extra_options_ev = info.get("extra_options_ev", []) self.has_checks = info.get("has_checks", False) self.distribute = info.get("distribute", False) @@ -52,7 +54,8 @@ class Module: 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, "autogen.sh")): + elif os.path.exists(os.path.join(source_dir, "autogen.sh")) or \ + os.path.exists(os.path.join(source_dir, "configure")): return "autotools" else: print("The source directory has unexpected content, please " -- cgit v0.9.1