wok-next view js/stuff/patches/js38-38.2.1-upstream_fixes-2.patch @ rev 21107

Restore Perl modules removed accidentally in commit 19709
author Aleksej Bobylev <al.bobylev@gmail.com>
date Mon Jan 07 11:16:02 2019 +0200 (2019-01-07)
parents
children
line source
1 Submitted By: Douglas R. Reno <renodr at linuxfromscratch dot org>
2 Date: 2017-04-01
3 Inital Package Version: 38.2.1
4 Upstream Status: Declined
5 Origin: https://git.gnome.org/browse/jhbuild/tree/patches
6 Description: Fixes build and functionality problems within mozjs38.
9 diff -Naurp mozjs-38.0.0.orig/build/autoconf/icu.m4 mozjs-38.0.0/build/autoconf/icu.m4
10 --- mozjs-38.0.0.orig/build/autoconf/icu.m4 2015-09-17 15:12:19.000000000 -0500
11 +++ mozjs-38.0.0/build/autoconf/icu.m4 2017-04-01 19:31:59.957994136 -0500
12 @@ -73,7 +73,8 @@ if test -n "$USE_ICU"; then
13 fi
14 fi
16 - 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"`
17 + #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"`
18 + version=57.1
19 if test x"$version" = x; then
20 AC_MSG_ERROR([cannot determine icu version number from uvernum.h header file $lineno])
21 fi
22 diff -Naurp mozjs-38.0.0.orig/js/src/configure mozjs-38.0.0/js/src/configure
23 --- mozjs-38.0.0.orig/js/src/configure 2015-09-17 15:38:10.000000000 -0500
24 +++ mozjs-38.0.0/js/src/configure 2017-04-01 19:31:59.958994141 -0500
25 @@ -1662,9 +1662,9 @@ esac
27 fi
29 -MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir`
30 -MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion`
31 -MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion`
32 +MOZILLA_VERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir`
33 +MOZILLA_UAVERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion`
34 +MOZILLA_SYMBOLVERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion`
36 cat >> confdefs.pytmp <<EOF
37 (''' MOZILLA_VERSION ''', r''' "$MOZILLA_VERSION" ''')
38 @@ -1696,8 +1696,13 @@ MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSI
39 MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"`
40 IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'`
42 +if test -n "$JS_STANDALONE"; then
43 +JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION
44 +JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config
45 +else
46 JS_SHELL_NAME=js
47 JS_CONFIG_NAME=js-config
48 +fi
51 if test -n "$IS_ALPHA"; then
52 diff -Naurp mozjs-38.0.0.orig/js/src/configure.in mozjs-38.0.0/js/src/configure.in
53 --- mozjs-38.0.0.orig/js/src/configure.in 2015-09-17 15:12:18.000000000 -0500
54 +++ mozjs-38.0.0/js/src/configure.in 2017-04-01 19:31:59.959994147 -0500
55 @@ -236,9 +236,9 @@ fi
56 dnl ==============================================================
57 dnl Get mozilla version from central milestone file
58 dnl ==============================================================
59 -MOZILLA_VERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir`
60 -MOZILLA_UAVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion`
61 -MOZILLA_SYMBOLVERSION=`$PYTHON $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion`
62 +MOZILLA_VERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir`
63 +MOZILLA_UAVERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --uaversion`
64 +MOZILLA_SYMBOLVERSION=`python $srcdir/python/mozbuild/mozbuild/milestone.py --topsrcdir $srcdir --symbolversion`
66 AC_DEFINE_UNQUOTED(MOZILLA_VERSION,"$MOZILLA_VERSION")
67 AC_DEFINE_UNQUOTED(MOZILLA_VERSION_U,$MOZILLA_VERSION)
68 @@ -252,16 +252,13 @@ MOZJS_MINOR_VERSION=`echo $MOZILLA_VERSI
69 MOZJS_PATCH_VERSION=`echo $MOZILLA_VERSION | sed "s|^[0-9]*\.[0-9]*[^0-9]*||"`
70 IS_ALPHA=`echo $MOZILLA_VERSION | grep '[ab]'`
72 -dnl XXX in a temporary bid to avoid developer anger at renaming files
73 -dnl XXX before "js" symlinks exist, don't change names.
74 -dnl
75 -dnl if test -n "$JS_STANDALONE"; then
76 -dnl JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION
77 -dnl JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config
78 -dnl else
79 +if test -n "$JS_STANDALONE"; then
80 +JS_SHELL_NAME=js$MOZJS_MAJOR_VERSION
81 +JS_CONFIG_NAME=js$MOZJS_MAJOR_VERSION-config
82 +else
83 JS_SHELL_NAME=js
84 JS_CONFIG_NAME=js-config
85 -dnl fi
86 +fi
88 changequote([,])
89 if test -n "$IS_ALPHA"; then
90 diff -Naurp mozjs-38.0.0.orig/js/src/jit/RegisterSets.h mozjs-38.0.0/js/src/jit/RegisterSets.h
91 --- mozjs-38.0.0.orig/js/src/jit/RegisterSets.h 2015-09-17 15:12:22.000000000 -0500
92 +++ mozjs-38.0.0/js/src/jit/RegisterSets.h 2017-04-01 19:31:59.961994157 -0500
93 @@ -7,7 +7,6 @@
94 #ifndef jit_RegisterSets_h
95 #define jit_RegisterSets_h
97 -#include "mozilla/Alignment.h"
98 #include "mozilla/MathAlgorithms.h"
100 #include "jit/JitAllocPolicy.h"
101 @@ -26,8 +25,8 @@ struct AnyRegister {
102 Code code_;
104 public:
105 - AnyRegister()
106 - { }
107 + AnyRegister() = default;
108 +
109 explicit AnyRegister(Register gpr) {
110 code_ = gpr.code();
111 }
112 @@ -156,7 +155,7 @@ class ValueOperand
113 }
114 #endif
116 - ValueOperand() {}
117 + ValueOperand() = default;
118 };
120 // Registers to hold either either a typed or untyped value.
121 @@ -165,46 +164,25 @@ class TypedOrValueRegister
122 // Type of value being stored.
123 MIRType type_;
125 - // Space to hold either an AnyRegister or a ValueOperand.
126 union U {
127 - mozilla::AlignedStorage2<AnyRegister> typed;
128 - mozilla::AlignedStorage2<ValueOperand> value;
129 + AnyRegister typed;
130 + ValueOperand value;
131 } data;
133 - AnyRegister& dataTyped() {
134 - MOZ_ASSERT(hasTyped());
135 - return *data.typed.addr();
136 - }
137 - ValueOperand& dataValue() {
138 - MOZ_ASSERT(hasValue());
139 - return *data.value.addr();
140 - }
141 -
142 - AnyRegister dataTyped() const {
143 - MOZ_ASSERT(hasTyped());
144 - return *data.typed.addr();
145 - }
146 - const ValueOperand& dataValue() const {
147 - MOZ_ASSERT(hasValue());
148 - return *data.value.addr();
149 - }
150 -
151 public:
153 - TypedOrValueRegister()
154 - : type_(MIRType_None)
155 - {}
156 + TypedOrValueRegister() = default;
158 TypedOrValueRegister(MIRType type, AnyRegister reg)
159 : type_(type)
160 {
161 - dataTyped() = reg;
162 + data.typed = reg;
163 }
165 MOZ_IMPLICIT TypedOrValueRegister(ValueOperand value)
166 : type_(MIRType_Value)
167 {
168 - dataValue() = value;
169 + data.value = value;
170 }
172 MIRType type() const {
173 @@ -220,11 +198,13 @@ class TypedOrValueRegister
174 }
176 AnyRegister typedReg() const {
177 - return dataTyped();
178 + MOZ_ASSERT(hasTyped());
179 + return data.typed;
180 }
182 ValueOperand valueReg() const {
183 - return dataValue();
184 + MOZ_ASSERT(hasValue());
185 + return data.value;
186 }
188 AnyRegister scratchReg() {
189 @@ -240,19 +220,18 @@ class ConstantOrRegister
190 // Whether a constant value is being stored.
191 bool constant_;
193 - // Space to hold either a Value or a TypedOrValueRegister.
194 union U {
195 - mozilla::AlignedStorage2<Value> constant;
196 - mozilla::AlignedStorage2<TypedOrValueRegister> reg;
197 + Value constant;
198 + TypedOrValueRegister reg;
199 } data;
201 Value& dataValue() {
202 MOZ_ASSERT(constant());
203 - return *data.constant.addr();
204 + return data.constant;
205 }
206 TypedOrValueRegister& dataReg() {
207 MOZ_ASSERT(!constant());
208 - return *data.reg.addr();
209 + return data.reg;
210 }
212 public:
213 diff -Naurp mozjs-38.0.0.orig/js/src/Makefile.in mozjs-38.0.0/js/src/Makefile.in
214 --- mozjs-38.0.0.orig/js/src/Makefile.in 2015-09-17 15:12:18.000000000 -0500
215 +++ mozjs-38.0.0/js/src/Makefile.in 2017-04-01 19:31:59.961994157 -0500
216 @@ -208,10 +208,13 @@ endif
217 SCRIPTS = $(JS_CONFIG_NAME)
218 SDK_BINARY = $(JS_CONFIG_NAME)
220 -$(LIBRARY_NAME).pc: js.pc
221 +$(JS_CONFIG_NAME): js-config
222 cp $^ $@
224 -install:: $(LIBRARY_NAME).pc
225 +$(JS_LIBRARY_NAME).pc: js.pc
226 + cp $^ $@
227 +
228 +install:: $(JS_LIBRARY_NAME).pc
229 $(SYSINSTALL) $^ $(DESTDIR)$(libdir)/pkgconfig
231 install:: js-config.h