1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
--- ./nss/coreconf/nspr.sh.sav 2019-11-19 20:55:30.000000000 +0100
+++ ./nss/coreconf/nspr.sh 2020-02-19 22:25:05.863542364 +0100
@@ -35,10 +35,13 @@
else
extra_params+=(--disable-debug --enable-optimize)
fi
+ else
+ extra_params+=(--enable-debug-rtl)
fi
if [ "$target_arch" = "x64" ]; then
extra_params+=(--enable-64bit)
fi
+ extra_params+=(--enable-win32-target=WIN95)
echo "NSPR [1/5] configure ..."
pushd "$nspr_dir" >/dev/null
@@ -43,24 +46,24 @@
run_verbose ../configure "${extra_params[@]}" "$@"
popd >/dev/null
echo "NSPR [2/5] make ..."
- run_verbose make -C "$nspr_dir"
+ run_verbose $MAKE -C $(cygpath -w "$nspr_dir") NSINSTALL=$NSINSTALL RC="$RC"
if [ "$build_nspr_tests" = 1 ]; then
echo "NSPR [3/5] build tests ..."
- run_verbose make -C "$nspr_dir/pr/tests"
+ run_verbose $MAKE -C $(cygpath -w "$nspr_dir/pr/tests")
else
echo "NSPR [3/5] NOT building tests"
fi
if [[ "$build_nspr_tests" = 1 && "$run_nspr_tests" = 1 ]]; then
echo "NSPR [4/5] run tests ..."
- run_verbose make -C "$nspr_dir/pr/tests" runtests
+ run_verbose $MAKE -C $(cygpath -w "$nspr_dir/pr/tests") runtests
else
echo "NSPR [4/5] NOT running tests"
fi
echo "NSPR [5/5] install ..."
- run_verbose make -C "$nspr_dir" install
+ run_verbose $MAKE -C $(cygpath -w "$nspr_dir") install NSINSTALL=$NSINSTALL
}
nspr_clean()
--- ./nss/build.sh.sav 2019-11-19 20:55:30.000000000 +0100
+++ ./nss/build.sh 2020-02-19 22:28:30.976068194 +0100
@@ -155,9 +155,10 @@
gyp_params+=(-Dsanitizer_flags="$sanitizer_flags")
fi
-if [ "$msvc" = 1 ]; then
- source "$cwd/coreconf/msvc.sh"
-fi
+# this breaks nspr
+#if [ "$msvc" = 1 ]; then
+# source "$cwd/coreconf/msvc.sh"
+#fi
# -c = clean first
if [ "$clean" = 1 -o "$clean_only" = 1 ]; then
@@ -236,6 +237,9 @@
exit 0
fi
+# set up for gyp
+source "$cwd/coreconf/msvc.sh"
+
# gyp.
if [ "$rebuild_gyp" = 1 ]; then
if ! hash "$GYP" 2> /dev/null; then
@@ -263,4 +267,4 @@
echo "Building NSS requires an installation of ninja: https://ninja-build.org/" 1>&2
exit 3
fi
-run_scanbuild setup-python "$ninja" -C "$target_dir" "${ninja_params[@]}"
+run_scanbuild setup-python $(cygpath -w $(which "$ninja")) -C $(cygpath -w "$target_dir") "${ninja_params[@]}"
--- ./nss/coreconf/msvc.sh.sav 2019-11-19 20:55:30.000000000 +0100
+++ ./nss/coreconf/msvc.sh 2020-02-21 17:42:32.344129200 +0100
@@ -2,6 +2,9 @@
# This configures the environment for running MSVC. It uses vswhere, the
# registry, and a little knowledge of how MSVC is laid out.
+PATH="$PATH:/cygdrive/c/Program Files (x86)/Microsoft Visual Studio/Installer/"
+set -o igncr
+
if ! hash vswhere 2>/dev/null; then
echo "Can't find vswhere on the path, aborting" 1>&2
exit 1
@@ -17,11 +17,7 @@
# Turn a unix-y path into a windows one.
fixpath() {
- if hash cygpath 2>/dev/null; then
- cygpath --unix "$1"
- else # haxx
- echo "$1" | sed -e 's,\\,/,g;s,^\(.\):,/\L\1,;s,/$,,'
- fi
+ echo "$1"
}
# Query the registry. This takes $1 and tags that on the end of several
@@ -94,6 +89,8 @@
INCLUDE="${INCLUDE}:${UniversalCRTSdkDir}/include/${UCRTVersion}/um"
INCLUDE="${INCLUDE}:${UniversalCRTSdkDir}/include/${UCRTVersion}/winrt"
INCLUDE="${INCLUDE}:${UniversalCRTSdkDir}/include/${UCRTVersion}/cppwinrt"
+ # : -> ; as the separator
+ INCLUDE=$(echo "$INCLUDE" | sed 's/:C/;C/g')
export INCLUDE
LIB="${VCINSTALLDIR}/lib/${m}"
--- ./nspr/configure.sav 2020-02-21 21:40:01.218554800 +0100
+++ ./nspr/configure 2020-02-21 21:41:32.434189100 +0100
@@ -5977,10 +5977,6 @@
NSINSTALL=nsinstall
;;
*-cygwin*|*-mks*)
- NSINSTALL='$(CYGWIN_WRAPPER) nsinstall'
- if test `echo "${PATH}" | grep -c \;` = 0; then
- CYGWIN_WRAPPER='sh $(topsrcdir)/build/cygwin-wrapper'
- fi
;;
*os2*)
;;
--- nss/coreconf/config.gypi.sav 2019-11-19 20:55:30.000000000 +0100
+++ nss/coreconf/config.gypi 2020-03-04 16:28:46.512443300 +0100
@@ -44,7 +44,7 @@
}],
['OS=="win"', {
'use_system_zlib%': 0,
- 'nspr_libs%': ['libnspr4.lib', 'libplc4.lib', 'libplds4.lib'],
+ 'nspr_libs%': ['nspr4.lib', 'plc4.lib', 'plds4.lib'],
'zlib_libs%': [],
#TODO
'moz_debug_flags%': '',
|