summaryrefslogtreecommitdiff
path: root/package/mozjs
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2014-01-10 17:37:30 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2014-01-10 17:37:30 +0100
commitb4d204f9fdb09a3655ae9a90ef262e253d6e59d7 (patch)
tree9195e74b2a7ff4f0403864f235a74ecb23ddac45 /package/mozjs
parent79963aad5902c51d47fbc779c1280060872f1a71 (diff)
add upower, polkit and dependencies
Diffstat (limited to 'package/mozjs')
-rw-r--r--package/mozjs/Makefile33
-rw-r--r--package/mozjs/patches/patch-js_src_configure42
-rw-r--r--package/mozjs/patches/patch-js_src_js_pc_in12
-rw-r--r--package/mozjs/patches/patch-js_src_methodjit_MethodJIT_cpp22
4 files changed, 109 insertions, 0 deletions
diff --git a/package/mozjs/Makefile b/package/mozjs/Makefile
new file mode 100644
index 000000000..c5e41f489
--- /dev/null
+++ b/package/mozjs/Makefile
@@ -0,0 +1,33 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:= mozjs
+PKG_VERSION:= 17.0.0
+PKG_RELEASE:= 1
+PKG_MD5SUM:= 20b6f8f1140ef6e47daa3b16965c9202
+PKG_DESCR:= javascript library
+PKG_SECTION:= libs
+PKG_BUILDDEP:= bzip2-host python2-host nspr
+PKG_SITES:= http://ftp.mozilla.org/pub/mozilla.org/js/
+PKG_OPTS:= dev
+
+DISTFILES:= ${PKG_NAME}${PKG_VERSION}.tar.gz
+WRKDIST= ${WRKDIR}/${PKG_NAME}${PKG_VERSION}
+WRKSRC= ${WRKDIST}/js/src
+
+include $(TOPDIR)/mk/package.mk
+
+$(eval $(call PKG_template,MOZJS,mozjs,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
+
+CONFIGURE_ENV+= HOST_CC="${CC_FOR_BUILD}" HOST_CFLAGS="${CFLAGS_FOR_BUILD}" HOST_CXX="${CXX_FOR_BUILD}"
+CONFIGURE_ARGS+= --disable-optimize \
+ --with-system-nspr
+
+mozjs-install:
+ $(INSTALL_DIR) $(IDIR_MOZJS)/usr/lib
+ $(CP) $(WRKINST)/usr/lib/libmozjs*.so* \
+ $(IDIR_MOZJS)/usr/lib
+
+include ${TOPDIR}/mk/pkg-bottom.mk
diff --git a/package/mozjs/patches/patch-js_src_configure b/package/mozjs/patches/patch-js_src_configure
new file mode 100644
index 000000000..f2b4f62c4
--- /dev/null
+++ b/package/mozjs/patches/patch-js_src_configure
@@ -0,0 +1,42 @@
+--- mozjs17.0.0.orig/js/src/configure 2013-03-25 21:34:20.000000000 +0100
++++ mozjs17.0.0/js/src/configure 2014-01-09 18:00:47.000000000 +0100
+@@ -6037,39 +6037,6 @@ EOF
+ HAVE_ARM_SIMD=1
+ fi
+
+- echo $ac_n "checking for ARM NEON support in compiler""... $ac_c" 1>&6
+-echo "configure:6042: checking for ARM NEON support in compiler" >&5
+- # We try to link so that this also fails when
+- # building with LTO.
+- cat > conftest.$ac_ext <<EOF
+-#line 6046 "configure"
+-#include "confdefs.h"
+-
+-int main() {
+-asm(".fpu neon\n vadd.i8 d0, d0, d0");
+-; return 0; }
+-EOF
+-if { (eval echo configure:6053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+- rm -rf conftest*
+- result="yes"
+-else
+- echo "configure: failed program was:" >&5
+- cat conftest.$ac_ext >&5
+- rm -rf conftest*
+- result="no"
+-fi
+-rm -f conftest*
+- echo "$ac_t"""$result"" 1>&6
+- if test "$result" = "yes"; then
+- cat >> confdefs.pytmp <<\EOF
+- (''' HAVE_ARM_NEON ''', ' 1 ')
+-EOF
+-cat >> confdefs.h <<\EOF
+-#define HAVE_ARM_NEON 1
+-EOF
+-
+- HAVE_ARM_NEON=1
+- fi
+ fi # CPU_ARCH = arm
+
+
diff --git a/package/mozjs/patches/patch-js_src_js_pc_in b/package/mozjs/patches/patch-js_src_js_pc_in
new file mode 100644
index 000000000..456678abe
--- /dev/null
+++ b/package/mozjs/patches/patch-js_src_js_pc_in
@@ -0,0 +1,12 @@
+--- mozjs17.0.0.orig/js/src/js.pc.in 2013-03-25 21:34:20.000000000 +0100
++++ mozjs17.0.0/js/src/js.pc.in 2014-01-10 10:18:19.000000000 +0100
+@@ -1,7 +1,7 @@
+ #filter substitution
+ prefix=@prefix@
+-libdir=@libdir@
+-includedir=@includedir@
++libdir=${prefix}/lib
++includedir=${prefix}/include
+
+ Name: SpiderMonkey @MOZILLA_VERSION@
+ Description: The Mozilla library for JavaScript
diff --git a/package/mozjs/patches/patch-js_src_methodjit_MethodJIT_cpp b/package/mozjs/patches/patch-js_src_methodjit_MethodJIT_cpp
new file mode 100644
index 000000000..a347a7077
--- /dev/null
+++ b/package/mozjs/patches/patch-js_src_methodjit_MethodJIT_cpp
@@ -0,0 +1,22 @@
+--- mozjs17.0.0.orig/js/src/methodjit/MethodJIT.cpp 2013-02-11 23:33:23.000000000 +0100
++++ mozjs17.0.0/js/src/methodjit/MethodJIT.cpp 2014-01-09 18:10:13.000000000 +0100
+@@ -702,7 +702,8 @@ asm (
+ FUNCTION_HEADER_EXTRA
+ ".globl " SYMBOL_STRING(JaegerTrampolineReturn) "\n"
+ SYMBOL_STRING(JaegerTrampolineReturn) ":" "\n"
+-" strd r4, r5, [r10, #24]" "\n" /* fp->rval type,data */
++" str r4, [r10, #24]" "\n" /* fp->rval type,data */
++" str r5, [r10, #28]" "\n" /* fp->rval type,data */
+
+ /* Tidy up. */
+ " mov r0, sp" "\n"
+@@ -762,7 +763,8 @@ SYMBOL_STRING(JaegerInterpoline) ":"
+ " blx " SYMBOL_STRING_RELOC(js_InternalInterpret) "\n"
+ " cmp r0, #0" "\n"
+ " ldr r10, [sp, #(4*7)]" "\n" /* Load (StackFrame*)f->regs->fp_ */
+-" ldrd r4, r5, [r10, #(4*6)]" "\n" /* Load rval payload and type. */
++" ldr r4, [r10, #(4*6)]" "\n" /* Load rval payload and type. */
++" ldr r5, [r10, #((4*6)+4)]" "\n" /* Load rval payload and type. */
+ " ldr r1, [sp, #(4*3)]" "\n" /* Load scratch. */
+ " it ne" "\n"
+ " bxne r0" "\n"