@@ -306,7 +306,7 @@ function download-php-deps {
306
306
function build-snappy {
307
307
write-library " snappy" $LIBSNAPPY_VER
308
308
write-download
309
- (& cmd.exe / c " git clone -b $LIBSNAPPY_VER https://github.com/google/snappy $pwd 2>&1" ) >> $log_file
309
+ (& cmd.exe / c " git clone -b $LIBSNAPPY_VER https://github.com/google/snappy snappy 2>&1" ) >> $log_file
310
310
Push-Location snappy
311
311
312
312
(& cmd.exe / c " git submodule update --depth=1 --init 2>&1" ) >> $log_file
@@ -316,7 +316,7 @@ function build-snappy {
316
316
-DCMAKE_PREFIX_PATH=`" $DEPS_DIR `" ^`
317
317
-DCMAKE_INSTALL_PREFIX=`" $DEPS_DIR `" ^`
318
318
-DCMAKE_BUILD_TYPE=`" $MSBUILD_CONFIGURATION `" ^`
319
- `" $pwd `" || exit 1"
319
+ . || exit 1"
320
320
321
321
write-compile
322
322
sdk- command " cmake --build . || exit 1"
@@ -329,7 +329,7 @@ function build-snappy {
329
329
function build-grpc {
330
330
write-library " grpc" $LIBGRPC_VER
331
331
write-download
332
- (& cmd.exe / c " git clone -b v$LIBGRPC_VER --depth=1 https://github.com/grpc/grpc $pwd 2>&1" ) >> $log_file
332
+ (& cmd.exe / c " git clone -b v$LIBGRPC_VER --depth=1 https://github.com/grpc/grpc grpc 2>&1" ) >> $log_file
333
333
Push-Location grpc
334
334
335
335
(& cmd.exe / c " git submodule update --depth=1 --init 2>&1" ) >> $log_file
@@ -347,16 +347,16 @@ function build-grpc {
347
347
-DgRPC_BUILD_GRPC_PYTHON_PLUGIN=OFF^`
348
348
-DgRPC_BUILD_GRPC_RUBY_PLUGIN=OFF^`
349
349
-DgRPC_SSL_PROVIDER=`" package`" ^`
350
- -DgRPC_ZLIB_PROVIDER=`" package`"
351
- `" $pwd `" || exit 1"
350
+ -DgRPC_ZLIB_PROVIDER=`" package`" ^ `
351
+ . || exit 1"
352
352
353
353
write-compile
354
354
sdk- command " cmake --build . || exit 1"
355
355
write-install
356
356
sdk- command " cmake -P cmake_install.cmake || exit 1"
357
357
358
- Move-Item " .\ third_party\protobuf\php\ext\google\protobuf" " $SOURCES_PATH \php-src\ext\protobuf" >> $log_file 2>&1
359
- Move-Item " .\ third_party\protobuf\third_party" " $SOURCES_PATH \php-src\ \ext\protobuf\third_party" >> $log_file 2>&1
358
+ Move-Item " third_party\protobuf\php\ext\google\protobuf" " $SOURCES_PATH \php-src\ext\protobuf" >> $log_file 2>&1
359
+ Move-Item " third_party\protobuf\third_party" " $SOURCES_PATH \php-src\ext\protobuf\third_party" >> $log_file 2>&1
360
360
361
361
@"
362
362
ARG_ENABLE("protobuf", "Enable Protobuf extension", "yes");
@@ -368,7 +368,7 @@ if (PHP_PROTOBUF != "no") {
368
368
369
369
AC_DEFINE('HAVE_PROTOBUF', 1, '');
370
370
}
371
- "@ | Out-File - Encoding UTF8 - FilePath $SOURCES_PATH \php- src\ext\protobuf\config.w32
371
+ "@ | Out-File - Encoding ascii - FilePath $SOURCES_PATH \php- src\ext\protobuf\config.w32
372
372
373
373
write-done
374
374
Pop-Location
@@ -380,15 +380,15 @@ function build-zstd {
380
380
$file = download- file " https://github.com/facebook/zstd/archive/v$LIBZSTD_VER .zip" " zstd"
381
381
write-extracting
382
382
unzip- file $file $pwd
383
- Move-Item " zstd-$LIBYAML_VER " libyaml >> $log_file 2>&1
384
- Push-Location libyaml
383
+ Move-Item " zstd-$LIBZSTD_VER " libzstd >> $log_file 2>&1
384
+ Push-Location libzstd
385
385
386
386
write-configure
387
387
sdk- command " cmake -G `" $CMAKE_TARGET `" -A `" $ARCH `" ^`
388
388
-DCMAKE_PREFIX_PATH=`" $DEPS_DIR `" ^`
389
389
-DCMAKE_INSTALL_PREFIX=`" $DEPS_DIR `" ^`
390
390
-DBUILD_SHARED_LIBS=ON^`
391
- `" $pwd `" || exit 1"
391
+ `" $pwd \build\cmake `" || exit 1"
392
392
write-compile
393
393
sdk- command " msbuild ALL_BUILD.vcxproj /p:Configuration=$MSBUILD_CONFIGURATION /m || exit 1"
394
394
write-install
@@ -411,6 +411,10 @@ function build_rdkafka {
411
411
-DCMAKE_PREFIX_PATH=`" $DEPS_DIR `" ^`
412
412
-DCMAKE_INSTALL_PREFIX=`" $DEPS_DIR `" ^`
413
413
-DBUILD_SHARED_LIBS=ON^`
414
+ -DWITH_ZSTD=ON^`
415
+ -DWITH_SSL=ON^`
416
+ -DWITH_CURL=OFF^`
417
+ -DENABLE_LZ4_EXT=OFF^`
414
418
`" $pwd `" || exit 1"
415
419
416
420
write-compile
@@ -576,6 +580,11 @@ function download-php-extensions {
576
580
get-github - extension " zstd" $PHP_ZSTD_VER " kjdev" " php-ext-zstd"
577
581
get-github - extension " grpc" $PHP_GRPC_VER " larryTheCoder" " php-grpc"
578
582
583
+ # Vanilla generator depend on this folder, the compiler will not be able
584
+ # to find these dependencies if the folder name were to change
585
+ Move-Item " ext-chunkutils2-$PHP_CHUNKUTILS2_VER " " chunkutils2" - Force
586
+ Move-Item " ext-morton-$PHP_MORTON_VER " " morton" - Force
587
+
579
588
write-library " php-ext crypto" $PHP_CRYPTO_VER
580
589
write-download
581
590
(& cmd.exe / c " git clone https://github.com/bukka/php-crypto.git crypto 2>&1" ) >> $log_file
@@ -613,6 +622,7 @@ $DEPS_DIR="$SOURCES_PATH\deps"
613
622
# custom libs depend on some standard libs, so prepare these first
614
623
# a bit annoying because this part of the build is slow and makes it take longer to find problems
615
624
download- php- deps
625
+ download- php
616
626
617
627
$LIB_BUILD_DIR = " $SOURCES_PATH \deps_build"
618
628
@@ -632,7 +642,6 @@ build-libdeflate
632
642
633
643
cd $SOURCES_PATH >> $log_file 2>&1
634
644
635
- download- php
636
645
download- php- extensions
637
646
638
647
cd " $SOURCES_PATH \php-src"
@@ -666,11 +675,11 @@ sdk-command "configure^`
666
675
--enable-opcache^`
667
676
--enable-opcache-jit=$PHP_JIT_ENABLE_ARG ^`
668
677
--enable-phar^`
669
- --enable-vanillagenerator=shared^
670
- --enable-zstd^
671
- --enable-snappy^
672
- --enable-grpc=shared^
673
- --enable-protobuf=shared^
678
+ --enable-vanillagenerator=shared^`
679
+ --enable-zstd^`
680
+ --enable-snappy^`
681
+ --enable-grpc=shared^`
682
+ --enable-protobuf=shared^`
674
683
--enable-recursionguard=shared^`
675
684
--enable-sockets^`
676
685
--enable-tokenizer^`
@@ -721,8 +730,9 @@ Remove-Item "$SOURCES_PATH\php-src\$ARCH\Release_TS\php-$PHP_DISPLAY_VER\glib-*.
721
730
Remove-Item " $SOURCES_PATH \php-src\$ARCH \Release_TS\php-$PHP_DISPLAY_VER \gmodule-*.dll" >> $log_file 2>&1
722
731
Remove-Item - Recurse " $SOURCES_PATH \php-src\$ARCH \Release_TS\php-$PHP_DISPLAY_VER \lib\enchant\" >> $log_file 2>&1
723
732
724
- Move-Item " $DEPS_DIR \grpc\cmake\build\grpc_php_plugin.exe" " $outpath \grpc\grpc_php_plugin.exe" >> $log_file 2>&1
725
- Move-Item " $DEPS_DIR \grpc\cmake\build\third_party\protobuf\protoc.exe" " $outpath \grpc\protoc.exe" >> $log_file 2>&1
733
+ mkdir " $outpath \bin\grpc" >> $log_file 2>&1
734
+ Move-Item " $LIB_BUILD_DIR \grpc\grpc_php_plugin.exe" " $outpath \bin\grpc\grpc_php_plugin.exe" >> $log_file 2>&1
735
+ Move-Item " $LIB_BUILD_DIR \grpc\third_party\protobuf\protoc.exe" " $outpath \bin\grpc\protoc.exe" >> $log_file 2>&1
726
736
727
737
cd $outpath >> $log_file 2>&1
728
738
Move-Item - Force " $SOURCES_PATH \php-src\$ARCH \$ ( $OUT_PATH_REL ) _TS\php-debug-pack-*.zip" $outpath
0 commit comments