[gnome-continuous] manifest: Add mozjs24, switch gjs to that branch



commit ccfac3078b38c1f212a0b0504c1d792b44972633
Author: Colin Walters <walters verbum org>
Date:   Tue Nov 12 21:00:38 2013 -0500

    manifest: Add mozjs24, switch gjs to that branch

 manifest.json                 |   13 +++++++++
 patches/js24-buildapi.patch   |   38 ++++++++++++++++++++++++++
 patches/js24-virtualenv.patch |   58 +++++++++++++++++++++++++++++++++++++++++
 3 files changed, 109 insertions(+), 0 deletions(-)
---
diff --git a/manifest.json b/manifest.json
index 42b8b34..202a098 100644
--- a/manifest.json
+++ b/manifest.json
@@ -776,7 +776,20 @@
                                 "--enable-wayland"],
                 "setuid": ["/runtime/usr/bin/mutter-launch"]},
 
+                {"src": "tarball:https://people.mozilla.org/~sstangl/mozjs-24.1.0.rc1.tar.bz2";,
+                "name": "js24",
+                "checksum": "69ca3ae747cae5cad980bdcd59e688bc99114901c8c1e0b789d187f4ef1e7264",
+                "patches": ["js24-buildapi.patch", "js24-virtualenv.patch"],
+                "config-opts": ["--enable-threadsafe",
+                                "--with-system-nspr",
+                                "--disable-tests",
+                                "--disable-strip",
+                                "--enable-ctypes",
+                                "--enable-system-ffi",
+                                "--disable-intl-api"]},
+
                {"src": "gnome:gjs",
+                "branch": "wip/js24",
                 "config-opts": ["--enable-installed-tests"]},
 
                 {"src": "ibus:ibus.git",
diff --git a/patches/js24-buildapi.patch b/patches/js24-buildapi.patch
new file mode 100644
index 0000000..b794f9b
--- /dev/null
+++ b/patches/js24-buildapi.patch
@@ -0,0 +1,38 @@
+From 2134f0387c3fd24413a7c49b1b26c52e21ec7c46 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters verbum org>
+Date: Wed, 18 Jan 2012 22:25:47 -0500
+Subject: [PATCH] build: Add toplevel trampoline configure/Makefile
+
+These just invoke the ones in js/src.
+---
+ Makefile  |    5 +++++
+ configure |    5 +++++
+ 2 files changed, 10 insertions(+), 0 deletions(-)
+ create mode 100644 Makefile
+ create mode 100755 configure
+
+diff --git a/Makefile b/Makefile
+new file mode 100644
+index 0000000..98de844
+--- /dev/null
++++ b/Makefile
+@@ -0,0 +1,5 @@
++all:
++      cd js/src && $(MAKE)
++
++install:
++      cd js/src && $(MAKE) install DESTDIR=$(DESTDIR)
+diff --git a/configure b/configure
+new file mode 100755
+index 0000000..93ef339
+--- /dev/null
++++ b/configure
+@@ -0,0 +1,5 @@
++#!/bin/sh
++# http://people.gnome.org/~walters/docs/build-api.txt
++echo \#buildapi-variable-no-builddir >/dev/null
++cd js/src
++exec ./configure "$@"
+-- 
+1.7.1
+
diff --git a/patches/js24-virtualenv.patch b/patches/js24-virtualenv.patch
new file mode 100644
index 0000000..0834d42
--- /dev/null
+++ b/patches/js24-virtualenv.patch
@@ -0,0 +1,58 @@
+From 9103724a995e4a1438a113f71dc0263042458316 Mon Sep 17 00:00:00 2001
+From: Colin Walters <walters verbum org>
+Date: Thu, 28 Nov 2013 10:16:34 -0500
+Subject: [PATCH] virtualenv: Support cases where host Python only ships .pyo
+
+Apparently on at least OpenEmbedded Python, only the .pyo files
+are shipped.  Change everywhere where Virtualenv looks for .pyc
+to also handle .pyo.
+
+This fixes the build of js24 inside gnome-continuous (which uses
+OpenEmbedded python).
+---
+ js/src/python/virtualenv/virtualenv.py |    8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/js/src/python/virtualenv/virtualenv.py b/js/src/python/virtualenv/virtualenv.py
+index d33f60a..2bcc327 100755
+--- a/js/src/python/virtualenv/virtualenv.py
++++ b/js/src/python/virtualenv/virtualenv.py
+@@ -914,7 +914,7 @@ def main():
+             logger.notify('Running virtualenv with interpreter %s' % interpreter)
+             env['VIRTUALENV_INTERPRETER_RUNNING'] = 'true'
+             file = __file__
+-            if file.endswith('.pyc'):
++            if file.endswith('.pyc') or site_filename.endswith('.pyo'):
+                 file = file[:-1]
+             popen = subprocess.Popen([interpreter, file] + sys.argv[1:], env=env)
+             raise SystemExit(popen.wait())
+@@ -1195,7 +1195,7 @@ def copy_required_modules(dst_prefix):
+                 else:
+                     dst_filename = change_prefix(filename, dst_prefix)
+                 copyfile(filename, dst_filename)
+-                if filename.endswith('.pyc'):
++                if filename.endswith('.pyc') or filename.endswith('.pyo'):
+                     pyfile = filename[:-1]
+                     if os.path.exists(pyfile):
+                         copyfile(pyfile, dst_filename[:-1])
+@@ -1261,7 +1261,7 @@ def install_python(home_dir, lib_dir, inc_dir, bin_dir, site_packages, clear):
+     mkdir(join(lib_dir, 'site-packages'))
+     import site
+     site_filename = site.__file__
+-    if site_filename.endswith('.pyc'):
++    if site_filename.endswith('.pyc') or site_filename.endswith('.pyo'):
+         site_filename = site_filename[:-1]
+     elif site_filename.endswith('$py.class'):
+         site_filename = site_filename.replace('$py.class', '.py')
+@@ -1882,7 +1882,7 @@ def create_bootstrap_script(extra_text, python_version=''):
+     be run with a particular Python version.
+     """
+     filename = __file__
+-    if filename.endswith('.pyc'):
++    if filename.endswith('.pyc') or filename.endswith('.pyo'):
+         filename = filename[:-1]
+     f = codecs.open(filename, 'r', encoding='utf-8')
+     content = f.read()
+-- 
+1.7.1
+


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]