Skip to content

Commit

Permalink
Remove PM4 support
Browse files Browse the repository at this point in the history
pthreads v4 will likely not work on PHP 8.3, and is not currently being tested.
I don't anticipate needing it in any case, since PM4 EOL is coming up in January.
  • Loading branch information
dktapps committed Nov 24, 2023
1 parent 77eafe2 commit 07ee1b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 24 deletions.
11 changes: 2 additions & 9 deletions compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ LIBZIP_VERSION="1.10.1"
SQLITE3_VERSION="3440200" #3.44.2
LIBDEFLATE_VERSION="dd12ff2b36d603dbb7fa8838fe7e7176fcbd4f6f" #1.19

EXT_PTHREADS_VERSION="4.2.2"
EXT_PMMPTHREAD_VERSION="6.0.12"
EXT_YAML_VERSION="2.2.3"
EXT_LEVELDB_VERSION="317fdcd8415e1566fc2835ce2bdb8e19b890f9f3"
Expand Down Expand Up @@ -1031,13 +1030,7 @@ function get_pecl_extension {
cd "$BUILD_DIR/php"
write_out "PHP" "Downloading additional extensions..."

if [ "$PM_VERSION_MAJOR" -ge 5 ]; then
get_github_extension "pmmpthread" "$EXT_PMMPTHREAD_VERSION" "pmmp" "ext-pmmpthread"
THREAD_EXT_FLAGS="--enable-pmmpthread"
else
get_github_extension "pthreads" "$EXT_PTHREADS_VERSION" "pmmp" "ext-pmmpthread" #"v" needed for release tags because github removes the "v"
THREAD_EXT_FLAGS="--enable-pthreads"
fi
get_github_extension "pmmpthread" "$EXT_PMMPTHREAD_VERSION" "pmmp" "ext-pmmpthread"

get_github_extension "yaml" "$EXT_YAML_VERSION" "php" "pecl-file_formats-yaml"
#get_pecl_extension "yaml" "$EXT_YAML_VERSION"
Expand Down Expand Up @@ -1157,7 +1150,7 @@ $HAS_DEBUG \
--enable-mbstring \
--disable-mbregex \
--enable-calendar \
$THREAD_EXT_FLAGS \
--enable-pmmpthread \
--enable-fileinfo \
--with-libxml \
--enable-xml \
Expand Down
18 changes: 3 additions & 15 deletions windows-compile-vs.bat
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ set PTHREAD_W32_VER=3.0.0
set LEVELDB_MCPE_VER=1c7564468b41610da4f498430e795ca4de0931ff
set LIBDEFLATE_VER=dd12ff2b36d603dbb7fa8838fe7e7176fcbd4f6f

set PHP_PTHREADS_VER=4.2.2
set PHP_PMMPTHREAD_VER=6.0.12
set PHP_YAML_VER=2.2.3
set PHP_CHUNKUTILS2_VER=0.3.5
Expand Down Expand Up @@ -219,14 +218,7 @@ cd /D ..
call :pm-echo "Getting additional PHP extensions..."
cd /D php-src\ext

set THREAD_EXT_FLAGS=""
if "%PM_VERSION_MAJOR%" geq "5" (
call :get-extension-zip-from-github "pmmpthread" "%PHP_PMMPTHREAD_VER%" "pmmp" "ext-pmmpthread" || exit 1
set THREAD_EXT_FLAGS="--with-pmmpthread=shared"
) else (
call :get-extension-zip-from-github "pthreads" "%PHP_PTHREADS_VER%" "pmmp" "ext-pmmpthread" || exit 1
set THREAD_EXT_FLAGS="--with-pthreads=shared"
)
call :get-extension-zip-from-github "pmmpthread" "%PHP_PMMPTHREAD_VER%" "pmmp" "ext-pmmpthread" || exit 1
call :get-extension-zip-from-github "yaml" "%PHP_YAML_VER%" "php" "pecl-file_formats-yaml" || exit 1
call :get-extension-zip-from-github "chunkutils2" "%PHP_CHUNKUTILS2_VER%" "pmmp" "ext-chunkutils2" || exit 1
call :get-extension-zip-from-github "igbinary" "%PHP_IGBINARY_VER%" "igbinary" "igbinary" || exit 1
Expand Down Expand Up @@ -304,7 +296,7 @@ call configure^
--with-mysqlnd^
--with-openssl^
--with-pcre-jit^
%THREAD_EXT_FLAGS%^
--with-pmmpthread=shared^
--with-simplexml^
--with-sodium^
--with-sqlite3=shared^
Expand Down Expand Up @@ -345,11 +337,7 @@ call :pm-echo "Generating php.ini..."
(echo error_reporting=-1)>>"%php_ini%"
(echo zend.assertions=-1)>>"%php_ini%"
(echo extension_dir=ext)>>"%php_ini%"
if "%PM_VERSION_MAJOR%" geq "5" (
(echo extension=php_pmmpthread.dll)>>"%php_ini%"
) else (
(echo extension=php_pthreads.dll)>>"%php_ini%"
)
(echo extension=php_pmmpthread.dll)>>"%php_ini%"
(echo extension=php_openssl.dll)>>"%php_ini%"
(echo extension=php_chunkutils2.dll)>>"%php_ini%"
(echo extension=php_igbinary.dll)>>"%php_ini%"
Expand Down

0 comments on commit 07ee1b4

Please sign in to comment.