mirror of
https://github.com/bdnugget/php-wasm.git
synced 2026-11-07 09:07:28 +00:00
Adding libicu.
This commit is contained in:
1 parent
89530fb1e0
commit
abccf7cf94
12 files changed
+718
-30
No files matched your search
@@ -37,10 +37,21 @@ DOCKER_ENV=USERID=${UID} docker-compose -p phpwasm run --rm \
|
||||
-e EMCC_CORES=`nproc` \
|
||||
-e EMCC_ALLOW_FASTCOMP=1
|
||||
|
||||
DOCKER_ENV_SIDE=USERID=${UID} docker-compose -p phpwasm run --rm \
|
||||
-e PRELOAD_ASSETS='${PRELOAD_ASSETS}' \
|
||||
-e INITIAL_MEMORY=${INITIAL_MEMORY} \
|
||||
-e ENVIRONMENT=${ENVIRONMENT} \
|
||||
-e PHP_BRANCH=${PHP_BRANCH} \
|
||||
-e EMCC_CORES=`nproc` \
|
||||
-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_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_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
|
||||
|
||||
TIMER=(which pv > /dev/null && pv --name '${@}' || cat)
|
||||
.PHONY: web all clean show-ports image js hooks push-image pull-image
|
||||
@@ -107,24 +118,27 @@ third_party/libxml2/.gitignore:
|
||||
--single-branch \
|
||||
--depth 1;
|
||||
|
||||
# third_party/libicu-src:
|
||||
# @ ${DOCKER_RUN} git clone https://github.com/unicode-org/icu.git third_party/libicu-src \
|
||||
# --branch ${ICU_TAG} \
|
||||
# --single-branch \
|
||||
# --depth 1;
|
||||
third_party/tidy-html5/.gitignore:
|
||||
git clone https://github.com/htacg/tidy-html5.git third_party/tidy-html5 \
|
||||
--branch ${TIDYHTML_TAG} \
|
||||
--single-branch \
|
||||
--depth 1;
|
||||
cd third_party/tidy-html5 && \
|
||||
git apply --no-index ../../patch/tidy-html.patch
|
||||
|
||||
# third_party/tidy-html5:
|
||||
# @ ${DOCKER_RUN} git clone https://github.com/htacg/tidy-html5.git third_party/tidy-html5 \
|
||||
# --branch ${TIDYHTML_TAG} \
|
||||
# --single-branch \
|
||||
# --depth 1;
|
||||
third_party/libicu-src/.gitignore:
|
||||
@ ${DOCKER_RUN} git clone https://github.com/unicode-org/icu.git third_party/libicu-src \
|
||||
--branch ${ICU_TAG} \
|
||||
--single-branch \
|
||||
--depth 1;
|
||||
|
||||
########### Build the objects. ###########
|
||||
|
||||
third_party/php${PHP_VERSION}-src/configure: third_party/php${PHP_VERSION}-src/ext/vrzno/vrzno.c source/sqlite3.c lib/lib/libxml2.la
|
||||
third_party/php${PHP_VERSION}-src/configured: third_party/php${PHP_VERSION}-src/ext/vrzno/vrzno.c source/sqlite3.c lib/lib/libxml2.la lib/lib/libtidy.a lib/lib/libicudata.a
|
||||
@ echo -e "\e[33mBuilding PHP object files"
|
||||
${DOCKER_RUN_IN_PHP} ./buildconf --force
|
||||
${DOCKER_RUN_IN_PHP} bash -c "emconfigure ./configure \
|
||||
${DOCKER_RUN_IN_PHP} emconfigure pkg-config --list-all
|
||||
${DOCKER_RUN_IN_PHP} emconfigure ./configure \
|
||||
PKG_CONFIG_PATH=${PKG_CONFIG_PATH} \
|
||||
--enable-embed=static \
|
||||
--with-layout=GNU \
|
||||
@@ -154,24 +168,27 @@ third_party/php${PHP_VERSION}-src/configure: third_party/php${PHP_VERSION}-src/e
|
||||
--enable-xml \
|
||||
--enable-simplexml \
|
||||
--with-gd \
|
||||
--disable-fiber-asm \
|
||||
"
|
||||
--with-tidy=/src/lib \
|
||||
--enable-intl \
|
||||
--disable-fiber-asm
|
||||
touch third_party/php${PHP_VERSION}-src/configured
|
||||
|
||||
lib/${PHP_AR}.a: third_party/php${PHP_VERSION}-src/configure third_party/php${PHP_VERSION}-src/patched third_party/php${PHP_VERSION}-src/**.c source/sqlite3.c
|
||||
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'
|
||||
@ ${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/
|
||||
@ ${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/pib_eval.o: lib/${PHP_AR}.a source/pib_eval.c
|
||||
@ echo -e "\e[33mRun pkgconfig"
|
||||
lib/pib_eval.o: lib/${PHP_AR}.a source/pib_eval.c lib/lib/libxml2.la
|
||||
${DOCKER_RUN_IN_PHP} emcc -c ${OPTIMIZE} \
|
||||
-I . \
|
||||
-I Zend \
|
||||
-I main \
|
||||
-I TSRM/ \
|
||||
-I /src/third_party/libxml2 \
|
||||
/src/source/pib_eval.c \
|
||||
-o /src/lib/pib_eval.o \
|
||||
/src/source/pib_eval.c
|
||||
|
||||
lib/lib/libxml2.la: third_party/libxml2/.gitignore
|
||||
@ echo -e "\e[33mBuilding LibXML2"
|
||||
@@ -180,6 +197,20 @@ lib/lib/libxml2.la: third_party/libxml2/.gitignore
|
||||
${DOCKER_RUN_IN_LIBXML} emmake make -j`nproc` | ${TIMER}
|
||||
${DOCKER_RUN_IN_LIBXML} emmake make install | ${TIMER}
|
||||
|
||||
lib/lib/libtidy.a: third_party/tidy-html5/.gitignore
|
||||
@ echo -e "\e[33mBuilding LibTidy"
|
||||
${DOCKER_RUN_IN_TIDY} emcmake cmake . \
|
||||
-DCMAKE_INSTALL_PREFIX=/src/lib/ \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_FLAGS="-I/emsdk/upstream/emscripten/system/lib/libc/musl/include/"; \
|
||||
${DOCKER_RUN_IN_TIDY} emmake make
|
||||
${DOCKER_RUN_IN_TIDY} emmake make install
|
||||
|
||||
lib/lib/libicudata.a: third_party/libicu-src/.gitignore
|
||||
@ echo -e "\e[33mBuilding LibIcu"
|
||||
${DOCKER_RUN_IN_ICU} emconfigure ./configure --prefix=/src/lib/ --target=wasm32-unknown-emscripten --enable-icu-config --enable-extras=no --enable-tools=no --enable-samples=no --enable-tests=no --enable-shared=no --enable-static=yes
|
||||
${DOCKER_RUN_IN_ICU} emmake make clean install
|
||||
|
||||
########### Build the final files. ###########
|
||||
|
||||
FINAL_BUILD=${DOCKER_RUN_IN_PHP} emcc ${OPTIMIZE} \
|
||||
@@ -196,11 +227,12 @@ FINAL_BUILD=${DOCKER_RUN_IN_PHP} emcc ${OPTIMIZE} \
|
||||
-s EXPORT_NAME="'PHP'" \
|
||||
-s MODULARIZE=1 \
|
||||
-s INVOKE_RUN=0 \
|
||||
-s MAIN_MODULE \
|
||||
-s USE_ZLIB=1 \
|
||||
/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 /src/lib/lib/libxml2.a /src/lib/lib/libtidy.a /src/lib/lib/libicudata.a /src/lib/lib/libicui18n.a /src/lib/lib/libicuio.a /src/lib/lib/libicuuc.a
|
||||
|
||||
php-web-drupal.wasm: ENVIRONMENT=web-drupal
|
||||
php-web-drupal.wasm: lib/${PHP_AR}.a lib/pib_eval.o source/**.c source/**.h third_party/drupal-7.95/README.txt
|
||||
php-web-drupal.wasm: lib/${PHP_AR}.a lib/pib_eval.o lib/lib/libicudata.a source/**.c source/**.h third_party/drupal-7.95/README.txt
|
||||
@ echo -e "\e[33mBuilding PHP for web (drupal)"
|
||||
@ ${FINAL_BUILD} --preload-file ${PRELOAD_ASSETS} -s ENVIRONMENT=web
|
||||
@ ${DOCKER_RUN} cp -v build/php-${ENVIRONMENT}${RELEASE_SUFFIX}.* ./
|
||||
@@ -260,11 +292,13 @@ clean:
|
||||
@ ${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
|
||||
php-clean:
|
||||
@ ${DOCKER_RUN} rm -fv third_party/php${PHP_VERSION}-src/configure
|
||||
|
||||
deep-clean:
|
||||
@ ${DOCKER_RUN} rm -fv *.js *.wasm *.data
|
||||
@ ${DOCKER_RUN} rm -rfv build/* lib/* third_party/php${PHP_VERSION}-src \
|
||||
third_party/drupal-7.95 third_party/libxml2 \
|
||||
third_party/drupal-7.95 third_party/libxml2 third_party/tidy-html5 \
|
||||
third_party/libicu-src third_party/${SQLITE_DIR} \
|
||||
dist/* docs/php-*.js docs/php-*.wasm \
|
||||
sqlite-*.* \
|
||||
|
||||
@@ -14,4 +14,5 @@ services:
|
||||
volumes:
|
||||
- ./:/src
|
||||
- /tmp/emsdk-cache:/emsdk/upstream/emscripten/cache/
|
||||
- ./.cache:/emsdk_portable/.data/cache/asmjs/
|
||||
command: [bash]
|
||||
@@ -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
@@ -521,7 +521,7 @@ require.register("php-wasm/php-web-drupal.js", function(exports, require, module
|
||||
function(PHP) {
|
||||
PHP = PHP || {};
|
||||
|
||||
var Module=typeof PHP!=="undefined"?PHP:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){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 location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}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"];var PACKAGE_UUID=metadata["package_uuid"];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","drupal-7.95",true,true);Module["FS_createPath"]("/preload/drupal-7.95","includes",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","filetransfer",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","database",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes/database","sqlite",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","themes",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","stark",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","garland",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/garland","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/garland","color",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","engines",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/engines","phptemplate",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","seven",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/seven","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","bartik",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","color",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","css",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","templates",true,true);Module["FS_createPath"]("/preload/drupal-7.95","scripts",true,true);Module["FS_createPath"]("/preload/drupal-7.95","modules",true,true);Module["FS_createPath"]("/preload/drupal-7.95/modules","simpletest",true,true);Module["FS_createPath"]("/preload/dLine truncated
|
||||
var Module=typeof PHP!=="undefined"?PHP:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){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 location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}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"];var PACKAGE_UUID=metadata["package_uuid"];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","drupal-7.95",true,true);Module["FS_createPath"]("/preload/drupal-7.95","includes",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","filetransfer",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","database",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes/database","sqlite",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","themes",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","stark",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","garland",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/garland","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/garland","color",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","engines",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/engines","phptemplate",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","seven",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/seven","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","bartik",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","color",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","css",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","templates",true,true);Module["FS_createPath"]("/preload/drupal-7.95","scripts",true,true);Module["FS_createPath"]("/preload/drupal-7.95","modules",true,true);Module["FS_createPath"]("/preload/drupal-7.95/modules","simpletest",true,true);Module["FS_createPath"]("/preload/dLine truncated
|
||||
|
||||
|
||||
return PHP.ready
|
||||
@@ -883,10 +883,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
|
||||
@@ -6,7 +6,7 @@ var PHP = (function() {
|
||||
function(PHP) {
|
||||
PHP = PHP || {};
|
||||
|
||||
var Module=typeof PHP!=="undefined"?PHP:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){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 location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}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"];var PACKAGE_UUID=metadata["package_uuid"];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","drupal-7.95",true,true);Module["FS_createPath"]("/preload/drupal-7.95","includes",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","filetransfer",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","database",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes/database","sqlite",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","themes",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","stark",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","garland",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/garland","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/garland","color",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","engines",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/engines","phptemplate",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","seven",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/seven","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","bartik",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","color",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","css",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","templates",true,true);Module["FS_createPath"]("/preload/drupal-7.95","scripts",true,true);Module["FS_createPath"]("/preload/drupal-7.95","modules",true,true);Module["FS_createPath"]("/preload/drupal-7.95/modules","simpletest",true,true);Module["FS_createPath"]("/preload/dLine truncated
|
||||
var Module=typeof PHP!=="undefined"?PHP:{};var readyPromiseResolve,readyPromiseReject;Module["ready"]=new Promise(function(resolve,reject){readyPromiseResolve=resolve;readyPromiseReject=reject});if(!Module.expectedDataFileDownloads){Module.expectedDataFileDownloads=0}Module.expectedDataFileDownloads++;(function(){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 location!=="undefined"){PACKAGE_PATH=encodeURIComponent(location.pathname.toString().substring(0,location.pathname.toString().lastIndexOf("/"))+"/")}else{throw"using preloaded data can only be done on a web page or in a web worker"}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"];var PACKAGE_UUID=metadata["package_uuid"];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","drupal-7.95",true,true);Module["FS_createPath"]("/preload/drupal-7.95","includes",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","filetransfer",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes","database",true,true);Module["FS_createPath"]("/preload/drupal-7.95/includes/database","sqlite",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","themes",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","stark",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","garland",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/garland","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/garland","color",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","engines",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/engines","phptemplate",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","seven",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/seven","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes","bartik",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","images",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","color",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","css",true,true);Module["FS_createPath"]("/preload/drupal-7.95/themes/bartik","templates",true,true);Module["FS_createPath"]("/preload/drupal-7.95","scripts",true,true);Module["FS_createPath"]("/preload/drupal-7.95","modules",true,true);Module["FS_createPath"]("/preload/drupal-7.95/modules","simpletest",true,true);Module["FS_createPath"]("/preload/dLine truncated
|
||||
|
||||
|
||||
return PHP.ready
|
||||
|
||||
Binary file not shown.
@@ -11,6 +11,7 @@ RUN set -euxo pipefail;\
|
||||
build-essential \
|
||||
automake \
|
||||
libxml2-dev \
|
||||
libicu-dev \
|
||||
autoconf \
|
||||
libtool \
|
||||
pkgconf \
|
||||
|
||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "php-wasm",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "php-wasm",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"license": "Apache-2.0",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.8.4",
|
||||
|
||||
@@ -146,3 +146,18 @@ diff --git a/third_party/php8.2-src/Zend/zend_atomic.h b/third_party/php8.2-src/
|
||||
+#if 0
|
||||
#define HAVE_C11_ATOMICS 1
|
||||
#elif ZEND_GCC_PREREQ(4, 7)
|
||||
diff --git a/third_party/php8.2-src/ext/standard/credits.c b/third_party/php8.2-src/ext/standard/credits.c
|
||||
--- 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 */
|
||||
|
||||
@@ -0,0 +1,340 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 631f0fd..f0458d8 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -56,8 +56,8 @@ if (LIBTIDY_VERSION)
|
||||
list(GET VERSION_LIST 2 TIDY_POINT_VERSION)
|
||||
else ()
|
||||
message(FATAL_ERROR "*** FAILED to get a VERSION from version.txt!")
|
||||
-endif ()
|
||||
-
|
||||
+endif ()
|
||||
+
|
||||
# Establish version date
|
||||
if (LIBTIDY_DATE)
|
||||
string(REPLACE "." ";" DATE_LIST ${LIBTIDY_DATE})
|
||||
@@ -145,24 +145,24 @@ option( ENABLE_MEMORY_DEBUG "Set ON to output some memory diagnostics." OFF
|
||||
|
||||
if ( ENABLE_DEBUG_LOG )
|
||||
add_definitions( -DENABLE_DEBUG_LOG )
|
||||
- message(STATUS "*** Debug Logging is enabled.")
|
||||
+ message(STATUS "*** Debug Logging is enabled.")
|
||||
else ()
|
||||
- message(STATUS "*** Debug Logging is NOT enabled.")
|
||||
+ message(STATUS "*** Debug Logging is NOT enabled.")
|
||||
endif ()
|
||||
|
||||
if (ENABLE_ALLOC_DEBUG)
|
||||
add_definitions ( -DDEBUG_ALLOCATION ) # see lexer.c for details
|
||||
message(STATUS "*** Note, lexer.c node allocation diagnostics are ON")
|
||||
endif ()
|
||||
-
|
||||
+
|
||||
if (ENABLE_MEMORY_DEBUG)
|
||||
add_definitions ( -DDEBUG_MEMORY ) # see alloc.c for details
|
||||
message(STATUS "*** Note, alloc.c memory diagnostics are ON")
|
||||
endif ()
|
||||
-
|
||||
+
|
||||
if (WIN32)
|
||||
option( ENABLE_CRTDBG_MEMORY "Set ON to enable the Windows CRT debug library." OFF )
|
||||
-
|
||||
+
|
||||
if (ENABLE_CRTDBG_MEMORY)
|
||||
add_definitions ( -D_CRTDBG_MAP_ALLOC ) # see tidy.c for details
|
||||
message(STATUS "*** Note, tidy.c Windows CRT memory debug is ON")
|
||||
@@ -178,9 +178,9 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set( WARNING_FLAGS -Wall )
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
-if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
+if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
set( WARNING_FLAGS "-Wall -Wno-overloaded-virtual" )
|
||||
-endif()
|
||||
+endif()
|
||||
|
||||
if(WIN32 AND MSVC)
|
||||
# C4996: The compiler encountered a deprecated declaration.
|
||||
@@ -190,7 +190,7 @@ if(WIN32 AND MSVC)
|
||||
foreach(warning 4996 4090 4244 4267)
|
||||
set(WARNING_FLAGS "${WARNING_FLAGS} /wd${warning}")
|
||||
endforeach()
|
||||
-
|
||||
+
|
||||
set( MSVC_FLAGS "-DNOMINMAX -D_USE_MATH_DEFINES -D_CRT_SECURE_NO_WARNINGS -D_SCL_SECURE_NO_WARNINGS -D__CRT_NONSTDC_NO_WARNINGS" )
|
||||
|
||||
# to distinguish between debug and release lib in windows
|
||||
@@ -206,7 +206,7 @@ set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${MSVC_LD_FLAGS}" )
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Static Windows Runtime
|
||||
-# Option to statically link to the Windows runtime. Maybe only
|
||||
+# Option to statically link to the Windows runtime. Maybe only
|
||||
# applies to WIN32/MSVC.
|
||||
#------------------------------------------------------------------------
|
||||
if (MSVC)
|
||||
@@ -222,7 +222,7 @@ if (MSVC)
|
||||
)
|
||||
foreach(CompilerFlag ${CompilerFlags})
|
||||
string(REPLACE "/MD" "/MT" ${CompilerFlag} "${${CompilerFlag}}")
|
||||
- endforeach()
|
||||
+ endforeach()
|
||||
message(STATUS "Using /MT STATIC runtime")
|
||||
else ()
|
||||
message(STATUS "Using /MD DYNAMIC runtime")
|
||||
@@ -255,14 +255,14 @@ if (NO_ACCESS_SUPPORT)
|
||||
endif ()
|
||||
|
||||
# Delete me? Not used in Tidy source!
|
||||
-add_definitions ( -DHAVE_CONFIG_H )
|
||||
+add_definitions ( -DHAVE_CONFIG_H )
|
||||
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Runtime Configuration File Support
|
||||
# By default on Unix-like systems when building for the console program,
|
||||
# support runtime configuration files in /etc/ and in ~/. To prevent this,
|
||||
-# set ENABLE_CONFIG_FILES to NO. Specify -DTIDY_CONFIG_FILE and/or
|
||||
+# set ENABLE_CONFIG_FILES to NO. Specify -DTIDY_CONFIG_FILE and/or
|
||||
# -DTIDY_USER_CONFIG_FILE to override the default paths in tidyplatform.h.
|
||||
# @note: this section refactored to support #584.
|
||||
#------------------------------------------------------------------------
|
||||
@@ -276,11 +276,11 @@ if ( UNIX AND SUPPORT_CONSOLE_APP )
|
||||
else ()
|
||||
|
||||
option ( ENABLE_CONFIG_FILES "Set to ON to enable Tidy runtime configuration file support" OFF )
|
||||
-
|
||||
+
|
||||
if ( SUPPORT_GETPWNAM )
|
||||
add_definitions( -DSUPPORT_GETPWNAM=1 )
|
||||
endif ()
|
||||
-
|
||||
+
|
||||
endif ()
|
||||
|
||||
if ( ENABLE_CONFIG_FILES )
|
||||
@@ -288,7 +288,7 @@ if ( ENABLE_CONFIG_FILES )
|
||||
message(STATUS "*** Building support for runtime configuration files.")
|
||||
|
||||
add_definitions( -DTIDY_ENABLE_CONFIG_FILES )
|
||||
-
|
||||
+
|
||||
# define a default here so we can pass to XSL.
|
||||
if ( NOT TIDY_CONFIG_FILE )
|
||||
set( TIDY_CONFIG_FILE "/etc/tidy.conf" )
|
||||
@@ -304,7 +304,7 @@ if ( ENABLE_CONFIG_FILES )
|
||||
add_definitions( -DTIDY_USER_CONFIG_FILE="${TIDY_USER_CONFIG_FILE}" )
|
||||
|
||||
endif ()
|
||||
-
|
||||
+
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Shared Library
|
||||
@@ -341,7 +341,7 @@ set ( CFILES
|
||||
${SRCDIR}/tmbstr.c ${SRCDIR}/utf8.c ${SRCDIR}/tidylib.c
|
||||
${SRCDIR}/mappedio.c ${SRCDIR}/gdoc.c ${SRCDIR}/language.c
|
||||
${SRCDIR}/messageobj.c ${SRCDIR}/sprtf.c )
|
||||
-
|
||||
+
|
||||
set ( HFILES
|
||||
${INCDIR}/tidyplatform.h ${INCDIR}/tidy.h ${INCDIR}/tidyenum.h
|
||||
${INCDIR}/tidybuffio.h )
|
||||
@@ -359,7 +359,7 @@ set ( LIBHFILES
|
||||
${SRCDIR}/tmbstr.h ${SRCDIR}/utf8.h ${SRCDIR}/tidy-int.h
|
||||
${SRCDIR}/version.h ${SRCDIR}/gdoc.h ${SRCDIR}/language.h
|
||||
${SRCDIR}/language_en.h ${SRCDIR}/sprtf.h )
|
||||
-
|
||||
+
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# Target Locations
|
||||
@@ -383,11 +383,11 @@ endif ()
|
||||
#------------------------------------------------------------------------
|
||||
set(name tidy-static)
|
||||
add_library ( ${name} STATIC ${CFILES} ${HFILES} ${LIBHFILES} )
|
||||
-set_target_properties( ${name} PROPERTIES
|
||||
+set_target_properties( ${name} PROPERTIES
|
||||
OUTPUT_NAME ${LIB_NAME}s )
|
||||
if (NOT TIDY_CONSOLE_SHARED) # user wants default static linkage
|
||||
list ( APPEND add_LIBS ${name} )
|
||||
-endif ()
|
||||
+endif ()
|
||||
install(TARGETS ${name}
|
||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
||||
ARCHIVE DESTINATION ${LIB_INSTALL_DIR}
|
||||
@@ -406,14 +406,14 @@ if (BUILD_SHARED_LIB)
|
||||
set(CMAKE_MACOSX_RPATH 1)
|
||||
endif ()
|
||||
add_library ( ${name} SHARED ${CFILES} ${HFILES} ${LIBHFILES} )
|
||||
- set_target_properties( ${name} PROPERTIES
|
||||
+ set_target_properties( ${name} PROPERTIES
|
||||
OUTPUT_NAME ${LIB_NAME} )
|
||||
set_target_properties( ${name} PROPERTIES
|
||||
VERSION ${LIBTIDY_VERSION}
|
||||
SOVERSION ${TIDY_MAJOR_VERSION} )
|
||||
- set_target_properties( ${name} PROPERTIES
|
||||
+ set_target_properties( ${name} PROPERTIES
|
||||
COMPILE_FLAGS "-DBUILD_SHARED_LIB" )
|
||||
- set_target_properties( ${name} PROPERTIES
|
||||
+ set_target_properties( ${name} PROPERTIES
|
||||
COMPILE_FLAGS "-DBUILDING_SHARED_LIB" )
|
||||
install(TARGETS ${name}
|
||||
RUNTIME DESTINATION ${BIN_INSTALL_DIR}
|
||||
@@ -422,7 +422,7 @@ if (BUILD_SHARED_LIB)
|
||||
)
|
||||
if (TIDY_CONSOLE_SHARED) # user wants shared/dll linkage
|
||||
list ( APPEND add_LIBS ${name} )
|
||||
- endif ()
|
||||
+ endif ()
|
||||
endif ()
|
||||
|
||||
|
||||
@@ -440,7 +440,7 @@ if (SUPPORT_CONSOLE_APP)
|
||||
set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d )
|
||||
endif ()
|
||||
if (NOT TIDY_CONSOLE_SHARED)
|
||||
- set_target_properties( ${name} PROPERTIES
|
||||
+ set_target_properties( ${name} PROPERTIES
|
||||
COMPILE_FLAGS "-DTIDY_STATIC" )
|
||||
endif ()
|
||||
install (TARGETS ${name} DESTINATION bin)
|
||||
@@ -471,62 +471,6 @@ if (BUILD_SAMPLE_CODE)
|
||||
endif ()
|
||||
|
||||
|
||||
-#################################################
|
||||
-# Create man pages
|
||||
-#################################################
|
||||
-
|
||||
-if (UNIX AND SUPPORT_CONSOLE_APP)
|
||||
- find_program( XSLTPROC_FOUND xsltproc )
|
||||
- if (XSLTPROC_FOUND)
|
||||
- ## NOTE: man name must match exe ie currently `${LIB_NAME}.1` not `tidy.1`
|
||||
- ## also could use `manpath` command output to determine target install path
|
||||
- set(TIDY_MANFILE ${LIB_NAME}.1)
|
||||
- message(STATUS "*** Generating man ${TIDY_MANFILE} custom commands...")
|
||||
- set(TIDY1XSL ${CMAKE_CURRENT_BINARY_DIR}/tidy1.xsl)
|
||||
- set(TIDYHELP ${CMAKE_CURRENT_BINARY_DIR}/tidy-help.xml)
|
||||
- set(TIDYCONFIG ${CMAKE_CURRENT_BINARY_DIR}/tidy-config.xml)
|
||||
- add_custom_target(man ALL DEPENDS "${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}")
|
||||
-
|
||||
- ## Populate the @VARIABLES@ in the input file.
|
||||
- configure_file(
|
||||
- ${CMAKE_CURRENT_SOURCE_DIR}/man/tidy1.xsl.in
|
||||
- ${TIDY1XSL}
|
||||
- )
|
||||
-
|
||||
- # Run the built EXE to generate xml output .
|
||||
- add_custom_command(
|
||||
- TARGET man
|
||||
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME} -xml-help > ${TIDYHELP}
|
||||
- COMMENT "Generate ${TIDYHELP}"
|
||||
- VERBATIM
|
||||
- )
|
||||
-
|
||||
- # Run the built EXE to generate more xml output.
|
||||
- add_custom_command(
|
||||
- TARGET man
|
||||
- COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME} -xml-config > ${TIDYCONFIG}
|
||||
- COMMENT "Generate ${TIDYCONFIG}"
|
||||
- VERBATIM
|
||||
- )
|
||||
-
|
||||
- # Run xsltproc to generate the install files.
|
||||
- add_custom_command(
|
||||
- TARGET man
|
||||
- DEPENDS ${TIDYHELP}
|
||||
- COMMAND xsltproc ARGS ${TIDY1XSL} ${TIDYHELP} > ${CMAKE_CURRENT_BINARY_DIR}/${TIDY_MANFILE}
|
||||
- COMMENT "Generate ${TIDY_MANFILE}"
|
||||
- VERBATIM
|
||||
- )
|
||||
-
|
||||
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${TIDY_MANFILE} DESTINATION ${MAN_INSTALL_DIR})
|
||||
-
|
||||
- else ()
|
||||
- message(STATUS "*** NOTE: xsltproc NOT FOUND! Can NOT generate man page.")
|
||||
- message(STATUS "*** You need to install xsltproc in your system.")
|
||||
- endif ()
|
||||
-endif ()
|
||||
-
|
||||
-
|
||||
#################################################
|
||||
# Create MSI,EXE, DMG, DEB/RPM
|
||||
# TODO: Check each of these builds
|
||||
@@ -540,7 +484,7 @@ endif()
|
||||
|
||||
#------------------------------------------------------------------------
|
||||
# System Runtime Libraries
|
||||
-# Need to ensure that system DLLs get included in a binary
|
||||
+# Need to ensure that system DLLs get included in a binary
|
||||
# distribution, but since it can miss some - seems incomplete - make
|
||||
# optional.
|
||||
#------------------------------------------------------------------------
|
||||
@@ -627,7 +571,7 @@ configure_file(
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc"
|
||||
@ONLY
|
||||
)
|
||||
-
|
||||
+
|
||||
install(FILES
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${LIB_NAME}.pc"
|
||||
DESTINATION "${LIB_INSTALL_DIR}/pkgconfig"
|
||||
diff --git a/include/tidyplatform.h b/include/tidyplatform.h
|
||||
index 28de468..ec0b99b 100644
|
||||
--- a/include/tidyplatform.h
|
||||
+++ b/include/tidyplatform.h
|
||||
@@ -81,7 +81,7 @@ extern "C" {
|
||||
#ifndef SUPPORT_LOCALIZATIONS
|
||||
# define SUPPORT_LOCALIZATIONS 1
|
||||
#endif
|
||||
-
|
||||
+
|
||||
/* Enable/disable support for console */
|
||||
#ifndef SUPPORT_CONSOLE_APP
|
||||
# define SUPPORT_CONSOLE_APP 1
|
||||
@@ -251,7 +251,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/* === Convenience defines for Solaris platforms === */
|
||||
-
|
||||
+
|
||||
#if defined(sun)
|
||||
# define SOLARIS_OS
|
||||
# ifndef PLATFORM_NAME
|
||||
@@ -450,15 +450,11 @@ extern "C" {
|
||||
# include <stat.h>
|
||||
# endif
|
||||
|
||||
-# if HAS_FUTIME
|
||||
-# include <sys/utime.h>
|
||||
-# else
|
||||
-# include <utime.h>
|
||||
-# endif
|
||||
+# include <utime.h>
|
||||
|
||||
/* MS Windows needs _ prefix for Unix file functions.
|
||||
Not required by Metrowerks Standard Library (MSL).
|
||||
-
|
||||
+
|
||||
Tidy uses following for preserving the last modified time.
|
||||
|
||||
WINDOWS automatically set by Win16 compilers.
|
||||
@@ -622,7 +618,7 @@ typedef char tmbchar; /* single, possibly partial character */
|
||||
/* `bool` is a reserved word in some but not all C++ compilers depending on age.
|
||||
age. Work around is to avoid bool by introducing a new enum called `Bool`.
|
||||
*/
|
||||
-
|
||||
+
|
||||
/* We could use the C99 definition where supported
|
||||
typedef _Bool Bool;
|
||||
#define no (_Bool)0
|
||||
@@ -634,7 +630,7 @@ typedef enum
|
||||
yes
|
||||
} Bool;
|
||||
|
||||
-/* for NULL pointers
|
||||
+/* for NULL pointers
|
||||
#define null ((const void*)0)
|
||||
extern void* null;
|
||||
*/
|
||||
Reference in new issue
Block a user