File tree 4 files changed +65
-16
lines changed
4 files changed +65
-16
lines changed Original file line number Diff line number Diff line change 5
5
6
6
version=" ${1} "
7
7
8
+ platform=$( uname)
9
+
8
10
NJOBS=" ${NJOBS:- $(getconf _NPROCESSORS_ONLN 2>/ dev/ null || getconf NPROCESSORS_ONLN 2>/ dev/ null || true)} "
9
11
NJOBS=" ${NJOBS:- 1} "
10
12
11
13
echo " parallel job count: ${NJOBS} "
12
14
13
15
cd " src/node-${version} "
14
16
15
- patch -p1 < ../../py2-icutrim.patch
16
-
17
17
if which python3 > /dev/null 2>&1 ; then
18
18
PYTHON=" ${PYTHON:- python3} "
19
19
else
20
20
PYTHON=" ${PYTHON:- python2} "
21
21
fi
22
22
23
- " ${PYTHON} " configure --openssl-no-asm --without-npm --shared --with-intl=small-icu
24
- make -j" ${NJOBS} "
25
-
26
- # taken from
27
- # ./configure
28
- # make
29
- # make -C out BUILDTYPE=Release V=1
30
-
31
- # python configure.py --openssl-no-asm --without-npm
32
- # make BUILDTYPE=Release out/Makefile
33
- # make -C out BUILDTYPE=Release V=1 v8
34
- # make -C out BUILDTYPE=Release V=1 v8_libbase
35
- # make -C out BUILDTYPE=Release V=1 v8_libplatform
36
- # make -C out BUILDTYPE=Release V=1 v8_libsampler
23
+ case " ${platform} " in
24
+ SunOS)
25
+ export CC=" ${CC:-/ opt/ local/ gcc7/ bin/ gcc} "
26
+ export CXX=" ${CXX:-/ opt/ local/ gcc7/ bin/ g++} "
27
+ ;;
28
+ * )
29
+ if cc --version | grep 4.9 > /dev/null; then
30
+ export CC=" ${CC:- clang} "
31
+ export CXX=" ${CXX:- clang++} "
32
+ fi
33
+ ;;
34
+ esac
37
35
36
+ " ${PYTHON} " configure --openssl-no-asm --without-npm --shared --with-intl=small-icu
37
+ make BUILDTYPE=Release config.gypi
38
+ make BUILDTYPE=Release out/Makefile
39
+ export PATH=" ${PWD} /out/tools/bin:${PATH} "
40
+ make -j" ${NJOBS} " -C out BUILDTYPE=Release V=0 v8 v8_libbase v8_libplatform v8_libsampler
Original file line number Diff line number Diff line change @@ -17,3 +17,19 @@ case "${platform}" in
17
17
esac
18
18
19
19
" ${TAR} " -C src -xz -f " src/node-${version} .tar.gz"
20
+
21
+ cd " src/node-${version} "
22
+
23
+ patch -p1 < ../../py2-icutrim.patch
24
+ patch -p1 < ../../py2-genv8constants.patch
25
+
26
+ # TODO: the following still fails on py3 so the above one forcing py2 is needed
27
+ # patch -p1 < ../../py3-genv8constants.patch
28
+ #
29
+ # This is the error:
30
+ #
31
+ # Traceback (most recent call last):
32
+ # File "tools/genv8constants.py", line 99, in <module>
33
+ # curr_val += int('0x%s' % octetstr, 16) << (curr_octet * 8)
34
+ # ValueError: invalid literal for int() with base 16: "0xb'04 '"
35
+ # node_dtrace_ustack.target.mk:13: recipe for target '/usbkey/user_home/vagrant/ruby-libv8-node/src/node-14.14.0/out/Release/obj/gen/v8constants.h' failed
Original file line number Diff line number Diff line change
1
+ --- a/tools/genv8constants.py 2020-11-04 09:49:14.000000000 +0100
2
+ +++ b/tools/genv8constants.py 2020-11-04 12:40:46.000000000 +0100
3
+ @@ -1,4 +1,4 @@
4
+ - #!/usr/bin/env python
5
+ + #!/usr/bin/env python2
6
+
7
+ #
8
+ # genv8constants.py output_file libv8_base.a
9
+
10
+
Original file line number Diff line number Diff line change
1
+ --- a/tools/genv8constants.py 2020-11-04 09:49:14.000000000 +0100
2
+ +++ b/tools/genv8constants.py 2020-11-04 09:49:25.000000000 +0100
3
+ @@ -33,9 +33,14 @@
4
+
5
+ sys.exit()
6
+
7
+ - pattern = re.compile(bytes('([0-9a-fA-F]{8}|[0-9a-fA-F]{16}) <(.*)>:'))
8
+ - v8dbg = re.compile(bytes('^v8dbg.*$'))
9
+ - numpattern = re.compile(bytes('^[0-9a-fA-F]{2} $'))
10
+ + if str == bytes:
11
+ + pattern = re.compile(bytes('([0-9a-fA-F]{8}|[0-9a-fA-F]{16}) <(.*)>:'))
12
+ + v8dbg = re.compile(bytes('^v8dbg.*$'))
13
+ + numpattern = re.compile(bytes('^[0-9a-fA-F]{2} $'))
14
+ + else:
15
+ + pattern = re.compile(bytes('([0-9a-fA-F]{8}|[0-9a-fA-F]{16}) <(.*)>:', 'utf-8'))
16
+ + v8dbg = re.compile(bytes('^v8dbg.*$', 'utf-8'))
17
+ + numpattern = re.compile(bytes('^[0-9a-fA-F]{2} $', 'utf-8'))
18
+ octets = 4
19
+
20
+ outfile.write("""
You can’t perform that action at this time.
0 commit comments