Skip to content

Commit 453cd5b

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 599bd39 + be5e904 commit 453cd5b

File tree

11 files changed

+26
-25
lines changed

11 files changed

+26
-25
lines changed

bin/init.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ execute_process(
5151
OUTPUT_STRIP_TRAILING_WHITESPACE
5252
)
5353

54-
if(NOT GIT_BRANCH MATCHES "^PHP-[0-9]+\.[0-9]+$")
54+
if(NOT GIT_BRANCH MATCHES [[^PHP-[0-9]+\.[0-9]+$]])
5555
set(GIT_BRANCH "master")
5656
endif()
5757

bin/php.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ if(
8585
)
8686
set(PHP_VERSION "${PHP_VERSION_FALLBACK}")
8787
else()
88-
string(REGEX MATCH [[php-([0-9]+.[0-9]+.[0-9]+).tar.gz]] _ "${filename}")
88+
string(REGEX MATCH [[php-([0-9.]+)\.tar\.gz]] _ "${filename}")
8989
set(PHP_VERSION "${CMAKE_MATCH_1}")
9090
endif()
9191
endblock()
@@ -207,7 +207,7 @@ function(php_download)
207207
"https://github.com/php/php-src/archive/refs/heads/${branch}.tar.gz"
208208
)
209209
elseif(PHP_VERSION MATCHES "^.*-dev$")
210-
string(REGEX MATCH [[(^[0-9]+)\.([0-9]+).*$]] _ "${PHP_VERSION}")
210+
string(REGEX MATCH [[(^[0-9]+)\.([0-9]+)]] _ "${PHP_VERSION}")
211211
set(branch "PHP-${CMAKE_MATCH_1}.${CMAKE_MATCH_2}")
212212

213213
list(
@@ -296,7 +296,7 @@ function(php_prepare_sources)
296296
message(STATUS "Applying patches to ${PHP_SOURCE_DIR_RELATIVE}")
297297

298298
# Apply patches for php-src.
299-
string(REGEX MATCH [[([0-9]+\.[0-9]+).*$]] _ "${PHP_VERSION}")
299+
string(REGEX MATCH [[^([0-9]+\.[0-9]+)]] _ "${PHP_VERSION}")
300300
file(GLOB_RECURSE patches ${PHP_ROOT_DIR}/patches/${CMAKE_MATCH_1}/*.patch)
301301

302302
foreach(patch ${patches})
@@ -318,7 +318,7 @@ function(php_prepare_sources)
318318

319319
# Clean temporary .git directory. Checks are done as safeguards.
320320
if(
321-
PHP_SOURCE_DIR MATCHES "\\/php-8\\.[0-9][.-].*$"
321+
PHP_SOURCE_DIR MATCHES [[/php-8\.[0-9][.-].*$]]
322322
AND IS_DIRECTORY ${PHP_SOURCE_DIR}/.git/
323323
AND EXISTS ${PHP_SOURCE_DIR}/php.ini-development
324324
AND EXISTS ${PHP_SOURCE_DIR}/main/php_version.h

cmake/Zend/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ block(PROPAGATE Zend_VERSION Zend_VERSION_LABEL)
3232
file(READ zend.h content)
3333
string(
3434
REGEX MATCH
35-
"#[ \t]*define[ \t]+ZEND_VERSION[ \t]+\"([0-9.]+)([^\"]*)"
35+
[[#[ \t]*define[ \t]+ZEND_VERSION[ \t]+"([0-9.]+)([^"]*)]]
3636
_
3737
"${content}"
3838
)

cmake/cmake/ConfigureChecks.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -785,9 +785,9 @@ if(PHP_GCOV)
785785
if(CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache")
786786
message(
787787
WARNING
788-
"ccache should be disabled when PHP_GCOV='ON' option is used. You can "
789-
"disable ccache by setting option PHP_CCACHE='OFF' or environment "
790-
"variable CCACHE_DISABLE=1."
788+
"When 'PHP_GCOV' is enabled, ccache should be disabled by setting the "
789+
"'PHP_CCACHE' to 'OFF' or by setting the 'CCACHE_DISABLE' environment "
790+
"variable."
791791
)
792792
endif()
793793

cmake/cmake/Version.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ include_guard(GLOBAL)
1515

1616
# Set the PHP_VERSION_* variables from configure.ac.
1717
block(PROPAGATE PHP_VERSION)
18-
set(regex "^AC_INIT\\(\\[PHP\\],\\[([0-9]+\.[0-9]+\.[0-9]+)([^\]]*)")
19-
file(STRINGS ${CMAKE_CURRENT_LIST_DIR}/../configure.ac _ REGEX "${regex}")
18+
set(regex "^AC_INIT.+PHP\\],\\[([0-9.]+)([^]]*)")
19+
file(STRINGS configure.ac _ REGEX "${regex}")
2020

2121
cmake_policy(GET CMP0159 policy)
2222
if(CMAKE_VERSION VERSION_LESS 3.29 OR NOT policy STREQUAL NEW)

cmake/cmake/modules/FindApache.cmake

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,9 +338,7 @@ block(PROPAGATE Apache_VERSION)
338338
ERROR_QUIET
339339
)
340340

341-
string(REGEX MATCH " Apache/([0-9]\.[0-9.]+\.[0-9]+) " _ "${version}")
342-
343-
if(CMAKE_MATCH_1)
341+
if(version MATCHES [[ Apache/([0-9]+\.[0-9.]+)]])
344342
set(Apache_VERSION "${CMAKE_MATCH_1}")
345343
endif()
346344
endif()

cmake/cmake/modules/FindCcache.cmake

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ Find the Ccache compiler cache tool for faster compilation times.
1212
1313
## Hints
1414
15-
* The `CCACHE_DISABLE` environment variable disables the ccache and doesn't add
16-
it to the C and CXX launcher, see Ccache documentation for more info.
15+
* The `CCACHE_DISABLE` regular or environment variable which disables ccache and
16+
doesn't adjust the C and CXX launcher. For more info see Ccache documentation.
1717
#]=============================================================================]
1818

1919
include(FeatureSummary)
@@ -45,9 +45,7 @@ block(PROPAGATE Ccache_VERSION)
4545
OUTPUT_STRIP_TRAILING_WHITESPACE
4646
)
4747

48-
string(REGEX MATCH "^ccache version ([^\r\n]+)" _ "${version}")
49-
50-
if(CMAKE_MATCH_1)
48+
if(version MATCHES "^ccache version ([^\r\n]+)")
5149
set(Ccache_VERSION "${CMAKE_MATCH_1}")
5250
endif()
5351
endif()
@@ -64,11 +62,16 @@ find_package_handle_standard_args(
6462

6563
unset(_reason)
6664

67-
if(NOT Ccache_FOUND OR CCACHE_DISABLE OR "$ENV{CCACHE_DISABLE}")
65+
if(NOT Ccache_FOUND)
6866
message(STATUS "Ccache disabled")
6967
return()
7068
endif()
7169

70+
if(CCACHE_DISABLE OR DEFINED ENV{CCACHE_DISABLE})
71+
message(STATUS "Ccache disabled ('CCACHE_DISABLE' is set)")
72+
return()
73+
endif()
74+
7275
if(CMAKE_C_COMPILER_LOADED)
7376
set(CMAKE_C_COMPILER_LAUNCHER ${Ccache_EXECUTABLE})
7477
endif()

cmake/cmake/modules/FindODBC.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ elseif(ODBC_CONFIG)
247247
ERROR_QUIET
248248
)
249249

250-
if(NOT result EQUAL 0 OR NOT ODBC_VERSION MATCHES "[0-9]+\.[0-9.]+")
250+
if(NOT result EQUAL 0 OR NOT ODBC_VERSION MATCHES [[[0-9]+\.[0-9.]+]])
251251
unset(ODBC_VERSION)
252252
endif()
253253

cmake/cmake/modules/FindTokyoCabinet.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ endif()
7676
# Get version.
7777
block(PROPAGATE TokyoCabinet_VERSION)
7878
if(EXISTS ${TokyoCabinet_INCLUDE_DIR}/tcutil.h)
79-
set(regex [[^[ \t]*#[ \t]*define[ \t]+_TC_VERSION[ \t]+"?([0-9.]+)"?[ \t]*$]])
79+
set(regex [[^[ \t]*#[ \t]*define[ \t]+_TC_VERSION[ \t]+"?([^"]+)"?[ \t]*$]])
8080

8181
file(STRINGS ${TokyoCabinet_INCLUDE_DIR}/tcutil.h result REGEX "${regex}")
8282

cmake/ext/odbc/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,9 +363,9 @@ elseif(PHP_ODBC_TYPE STREQUAL "sapdb")
363363
set(HAVE_SAPDB 1)
364364
elseif(PHP_ODBC_TYPE STREQUAL "solid")
365365
# Set based on the Solid version:
366-
if(ODBC_LIBRARY MATCHES "23\.(a|so)$")
366+
if(ODBC_LIBRARY MATCHES [[23\.(a|so)$]])
367367
set(HAVE_SOLID 1)
368-
elseif(ODBC_LIBRARY MATCHES "30\.(a|so)$")
368+
elseif(ODBC_LIBRARY MATCHES [[30\.(a|so)$]])
369369
set(HAVE_SOLID_30 1)
370370
else()
371371
set(HAVE_SOLID_35 1)

0 commit comments

Comments
 (0)