Skip to content

Commit f6f957f

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 9ccee40 + 9bae4d6 commit f6f957f

File tree

6 files changed

+122
-65
lines changed

6 files changed

+122
-65
lines changed

cmake/ext/phar/CMakeLists.txt

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -97,23 +97,25 @@ add_dependencies(php_ext_phar php_ext_hash php_ext_spl)
9797
include(cmake/GenerateGrammar.cmake)
9898

9999
################################################################################
100-
# Man documentation.
100+
# Configure man documentation.
101101
################################################################################
102102

103-
configure_file(phar.1.in phar.1 @ONLY)
104-
configure_file(phar.phar.1.in phar.phar.1 @ONLY)
103+
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
104+
configure_file(phar.1.in phar.1 @ONLY)
105+
configure_file(phar.phar.1.in phar.phar.1 @ONLY)
105106

106-
install(
107-
FILES ${CMAKE_CURRENT_BINARY_DIR}/phar.1
108-
RENAME ${PHP_PROGRAM_PREFIX}phar${PHP_PROGRAM_SUFFIX}.1
109-
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
110-
)
107+
install(
108+
FILES ${CMAKE_CURRENT_BINARY_DIR}/phar.1
109+
RENAME ${PHP_PROGRAM_PREFIX}phar${PHP_PROGRAM_SUFFIX}.1
110+
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
111+
)
111112

112-
install(
113-
FILES ${CMAKE_CURRENT_BINARY_DIR}/phar.phar.1
114-
RENAME ${PHP_PROGRAM_PREFIX}phar${PHP_PROGRAM_SUFFIX}.phar.1
115-
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
116-
)
113+
install(
114+
FILES ${CMAKE_CURRENT_BINARY_DIR}/phar.phar.1
115+
RENAME ${PHP_PROGRAM_PREFIX}phar${PHP_PROGRAM_SUFFIX}.phar.1
116+
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
117+
)
118+
endif()
117119

118120
################################################################################
119121
# The phar command-line script.

cmake/sapi/cgi/CMakeLists.txt

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,27 @@ else()
7171
message(CHECK_FAIL "no")
7272
endif()
7373

74-
# Man documentation.
75-
configure_file(php-cgi.1.in php-cgi.1 @ONLY)
76-
7774
install(
7875
TARGETS php_sapi_cgi
7976
RUNTIME
8077
DESTINATION ${CMAKE_INSTALL_BINDIR}
8178
)
8279

83-
install(
84-
FILES ${CMAKE_CURRENT_BINARY_DIR}/php-cgi.1
85-
RENAME ${PHP_PROGRAM_PREFIX}php-cgi${PHP_PROGRAM_SUFFIX}.1
86-
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
87-
)
80+
################################################################################
81+
# Configure man documentation.
82+
################################################################################
83+
84+
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
85+
configure_file(php-cgi.1.in php-cgi.1 @ONLY)
86+
install(
87+
FILES ${CMAKE_CURRENT_BINARY_DIR}/php-cgi.1
88+
RENAME ${PHP_PROGRAM_PREFIX}php-cgi${PHP_PROGRAM_SUFFIX}.1
89+
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
90+
)
91+
endif()
92+
93+
################################################################################
94+
# Configuration header.
95+
################################################################################
8896

8997
configure_file(cmake/config.h.in config.h)

cmake/sapi/cli/CMakeLists.txt

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
144144
endif()
145145
endif()
146146

147-
# Man documentation.
148-
block()
149-
set(program_prefix "${PHP_PROGRAM_PREFIX}")
150-
configure_file(php.1.in php.1 @ONLY)
151-
endblock()
152-
153147
install(
154148
TARGETS php_sapi_cli
155149
RUNTIME
@@ -158,12 +152,6 @@ install(
158152
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PHP_INCLUDE_PREFIX}/sapi/cli
159153
)
160154

161-
install(
162-
FILES ${CMAKE_CURRENT_BINARY_DIR}/php.1
163-
RENAME ${PHP_PROGRAM_PREFIX}php${PHP_PROGRAM_SUFFIX}.1
164-
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
165-
)
166-
167155
################################################################################
168156
# The cli SAPI without console on Windows.
169157
################################################################################
@@ -207,4 +195,24 @@ if(PHP_SAPI_CLI_WIN_NO_CONSOLE)
207195
)
208196
endif()
209197

198+
################################################################################
199+
# Configure man documentation.
200+
################################################################################
201+
202+
block()
203+
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
204+
set(program_prefix "${PHP_PROGRAM_PREFIX}")
205+
configure_file(php.1.in php.1 @ONLY)
206+
install(
207+
FILES ${CMAKE_CURRENT_BINARY_DIR}/php.1
208+
RENAME ${PHP_PROGRAM_PREFIX}php${PHP_PROGRAM_SUFFIX}.1
209+
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
210+
)
211+
endif()
212+
endblock()
213+
214+
################################################################################
215+
# Configuration header.
216+
################################################################################
217+
210218
configure_file(cmake/config.h.in config.h)

cmake/sapi/fpm/CMakeLists.txt

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -504,10 +504,9 @@ if(PHP_SAPI_FPM_SELINUX)
504504
endif()
505505

506506
################################################################################
507-
# Install files.
507+
# Configure man documentation.
508508
################################################################################
509509

510-
# Configure man documentation.
511510
block()
512511
# Replace the hardcoded runstatedir with a template placeholder.
513512
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/php-fpm.8.in" content)
@@ -518,7 +517,11 @@ block()
518517
content
519518
"${content}"
520519
)
521-
file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/PHP/php-fpm.8.in" "${content}")
520+
file(
521+
WRITE
522+
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/PHP/php-fpm.8.in"
523+
"${content}"
524+
)
522525

523526
string(CONFIGURE [[
524527
set(php_fpm_localstatedir "$<PATH:ABSOLUTE_PATH,NORMALIZE,@CMAKE_INSTALL_LOCALSTATEDIR@,${CMAKE_INSTALL_PREFIX}>")
@@ -551,7 +554,10 @@ block()
551554
)
552555
endblock()
553556

557+
################################################################################
554558
# Configure php-fpm.conf.
559+
################################################################################
560+
555561
block()
556562
string(CONFIGURE [[
557563
set(prefix "${CMAKE_INSTALL_PREFIX}")
@@ -577,7 +583,10 @@ block()
577583
install(CODE "${code}")
578584
endblock()
579585

586+
################################################################################
580587
# Configure www.conf.
588+
################################################################################
589+
581590
block()
582591
string(CONFIGURE [[
583592
set(prefix "${CMAKE_INSTALL_PREFIX}")
@@ -605,7 +614,10 @@ block()
605614
install(CODE "${code}")
606615
endblock()
607616

617+
################################################################################
608618
# Configure init.d.php-fpm.
619+
################################################################################
620+
609621
block()
610622
# Replace the hardcoded runstatedir with a template placeholder.
611623
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/init.d.php-fpm.in" content)
@@ -646,7 +658,10 @@ block()
646658
install(CODE "${code}")
647659
endblock()
648660

661+
################################################################################
649662
# Configure init.d.php-fpm.
663+
################################################################################
664+
650665
block()
651666
# Replace the hardcoded runstatedir with a template placeholder.
652667
file(READ "${CMAKE_CURRENT_SOURCE_DIR}/php-fpm.service.in" content)
@@ -686,6 +701,10 @@ block()
686701
install(CODE "${code}")
687702
endblock()
688703

704+
################################################################################
705+
# Installation.
706+
################################################################################
707+
689708
install(TARGETS php_sapi_fpm RUNTIME DESTINATION ${CMAKE_INSTALL_SBINDIR})
690709

691710
php_install(CODE "
@@ -727,7 +746,10 @@ php_install(CODE "
727746
endif()
728747
")
729748

749+
################################################################################
730750
# FPM info status HTML page.
751+
################################################################################
752+
731753
configure_file(status.html.in status.html @ONLY)
732754

733755
install(
@@ -736,4 +758,8 @@ install(
736758
DESTINATION ${CMAKE_INSTALL_DATADIR}/fpm
737759
)
738760

761+
################################################################################
762+
# Configuration header.
763+
################################################################################
764+
739765
configure_file(cmake/config.h.in config.h)

cmake/sapi/phpdbg/CMakeLists.txt

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -268,24 +268,12 @@ endif()
268268
# Installation.
269269
################################################################################
270270

271-
# Man documentation.
272-
block()
273-
set(program_prefix "${PHP_PROGRAM_PREFIX}")
274-
configure_file(phpdbg.1.in phpdbg.1 @ONLY)
275-
endblock()
276-
277271
install(
278272
TARGETS php_sapi_phpdbg
279273
RUNTIME
280274
DESTINATION ${CMAKE_INSTALL_BINDIR}
281275
)
282276

283-
install(
284-
FILES ${CMAKE_CURRENT_BINARY_DIR}/phpdbg.1
285-
RENAME ${PHP_PROGRAM_PREFIX}phpdbg${PHP_PROGRAM_SUFFIX}.1
286-
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
287-
)
288-
289277
# Create log and run directories on installation.
290278
php_install(CODE "
291279
file(
@@ -333,4 +321,24 @@ if(TARGET php_sapi_phpdbg_shared)
333321
)
334322
endif()
335323

324+
################################################################################
325+
# Configure man documentation.
326+
################################################################################
327+
328+
block()
329+
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
330+
set(program_prefix "${PHP_PROGRAM_PREFIX}")
331+
configure_file(phpdbg.1.in phpdbg.1 @ONLY)
332+
install(
333+
FILES ${CMAKE_CURRENT_BINARY_DIR}/phpdbg.1
334+
RENAME ${PHP_PROGRAM_PREFIX}phpdbg${PHP_PROGRAM_SUFFIX}.1
335+
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
336+
)
337+
endif()
338+
endblock()
339+
340+
################################################################################
341+
# Configuration header.
342+
################################################################################
343+
336344
configure_file(cmake/config.h.in config.h)

cmake/scripts/CMakeLists.txt

Lines changed: 22 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,27 @@
1-
# Man documentation.
2-
block()
3-
set(program_prefix "${PHP_PROGRAM_PREFIX}")
1+
##############################################################################
2+
# Configure man documentation.
3+
##############################################################################
44

5-
message(STATUS "Creating scripts/man1/php-config.1")
6-
configure_file(man1/php-config.1.in man1/php-config.1 @ONLY)
7-
install(
8-
FILES ${PROJECT_BINARY_DIR}/scripts/man1/php-config.1
9-
RENAME ${PHP_PROGRAM_PREFIX}php-config${PHP_PROGRAM_SUFFIX}.1
10-
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
11-
)
5+
block()
6+
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Windows")
7+
set(program_prefix "${PHP_PROGRAM_PREFIX}")
8+
9+
message(STATUS "Creating scripts/man1/php-config.1")
10+
configure_file(man1/php-config.1.in man1/php-config.1 @ONLY)
11+
install(
12+
FILES ${PROJECT_BINARY_DIR}/scripts/man1/php-config.1
13+
RENAME ${PHP_PROGRAM_PREFIX}php-config${PHP_PROGRAM_SUFFIX}.1
14+
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
15+
)
1216

13-
message(STATUS "Creating scripts/man1/phpize.1")
14-
configure_file(man1/phpize.1.in man1/phpize.1 @ONLY)
15-
install(
16-
FILES ${PROJECT_BINARY_DIR}/scripts/man1/phpize.1
17-
RENAME ${PHP_PROGRAM_PREFIX}phpize${PHP_PROGRAM_SUFFIX}.1
18-
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
19-
)
17+
message(STATUS "Creating scripts/man1/phpize.1")
18+
configure_file(man1/phpize.1.in man1/phpize.1 @ONLY)
19+
install(
20+
FILES ${PROJECT_BINARY_DIR}/scripts/man1/phpize.1
21+
RENAME ${PHP_PROGRAM_PREFIX}phpize${PHP_PROGRAM_SUFFIX}.1
22+
DESTINATION ${CMAKE_INSTALL_MANDIR}/man1
23+
)
24+
endif()
2025
endblock()
2126

2227
# The php-config and phpize scripts.

0 commit comments

Comments
 (0)