mirror of
https://github.com/bdnugget/php-wasm.git
synced 2026-11-07 09:07:28 +00:00
Fixing SQLite with new Emscripten.
This commit is contained in:
1 parent
a4a2a846a1
commit
09009dba5a
10 files changed
+427
-165
No files matched your search
@@ -10,7 +10,6 @@ PRELOAD_ASSETS ?=preload/
|
||||
ASSERTIONS ?=0
|
||||
OPTIMIZE ?=-O3
|
||||
RELEASE_SUFFIX ?=
|
||||
BUILD_TYPE ?=js
|
||||
|
||||
PHP_VERSION ?=8.2
|
||||
PHP_BRANCH ?=php-8.2.11
|
||||
@@ -30,15 +29,13 @@ SQLITE_DIR ?=sqlite3.41-src
|
||||
|
||||
PKG_CONFIG_PATH ?=/src/lib/lib/pkgconfig
|
||||
|
||||
NPM_PUBLISH_DRY?=--dry-run
|
||||
|
||||
DOCKER_ENV=USERID=${UID} docker-compose -p phpwasm run --rm \
|
||||
-e PKG_CONFIG_PATH=${PKG_CONFIG_PATH} \
|
||||
-e PRELOAD_ASSETS='${PRELOAD_ASSETS}' \
|
||||
-e INITIAL_MEMORY=${INITIAL_MEMORY} \
|
||||
-e ENVIRONMENT=${ENVIRONMENT} \
|
||||
-e PHP_BRANCH=${PHP_BRANCH} \
|
||||
-e EMCC_CORES=`nproc` \
|
||||
-e EMCC_CORES=`nproc`
|
||||
|
||||
DOCKER_ENV_SIDE=USERID=${UID} docker-compose -p phpwasm run --rm \
|
||||
-e PRELOAD_ASSETS='${PRELOAD_ASSETS}' \
|
||||
@@ -49,11 +46,12 @@ DOCKER_ENV_SIDE=USERID=${UID} docker-compose -p phpwasm run --rm \
|
||||
-e CFLAGS=" -I/root/lib/include " \
|
||||
-e EMCC_FLAGS=" -sSIDE_MODULE=1 -sERROR_ON_UNDEFINED_SYMBOLS=0 "
|
||||
|
||||
|
||||
DOCKER_RUN =${DOCKER_ENV} emscripten-builder
|
||||
DOCKER_RUN_IN_PHP =${DOCKER_ENV} -w /src/third_party/php${PHP_VERSION}-src/ emscripten-builder
|
||||
DOCKER_RUN_IN_PHPSIDE=${DOCKER_ENV_SIDE} -w /src/third_party/php${PHP_VERSION}-src/ emscripten-builder
|
||||
DOCKER_RUN_IN_ICU4C =${DOCKER_ENV} -w /src/third_party/libicu-src/icu4c/source/ emscripten-builder
|
||||
DOCKER_RUN_IN_LIBXML =${DOCKER_ENV} -w /src/third_party/libxml2/ emscripten-builder
|
||||
DOCKER_RUN_IN_SQLITE =${DOCKER_ENV_SIDE} -w /src/third_party/${SQLITE_DIR}/ emscripten-builder
|
||||
DOCKER_RUN_IN_TIDY =${DOCKER_ENV_SIDE} -w /src/third_party/tidy-html5/ emscripten-builder
|
||||
DOCKER_RUN_IN_ICU =${DOCKER_ENV_SIDE} -w /src/third_party/libicu-src/icu4c/source emscripten-builder
|
||||
DOCKER_RUN_IN_ICONV =${DOCKER_ENV_SIDE} -w /src/third_party/libiconv-1.17/ emscripten-builder
|
||||
@@ -64,23 +62,30 @@ TIMER=(which pv > /dev/null && pv --name '${@}' || cat)
|
||||
all: cjs mjs js
|
||||
cjs: php-web-drupal.js php-web.js php-webview.js php-node.js php-shell.js php-worker.js
|
||||
mjs: php-web-drupal.mjs php-web.mjs php-webview.mjs php-node.mjs php-shell.mjs php-worker.mjs
|
||||
web-drupal: php-web-drupal.wasm php-web-drupal.mjs
|
||||
web: php-web.wasm php-web.mjs
|
||||
web-drupal: lib/pib_eval.o php-web-drupal.wasm
|
||||
web: lib/pib_eval.o php-web.wasm
|
||||
@ echo "Done!"
|
||||
|
||||
########### Collect & patch the source code. ###########
|
||||
|
||||
third_party/${SQLITE_DIR}/sqlite3.c: patch/sqlite3-wasm.patch
|
||||
# third_party/${SQLITE_DIR}/sqlite3.c: patch/sqlite3-wasm.patch
|
||||
# @ echo -e "\e[33mDownloading and patching SQLite"
|
||||
# @ wget https://sqlite.org/2023/sqlite-amalgamation-${SQLITE_VERSION}.zip
|
||||
# @ ${DOCKER_RUN} unzip sqlite-amalgamation-${SQLITE_VERSION}.zip
|
||||
# @ ${DOCKER_RUN} rm -r sqlite-amalgamation-${SQLITE_VERSION}.zip
|
||||
# @ ${DOCKER_RUN} mv sqlite-amalgamation-${SQLITE_VERSION} third_party/${SQLITE_DIR}
|
||||
# @ ${DOCKER_RUN} git apply --no-index patch/sqlite3.41-wasm.patch
|
||||
|
||||
third_party/${SQLITE_DIR}/sqlite3.c:
|
||||
@ echo -e "\e[33mDownloading and patching SQLite"
|
||||
@ wget https://sqlite.org/2023/sqlite-amalgamation-${SQLITE_VERSION}.zip
|
||||
@ ${DOCKER_RUN} unzip sqlite-amalgamation-${SQLITE_VERSION}.zip
|
||||
@ ${DOCKER_RUN} rm -r sqlite-amalgamation-${SQLITE_VERSION}.zip
|
||||
@ ${DOCKER_RUN} mv sqlite-amalgamation-${SQLITE_VERSION} third_party/${SQLITE_DIR}
|
||||
@ ${DOCKER_RUN} git apply --no-index patch/sqlite3.41-wasm.patch
|
||||
@ wget https://sqlite.org/2023/sqlite-autoconf-${SQLITE_VERSION}.tar.gz
|
||||
@ ${DOCKER_RUN} tar -xzf sqlite-autoconf-${SQLITE_VERSION}.tar.gz
|
||||
@ ${DOCKER_RUN} rm -r sqlite-autoconf-${SQLITE_VERSION}.tar.gz
|
||||
@ ${DOCKER_RUN} rm -rf third_party/${SQLITE_DIR}
|
||||
@ ${DOCKER_RUN} mv sqlite-autoconf-${SQLITE_VERSION} third_party/${SQLITE_DIR}
|
||||
|
||||
third_party/php${PHP_VERSION}-src/patched: third_party/${SQLITE_DIR}/sqlite3.c
|
||||
@ echo -e "\e[33mDownloading and patching PHP"
|
||||
@ ${DOCKER_RUN} rm -rf third_party/php${PHP_VERSION}-src
|
||||
@ ${DOCKER_RUN} git clone https://github.com/php/php-src.git third_party/php${PHP_VERSION}-src \
|
||||
--branch ${PHP_BRANCH} \
|
||||
--single-branch \
|
||||
@@ -90,12 +95,12 @@ third_party/php${PHP_VERSION}-src/patched: third_party/${SQLITE_DIR}/sqlite3.c
|
||||
@ ${DOCKER_RUN} cp third_party/php${PHP_VERSION}-src/Zend/bench.php third_party/php${PHP_VERSION}-src/preload/Zend
|
||||
@ ${DOCKER_RUN} touch third_party/php${PHP_VERSION}-src/patched
|
||||
|
||||
source/sqlite3.c: third_party/${SQLITE_DIR}/sqlite3.c third_party/php${PHP_VERSION}-src/patched
|
||||
@ echo -e "\e[33mImporting SQLite"
|
||||
@ ${DOCKER_RUN} cp -v third_party/${SQLITE_DIR}/sqlite3.c source/sqlite3.c
|
||||
@ ${DOCKER_RUN} cp -v third_party/${SQLITE_DIR}/sqlite3.h source/sqlite3.h
|
||||
@ ${DOCKER_RUN} cp -v third_party/${SQLITE_DIR}/sqlite3.h third_party/php${PHP_VERSION}-src/main/sqlite3.h
|
||||
@ ${DOCKER_RUN} cp -v third_party/${SQLITE_DIR}/sqlite3.c third_party/php${PHP_VERSION}-src/main/sqlite3.c
|
||||
# source/sqlite3.c: third_party/${SQLITE_DIR}/sqlite3.c third_party/php${PHP_VERSION}-src/patched
|
||||
# @ echo -e "\e[33mImporting SQLite"
|
||||
# @ ${DOCKER_RUN} cp -v third_party/${SQLITE_DIR}/sqlite3.c source/sqlite3.c
|
||||
# @ ${DOCKER_RUN} cp -v third_party/${SQLITE_DIR}/sqlite3.h source/sqlite3.h
|
||||
# @ ${DOCKER_RUN} cp -v third_party/${SQLITE_DIR}/sqlite3.h third_party/php${PHP_VERSION}-src/main/sqlite3.h
|
||||
# @ ${DOCKER_RUN} cp -v third_party/${SQLITE_DIR}/sqlite3.c third_party/php${PHP_VERSION}-src/main/sqlite3.c
|
||||
|
||||
third_party/php${PHP_VERSION}-src/ext/vrzno/vrzno.c: third_party/php${PHP_VERSION}-src/patched
|
||||
@ echo -e "\e[33mDownloading and importing VRZNO"
|
||||
@@ -147,12 +152,25 @@ third_party/libiconv-1.17/README:
|
||||
|
||||
########### Build the objects. ###########
|
||||
|
||||
lib/lib/libxml2.a: third_party/libxml2/.gitignore
|
||||
lib/${PHP_AR}.a: third_party/php${PHP_VERSION}-src/configured third_party/php${PHP_VERSION}-src/patched third_party/php${PHP_VERSION}-src/**.c
|
||||
@ echo -e "\e[33mBuilding PHP symbol files"
|
||||
@ ${DOCKER_RUN_IN_PHPSIDE} emmake make -B -j`nproc` EXTRA_CFLAGS='-Wno-int-conversion -Wno-incompatible-function-pointer-types'
|
||||
@ ${DOCKER_RUN} cp -v \
|
||||
third_party/php${PHP_VERSION}-src/.libs/${PHP_AR}.la \
|
||||
third_party/php${PHP_VERSION}-src/.libs/${PHP_AR}.a lib/
|
||||
|
||||
lib/lib/libxml2.la: third_party/libxml2/.gitignore
|
||||
@ echo -e "\e[33mBuilding LibXML2"
|
||||
${DOCKER_RUN_IN_LIBXML} ./autogen.sh
|
||||
${DOCKER_RUN_IN_LIBXML} emconfigure ./configure --with-http=no --with-ftp=no --with-python=no --with-threads=no --enable-shared=no --prefix=/src/lib
|
||||
${DOCKER_RUN_IN_LIBXML} emmake make -j`nproc` EXTRA_CFLAGS='-fPIC'
|
||||
${DOCKER_RUN_IN_LIBXML} emmake make install
|
||||
${DOCKER_RUN_IN_LIBXML} emconfigure ./configure --with-http=no --with-ftp=no --with-python=no --with-threads=no --enable-shared=no --prefix=/src/lib/ | ${TIMER}
|
||||
${DOCKER_RUN_IN_LIBXML} emmake make -j`nproc` EXTRA_CFLAGS='-fPIC' | ${TIMER}
|
||||
${DOCKER_RUN_IN_LIBXML} emmake make install | ${TIMER}
|
||||
|
||||
lib/lib/libsqlite3.a: third_party/${SQLITE_DIR}/sqlite3.c
|
||||
@ echo -e "\e[33mBuilding LibSqlite3"
|
||||
${DOCKER_RUN_IN_SQLITE} emconfigure ./configure --with-http=no --with-ftp=no --with-python=no --with-threads=no --enable-shared=no --prefix=/src/lib/ | ${TIMER}
|
||||
${DOCKER_RUN_IN_SQLITE} emmake make -j`nproc` EXTRA_CFLAGS='-fPIC' | ${TIMER}
|
||||
${DOCKER_RUN_IN_SQLITE} emmake make install | ${TIMER}
|
||||
|
||||
lib/lib/libtidy.a: third_party/tidy-html5/.gitignore
|
||||
@ echo -e "\e[33mBuilding LibTidy"
|
||||
@@ -160,7 +178,7 @@ lib/lib/libtidy.a: third_party/tidy-html5/.gitignore
|
||||
-DCMAKE_INSTALL_PREFIX=/src/lib/ \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_FLAGS="-I/emsdk/upstream/emscripten/system/lib/libc/musl/include/ -fpic"; \
|
||||
${DOCKER_RUN_IN_TIDY} emmake make -j`nproc`
|
||||
${DOCKER_RUN_IN_TIDY} emmake make
|
||||
${DOCKER_RUN_IN_TIDY} emmake make install
|
||||
|
||||
# lib/lib/libicudata.a: third_party/libicu-src/.gitignore
|
||||
@@ -172,37 +190,25 @@ lib/lib/libiconv.a: third_party/libiconv-1.17/README
|
||||
@ echo -e "\e[33mBuilding LibIconv"
|
||||
${DOCKER_RUN_IN_ICONV} autoconf
|
||||
${DOCKER_RUN_IN_ICONV} emconfigure ./configure --prefix=/src/lib/ --target=wasm32-unknown-emscripten --enable-shared=no --enable-static=yes
|
||||
${DOCKER_RUN_IN_ICONV} emmake make -j`nproc` EMCC_CFLAGS='-fPIC'
|
||||
${DOCKER_RUN_IN_ICONV} emmake make -B EMCC_CFLAGS='-fPIC'
|
||||
${DOCKER_RUN_IN_ICONV} emmake make install
|
||||
|
||||
lib/${PHP_AR}.a: third_party/php${PHP_VERSION}-src/configured third_party/php${PHP_VERSION}-src/patched third_party/php${PHP_VERSION}-src/**.c source/sqlite3.c
|
||||
@ echo -e "\e[33mBuilding PHP symbol files"
|
||||
@ ${DOCKER_RUN_IN_PHP} emmake make -j`nproc` EXTRA_CFLAGS='-Wno-int-conversion -Wno-incompatible-function-pointer-types -fPIC'
|
||||
@ ${DOCKER_RUN} cp -v \
|
||||
third_party/php${PHP_VERSION}-src/.libs/${PHP_AR}.la \
|
||||
third_party/php${PHP_VERSION}-src/.libs/${PHP_AR}.a \
|
||||
lib/lib/
|
||||
|
||||
########### Build the final files. ###########
|
||||
|
||||
third_party/php${PHP_VERSION}-src/configured: third_party/php${PHP_VERSION}-src/ext/vrzno/vrzno.c source/sqlite3.c lib/lib/libxml2.a lib/lib/libtidy.a lib/lib/libiconv.a # lib/lib/libicudata.a
|
||||
@ echo -e "\e[33mConfiguring PHP..."
|
||||
${DOCKER_RUN_IN_PHP} ./buildconf --force
|
||||
${DOCKER_RUN_IN_PHP} emconfigure ./configure \
|
||||
third_party/php${PHP_VERSION}-src/configured: third_party/php${PHP_VERSION}-src/ext/vrzno/vrzno.c lib/lib/libxml2.la lib/lib/libtidy.a lib/lib/libiconv.a lib/lib/libsqlite3.a # lib/lib/libicudata.a
|
||||
@ echo -e "\e[33mBuilding PHP object files"
|
||||
${DOCKER_RUN_IN_PHPSIDE} ./buildconf --force
|
||||
${DOCKER_RUN_IN_PHPSIDE} emconfigure ./configure \
|
||||
PKG_CONFIG_PATH=${PKG_CONFIG_PATH} \
|
||||
--target=wasm32-unknown-emscripten \
|
||||
--enable-embed=static \
|
||||
--with-layout=GNU \
|
||||
--with-libxml \
|
||||
--disable-cgi \
|
||||
--disable-cli \
|
||||
--disable-all \
|
||||
--with-sqlite3 \
|
||||
--enable-session \
|
||||
--enable-filter \
|
||||
--enable-calendar \
|
||||
--enable-dom \
|
||||
--enable-pdo \
|
||||
--with-pdo-sqlite \
|
||||
--disable-rpath \
|
||||
--disable-phpdbg \
|
||||
--without-pear \
|
||||
@@ -218,22 +224,19 @@ third_party/php${PHP_VERSION}-src/configured: third_party/php${PHP_VERSION}-src/
|
||||
--enable-xml \
|
||||
--enable-simplexml \
|
||||
--with-gd \
|
||||
--with-sqlite3 \
|
||||
--enable-pdo \
|
||||
--with-pdo-sqlite=/src/lib \
|
||||
--with-iconv=/src/lib \
|
||||
--with-tidy=/src/lib \
|
||||
--disable-fiber-asm
|
||||
${DOCKER_RUN} touch third_party/php${PHP_VERSION}-src/configured
|
||||
${DOCKER_RUN_IN_PHPSIDE} touch /src/third_party/php${PHP_VERSION}-src/configured
|
||||
|
||||
########### Build the final files. ###########
|
||||
|
||||
FINAL_BUILD=${DOCKER_RUN_IN_PHP} emcc ${OPTIMIZE} \
|
||||
-I . \
|
||||
-I Zend \
|
||||
-I main \
|
||||
-I TSRM/ \
|
||||
-I /src/third_party/libxml2 \
|
||||
-I ext/pdo_sqlite/ \
|
||||
-o ../../build/php-${ENVIRONMENT}${RELEASE_SUFFIX}.${BUILD_TYPE} \
|
||||
--llvm-lto 2 \
|
||||
-s EXPORTED_FUNCTIONS=_pib_init,_pib_destroy,_pib_run,_pib_exec,_pib_refresh,_main,_php_embed_init,_php_embed_shutdown,_php_embed_shutdown,_zend_eval_string,_exec_callback,_del_callback \
|
||||
-s EXPORTED_RUNTIME_METHODS='"ccall", "UTF8ToString", "lengthBytesUTF8"' \
|
||||
-s EXPORTED_FUNCTIONS='["_pib_init", "_pib_destroy", "_pib_run", "_pib_exec", "_pib_refresh", "_main", "_php_embed_init", "_php_embed_shutdown", "_php_embed_shutdown", "_zend_eval_string", "_exec_callback", "_del_callback"]' \
|
||||
-s EXPORTED_RUNTIME_METHODS='["ccall", "UTF8ToString", "lengthBytesUTF8"]' \
|
||||
-s ENVIRONMENT=${ENVIRONMENT} \
|
||||
-s MAXIMUM_MEMORY=2048mb \
|
||||
-s INITIAL_MEMORY=${INITIAL_MEMORY} \
|
||||
@@ -244,9 +247,26 @@ FINAL_BUILD=${DOCKER_RUN_IN_PHP} emcc ${OPTIMIZE} \
|
||||
-s MODULARIZE=1 \
|
||||
-s INVOKE_RUN=0 \
|
||||
-s USE_ZLIB=1 \
|
||||
/src/lib/lib/libiconv.a /src/lib/lib/libxml2.a /src/lib/lib/libtidy.a /src/source/pib_eval.c /src/third_party/php8.2-src/.libs/${PHP_AR}.a
|
||||
-I . \
|
||||
-I Zend \
|
||||
-I main \
|
||||
-I TSRM/ \
|
||||
-I /src/third_party/libxml2 \
|
||||
-I ext/pdo_sqlite \
|
||||
-o ../../build/php-${ENVIRONMENT}${RELEASE_SUFFIX}.${BUILD_TYPE} \
|
||||
--llvm-lto 2 \
|
||||
/src/third_party/php8.2-src/.libs/${PHP_AR}.a \
|
||||
/src/lib/lib/libxml2.a \
|
||||
/src/lib/lib/libtidy.a \
|
||||
/src/lib/lib/libiconv.a \
|
||||
/src/lib/lib/libsqlite3.a \
|
||||
ext/pdo_sqlite/pdo_sqlite.c \
|
||||
ext/pdo_sqlite/sqlite_driver.c \
|
||||
ext/pdo_sqlite/sqlite_statement.c \
|
||||
/src/source/pib_eval.c
|
||||
|
||||
DEPENDENCIES=lib/${PHP_AR}.a lib/lib/libiconv.a source/**.c source/**.h lib/${PHP_AR}.a source/pib_eval.c lib/lib/libxml2.a lib/lib/libtidy.a # lib/lib/libicudata.a
|
||||
DEPENDENCIES=lib/${PHP_AR}.a lib/lib/libxml2.a lib/lib/libiconv.a lib/lib/libtidy.a lib/${PHP_AR}.a source/pib_eval.c lib/lib/libxml2.la lib/lib/libsqlite3.a
|
||||
BUILD_TYPE ?=js
|
||||
|
||||
php-web-drupal.js: ENVIRONMENT=web-drupal
|
||||
php-web-drupal.js: ${DEPENDENCIES} third_party/drupal-7.95/README.txt
|
||||
@@ -349,8 +369,9 @@ php-webview.mjs: ${DEPENDENCIES}
|
||||
clean:
|
||||
@ ${DOCKER_RUN} rm -fv *.js *.mjs *.wasm *.data
|
||||
@ ${DOCKER_RUN} rm -rfv build/* lib/* docs/php-*.js docs/php-*.wasm \
|
||||
/src/lib/pib_eval.o /src/lib/${PHP_AR}.a \
|
||||
# /src/lib/lib/libxml2.a
|
||||
/src/lib/pib_eval.o /src/lib/${PHP_AR}.a
|
||||
@ ${DOCKER_RUN_IN_PHP} make clean
|
||||
|
||||
php-clean:
|
||||
@ ${DOCKER_RUN} rm -fv third_party/php${PHP_VERSION}-src/configure
|
||||
|
||||
@@ -374,9 +395,8 @@ show-files:
|
||||
hooks:
|
||||
@ git config core.hooksPath githooks
|
||||
|
||||
js: cjs mjs
|
||||
js:
|
||||
@ echo -e "\e[33mBuilding JS"
|
||||
@ npm install
|
||||
@ npx babel source --out-dir .
|
||||
@ find source -name "*.js" | while read JS; \
|
||||
do cp $${JS} $$(basename $${JS%.js}.mjs); \
|
||||
|
||||
@@ -216,11 +216,11 @@ self.addEventListener('message', function (event) {});
|
||||
self.addEventListener('push', function (event) {
|
||||
console.log(event);
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
require.register("___globals___", function(exports, require, module) {
|
||||
|
||||
});})();require('___globals___');
|
||||
|
||||
require('DrupalWorker');
|
||||
require('DrupalWorker');
|
||||
//# sourceMappingURL=DrupalWorker.js.map
|
||||
+295
-1
@@ -1 +1,295 @@
|
||||
@font-face{src:url(fsex302-webfont.woff) format('woff');font-weight:400;font-style:normal;font-family:fixedsys}body{font-family:fixedsys;display:flex;flex-direction:column;align-items:stretch;height:100vh;padding:0;margin:0;background-color:#aaa}.output .scroller{background-color:#eee}.output div.scroller{white-space:pre}.output .row{background-color:#fff;padding:.5em .5em;border-bottom:1px #fff solid}.row.toolbar{margin:.5em;padding:.5em 0;border:2px solid;border-image:url(border-inset.png) 2 2 2 2;align-items:center}.row.toolbar>div{display:flex;justify-content:flex-end;padding:0 .5em;flex:1;flex-direction:row}.row.toolbar>div .start{align-items:center;flex:1}.row.toolbar button[data-run]{padding:.75em;font-weight:700;border:2px solid;align-self:center;margin-right:.5em}button{border-image:url(border.png) 2 2 2 2}button[data-run]:not([disabled])::after{position:absolute;top:-2px;left:-2px;bottom:-2px;right:-2px;content:'';background-color:red!important;mix-blend-mode:darken;opacity:.5}.header button[data-run]{position:relative;font-weight:700;font-size:13pt;box-sizing:border-box}:focus{outline-style:dotted;outline-color:#000}.row:focus{background-color:#000082;border-bottom:1px #000082 solid;color:#fff}.row.toolbar.header{background-color:#bbb}.row.toolbar.status{padding:0}.row.toolbar.status>div{padding:.25em}h1{margin:0;margin:.25em;white-space:nowrap}.row{display:flex;flex-direction:row}body>div{display:flex;flex-direction:row}.row.body{flex-grow:1}.collapse{flex-grow:0;flex-shrink:1}div.column{position:relative;flex:1}div.column .scroller{position:absolute;top:0;left:0;bottom:0;right:0;width:100%;height:100%;overflow-y:auto;overflow-x:auto;font-size:.9rem}div.panel{font-family:fixedsys;display:flex;position:relative;background-color:#aaa;flex-direction:column;box-sizing:border-box;margin:.5em;flex:1;border-right:1px solid rgba(0,0,0,.5);border-bottom:1px solid rgba(0,0,0,.5)}div.panel div.input{background-color:#272822}div.panel>div{background-color:#fff;border:2px solid;border-image:url(border-inset.png) 2 2 2 2;flex-direction:column;display:flex;flex:1}.liquid{display:flex;flex-direction:column;flex:1}.panel label,button{user-select:none;border:2px solid;border-image:url(border.png) 2 2 2 2!important;background-color:#c3c3c3;padding:.25em}.input,.output .scroller,iframe{user-select:normal}.panel .cols{margin-top:-1px}.panel label[tabindex]:first-child{margin-left:-1px}.panel .cols>label[tabindex]:last-child{margin-right:-3px}.ace_editor{margin-right:-2px}button:active,label[tabindex]:active{border:2px solid;border-image:url(border-inset.png) 2 2 2 2!important;position:relative;z-index:100}.header label{display:flex;align-items:center;justify-content:flex-end}.header label p{text-align:right}pre{flex:1;margin-top:0;margin-bottom:0}.round{border-radius:50%;height:49px;margin-right:5px}.credit{padding-right:.5em;padding-left:.5em}.column .row{white-space:pre}.cols{display:flex;flex-direction:row!important}.rows{display:flex;flex-direction:column!important}.cols label{flex:1}label{user-select:none}.collapse{flex:0!important;white-space:nowrap}.header.row{align-items:flex-start}iframe{border:none}input[type=file]{display:none}.header select{font-size:1rem}
|
||||
@font-face {
|
||||
src: url('fsex302-webfont.woff') format('woff');
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
font-family: 'fixedsys';
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: 'fixedsys';
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: stretch;
|
||||
height: 100vh;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
background-color: #aaa;
|
||||
}
|
||||
|
||||
.output {
|
||||
|
||||
}
|
||||
|
||||
.output .scroller {
|
||||
background-color: #EEE;
|
||||
}
|
||||
|
||||
.output div.scroller {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.output .row {
|
||||
background-color: #FFF;
|
||||
padding: 0.5em 0.5em;
|
||||
border-bottom: 1px white solid;
|
||||
}
|
||||
|
||||
.row.toolbar {
|
||||
margin: 0.5em;
|
||||
padding: 0.5em 0em;
|
||||
border: 2px solid;
|
||||
border-image: url(border-inset.png) 2 2 2 2;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.row.toolbar > div{
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
padding: 0em 0.5em;
|
||||
flex: 1;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.row.toolbar > div .start{
|
||||
align-items: center;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.row.toolbar button[data-run] {
|
||||
padding: 0.75em;
|
||||
font-weight: bold;
|
||||
border: 2px solid;
|
||||
align-self: center;
|
||||
margin-right: 0.5em;
|
||||
}
|
||||
|
||||
button {
|
||||
border-image: url(border.png) 2 2 2 2;
|
||||
}
|
||||
|
||||
button[data-run]:not([disabled])::after {
|
||||
position: absolute;
|
||||
top: -2px;
|
||||
left:-2px;
|
||||
bottom:-2px;
|
||||
right:-2px;
|
||||
content: '';
|
||||
background-color: #F00 !important;
|
||||
mix-blend-mode: darken;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.header button[data-run] {
|
||||
position: relative;
|
||||
font-weight: bold;
|
||||
font-size: 13pt;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
*:focus {
|
||||
outline-style: dotted;
|
||||
outline-color: black;
|
||||
}
|
||||
|
||||
.row:focus {
|
||||
background-color: #000082;
|
||||
border-bottom: 1px #000082 solid;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.row.toolbar.header{
|
||||
background-color: #BBB;
|
||||
}
|
||||
|
||||
.row.toolbar.status {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.row.toolbar.status > div {
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0em;
|
||||
margin: 0.25em;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
body > div {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.row.body {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
||||
.collapse {
|
||||
flex-grow: 0;
|
||||
flex-shrink: 1;
|
||||
}
|
||||
|
||||
div.column {
|
||||
position: relative;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
div.column .scroller {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
bottom: 0px;
|
||||
right: 0px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
div.panel {
|
||||
font-family: 'fixedsys';
|
||||
display: flex;
|
||||
position: relative;
|
||||
background-color: #aaa;
|
||||
flex-direction: column;
|
||||
box-sizing: border-box;
|
||||
margin: 0.5em;
|
||||
flex: 1;
|
||||
border-right: 1px solid rgba(0,0,0,0.5);
|
||||
border-bottom: 1px solid rgba(0,0,0,0.5);
|
||||
}
|
||||
|
||||
div.panel div.input {
|
||||
background-color: #272822;
|
||||
}
|
||||
|
||||
div.panel > div {
|
||||
background-color: white;
|
||||
border: 2px solid;
|
||||
border-image: url(border-inset.png) 2 2 2 2;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.liquid{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
button,
|
||||
.panel label {
|
||||
user-select: none;
|
||||
border: 2px solid;
|
||||
border-image: url(border.png) 2 2 2 2 !important;
|
||||
background-color: #c3c3c3;
|
||||
padding: 0.25em;
|
||||
}
|
||||
|
||||
.input, .output .scroller, iframe {
|
||||
user-select: normal;
|
||||
}
|
||||
|
||||
.panel .cols {
|
||||
margin-top: -1px;
|
||||
}
|
||||
|
||||
.panel label[tabindex]:first-child {
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
.panel .cols > label[tabindex]:last-child {
|
||||
margin-right: -3px;
|
||||
}
|
||||
|
||||
.ace_editor {
|
||||
margin-right: -2px;
|
||||
}
|
||||
|
||||
label[tabindex]:active,
|
||||
button:active {
|
||||
border: 2px solid;
|
||||
border-image: url(border-inset.png) 2 2 2 2 !important;
|
||||
position: relative;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.header label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.header label p {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
pre {
|
||||
flex: 1;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
.round {
|
||||
border-radius: 50%;
|
||||
height: 49px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
.credit{
|
||||
padding-right: 0.5em;
|
||||
padding-left: 0.5em;
|
||||
}
|
||||
|
||||
.column .row {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.cols {
|
||||
display: flex;
|
||||
flex-direction: row !important;
|
||||
}
|
||||
|
||||
.rows {
|
||||
display: flex;
|
||||
flex-direction: column !important;
|
||||
}
|
||||
|
||||
.cols label {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
label {
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.collapse {
|
||||
flex: 0 !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.header.row {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
iframe {
|
||||
border: none;
|
||||
}
|
||||
|
||||
input[type=file] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.header select {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
|
||||
/*# sourceMappingURL=app.css.map*/
|
||||
+3
-2
@@ -520,7 +520,7 @@ require.register("php-wasm/php-web-drupal.js", function(exports, require, module
|
||||
return (
|
||||
function(moduleArg = {}) {
|
||||
|
||||
var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject}));if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){if(Module["ENVIRONMENT_IS_PTHREAD"]||Module["$ww"])return;var loadPackage=function(metadata){var PACKAGE_PATH="";if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof process==="undefined"&&typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}var PACKAGE_NAME="../../build/php-web-drupal.data";var REMOTE_PACKAGE_BASE="php-web-drupal.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE_NAME=Module["locateFile"]?Module["locateFile"](REMOTE_PACKAGE_BASE,""):REMOTE_PACKAGE_BASE;var REMOTE_PACKAGE_SIZE=metadata["remote_package_size"];function fetchRemotePackage(packageName,packageSize,callback,errback){var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=function(event){var url=packageName;var size=packageSize;if(event.total)size=event.total;if(event.loaded){if(!xhr.addedTotal){xhr.addedTotal=true;if(!Module.dataFileDownloads)Module.dataFileDownloads={};Module.dataFileDownloads[url]={loaded:event.loaded,total:size}}else{Module.dataFileDownloads[url].loaded=event.loaded}var total=0;var loaded=0;var num=0;for(var download in Module.dataFileDownloads){var data=Module.dataFileDownloads[download];total+=data.total;loaded+=data.loaded;num++}total=Math.ceil(total*Module.expectedDataFileDownloads/num);if(Module["setStatus"])Module["setStatus"](`Downloading data... (${loaded}/${total})`)}else if(!Module.dataFileDownloads){if(Module["setStatus"])Module["setStatus"]("Downloading data...")}};xhr.onerror=function(event){throw new Error("NetworkError for: "+packageName)};xhr.onload=function(event){if(xhr.status==200||xhr.status==304||xhr.status==206||xhr.status==0&&xhr.response){var packageData=xhr.response;callback(packageData)}else{throw new Error(xhr.statusText+" : "+xhr.responseURL)}};xhr.send(null)}function handleError(error){console.error("package error:",error)}var fetchedCallback=null;var fetched=Module["getPreloadedPackage"]?Module["getPreloadedPackage"](REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE):null;if(!fetched)fetchRemotePackage(REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE,(function(data){if(fetchedCallback){fetchedCallback(data);fetchedCallback=null}else{fetched=data}}),handleError);function runWithFS(){function assert(check,msg){if(!check)throw msg+(new Error).stack}Module["FS_createPath"]("/","preload",true,true);Module["FS_createPath"]("/preload","Zend",true,true);Module["FS_createPath"]("/preload","drupal-7.95",true,true);Module["FS_createPath"]("/preload/drupal-7.95","includes",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","database",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes/database","mysql",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes/database","pgsql",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes/database","sqlite",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","filetransfer",true,true);Module["FS_createPath"]("/preload/drupal-7.95","misc",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc","brumann",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/brumann","polyfill-unserialize",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/brumann/polyfill-unserialize","src",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc","farbtastic",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc","typo3",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3","drupal-security",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3","phar-stream-wrapper",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3/phar-stream-wrapper","src",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3/phar-stream-wrapper/src","Interceptor",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3/phar-stream-wrapper/src","Phar",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3/phar-stream-wrapper/src","Resolver",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc","ui",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/ui","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95","modules",true,true);Module["FS_createPath"]("/preload/drupal-7.95/modules","aggregator",true,trLine truncated
|
||||
var Module=moduleArg;var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(((resolve,reject)=>{readyPromiseResolve=resolve;readyPromiseReject=reject}));if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){if(Module["ENVIRONMENT_IS_PTHREAD"]||Module["$ww"])return;var loadPackage=function(metadata){var PACKAGE_PATH="";if(typeof window==="object"){PACKAGE_PATH=window["encodeURIComponent"](window.location.pathname.toString().substring(0,window.location.pathname.toString().lastIndexOf("/"))+"/")}else if(typeof process==="undefined"&&typeof location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}var PACKAGE_NAME="../../build/php-web-drupal.data";var REMOTE_PACKAGE_BASE="php-web-drupal.data";if(typeof Module["locateFilePackage"]==="function"&&!Module["locateFile"]){Module["locateFile"]=Module["locateFilePackage"];err("warning: you defined Module.locateFilePackage, that has been renamed to Module.locateFile (using your locateFilePackage for now)")}var REMOTE_PACKAGE_NAME=Module["locateFile"]?Module["locateFile"](REMOTE_PACKAGE_BASE,""):REMOTE_PACKAGE_BASE;var REMOTE_PACKAGE_SIZE=metadata["remote_package_size"];function fetchRemotePackage(packageName,packageSize,callback,errback){var xhr=new XMLHttpRequest;xhr.open("GET",packageName,true);xhr.responseType="arraybuffer";xhr.onprogress=function(event){var url=packageName;var size=packageSize;if(event.total)size=event.total;if(event.loaded){if(!xhr.addedTotal){xhr.addedTotal=true;if(!Module.dataFileDownloads)Module.dataFileDownloads={};Module.dataFileDownloads[url]={loaded:event.loaded,total:size}}else{Module.dataFileDownloads[url].loaded=event.loaded}var total=0;var loaded=0;var num=0;for(var download in Module.dataFileDownloads){var data=Module.dataFileDownloads[download];total+=data.total;loaded+=data.loaded;num++}total=Math.ceil(total*Module.expectedDataFileDownloads/num);if(Module["setStatus"])Module["setStatus"](`Downloading data... (${loaded}/${total})`)}else if(!Module.dataFileDownloads){if(Module["setStatus"])Module["setStatus"]("Downloading data...")}};xhr.onerror=function(event){throw new Error("NetworkError for: "+packageName)};xhr.onload=function(event){if(xhr.status==200||xhr.status==304||xhr.status==206||xhr.status==0&&xhr.response){var packageData=xhr.response;callback(packageData)}else{throw new Error(xhr.statusText+" : "+xhr.responseURL)}};xhr.send(null)}function handleError(error){console.error("package error:",error)}var fetchedCallback=null;var fetched=Module["getPreloadedPackage"]?Module["getPreloadedPackage"](REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE):null;if(!fetched)fetchRemotePackage(REMOTE_PACKAGE_NAME,REMOTE_PACKAGE_SIZE,(function(data){if(fetchedCallback){fetchedCallback(data);fetchedCallback=null}else{fetched=data}}),handleError);function runWithFS(){function assert(check,msg){if(!check)throw msg+(new Error).stack}Module["FS_createPath"]("/","preload",true,true);Module["FS_createPath"]("/preload","Zend",true,true);Module["FS_createPath"]("/preload","drupal-7.95",true,true);Module["FS_createPath"]("/preload/drupal-7.95","includes",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","database",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes/database","mysql",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes/database","pgsql",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes/database","sqlite",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","filetransfer",true,true);Module["FS_createPath"]("/preload/drupal-7.95","misc",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc","brumann",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/brumann","polyfill-unserialize",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/brumann/polyfill-unserialize","src",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc","farbtastic",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc","typo3",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3","drupal-security",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3","phar-stream-wrapper",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3/phar-stream-wrapper","src",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3/phar-stream-wrapper/src","Interceptor",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3/phar-stream-wrapper/src","Phar",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/typo3/phar-stream-wrapper/src","Resolver",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc","ui",true,true);Module["FS_createPath"]("/preload/drupal-7.95/misc/ui","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95","modules",true,true);Module["FS_createPath"]("/preload/drupal-7.95/modules","aggregator",true,trLine truncated
|
||||
|
||||
|
||||
return moduleArg.ready
|
||||
@@ -881,10 +881,11 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
require.register("___globals___", function(exports, require, module) {
|
||||
|
||||
});})();require('___globals___');
|
||||
|
||||
|
||||
//# sourceMappingURL=app.js.map
|
||||
@@ -160,3 +160,5 @@ module.exports = "<?php\nini_set('session.save_path', '/home/web_user');\nsessio
|
||||
|
||||
});})();require('___globals___');
|
||||
|
||||
|
||||
//# sourceMappingURL=include.js.map
|
||||
Binary file not shown.
@@ -1,4 +1,5 @@
|
||||
FROM emscripten/emsdk:3.1.43
|
||||
MAINTAINER Sean Morris <sean@seanmorr.is>
|
||||
|
||||
SHELL ["/bin/bash", "-c"]
|
||||
|
||||
@@ -6,6 +7,7 @@ RUN set -euxo pipefail;\
|
||||
apt-get update; \
|
||||
apt-get --no-install-recommends -y install \
|
||||
build-essential \
|
||||
libsqlite3-dev \
|
||||
libxml2-dev \
|
||||
libicu-dev \
|
||||
automake \
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
"description": "Run PHP right in the browser.",
|
||||
"repository": "https://github.com/seanmorris/pib",
|
||||
"author": "Oraoto <oraoto@outlook.com>",
|
||||
"version": "0.0.0-esm-preview-12",
|
||||
"version": "0.0.0-esm-preview-18",
|
||||
"license": "Apache-2.0",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
|
||||
+42
-96
@@ -1,57 +1,33 @@
|
||||
diff --git a/third_party/php8.2-src/Zend/zend_atomic.h b/third_party/php8.2-src/Zend/zend_atomic.h
|
||||
index 617cde0e..fe9cba5c 100644
|
||||
--- a/third_party/php8.2-src/Zend/zend_atomic.h
|
||||
+++ b/third_party/php8.2-src/Zend/zend_atomic.h
|
||||
@@ -23,7 +23,7 @@
|
||||
((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || (__GNUC__ > (x)))
|
||||
|
||||
/* Builtins are used to avoid library linkage */
|
||||
-#if __has_feature(c_atomic)
|
||||
+#if 0
|
||||
#define HAVE_C11_ATOMICS 1
|
||||
#elif ZEND_GCC_PREREQ(4, 7)
|
||||
#define HAVE_GNUC_ATOMICS 1
|
||||
diff --git a/third_party/php8.2-src/ext/pdo/config.m4 b/third_party/php8.2-src/ext/pdo/config.m4
|
||||
index 9b9a3e36..d93bc714 100644
|
||||
--- a/third_party/php8.2-src/ext/pdo/config.m4
|
||||
+++ b/third_party/php8.2-src/ext/pdo/config.m4
|
||||
@@ -4,15 +4,12 @@ PHP_ARG_ENABLE([pdo],
|
||||
@@ -4,15 +4,14 @@ PHP_ARG_ENABLE([pdo],
|
||||
[Disable PHP Data Objects support])],
|
||||
[yes])
|
||||
|
||||
|
||||
-if test "$PHP_PDO" != "no"; then
|
||||
+dnl Make sure $PHP_PDO is 'yes' when it's not 'no' :)
|
||||
+PHP_PDO=yes
|
||||
|
||||
-
|
||||
- dnl Make sure $PHP_PDO is 'yes' when it's not 'no' :)
|
||||
- PHP_PDO=yes
|
||||
+dnl so we always include the known-good working hack.
|
||||
+PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared)
|
||||
+PHP_ADD_EXTENSION_DEP(pdo, spl, true)
|
||||
+PHP_INSTALL_HEADERS(ext/pdo, [php_pdo.h php_pdo_driver.h php_pdo_error.h])
|
||||
|
||||
- PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared)
|
||||
- PHP_ADD_EXTENSION_DEP(pdo, spl, true)
|
||||
- PHP_INSTALL_HEADERS(ext/pdo, [php_pdo.h php_pdo_driver.h php_pdo_error.h])
|
||||
-
|
||||
+dnl Make sure $PHP_PDO is 'yes' when it's not 'no' :)
|
||||
+PHP_PDO=yes
|
||||
|
||||
+if test "$PHP_PDO" != "no"; then
|
||||
+ dnl so we always include the known-good working hack.
|
||||
PHP_NEW_EXTENSION(pdo, pdo.c pdo_dbh.c pdo_stmt.c pdo_sql_parser.c pdo_sqlstate.c, $ext_shared)
|
||||
PHP_ADD_EXTENSION_DEP(pdo, spl, true)
|
||||
PHP_INSTALL_HEADERS(ext/pdo, [php_pdo.h php_pdo_driver.h php_pdo_error.h])
|
||||
|
||||
- dnl so we always include the known-good working hack.
|
||||
- PHP_ADD_MAKEFILE_FRAGMENT
|
||||
-fi
|
||||
+PHP_ADD_MAKEFILE_FRAGMENT
|
||||
PHP_ADD_MAKEFILE_FRAGMENT
|
||||
fi
|
||||
diff --git a/third_party/php8.2-src/ext/pdo_sqlite/config.m4 b/third_party/php8.2-src/ext/pdo_sqlite/config.m4
|
||||
index 64311eaa..dd850f79 100644
|
||||
--- a/third_party/php8.2-src/ext/pdo_sqlite/config.m4
|
||||
+++ b/third_party/php8.2-src/ext/pdo_sqlite/config.m4
|
||||
@@ -4,31 +4,11 @@ PHP_ARG_WITH([pdo-sqlite],
|
||||
[PDO: sqlite 3 support.])],
|
||||
[$PHP_PDO])
|
||||
|
||||
-if test "$PHP_PDO_SQLITE" != "no"; then
|
||||
-
|
||||
- if test "$PHP_PDO" = "no" && test "$ext_shared" = "no"; then
|
||||
- AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
|
||||
- fi
|
||||
-
|
||||
@@ -10,23 +10,6 @@ if test "$PHP_PDO_SQLITE" != "no"; then
|
||||
AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
|
||||
fi
|
||||
|
||||
- PHP_CHECK_PDO_INCLUDES
|
||||
-
|
||||
- PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.7.7])
|
||||
@@ -67,24 +43,15 @@ index 64311eaa..dd850f79 100644
|
||||
- PHP_CHECK_LIBRARY(sqlite3, sqlite3_column_table_name, [
|
||||
- AC_DEFINE(HAVE_SQLITE3_COLUMN_TABLE_NAME, 1, [have sqlite3_column_table_name])
|
||||
- ], [], [$PDO_SQLITE_SHARED_LIBADD])
|
||||
+if test "$PHP_PDO" = "no"; then
|
||||
+ AC_MSG_ERROR([PDO is not enabled! Add --enable-pdo to your configure line.])
|
||||
+fi
|
||||
|
||||
-
|
||||
- PHP_SUBST(PDO_SQLITE_SHARED_LIBADD)
|
||||
- PHP_NEW_EXTENSION(pdo_sqlite, pdo_sqlite.c sqlite_driver.c sqlite_statement.c,
|
||||
- $ext_shared,,-I$pdo_cv_inc_path)
|
||||
+PHP_NEW_EXTENSION(pdo_sqlite, pdo_sqlite.c sqlite_driver.c sqlite_statement.c,
|
||||
+ $ext_shared,,-I$pdo_cv_inc_path)
|
||||
|
||||
- PHP_ADD_EXTENSION_DEP(pdo_sqlite, pdo)
|
||||
-fi
|
||||
+PHP_ADD_EXTENSION_DEP(pdo_sqlite, pdo)
|
||||
PHP_NEW_EXTENSION(pdo_sqlite, pdo_sqlite.c sqlite_driver.c sqlite_statement.c,
|
||||
$ext_shared,,-I$pdo_cv_inc_path)
|
||||
|
||||
diff --git a/third_party/php8.2-src/ext/pdo_sqlite/pdo_sqlite.c b/third_party/php8.2-src/ext/pdo_sqlite/pdo_sqlite.c
|
||||
index 81761b13..09424231 100644
|
||||
--- a/third_party/php8.2-src/ext/pdo_sqlite/pdo_sqlite.c
|
||||
+++ b/third_party/php8.2-src/ext/pdo_sqlite/pdo_sqlite.c
|
||||
@@ -21,8 +21,8 @@
|
||||
@@ -23,8 +23,8 @@
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
@@ -95,24 +62,10 @@ index 81761b13..09424231 100644
|
||||
#include "php_pdo_sqlite.h"
|
||||
#include "php_pdo_sqlite_int.h"
|
||||
#include "zend_exceptions.h"
|
||||
diff --git a/third_party/php8.2-src/ext/pdo_sqlite/php_pdo_sqlite.h b/third_party/php8.2-src/ext/pdo_sqlite/php_pdo_sqlite.h
|
||||
index 1bba9e35..62cf4a5f 100644
|
||||
--- a/third_party/php8.2-src/ext/pdo_sqlite/php_pdo_sqlite.h
|
||||
+++ b/third_party/php8.2-src/ext/pdo_sqlite/php_pdo_sqlite.h
|
||||
@@ -17,7 +17,7 @@
|
||||
#ifndef PHP_PDO_SQLITE_H
|
||||
#define PHP_PDO_SQLITE_H
|
||||
|
||||
-extern zend_module_entry pdo_sqlite_module_entry;
|
||||
+zend_module_entry pdo_sqlite_module_entry;
|
||||
#define phpext_pdo_sqlite_ptr &pdo_sqlite_module_entry
|
||||
|
||||
#include "php_version.h"
|
||||
diff --git a/third_party/php8.2-src/ext/pdo_sqlite/sqlite_driver.c b/third_party/php8.2-src/ext/pdo_sqlite/sqlite_driver.c
|
||||
index de5170a3..2ea31b62 100644
|
||||
--- a/third_party/php8.2-src/ext/pdo_sqlite/sqlite_driver.c
|
||||
+++ b/third_party/php8.2-src/ext/pdo_sqlite/sqlite_driver.c
|
||||
@@ -21,8 +21,8 @@
|
||||
@@ -23,8 +23,8 @@
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
@@ -124,10 +77,9 @@ index de5170a3..2ea31b62 100644
|
||||
#include "php_pdo_sqlite_int.h"
|
||||
#include "zend_exceptions.h"
|
||||
diff --git a/third_party/php8.2-src/ext/pdo_sqlite/sqlite_statement.c b/third_party/php8.2-src/ext/pdo_sqlite/sqlite_statement.c
|
||||
index 90de059a..8dc0ad36 100644
|
||||
--- a/third_party/php8.2-src/ext/pdo_sqlite/sqlite_statement.c
|
||||
+++ b/third_party/php8.2-src/ext/pdo_sqlite/sqlite_statement.c
|
||||
@@ -21,8 +21,8 @@
|
||||
@@ -23,8 +23,8 @@
|
||||
#include "php.h"
|
||||
#include "php_ini.h"
|
||||
#include "ext/standard/info.h"
|
||||
@@ -137,14 +89,13 @@ index 90de059a..8dc0ad36 100644
|
||||
+#include "../pdo/php_pdo_driver.h"
|
||||
#include "php_pdo_sqlite.h"
|
||||
#include "php_pdo_sqlite_int.h"
|
||||
|
||||
|
||||
diff --git a/third_party/php8.2-src/ext/sqlite3/config0.m4 b/third_party/php8.2-src/ext/sqlite3/config0.m4
|
||||
index 2373d13d..b94508f3 100644
|
||||
--- a/third_party/php8.2-src/ext/sqlite3/config0.m4
|
||||
+++ b/third_party/php8.2-src/ext/sqlite3/config0.m4
|
||||
@@ -5,26 +5,6 @@ PHP_ARG_WITH([sqlite3],
|
||||
[yes])
|
||||
|
||||
|
||||
if test $PHP_SQLITE3 != "no"; then
|
||||
- PKG_CHECK_MODULES([SQLITE], [sqlite3 >= 3.7.7])
|
||||
-
|
||||
@@ -166,37 +117,32 @@ index 2373d13d..b94508f3 100644
|
||||
- [$SQLITE3_SHARED_LIBADD]
|
||||
- )
|
||||
-
|
||||
PHP_NEW_EXTENSION(sqlite3, sqlite3.c, $ext_shared,,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
|
||||
- PHP_NEW_EXTENSION(sqlite3, sqlite3.c, $ext_shared,,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
|
||||
+ PHP_NEW_EXTENSION(sqlite3, sqlite3.c, $ext_shared,,-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
|
||||
PHP_SUBST(SQLITE3_SHARED_LIBADD)
|
||||
fi
|
||||
diff --git a/third_party/php8.2-src/ext/standard/credits.c b/third_party/php8.2-src/ext/standard/credits.c
|
||||
index 4e8722db..13433301 100644
|
||||
--- a/third_party/php8.2-src/ext/standard/credits.c
|
||||
+++ b/third_party/php8.2-src/ext/standard/credits.c
|
||||
@@ -33,6 +33,11 @@ PHPAPI ZEND_COLD void php_print_credits(int flag) /* {{{ */
|
||||
PUTS("PHP Credits\n");
|
||||
}
|
||||
|
||||
+ php_info_print_table_start();
|
||||
+ php_info_print_table_header(1, "php-wasm");
|
||||
+ php_info_print_table_row(1, "Sean Morris & Oraoto");
|
||||
+ php_info_print_table_end();
|
||||
+
|
||||
if (flag & PHP_CREDITS_GROUP) {
|
||||
/* Group */
|
||||
|
||||
diff --git a/third_party/php8.2-src/sapi/embed/php_embed.c b/third_party/php8.2-src/sapi/embed/php_embed.c
|
||||
index 4b94bd98..fc44d302 100644
|
||||
--- a/third_party/php8.2-src/sapi/embed/php_embed.c
|
||||
+++ b/third_party/php8.2-src/sapi/embed/php_embed.c
|
||||
@@ -243,8 +243,8 @@ EMBED_SAPI_API int php_embed_init(int argc, char **argv)
|
||||
return FAILURE;
|
||||
}
|
||||
|
||||
|
||||
- SG(headers_sent) = 1;
|
||||
- SG(request_info).no_headers = 1;
|
||||
+ SG(headers_sent) = 0;
|
||||
+ SG(request_info).no_headers = 0;
|
||||
php_register_variable("PHP_SELF", "-", NULL);
|
||||
|
||||
|
||||
return SUCCESS;
|
||||
diff --git a/third_party/php8.2-src/Zend/zend_atomic.h b/third_party/php8.2-src/Zend/zend_atomic.h
|
||||
--- a/third_party/php8.2-src/Zend/zend_atomic.h
|
||||
+++ b/third_party/php8.2-src/Zend/zend_atomic.h
|
||||
@@ -23,5 +23,5 @@
|
||||
((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || (__GNUC__ > (x)))
|
||||
|
||||
/* Builtins are used to avoid library linkage */
|
||||
-#if __has_feature(c_atomic)
|
||||
+#if 0
|
||||
#define HAVE_C11_ATOMICS 1
|
||||
#elif ZEND_GCC_PREREQ(4, 7)
|
||||
@@ -8,9 +8,6 @@
|
||||
|
||||
#include "../php8.2-src/ext/vrzno/php_vrzno.h"
|
||||
|
||||
#include "sqlite3.h"
|
||||
#include "sqlite3.c"
|
||||
|
||||
int main() { return 0; }
|
||||
|
||||
int EMSCRIPTEN_KEEPALIVE pib_init()
|
||||
|
||||
Reference in new issue
Block a user