wok-next diff js/stuff/patches/js38-38.2.1-upstream_fixes-2.patch @ rev 21723
busybox: update patches
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Tue Sep 01 10:44:52 2020 +0000 (2020-09-01) |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/js/stuff/patches/js38-38.2.1-upstream_fixes-2.patch Tue Sep 01 10:44:52 2020 +0000 1.3 @@ -0,0 +1,231 @@ 1.4 +Submitted By: Douglas R. Reno <renodr at linuxfromscratch dot org> 1.5 +Date: 2017-04-01 1.6 +Inital Package Version: 38.2.1 1.7 +Upstream Status: Declined 1.8 +Origin: https://git.gnome.org/browse/jhbuild/tree/patches 1.9 +Description: Fixes build and functionality problems within mozjs38. 1.10 + 1.11 + 1.12 +diff -Naurp mozjs-38.0.0.orig/build/autoconf/icu.m4 mozjs-38.0.0/build/autoconf/icu.m4 1.13 +--- mozjs-38.0.0.orig/build/autoconf/icu.m4 2015-09-17 15:12:19.000000000 -0500 1.14 ++++ mozjs-38.0.0/build/autoconf/icu.m4 2017-04-01 19:31:59.957994136 -0500 1.15 +@@ -73,7 +73,8 @@ if test -n "$USE_ICU"; then 1.16 + fi 1.17 + fi 1.18 + 1.19 +- version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` 1.20 ++ #version=`sed -n 's/^[[:space:]]*#[[:space:]]*define[[:space:]][[:space:]]*U_ICU_VERSION_MAJOR_NUM[[:space:]][[:space:]]*\([0-9][0-9]*\)[[:space:]]*$/\1/p' "$icudir/common/unicode/uvernum.h"` 1.21 ++ version=57.1 1.22 + if test x"$version" = x; then 1.23 + AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno]) 1.24 + fi 1.25 +diff -Naurp mozjs-38.0.0.orig/js/src/configure mozjs-38.0.0/js/src/configure 1.26 +--- mozjs-38.0.0.orig/js/src/configure 2015-09-17 15:38:10.000000000 -0500 1.27 ++++ mozjs-38.0.0/js/src/configure 2017-04-01 19:31:59.958994141 -0500 1.28 +@@ -1662,9 +1662,9 @@ esac 1.29 + 1.30 + fi 1.31 + 1.32 +-MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` 1.33 +-MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` 1.34 +-MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` 1.35 ++MOZILLA_VERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` 1.36 ++MOZILLA_UAVERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` 1.37 ++MOZILLA_SYMBOLVERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` 1.38 + 1.39 + cat >> confdefs.pytmp <<EOF 1.40 + (''' MOZILLA_VERSION ''', r''' "$MOZILLA_VERSION" ''') 1.41 +@@ -1696,8 +1696,13 @@ MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSI 1.42 + MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` 1.43 + IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` 1.44 + 1.45 ++if test -n "$JS_STANDALONE"; then 1.46 ++JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION 1.47 ++JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config 1.48 ++else 1.49 + JS_SHELL_NAME=js 1.50 + JS_CONFIG_NAME=js-config 1.51 ++fi 1.52 + 1.53 + 1.54 + if test -n "$IS_ALPHA"; then 1.55 +diff -Naurp mozjs-38.0.0.orig/js/src/configure.in mozjs-38.0.0/js/src/configure.in 1.56 +--- mozjs-38.0.0.orig/js/src/configure.in 2015-09-17 15:12:18.000000000 -0500 1.57 ++++ mozjs-38.0.0/js/src/configure.in 2017-04-01 19:31:59.959994147 -0500 1.58 +@@ -236,9 +236,9 @@ fi 1.59 + dnl ============================================================== 1.60 + dnl Get mozilla version from central milestone file 1.61 + dnl ============================================================== 1.62 +-MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` 1.63 +-MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` 1.64 +-MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` 1.65 ++MOZILLA_VERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir` 1.66 ++MOZILLA_UAVERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion` 1.67 ++MOZILLA_SYMBOLVERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion` 1.68 + 1.69 + AC_DEFINE_UNQUOTED(MOZILLA_VERSION,"$MOZILLA_VERSION") 1.70 + AC_DEFINE_UNQUOTED(MOZILLA_VERSION_U,$MOZILLA_VERSION) 1.71 +@@ -252,16 +252,13 @@ MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSI 1.72 + MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"` 1.73 + IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'` 1.74 + 1.75 +-dnl XXX in a temporary bid to avoid developer anger at renaming files 1.76 +-dnl XXX before "js" symlinks exist, don't change names. 1.77 +-dnl 1.78 +-dnl if test -n "$JS_STANDALONE"; then 1.79 +-dnl JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION 1.80 +-dnl JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config 1.81 +-dnl else 1.82 ++if test -n "$JS_STANDALONE"; then 1.83 ++JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION 1.84 ++JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config 1.85 ++else 1.86 + JS_SHELL_NAME=js 1.87 + JS_CONFIG_NAME=js-config 1.88 +-dnl fi 1.89 ++fi 1.90 + 1.91 + changequote([,]) 1.92 + if test -n "$IS_ALPHA"; then 1.93 +diff -Naurp mozjs-38.0.0.orig/js/src/jit/RegisterSets.h mozjs-38.0.0/js/src/jit/RegisterSets.h 1.94 +--- mozjs-38.0.0.orig/js/src/jit/RegisterSets.h 2015-09-17 15:12:22.000000000 -0500 1.95 ++++ mozjs-38.0.0/js/src/jit/RegisterSets.h 2017-04-01 19:31:59.961994157 -0500 1.96 +@@ -7,7 +7,6 @@ 1.97 + #ifndef jit_RegisterSets_h 1.98 + #define jit_RegisterSets_h 1.99 + 1.100 +-#include "mozilla/Alignment.h" 1.101 + #include "mozilla/MathAlgorithms.h" 1.102 + 1.103 + #include "jit/JitAllocPolicy.h" 1.104 +@@ -26,8 +25,8 @@ struct AnyRegister { 1.105 + Code code_; 1.106 + 1.107 + public: 1.108 +- AnyRegister() 1.109 +- { } 1.110 ++ AnyRegister() = default; 1.111 ++ 1.112 + explicit AnyRegister(Register gpr) { 1.113 + code_ = gpr.code(); 1.114 + } 1.115 +@@ -156,7 +155,7 @@ class ValueOperand 1.116 + } 1.117 + #endif 1.118 + 1.119 +- ValueOperand() {} 1.120 ++ ValueOperand() = default; 1.121 + }; 1.122 + 1.123 + // Registers to hold either either a typed or untyped value. 1.124 +@@ -165,46 +164,25 @@ class TypedOrValueRegister 1.125 + // Type of value being stored. 1.126 + MIRType type_; 1.127 + 1.128 +- // Space to hold either an AnyRegister or a ValueOperand. 1.129 + union U { 1.130 +- mozilla::AlignedStorage2<AnyRegister> typed; 1.131 +- mozilla::AlignedStorage2<ValueOperand> value; 1.132 ++ AnyRegister typed; 1.133 ++ ValueOperand value; 1.134 + } data; 1.135 + 1.136 +- AnyRegister& dataTyped() { 1.137 +- MOZ_ASSERT(hasTyped()); 1.138 +- return *data.typed.addr(); 1.139 +- } 1.140 +- ValueOperand& dataValue() { 1.141 +- MOZ_ASSERT(hasValue()); 1.142 +- return *data.value.addr(); 1.143 +- } 1.144 +- 1.145 +- AnyRegister dataTyped() const { 1.146 +- MOZ_ASSERT(hasTyped()); 1.147 +- return *data.typed.addr(); 1.148 +- } 1.149 +- const ValueOperand& dataValue() const { 1.150 +- MOZ_ASSERT(hasValue()); 1.151 +- return *data.value.addr(); 1.152 +- } 1.153 +- 1.154 + public: 1.155 + 1.156 +- TypedOrValueRegister() 1.157 +- : type_(MIRType_None) 1.158 +- {} 1.159 ++ TypedOrValueRegister() = default; 1.160 + 1.161 + TypedOrValueRegister(MIRType type, AnyRegister reg) 1.162 + : type_(type) 1.163 + { 1.164 +- dataTyped() = reg; 1.165 ++ data.typed = reg; 1.166 + } 1.167 + 1.168 + MOZ_IMPLICIT TypedOrValueRegister(ValueOperand value) 1.169 + : type_(MIRType_Value) 1.170 + { 1.171 +- dataValue() = value; 1.172 ++ data.value = value; 1.173 + } 1.174 + 1.175 + MIRType type() const { 1.176 +@@ -220,11 +198,13 @@ class TypedOrValueRegister 1.177 + } 1.178 + 1.179 + AnyRegister typedReg() const { 1.180 +- return dataTyped(); 1.181 ++ MOZ_ASSERT(hasTyped()); 1.182 ++ return data.typed; 1.183 + } 1.184 + 1.185 + ValueOperand valueReg() const { 1.186 +- return dataValue(); 1.187 ++ MOZ_ASSERT(hasValue()); 1.188 ++ return data.value; 1.189 + } 1.190 + 1.191 + AnyRegister scratchReg() { 1.192 +@@ -240,19 +220,18 @@ class ConstantOrRegister 1.193 + // Whether a constant value is being stored. 1.194 + bool constant_; 1.195 + 1.196 +- // Space to hold either a Value or a TypedOrValueRegister. 1.197 + union U { 1.198 +- mozilla::AlignedStorage2<Value> constant; 1.199 +- mozilla::AlignedStorage2<TypedOrValueRegister> reg; 1.200 ++ Value constant; 1.201 ++ TypedOrValueRegister reg; 1.202 + } data; 1.203 + 1.204 + Value& dataValue() { 1.205 + MOZ_ASSERT(constant()); 1.206 +- return *data.constant.addr(); 1.207 ++ return data.constant; 1.208 + } 1.209 + TypedOrValueRegister& dataReg() { 1.210 + MOZ_ASSERT(!constant()); 1.211 +- return *data.reg.addr(); 1.212 ++ return data.reg; 1.213 + } 1.214 + 1.215 + public: 1.216 +diff -Naurp mozjs-38.0.0.orig/js/src/Makefile.in mozjs-38.0.0/js/src/Makefile.in 1.217 +--- mozjs-38.0.0.orig/js/src/Makefile.in 2015-09-17 15:12:18.000000000 -0500 1.218 ++++ mozjs-38.0.0/js/src/Makefile.in 2017-04-01 19:31:59.961994157 -0500 1.219 +@@ -208,10 +208,13 @@ endif 1.220 + SCRIPTS = $(JS_CONFIG_NAME) 1.221 + SDK_BINARY = $(JS_CONFIG_NAME) 1.222 + 1.223 +-$(LIBRARY_NAME).pc: js.pc 1.224 ++$(JS_CONFIG_NAME): js-config 1.225 + cp $^ $@ 1.226 + 1.227 +-install:: $(LIBRARY_NAME).pc 1.228 ++$(JS_LIBRARY_NAME).pc: js.pc 1.229 ++ cp $^ $@ 1.230 ++ 1.231 ++install:: $(JS_LIBRARY_NAME).pc 1.232 + $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig 1.233 + 1.234 + install:: js-config.h