Skip to content

Commit

Permalink
Make LIBXML configurable in npm build:php:node:8.0 via `WITH_LIBXML…
Browse files Browse the repository at this point in the history
…=yes` and `WITH_LIBXML=no`
  • Loading branch information
Pookie717 committed Jan 13, 2023
1 parent fcb40ea commit b16eaa5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/php-wasm/wasm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ RUN if [ "$WITH_LIBXML" = "yes" ]; \
--single-branch \
--depth 1 && \
cd libxml2 && \
buildautogen.sh && \
./autogen.sh && \
emconfigure ./configure --with-http=no --with-ftp=no --with-python=no --with-threads=no --enable-shared=no --prefix=/root/lib/ &&\
emmake make && \
emmake make install; \
echo -n ' --with-libxml --enable-dom --enable-xml --enable-simplexml' >> /root/.php-configure-flags; \
echo -n ' --with-libxml=/root/lib --enable-dom --enable-xml --enable-simplexml' >> /root/.php-configure-flags; \
echo -n ' -I /root/libxml2' >> /root/.emcc-php-wasm-flags; \
echo -n ' /root/lib/lib/libxml2.a' >> /root/.emcc-php-wasm-sources; \
else \
Expand Down
3 changes: 2 additions & 1 deletion src/php-wasm/wasm/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ async function build() {
const withVRZNO = 'no'; //phpVersion.startsWith('7.') ? 'yes' : 'no';
const platform = process.env.PLATFORM === 'node' ? 'node' : 'web';
const withNodeFs = platform === 'node' ? 'yes' : 'no';
const withLibxml = process.env.WITH_LIBXML === 'yes' ? 'yes' : 'no';

// Build PHP
await asyncSpawn(
Expand All @@ -36,7 +37,7 @@ async function build() {
'--build-arg',
`WITH_VRZNO=${withVRZNO}`,
'--build-arg',
`WITH_LIBXML=no`,
`WITH_LIBXML=${withLibxml}`,
'--build-arg',
`WITH_LIBZIP=yes`,
'--build-arg',
Expand Down

0 comments on commit b16eaa5

Please sign in to comment.