Skip to content

Commit 73418e0

Browse files
committed
Reconcile more trunk changes
1 parent 10a2626 commit 73418e0

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

packages/php-wasm/compile/Dockerfile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,8 @@ RUN if [ "$WITH_WS_NETWORKING_PROXY" = "yes" ]; \
665665
"dynCall_viiiii",\
666666
"dynCall_viiiiiii",\
667667
"dynCall_viiiiiiii",'; \
668-
export ASYNCIFY_ONLY=$'"zif_array_filter",\"__fwritex",\
668+
export ASYNCIFY_ONLY=$'"zif_array_filter",\
669+
"__fwritex",\
669670
"zif_sleep",\
670671
"zif_stream_get_contents",\
671672
"php_stdiop_read",\
@@ -970,7 +971,7 @@ RUN if [ "$WITH_WS_NETWORKING_PROXY" = "yes" ]; \
970971
if [ "${PHP_VERSION:0:1}" -lt "8" ]; then \
971972
export ASYNCIFY_ONLY="$ASYNCIFY_ONLY,"$(echo "$ASYNCIFY_ONLY" | sed -E $'s/"([a-zA-Z])/"byn$fpcast-emu$\\1/g'); \
972973
fi; \
973-
echo -n ' -s ASYNCIFY_ONLY=['$ASYNCIFY_ONLY_UNPREFIXED$ASYNCIFY_ONLY'] '| tr -d "\n" >> /root/.emcc-php-wasm-flags; \
974+
echo -n ' -s ASYNCIFY_ONLY=['$ASYNCIFY_ONLY_UNPREFIXED$ASYNCIFY_ONLY'] '| tr -d "\n" >> /root/.emcc-php-wasm-flags; \
974975
fi;
975976

976977
# Build the final .wasm file
@@ -1143,7 +1144,7 @@ RUN set -euxo pipefail; \
11431144
# Make the php.wasm URL configurable via the dependencyFilename loader argument:
11441145
/root/replace.sh $'s/["\']php\.wasm[\'"]/dependencyFilename/g' /root/output/php.js; \
11451146
# Patch a "property undefined" error
1146-
# Emscripten produces an if that checkes a stream.stream_ops.poll property. However,
1147+
# Emscripten produces an if that checks a stream.stream_ops.poll property. However,
11471148
# stream.stream_ops is sometimes undefined and the check fails. Let's adjust it to
11481149
# tolerate a null stream.stream_ops value.
11491150
/root/replace.sh "s/if\s*\(stream\.stream_ops\.poll\)/if (stream.stream_ops?.poll)/g" /root/output/php.js; \
@@ -1155,10 +1156,12 @@ RUN set -euxo pipefail; \
11551156
/root/replace.sh $'s/if\s*\(\s*["\']string["\']\s*===\s*typeof Module\[["\']websocket["\']\]\[["\']url["\']\]\s*\)/if("function"===typeof Module["websocket"]["url"]) {\nurl = Module["websocket"]["url"](...arguments);\n}else if ("string" === typeof Module["websocket"]["url"])/g' \
11561157
/root/output/php.js; \
11571158
# Enable custom WebSocket constructors to support socket options.
1158-
/root/replace.sh "s/ws\s*=\s*new WebSocketConstructor/if (Module['websocket']['decorator']) {WebSocketConstructor = Module['websocket']['decorator'](WebSocketConstructor);}ws = new WebSocketConstructor/g" /root/output/php.js; \
1159+
/root/replace.sh "s/ws\s*=\s*new WebSocketConstructor/if (Module['websocket']['decorator']) {WebSocketConstructor = Module['websocket']['decorator'](WebSocketConstructor);}ws = new WebSocketConstructor/g" /root/output/php.js && \
1160+
if [ "$EMSCRIPTEN_ENVIRONMENT" = "node" ]; then \
11591161
if [ "$WITH_WS_NETWORKING_PROXY" = "yes" ]; then \
11601162
/root/replace.sh "s/sock\.server\s*=\s*new WebSocketServer/if (Module['websocket']['serverDecorator']) {WebSocketServer = Module['websocket']['serverDecorator'](WebSocketServer);}sock.server = new WebSocketServer/g" /root/output/php.js; \
11611163
fi; \
1164+
fi; \
11621165
# Add MSG_PEEK flag support in recvfrom
11631166
#
11641167
# Emscripten ignores the flags argument to ___syscall_recvfrom.

0 commit comments

Comments
 (0)