File tree Expand file tree Collapse file tree 2 files changed +18
-2
lines changed
src/SPC/builder/extension Expand file tree Collapse file tree 2 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 10011001 "spx" : {
10021002 "type" : " git" ,
10031003 "rev" : " master" ,
1004- "url" : " https://github.com/static-php /php-spx.git" ,
1004+ "url" : " https://github.com/NoiseByNorthwest /php-spx.git" ,
10051005 "path" : " php-src/ext/spx" ,
10061006 "license" : {
10071007 "type" : " file" ,
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ class spx extends Extension
1313{
1414 public function getUnixConfigureArg (bool $ shared = false ): string
1515 {
16- $ arg = '--enable-spx ' . ($ shared ? '=shared ' : '' );
16+ $ arg = '--enable-SPX ' . ($ shared ? '=shared ' : '' );
1717 if ($ this ->builder ->getLib ('zlib ' ) !== null ) {
1818 $ arg .= ' --with-zlib-dir= ' . BUILD_ROOT_PATH ;
1919 }
@@ -29,4 +29,20 @@ public function patchBeforeConfigure(): bool
2929 );
3030 return true ;
3131 }
32+
33+ public function patchBeforeBuildconf (): bool
34+ {
35+ FileSystem::replaceFileStr (
36+ $ this ->source_dir . '/config.m4 ' ,
37+ 'CFLAGS="$CFLAGS -Werror -Wall -O3 -pthread -std=gnu90" ' ,
38+ 'CFLAGS="$CFLAGS -pthread" '
39+ );
40+ FileSystem::replaceFileStr (
41+ $ this ->source_dir . '/src/php_spx.h ' ,
42+ "extern zend_module_entry spx_module_entry; \n" ,
43+ "extern zend_module_entry spx_module_entry;; \n#define phpext_spx_ptr &spx_module_entry \n"
44+ );
45+ FileSystem::copy ($ this ->source_dir . '/src/php_spx.h ' , $ this ->source_dir . '/php_spx.h ' );
46+ return true ;
47+ }
3248}
You can’t perform that action at this time.
0 commit comments