Skip to content

Commit 353d65d

Browse files
committed
Merge branch 'PHP-8.4'
2 parents 0967dcf + e347c46 commit 353d65d

File tree

4 files changed

+66
-46
lines changed

4 files changed

+66
-46
lines changed

bin/init.sh

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ done
8282
# Check requirements.
8383
which=$(which which 2>/dev/null)
8484
cmake=$(which cmake 2>/dev/null)
85-
patch=$(which patch 2>/dev/null)
8685
git=$(which git 2>/dev/null)
86+
patch=$(which patch 2>/dev/null)
8787

8888
if test -z "$which"; then
8989
echo "init.sh: The 'which' command not found." >&2
@@ -98,22 +98,22 @@ if test -z "$cmake"; then
9898
echo "" >&2
9999
fi
100100

101-
if test -z "$patch"; then
102-
echo "init.sh: The 'patch' command not found." >&2
103-
echo " Please install patch utilities:" >&2
104-
echo " http://savannah.gnu.org/projects/patch" >&2
105-
echo "" >&2
106-
fi
107-
108101
if test -z "$git"; then
109102
echo "init.sh: The 'git' command not found." >&2
110103
echo " Please install Git:" >&2
111104
echo " https://git-scm.com" >&2
112105
echo "" >&2
113106
fi
114107

108+
if test -z "$patch"; then
109+
echo "init.sh: The 'patch' command not found." >&2
110+
echo " Instead, the 'git' command will be used to apply patches." >&2
111+
echo " Optionally install patch utilities:" >&2
112+
echo " http://savannah.gnu.org/projects/patch" >&2
113+
echo "" >&2
114+
fi
115+
115116
if test -z "${cmake}" \
116-
|| test -z "${patch}" \
117117
|| test -z "${git}"
118118
then
119119
exit 1
@@ -196,8 +196,12 @@ fi
196196
for file in $patches; do
197197
case $file in
198198
*.patch)
199-
"$patch" -p1 -d php-src < $file
200-
;;
199+
if test -n "$patch"; then
200+
"$patch" -p1 -d php-src < $file
201+
else
202+
"$git" apply $file --directory php-src
203+
fi
204+
;;
201205
esac
202206
done
203207

cmake/ext/skeleton/cmake/modules/FindPHP.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,7 @@ endif()
286286
set(PHP_LIBRARIES ${PHP_EMBED_LIBRARY})
287287

288288
if(NOT TARGET PHP::PHP)
289-
add_library(PHP::PHP UNKNOWN IMPORTED)
289+
add_library(PHP::PHP INTERFACE IMPORTED)
290290

291291
set_target_properties(
292292
PHP::PHP

cmake/main/config.w32.cmake.h.in

Lines changed: 48 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -242,9 +242,6 @@
242242
/* Define to 1 if the PHP extension 'zlib' is built as a dynamic module. */
243243
#cmakedefine COMPILE_DL_ZLIB 1
244244

245-
/* Configure line */
246-
#cmakedefine CONFIGURE_COMMAND "@CONFIGURE_COMMAND@"
247-
248245
/* Define to 1 if fopencookie seeker uses off64_t. */
249246
#cmakedefine COOKIE_SEEKER_USES_OFF64_T 1
250247

@@ -1792,11 +1789,6 @@
17921789
/* Define to 1 if the pdo_mysql extension uses mysqlnd. */
17931790
#cmakedefine PDO_USE_MYSQLND 1
17941791

1795-
/* The PEAR installation directory. */
1796-
#define PEAR_INSTALLDIR "@PREFIX@\\pear"
1797-
1798-
#define PHP_BINDIR "@PREFIX@"
1799-
18001792
/* The build architecture. */
18011793
#cmakedefine PHP_BUILD_ARCH "@PHP_BUILD_ARCH@"
18021794

@@ -1815,15 +1807,6 @@
18151807
/* Compiler identification string. */
18161808
#cmakedefine PHP_COMPILER_ID "@PHP_COMPILER_ID@"
18171809

1818-
/* The path in which to look for php.ini. */
1819-
#define PHP_CONFIG_FILE_PATH ""
1820-
1821-
#define PHP_CONFIG_FILE_SCAN_DIR "@PHP_FULL_CONFIG_FILE_SCAN_DIR@"
1822-
1823-
#define PHP_DATADIR "@PREFIX@"
1824-
1825-
#define PHP_EXTENSION_DIR "@PREFIX@\\ext"
1826-
18271810
/* Define to 1 if the compiler supports AVX-512. */
18281811
#cmakedefine PHP_HAVE_AVX512_SUPPORTS 1
18291812

@@ -1887,21 +1870,15 @@
18871870
/* The iconv implementation. */
18881871
#cmakedefine PHP_ICONV_IMPL "@PHP_ICONV_IMPL@"
18891872

1890-
#define PHP_INCLUDE_PATH ".;@PREFIX@\\pear"
1891-
18921873
/* Define to 1 you have IRIX-style reentrant time functions. */
18931874
#cmakedefine PHP_IRIX_TIME_R 1
18941875

1895-
#define PHP_LIBDIR "@PREFIX@"
1896-
18971876
/* Linker major version. */
18981877
#cmakedefine PHP_LINKER_MAJOR @PHP_LINKER_MAJOR@
18991878

19001879
/* Linker minor version. */
19011880
#cmakedefine PHP_LINKER_MINOR @PHP_LINKER_MINOR@
19021881

1903-
#define PHP_LOCALSTATEDIR "@PREFIX@"
1904-
19051882
/* Define to 1 if mhash support is enabled. */
19061883
#cmakedefine PHP_MHASH_BC 1
19071884

@@ -1914,24 +1891,15 @@
19141891
/* The 'uname' output. */
19151892
#define PHP_OS "@CMAKE_SYSTEM_NAME@"
19161893

1917-
#define PHP_PREFIX "@PREFIX@"
1918-
1919-
#define PHP_SBINDIR "@PREFIX@"
1920-
19211894
/* Define to 1 if 'pread' declaration with 'off64_t' is missing. */
19221895
#cmakedefine PHP_PREAD_64 1
19231896

19241897
/* Define to 1 if 'pwrite' declaration with 'off64_t' is missing. */
19251898
#cmakedefine PHP_PWRITE_64 1
19261899

1927-
#define PHP_SHLIB_EXT_PREFIX "php_"
1928-
#define PHP_SHLIB_SUFFIX "dll"
1929-
19301900
/* Define to 1 if PHP uses its own SIGCHLD handler, and to 0 if not. */
19311901
#cmakedefine01 PHP_SIGCHILD
19321902

1933-
#define PHP_SYSCONFDIR "@PREFIX@"
1934-
19351903
/* The 'uname -a' output. */
19361904
#cmakedefine PHP_UNAME "@PHP_UNAME@"
19371905

@@ -2035,7 +2003,8 @@
20352003
/* Define to 1 if Zend signal handling is supported and enabled. */
20362004
#cmakedefine ZEND_SIGNALS 1
20372005

2038-
/* */
2006+
/* Define to 1 if libzip is built statically on Windows. Required for static
2007+
libzip since version 1.0 to 1.3.2. */
20392008
#cmakedefine ZIP_STATIC 1
20402009

20412010
/* Define to 1 if thread safety (ZTS) is enabled. */
@@ -2044,6 +2013,52 @@
20442013
/* Define to 1 when using musl libc. */
20452014
#cmakedefine __MUSL__ 1
20462015

2016+
/* The following build system related configuration values are on *nix
2017+
systems defined in the main/build-defs.h and JScript Windows build system
2018+
defines them in the configuration header file. */
2019+
2020+
/* Configure line */
2021+
#cmakedefine CONFIGURE_COMMAND "@CONFIGURE_COMMAND@"
2022+
2023+
/* The PEAR installation directory. */
2024+
#define PEAR_INSTALLDIR "@PREFIX@\\pear"
2025+
2026+
/* The path to the bin directory. */
2027+
#define PHP_BINDIR "@PREFIX@"
2028+
2029+
/* The path in which to look for php.ini. */
2030+
#define PHP_CONFIG_FILE_PATH ""
2031+
2032+
/* The path where to scan for additional INI configuration files. */
2033+
#define PHP_CONFIG_FILE_SCAN_DIR "@PHP_FULL_CONFIG_FILE_SCAN_DIR@"
2034+
2035+
/* The path to the share directory. */
2036+
#define PHP_DATADIR "@PREFIX@"
2037+
2038+
/* Default directory for dynamically loadable PHP extensions. */
2039+
#define PHP_EXTENSION_DIR "@PREFIX@\\ext"
2040+
2041+
/* The 'include_path' PHP INI directive. */
2042+
#define PHP_INCLUDE_PATH ".;@PREFIX@\\pear"
2043+
2044+
/* The path containing system libraries (lib or lib64). */
2045+
#define PHP_LIBDIR "@PREFIX@"
2046+
2047+
/* The path to the var directory. */
2048+
#define PHP_LOCALSTATEDIR "@PREFIX@"
2049+
2050+
/* The installation prefix. */
2051+
#define PHP_PREFIX "@PREFIX@"
2052+
2053+
/* The prefix for the shared library objects. */
2054+
#define PHP_SHLIB_EXT_PREFIX "php_"
2055+
2056+
/* The shared library objects extension. */
2057+
#define PHP_SHLIB_SUFFIX "dll"
2058+
2059+
/* The path to the etc directory. */
2060+
#define PHP_SYSCONFDIR "@PREFIX@"
2061+
20472062
#if __has_include("main/config.pickle.h")
20482063
#include "main/config.pickle.h"
20492064
#endif

cmake/main/php_config.cmake.h.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2001,7 +2001,8 @@
20012001
/* Define to 1 if Zend signal handling is supported and enabled. */
20022002
#cmakedefine ZEND_SIGNALS 1
20032003

2004-
/* */
2004+
/* Define to 1 if libzip is built statically on Windows. Required for static
2005+
libzip since version 1.0 to 1.3.2. */
20052006
#cmakedefine ZIP_STATIC 1
20062007

20072008
/* Define to 1 if thread safety (ZTS) is enabled. */

0 commit comments

Comments
 (0)