summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2011-01-23 18:34:46 -0800
committerKhem Raj <raj.khem@gmail.com>2011-01-23 18:34:46 -0800
commitffc1260a51cc6e08d1d6fe90d233a400808fe39a (patch)
tree42866d312ebc225161aadd90fe19a3fddea9f11a
parente5274a6cceb56653971f355a4f19079831efb832 (diff)
downloadopenembedded-ffc1260a51cc6e08d1d6fe90d233a400808fe39a.tar.gz
v8: Add recipes for v8/google's opensource JavaScript Engine
* Fixed Bugzilla/5486 Signed-off-by: Khem Raj <raj.khem@gmail.com>
-rw-r--r--recipes/v8/v8/0001-enable_soname.patch13
-rw-r--r--recipes/v8/v8/0004-add-the-install-target.patch39
-rw-r--r--recipes/v8/v8/SConstruct.patch17
-rw-r--r--recipes/v8/v8_svn.bb55
4 files changed, 124 insertions, 0 deletions
diff --git a/recipes/v8/v8/0001-enable_soname.patch b/recipes/v8/v8/0001-enable_soname.patch
new file mode 100644
index 0000000000..565b036018
--- /dev/null
+++ b/recipes/v8/v8/0001-enable_soname.patch
@@ -0,0 +1,13 @@
+patch to enable the soname that is not automatically shipped with SConstruct
+
+--- a/src/version.cc
++++ b/src/version.cc
+@@ -41,7 +41,7 @@
+ // Define SONAME to have the SCons build the put a specific SONAME into the
+ // shared library instead the generic SONAME generated from the V8 version
+ // number. This define is mainly used by the SCons build script.
+-#define SONAME ""
++#define SONAME "libv8.so.2.2.24"
+
+ namespace v8 {
+ namespace internal {
diff --git a/recipes/v8/v8/0004-add-the-install-target.patch b/recipes/v8/v8/0004-add-the-install-target.patch
new file mode 100644
index 0000000000..e50a35c11d
--- /dev/null
+++ b/recipes/v8/v8/0004-add-the-install-target.patch
@@ -0,0 +1,39 @@
+--- trunk/SConstruct.orig 2010-11-20 21:41:59.000000000 +0000
++++ trunk/SConstruct 2010-11-20 21:45:56.000000000 +0000
+@@ -665,6 +665,7 @@
+ result.Add('mode', 'compilation mode (debug, release)', 'release')
+ result.Add('sample', 'build sample (shell, process)', '')
+ result.Add('env', 'override environment settings (NAME0:value0,NAME1:value1,...)', '')
++ result.Add('install', 'install result files', '')
+ result.Add('importenv', 'import environment settings (NAME0,NAME1,...)', '')
+ for (name, option) in SIMPLE_OPTIONS.iteritems():
+ help = '%s (%s)' % (name, ", ".join(option['values']))
+@@ -997,8 +998,28 @@
+ env.Alias('sample', samples)
+ env.Alias('d8', d8s)
+
++ install_dirs = []
++ destdir = ARGUMENTS.get('DESTDIR', '')
++ prefix = ARGUMENTS.get('PREFIX', '/usr')
++ libdir = [ destdir + prefix + '/lib/' ]
++ incdir = [ destdir + prefix + '/include/' ]
++ for lib in libraries:
++ env.Install(libdir, lib[0])
++ if dir not in install_dirs:
++ install_dirs += libdir
++ for include in [ 'include/v8.h', 'include/v8-debug.h' ]:
++ env.Install(incdir, include);
++ install_dirs += incdir
++ env.Alias('install', install_dirs)
++
++ # Always build at least the library
++ env.Default('library')
++
+ if env['sample']:
+ env.Default('sample')
++ elif env['install']:
++ env.Default('install')
++
+ else:
+ env.Default('library')
+
diff --git a/recipes/v8/v8/SConstruct.patch b/recipes/v8/v8/SConstruct.patch
new file mode 100644
index 0000000000..61caa67a58
--- /dev/null
+++ b/recipes/v8/v8/SConstruct.patch
@@ -0,0 +1,17 @@
+--- trunk/SConstruct.orig 2010-11-20 19:18:33.000000000 +0000
++++ trunk/SConstruct 2010-11-20 19:18:25.000000000 +0000
+@@ -963,6 +963,14 @@
+ def Build():
+ opts = GetOptions()
+ env = Environment(options=opts)
++ env['CC'] = os.environ['CC']
++ env['CXX'] = os.environ['CXX']
++ env['CPP'] = os.environ['CPP']
++ env['AR'] = os.environ['AR']
++ env['LD'] = os.environ['LD']
++ env['CCLD'] = os.environ['CCLD']
++ env['ENV']['PATH'] = os.environ['PATH']
++ env['LINKFLAGS'] = os.environ['TARGET_LINK_HASH_STYLE'] + " " + env['LINKFLAGS']
+ Help(opts.GenerateHelpText(env))
+ VerifyOptions(env)
+ env_overrides = ParseEnvOverrides(env['env'], env['importenv'])
diff --git a/recipes/v8/v8_svn.bb b/recipes/v8/v8_svn.bb
new file mode 100644
index 0000000000..aab0fc2458
--- /dev/null
+++ b/recipes/v8/v8_svn.bb
@@ -0,0 +1,55 @@
+# v8 OE build file
+# Copyright (C) 2005, Advanced Micro Devices, Inc. All Rights Reserved
+# Released under the MIT license (see packages/COPYING)
+DESCRIPTION = "V8 is Google's open source JavaScript engine."
+HOMEPAGE = "http://code.google.com/p/v8/"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "BSD"
+PR = "r0"
+
+PV = "0.0+svnr${SRCPV}"
+SRCREV = "3431"
+
+SRC_URI = "svn://v8.googlecode.com/svn/;module=trunk;proto=http;rev=${SRCREV} \
+ file://SConstruct.patch \
+ file://0004-add-the-install-target.patch \
+ "
+
+S = "${WORKDIR}/trunk"
+
+export V8_TARGET_ARCH_ARM = "\
+ -msoft-float \
+ -fpic \
+ -funwind-tables \
+ -fstack-protector \
+ -fno-short-enums \
+ -fmessage-length=0 \
+ -finline-functions \
+ -fno-inline-functions-called-once \
+ -fgcse-after-reload \
+ -frerun-cse-after-loop \
+ -frename-registers \
+ -fomit-frame-pointer \
+ -fno-strict-aliasing \
+ -finline-limit=64 \
+ -MD \
+ -D__ARM_ARCH_5__ \
+ -D__ARM_ARCH_5T__ \
+ -D__ARM_ARCH_5TE__ \
+ "
+
+export LINKFLAGS = "${LDFLAGS}"
+
+SCONS_EXTRA_COMPILE_ARGS = "\
+ arch=${TARGET_ARCH} \
+ importenv=PATH,LINKFLAGS,V8_TARGET_ARCH_ARM \
+ library=shared \
+ soname=on \
+ shlibtype=hidden \
+ "
+
+SCONS_EXTRA_INSTALL_ARGS = "${SCONS_EXTRA_COMPILE_ARGS}"
+
+inherit scons
+