Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/windows-cygwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
run: |
bash ./sapi/scripts/cygwin/install-re2c.sh
bash sapi/download-box/download-box-get-archive-from-server.sh

- name: install deps lib with source code
shell: C:\cygwin\bin\bash.EXE --noprofile --norc -e -o pipefail -o igncr {0}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,5 @@ php-fpm-*
!sapi/patches
/runtime
!/runtime/.gitkeep
/APP_NAME
/APP_VERSION
18 changes: 17 additions & 1 deletion ext/readline/readline_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -739,8 +739,24 @@ typedef cli_shell_callbacks_t *(__cdecl *get_cli_shell_callbacks)(void);
} while(0)

#else
/*
#ifdef COMPILE_DL_READLINE
This dlsym() is always used as even the CGI SAPI is linked against "CLI"-only
extensions. If that is being changed dlsym() should only be used when building
this extension sharedto offer compatibility.
*/
#define GET_SHELL_CB(cb) \
do { \
(cb) = NULL; \
cli_shell_callbacks_t *(*get_callbacks)(void); \
get_callbacks = dlsym(RTLD_DEFAULT, "php_cli_get_shell_callbacks"); \
if (get_callbacks) { \
(cb) = get_callbacks(); \
} \
} while(0)
/*#else
#define GET_SHELL_CB(cb) (cb) = php_cli_get_shell_callbacks()
#endif*/
#endif

PHP_MINIT_FUNCTION(cli_readline)
Expand Down
24 changes: 22 additions & 2 deletions sapi/download-box/download-box-get-archive-from-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,15 @@ mkdir -p pool/ext
mkdir -p ${__PROJECT__}/var/download-box/

cd ${__PROJECT__}/var/download-box/
SWOOLE_CLI_RELEASE_VERSION="v6.1.1.1"
ALL_DEPS_HASH="39983e8b050bfc31265b6c385220026d58ebb04f72cba3ff9f461c97b546e25a"

ALL_DEPS_HASH="a55699ecee994032f33266dfa37eabb49f1f6d6b6b65cdcf7b881cac09c63bea"
DOMAIN="https://github.com/swoole/swoole-cli/releases/download/${SWOOLE_CLI_RELEASE_VERSION}/"

DOMAIN='https://github.com/swoole/swoole-cli/releases/download/v6.0.0.0/'
# show sha256sum
# curl -fSL https://github.com/swoole/swoole-cli/releases/download/v6.1.1.1/all-deps.zip.sha256sum && echo
# download command
# curl -fSLo all-deps.zip https://github.com/swoole/swoole-cli/releases/download/v6.1.1.1/all-deps.zip

while [ $# -gt 0 ]; do
case "$1" in
Expand All @@ -29,6 +34,21 @@ while [ $# -gt 0 ]; do
DOMAIN='https://swoole-cli.jingjingxyk.com/'
fi
;;
--proxy)
export HTTP_PROXY="$2"
export HTTPS_PROXY="$2"
NO_PROXY="127.0.0.0/8,10.0.0.0/8,100.64.0.0/10,172.16.0.0/12,192.168.0.0/16"
NO_PROXY="${NO_PROXY},::1/128,fe80::/10,fd00::/8,ff00::/8"
NO_PROXY="${NO_PROXY},localhost"
NO_PROXY="${NO_PROXY},.aliyuncs.com,.aliyun.com"
NO_PROXY="${NO_PROXY},.tsinghua.edu.cn,.ustc.edu.cn"
NO_PROXY="${NO_PROXY},.tencent.com"
NO_PROXY="${NO_PROXY},ftpmirror.gnu.org"
NO_PROXY="${NO_PROXY},gitee.com,gitcode.com"
NO_PROXY="${NO_PROXY},.myqcloud.com,.swoole.com"
NO_PROXY="${NO_PROXY},.jingjingxyk.com,jingjingxyk.cn"
export NO_PROXY="${NO_PROXY},.npmmirror.com"
;;
--*)
echo "Illegal option $1"
;;
Expand Down
9 changes: 4 additions & 5 deletions sapi/src/template/make.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,12 @@
export_variables
<?php if ($this->isLinux()) : ?>
export CFLAGS="$CFLAGS "
export LDFLAGS="$LDFLAGS -static -all-static "
<?php if($this->getInputOption('with-static-pie')) : ?>
export LDFLAGS="$LDFLAGS -static -all-static"
<?php if ($this->getInputOption('with-static-pie')) : ?>
export CFLAGS="$CFLAGS -fPIE"
export LDFLAGS="$LDFLAGS -static-pie"
<?php endif ;?>
<?php endif ;?>
<?php endif ; ?>
<?php endif ; ?>
export LDFLAGS="$LDFLAGS <?= $this->extraLdflags ?>"
export EXTRA_CFLAGS='<?= $this->extraCflags ?>'
<?php if(!empty($this->httpProxy)) : ?>
Expand All @@ -303,7 +303,6 @@
{ readelf -l <?= $this->getWorkDir() ?>/bin/swoole-cli ; } || { echo $? ; }
{ objdump -p <?= $this->getWorkDir() ?>/bin/swoole-cli ; } || { echo $? ; }
<?php endif; ?>

}

make_archive() {
Expand Down
Loading