Skip to content

Commit 63b1def

Browse files
committed
Merge branch 'PHP-8.5'
2 parents 5001a1c + 5627aea commit 63b1def

File tree

9 files changed

+51
-44
lines changed

9 files changed

+51
-44
lines changed

cmake/cmake/Configuration.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ mark_as_advanced(PHP_INCLUDE_PREFIX)
8787

8888
set(
8989
CACHE{PHP_CONFIG_FILE_SCAN_DIR}
90-
TYPE PATH
90+
TYPE STRING
9191
HELP
9292
"The path where to scan for additional INI configuration files; By default "
9393
"it is empty value; Pass it as a relative path inside the install prefix, "
@@ -100,7 +100,7 @@ mark_as_advanced(PHP_CONFIG_FILE_SCAN_DIR)
100100
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
101101
set(
102102
CACHE{PHP_CONFIG_FILE_PATH}
103-
TYPE FILEPATH
103+
TYPE STRING
104104
HELP
105105
"The path in which to look for php.ini; By default, it is set to "
106106
"SYSCONFDIR (etc); Relative path gets the CMAKE_INSTALL_PREFIX "
@@ -223,7 +223,7 @@ mark_as_advanced(PHP_SYSTEM_GLOB)
223223

224224
set(
225225
CACHE{PHP_EXTENSION_DIR}
226-
TYPE PATH
226+
TYPE STRING
227227
HELP
228228
"Default directory for dynamically loadable PHP extensions. If left empty, "
229229
"it is determined automatically. Can be overridden using the PHP "

cmake/ext/mysqli/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ mark_as_advanced(PHP_EXT_MYSQL_SOCKET)
7979

8080
php_set(
8181
PHP_EXT_MYSQL_SOCKET_PATH
82-
TYPE FILEPATH
82+
TYPE STRING
8383
IF [[(PHP_EXT_MYSQLI OR PHP_EXT_PDO_MYSQL) AND PHP_EXT_MYSQL_SOCKET]]
8484
VALUE ""
8585
DOC

cmake/main/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ function(_php_main_configure_build_defs)
286286
string(CONFIGURE [[
287287
set(CONFIGURE_COMMAND "cmake")
288288

289-
if(NOT "@PHP_PEAR_DIR@" STREQUAL "")
290-
set(PHP_PEAR_INSTALLDIR "$<PATH:ABSOLUTE_PATH,NORMALIZE,@PHP_PEAR_DIR@,${CMAKE_INSTALL_PREFIX}>")
289+
if(NOT "@PHP_PEAR_INSTALL_DIR_VALUE@" STREQUAL "")
290+
set(PHP_PEAR_INSTALL_DIR_VALUE "$<PATH:ABSOLUTE_PATH,NORMALIZE,@PHP_PEAR_INSTALL_DIR_VALUE@,${CMAKE_INSTALL_PREFIX}>")
291291
endif()
292292

293293
set(PHP_BINDIR "$<PATH:ABSOLUTE_PATH,NORMALIZE,@CMAKE_INSTALL_BINDIR@,${CMAKE_INSTALL_PREFIX}>")
@@ -305,9 +305,9 @@ function(_php_main_configure_build_defs)
305305
set(PHP_EXTENSION_DIR "$<PATH:ABSOLUTE_PATH,NORMALIZE,@PHP_EXTENSION_DIR@,${CMAKE_INSTALL_PREFIX}>")
306306

307307
if("@CMAKE_SYSTEM_NAME@" STREQUAL "Windows")
308-
set(PHP_INCLUDE_PATH ".;${PHP_PEAR_INSTALLDIR}")
308+
set(PHP_INCLUDE_PATH ".;${PHP_PEAR_INSTALL_DIR_VALUE}")
309309
else()
310-
set(PHP_INCLUDE_PATH ".:${PHP_PEAR_INSTALLDIR}")
310+
set(PHP_INCLUDE_PATH ".:${PHP_PEAR_INSTALL_DIR_VALUE}")
311311
endif()
312312

313313
set(PHP_LIBDIR "$<PATH:ABSOLUTE_PATH,NORMALIZE,@CMAKE_INSTALL_LIBDIR@,${CMAKE_INSTALL_PREFIX}>")

cmake/main/cmake/build-defs.h.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#cmakedefine CONFIGURE_COMMAND "@CONFIGURE_COMMAND@"
1313

1414
/* The path to the PEAR installation directory. */
15-
#define PEAR_INSTALLDIR "@PHP_PEAR_INSTALLDIR@"
15+
#define PEAR_INSTALLDIR "@PHP_PEAR_INSTALL_DIR_VALUE@"
1616

1717
/* The path to the directory containing command-line executables (bin). */
1818
#define PHP_BINDIR "@PHP_BINDIR@"

cmake/pear/CMakeLists.txt

Lines changed: 32 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,14 @@ Configure PEAR as part of the PHP installation.
1717
1818
Install PEAR, PHP Extension and Application Repository package manager.
1919
20-
## PHP_PEAR_DIR
20+
## PHP_PEAR_INSTALL_DIR
2121
2222
:orange_circle: *Deprecated as of PHP 7.4.*
2323
2424
* Default: `DATADIR/pear`
2525
26-
The path where PEAR will be installed to. `CMAKE_INSTALL_PREFIX` is
27-
automatically prepended when given as a relative path.
26+
The path where PEAR will be installed to. Relative path is interpreted as being
27+
relative to the `CMAKE_INSTALL_PREFIX`.
2828
2929
## PHP_PEAR_TEMP_DIR
3030
@@ -33,18 +33,15 @@ automatically prepended when given as a relative path.
3333
* Default: `tmp/pear` on \*nix and `temp/pear` on Windows
3434
3535
The PEAR temporary directory where PEAR writes temporary files, such as cache,
36-
downloaded packages artifacts and similar. Pass it as a relative path inside the
37-
top level system directory, which will be automatically prepended. If given as
38-
an absolute path, top level directory is not prepended. Relative path is added
39-
to the top root system directory (`/` on \*nix, or `C:/` on Windows).
36+
downloaded packages artifacts and similar. Relative path is interpreted as being
37+
relative to the top root system directory (`/` on \*nix, or `C:/` on Windows).
4038
4139
For example, default PEAR temporary directory after the top level system
42-
directory is prepended becomes `/tmp/pear` on \*nix and `C:/temp/pear` on
43-
Windows.
40+
directory is prepended becomes `/tmp/pear` on Unix-like systems and
41+
`C:/temp/pear` on Windows.
4442
#]=============================================================================]
4543

4644
include(FeatureSummary)
47-
include(PHP/Set)
4845

4946
option(
5047
PHP_PEAR
@@ -57,26 +54,39 @@ add_feature_info(
5754
"PHP Extension and Application Repository"
5855
)
5956

60-
php_set(
61-
PHP_PEAR_DIR
62-
TYPE PATH
63-
IF PHP_PEAR
57+
set(
58+
CACHE{PHP_PEAR_INSTALL_DIR}
59+
TYPE STRING
60+
HELP "The PEAR installation directory"
6461
VALUE "${CMAKE_INSTALL_DATADIR}/pear"
65-
DOC "The PEAR installation directory"
6662
)
67-
mark_as_advanced(PHP_PEAR_DIR)
63+
mark_as_advanced(PHP_PEAR_INSTALL_DIR)
64+
65+
block()
66+
if(NOT PHP_PEAR)
67+
set(value "")
68+
else()
69+
set(value "${PHP_PEAR_INSTALL_DIR}")
70+
endif()
71+
72+
set(
73+
CACHE{PHP_PEAR_INSTALL_DIR_VALUE}
74+
TYPE INTERNAL
75+
HELP "Internal storage buffer for the PEAR installation directory value"
76+
VALUE ${value}
77+
)
78+
endblock()
6879

6980
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
7081
set(tmp_dir "temp/pear")
7182
else()
7283
set(tmp_dir "tmp/pear")
7384
endif()
74-
php_set(
75-
PHP_PEAR_TEMP_DIR
76-
TYPE PATH
77-
IF PHP_PEAR
85+
set(
86+
CACHE{PHP_PEAR_TEMP_DIR}
87+
TYPE STRING
88+
HELP "The PEAR temporary directory. Default: ${tmp_dir}"
7889
VALUE "${tmp_dir}"
79-
DOC "The PEAR temporary directory. Default: ${tmp_dir}"
8090
)
8191
mark_as_advanced(PHP_PEAR_TEMP_DIR)
8292

@@ -128,7 +138,7 @@ elseif(CMAKE_CROSSCOMPILING AND CMAKE_CROSSCOMPILING_EMULATOR)
128138
endif()
129139

130140
string(CONFIGURE [[
131-
set(php_pear_install_dir "$<PATH:ABSOLUTE_PATH,NORMALIZE,@PHP_PEAR_DIR@,${CMAKE_INSTALL_PREFIX}>")
141+
set(php_pear_install_dir "$<PATH:ABSOLUTE_PATH,NORMALIZE,@PHP_PEAR_INSTALL_DIR_VALUE@,${CMAKE_INSTALL_PREFIX}>")
132142
set(php_pear_install_bin_dir "$<PATH:ABSOLUTE_PATH,NORMALIZE,@CMAKE_INSTALL_BINDIR@,${CMAKE_INSTALL_PREFIX}>")
133143
set(php_pear_current_source_dir "@CMAKE_CURRENT_SOURCE_DIR@")
134144
set(php_pear_current_binary_dir "@CMAKE_CURRENT_BINARY_DIR@")

cmake/sapi/apache2handler/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ set(
6969
HELP "The path to the Apache modules directory to install PHP Apache module"
7070
VALUE ""
7171
)
72-
set_property(CACHE PHP_SAPI_APACHE2HANDLER_INSTALL_DIR PROPERTY TYPE PATH)
7372
mark_as_advanced(PHP_SAPI_APACHE2HANDLER_INSTALL_DIR)
7473

7574
if(NOT PHP_SAPI_APACHE2HANDLER)

docs/cmake/cmake.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -863,7 +863,7 @@ PHP CMake-based build system specific installation cache variables:
863863
The PHP include directory inside the `CMAKE_INSTALL_INCLUDEDIR`.
864864
Default: `php`
865865

866-
* [`PHP_PEAR_DIR`](/docs/cmake/variables/PHP_PEAR.md)
866+
* [`PHP_PEAR_INSTALL_DIR`](/docs/cmake/variables/PHP_PEAR.md)
867867

868868
The path where PEAR will be installed to.
869869

@@ -908,7 +908,7 @@ PHP installation directory structure when using CMake:
908908
└─📂 ${CMAKE_INSTALL_DATADIR} # └─📂 (share)
909909
└─📂 php # └─📂 php
910910
└─📂 fpm # └─📂 fpm
911-
├─📂 ${PHP_PEAR_DIR} # └─📂 pear (default: share/pear)
911+
├─📂 ${PHP_PEAR_INSTALL_DIR} # └─📂 pear (default: share/pear)
912912
└─📂 ${CMAKE_INSTALL_LOCALSTATEDIR} # └─📂 var
913913
└─📂 log # └─📂 log
914914
└─📂 ${CMAKE_INSTALL_RUNSTATEDIR} # └─📂 var/run

docs/cmake/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3411,7 +3411,7 @@ A list of Autoconf `configure` command-line configuration options, Windows
34113411
<td>N/A</td>
34123412
<td>
34133413
PHP_PEAR=ON<br>
3414-
[PHP_PEAR_DIR=DIR]<br>
3414+
[PHP_PEAR_INSTALL_DIR=DIR]<br>
34153415
[PHP_PEAR_TEMP_DIR=DIR]<br>
34163416
</td>
34173417
<td></td>

docs/cmake/pear.md

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ Configure PEAR as part of the PHP installation.
1919

2020
Install PEAR, PHP Extension and Application Repository package manager.
2121

22-
## PHP_PEAR_DIR
22+
## PHP_PEAR_INSTALL_DIR
2323

2424
:orange_circle: *Deprecated as of PHP 7.4.*
2525

2626
* Default: `DATADIR/pear`
2727

28-
The path where PEAR will be installed to. `CMAKE_INSTALL_PREFIX` is
29-
automatically prepended when given as a relative path.
28+
The path where PEAR will be installed to. Relative path is interpreted as being
29+
relative to the `CMAKE_INSTALL_PREFIX`.
3030

3131
## PHP_PEAR_TEMP_DIR
3232

@@ -35,11 +35,9 @@ automatically prepended when given as a relative path.
3535
* Default: `tmp/pear` on \*nix and `temp/pear` on Windows
3636

3737
The PEAR temporary directory where PEAR writes temporary files, such as cache,
38-
downloaded packages artifacts and similar. Pass it as a relative path inside the
39-
top level system directory, which will be automatically prepended. If given as
40-
an absolute path, top level directory is not prepended. Relative path is added
41-
to the top root system directory (`/` on \*nix, or `C:/` on Windows).
38+
downloaded packages artifacts and similar. Relative path is interpreted as being
39+
relative to the top root system directory (`/` on \*nix, or `C:/` on Windows).
4240

4341
For example, default PEAR temporary directory after the top level system
44-
directory is prepended becomes `/tmp/pear` on \*nix and `C:/temp/pear` on
45-
Windows.
42+
directory is prepended becomes `/tmp/pear` on Unix-like systems and
43+
`C:/temp/pear` on Windows.

0 commit comments

Comments
 (0)