Skip to content

Commit 451aa92

Browse files
committed
Merge branch 'PHP-8.4'
2 parents 37977f5 + 13986fa commit 451aa92

File tree

15 files changed

+136
-240
lines changed

15 files changed

+136
-240
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Removed configuration variables:
1919

2020
* Aspell_ROOT
2121
* Cclient_ROOT
22+
* EXT_DBA_GDBM
2223
* EXT_IMAP
2324
* EXT_IMAP_KERBEROS
2425
* EXT_IMAP_SHARED
@@ -30,6 +31,7 @@ Removed configuration variables:
3031
* EXT_PSPELL
3132
* EXT_PSPELL_SHARED
3233
* EXT_READLINE_LIBREADLINE
34+
* GDBM_ROOT
3335
* Kerberos_ROOT
3436
* Readline_ROOT
3537

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ sudo dnf install cmake gcc gcc-c++ bison sqlite-devel
3232
brew install cmake bison # See https://brew.sh how to install Homebrew
3333

3434
# Prerequisites for Alpine Linux:
35-
sudo apk add --no-cache cmake make gcc g++ bison sqlite-dev musl-dev
35+
sudo apk add --no-cache cmake make gcc g++ musl-dev bison sqlite-dev
3636

3737
# Prerequisites for BSD-based systems:
3838
sudo pkg install cmake bison sqlite3

cmake/cmake/modules/FindDbm.cmake

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ Find the dbm library.
44
Depending on the system, the dbm library can be part of other libraries as an
55
interface.
66
7-
* GNU dbm has compatibility interface via gdbm_compatibility
7+
* GNU dbm library (GDBM) has compatibility interface via gdbm_compatibility but
8+
it is licensed as GPL 3, which is incompatible with PHP.
89
* TODO: Built into default libraries (C): Solaris still has some macros
910
definitions mapping to internal dbm functions available in the db.h header.
1011
When defining `DB_DBM_HSEARCH` dbm handler is available as built into C
@@ -22,8 +23,6 @@ Module defines the following `IMPORTED` target(s):
2223
* `Dbm_IS_BUILT_IN` - Whether dbm is a part of the C library.
2324
* `Dbm_INCLUDE_DIRS` - Include directories needed to use this package.
2425
* `Dbm_LIBRARIES` - Libraries needed to link to the package library.
25-
* `Dbm_IMPLEMENTATION` - String of the library name that implements the dbm
26-
library.
2726
2827
## Cache variables
2928
@@ -72,7 +71,6 @@ else()
7271
find_path(
7372
Dbm_INCLUDE_DIR
7473
NAMES dbm.h
75-
PATH_SUFFIXES gdbm
7674
DOC "Directory containing dbm library headers"
7775
)
7876

@@ -82,9 +80,7 @@ else()
8280

8381
find_library(
8482
Dbm_LIBRARY
85-
NAMES
86-
gdbm_compat
87-
dbm
83+
NAMES dbm
8884
DOC "The path to the dbm library"
8985
)
9086

@@ -104,12 +100,6 @@ else()
104100
mark_as_advanced(Dbm_INCLUDE_DIR Dbm_LIBRARY)
105101
endif()
106102

107-
if(Dbm_LIBRARY MATCHES "gdbm_compat")
108-
set(Dbm_IMPLEMENTATION "GDBM")
109-
elseif(Dbm_LIBRARY)
110-
set(Dbm_IMPLEMENTATION "DBM")
111-
endif()
112-
113103
find_package_handle_standard_args(
114104
Dbm
115105
REQUIRED_VARS

cmake/cmake/modules/FindGDBM.cmake

Lines changed: 0 additions & 95 deletions
This file was deleted.

cmake/cmake/modules/FindNdbm.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ Find the ndbm library.
44
Depending on the system, the nbdm ("new" dbm) can be part of other libraries as
55
an interface.
66
7-
* GNU dbm library (GDBM) has a compatibility interface that provides ndbm.h
8-
header and gdbm_compat library.
7+
* GNU dbm library (GDBM) has compatibility interface via gdbm_compatibility that
8+
provides ndbm.h header but it is licensed as GPL 3, which is incompatible with
9+
PHP.
910
* Built into default libraries (C): BSD-based systems, macOS, Solaris.
1011
1112
Module defines the following `IMPORTED` target(s):
@@ -78,7 +79,6 @@ else()
7879
Ndbm_LIBRARY
7980
NAMES
8081
ndbm
81-
gdbm_compat
8282
db1
8383
DOC "The path to the ndbm library"
8484
)

cmake/ext/dba/CMakeLists.txt

Lines changed: 4 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -105,20 +105,6 @@ add_feature_info(
105105
"bundled flat-file DBA handler support"
106106
)
107107

108-
cmake_dependent_option(
109-
EXT_DBA_GDBM
110-
"DBA: Enable the GNU dbm (GDBM) support"
111-
OFF
112-
[[EXT_DBA AND NOT EXT_DBA_QDBM]]
113-
OFF
114-
)
115-
mark_as_advanced(EXT_DBA_GDBM)
116-
add_feature_info(
117-
"ext/dba GDBM"
118-
EXT_DBA_GDBM
119-
"GNU dbm support"
120-
)
121-
122108
cmake_dependent_option(
123109
EXT_DBA_INIFILE
124110
"DBA: Enable the bundled INI-file DBA handler support"
@@ -164,21 +150,15 @@ cmake_dependent_option(
164150
EXT_DBA_QDBM
165151
"DBA: Enable the QDBM support"
166152
OFF
167-
[[EXT_DBA AND NOT EXT_DBA_DBM AND NOT EXT_DBA_GDBM]]
153+
[[EXT_DBA AND NOT EXT_DBA_DBM]]
168154
OFF
169155
)
170156
add_feature_info(
171157
"ext/dba QDBM"
172158
EXT_DBA_QDBM
173159
"Quick Database Manager support"
174160
)
175-
if(EXT_DBA_QDBM AND EXT_DBA_GDBM)
176-
message(
177-
FATAL_ERROR
178-
"You cannot combine EXT_DBA_GDBM with EXT_DBA_QDBM. Please select either "
179-
"GDBM or QDBM."
180-
)
181-
elseif(EXT_DBA_QDBM AND EXT_DBA_DBM)
161+
if(EXT_DBA_QDBM AND EXT_DBA_DBM)
182162
message(
183163
FATAL_ERROR
184164
"You cannot combine EXT_DBA_DBM with EXT_DBA_QDBM. Please select either "
@@ -327,24 +307,13 @@ if(EXT_DBA_DBM)
327307
PURPOSE "Necessary to enable the DBM support in the dba extension."
328308
)
329309

330-
if(Dbm_LIBRARY MATCHES "gdbm")
331-
message(
332-
WARNING
333-
"The GNU dbm (GDBM) library is licensed under the GNU GPL 3, which is "
334-
"not compatible with the PHP license. PHP then shouldn't be distributed. "
335-
"The EXT_DBA_DBM is a legacy artifact for testing purposes. The "
336-
"recommendation for using and distributing the PHP 'dba' extension is to "
337-
"disable the EXT_DBA_DBM."
338-
)
339-
endif()
340-
341310
target_link_libraries(php_dba PRIVATE Dbm::Dbm)
342311

343312
target_sources(php_dba PRIVATE dba_dbm.c)
344313

345314
set(DBM_INCLUDE_FILE "<dbm.h>")
346315
set(DBA_DBM 1)
347-
set(DBM_VERSION "${Dbm_IMPLEMENTATION}")
316+
set(DBM_VERSION "DBM")
348317
endif()
349318

350319
################################################################################
@@ -361,34 +330,6 @@ if(EXT_DBA_FLATFILE)
361330
set(DBA_FLATFILE 1)
362331
endif()
363332

364-
################################################################################
365-
# The GNU dbm (GDBM) support.
366-
################################################################################
367-
if(EXT_DBA_GDBM)
368-
message(
369-
WARNING
370-
"The GNU dbm (GDBM) library is licensed under the GNU GPL 3, which is not "
371-
"compatible with the PHP license. PHP then shouldn't be distributed. The "
372-
"recommendation for using and distributing the PHP 'dba' extension is to "
373-
"disable EXT_DBA_GDBM."
374-
)
375-
376-
find_package(GDBM)
377-
set_package_properties(
378-
GDBM
379-
PROPERTIES
380-
TYPE REQUIRED
381-
PURPOSE "Necessary to enable the GDBM support in the dba extension."
382-
)
383-
384-
target_link_libraries(php_dba PRIVATE GDBM::GDBM)
385-
386-
target_sources(php_dba PRIVATE dba_gdbm.c)
387-
388-
set(GDBM_INCLUDE_FILE "<gdbm.h>")
389-
set(DBA_GDBM 1)
390-
endif()
391-
392333
################################################################################
393334
# INI-file support.
394335
################################################################################
@@ -435,17 +376,6 @@ if(EXT_DBA_NDBM)
435376
PURPOSE "Necessary to enable the ndbm support in the dba extension."
436377
)
437378

438-
if(Ndbm_LIBRARY MATCHES "gdbm")
439-
message(
440-
WARNING
441-
"The GNU dbm (GDBM) library is licensed under the GNU GPL 3, which is "
442-
"not compatible with the PHP license. PHP then shouldn't be distributed. "
443-
"The EXT_DBA_NDBM is a legacy artifact for testing purposes. The "
444-
"recommendation for using and distributing the PHP 'dba' extension is to "
445-
"disable the EXT_DBA_NDBM."
446-
)
447-
endif()
448-
449379
target_link_libraries(php_dba PRIVATE Ndbm::Ndbm)
450380

451381
target_sources(php_dba PRIVATE dba_ndbm.c)
@@ -457,7 +387,7 @@ endif()
457387
################################################################################
458388
# The qdbm handler support.
459389
################################################################################
460-
if(EXT_DBA_QDBM AND NOT EXT_DBA_DBM AND NOT EXT_DBA_GDBM)
390+
if(EXT_DBA_QDBM AND NOT EXT_DBA_DBM)
461391
find_package(QDBM)
462392
set_package_properties(
463393
QDBM

cmake/ext/dba/config.cmake.h.in

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@
4444
/* Define to 1 if the dba extension uses the bundled flatfile handler. */
4545
#cmakedefine DBA_FLATFILE 1
4646

47-
/* Define to 1 if the dba extension uses the GDBM handler. */
48-
#cmakedefine DBA_GDBM 1
49-
5047
/* Define to 1 if the dba extension uses the bundled inifile handler. */
5148
#cmakedefine DBA_INIFILE 1
5249

@@ -68,9 +65,6 @@
6865
/* The DBM handler version information. */
6966
#cmakedefine DBM_VERSION "@DBM_VERSION@"
7067

71-
/* The GDBM handler header file. */
72-
#cmakedefine GDBM_INCLUDE_FILE @GDBM_INCLUDE_FILE@
73-
7468
/* Define to 1 if the PHP extension 'dba' is available. */
7569
#cmakedefine HAVE_DBA 1
7670

docs/cmake/cmake.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ version available on the operating system.
277277
* 3.24
278278
* `CMAKE_COLOR_DIAGNOSTICS`
279279
* `CMAKE_COMPILE_WARNING_AS_ERROR`, otherwise INTERFACE library should be used
280+
* `if(PATH_EQUAL)`
280281
* 3.25
281282
* `block()` command
282283
* New `try_run` signature

docs/cmake/configuration.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,15 +1195,15 @@ A list of Autoconf `configure` command-line configuration options, Windows
11951195
<tr>
11961196
<td>&emsp;--without-gdbm</td>
11971197
<td>N/A</td>
1198-
<td>EXT_DBA_GDBM=OFF</td>
1198+
<td>EXT_DBA_GDBM=OFF (PHP &lt;= 8.3)</td>
11991199
<td>default</td>
12001200
</tr>
12011201
<tr>
12021202
<td>&emsp;--with-gdbm[=DIR]</td>
12031203
<td>N/A</td>
12041204
<td>
1205-
EXT_DBA_GDBM=ON<br>
1206-
[GDBM_ROOT=DIR]
1205+
EXT_DBA_GDBM=ON (PHP &lt;= 8.3)<br>
1206+
[GDBM_ROOT=DIR] (PHP &lt;= 8.3)
12071207
</td>
12081208
<td></td>
12091209
</tr>
@@ -2849,7 +2849,7 @@ A list of Autoconf `configure` command-line configuration options, Windows
28492849
<tr>
28502850
<td>&emsp;--without-readline</td>
28512851
<td>--without-readline</td>
2852-
<td>EXT_READLINE=OFF</td>
2852+
<td>EXT_READLINE=OFF (PHP &lt;= 8.3)</td>
28532853
<td>default</td>
28542854
</tr>
28552855
<tr>
@@ -2860,7 +2860,7 @@ A list of Autoconf `configure` command-line configuration options, Windows
28602860
EXT_READLINE_LIBREADLINE=ON <i>(PHP &lt;= 8.3)</i><br>
28612861
[Readline_ROOT=DIR] <i>(PHP &lt;= 8.3)</i>
28622862
</td>
2863-
<td>CMake PHP 8.4 Readline library was removed</td>
2863+
<td></td>
28642864
</tr>
28652865
<tr>
28662866
<td>&emsp;--with-readline=shared</td>

0 commit comments

Comments
 (0)