Skip to content

Commit 8770013

Browse files
committed
Sync with upstream: ext/gettext tests for musl C library
1 parent 0088d3d commit 8770013

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

cmake/ext/gettext/CMakeLists.txt

+13
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,19 @@ if(TARGET Intl::Intl)
9090
check_library_exists(Intl::Intl dngettext "" HAVE_DNGETTEXT)
9191
check_library_exists(Intl::Intl dcngettext "" HAVE_DCNGETTEXT)
9292
check_library_exists(Intl::Intl bind_textdomain_codeset "" HAVE_BIND_TEXTDOMAIN_CODESET)
93+
94+
# Create a symbolic link when intl is built into musl C library. The gettext
95+
# functions there ignore the codeset suffix on directories like 'en_US.UTF-8';
96+
# instead they look only in 'en_US'.
97+
if(Intl_IS_BUILT_IN AND PHP_C_STANDARD_LIBRARY STREQUAL "musl")
98+
message(STATUS "Patching tests: symlinking en_US.UTF-8 messages")
99+
file(
100+
CREATE_LINK
101+
en_US.UTF-8
102+
${CMAKE_CURRENT_SOURCE_DIR}/tests/locale/en_US
103+
SYMBOLIC
104+
)
105+
endif()
93106
endif()
94107

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

patches/8.5/cmake.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ index 19be96087d..58a83dfb68 100644
2828
indent_style = space
2929

3030
diff --git a/.gitignore b/.gitignore
31-
index d54334f599..fed3639dfd 100644
31+
index 52dde98ed4..5783dd2285 100644
3232
--- a/.gitignore
3333
+++ b/.gitignore
34-
@@ -287,9 +287,58 @@ tmp-php.ini
34+
@@ -290,9 +290,58 @@ tmp-php.ini
3535
/junit.out.xml
3636
/.ccache/
3737

0 commit comments

Comments
 (0)