1
0
Fork 0
mirror of https://gitlab.alpinelinux.org/alpine/aports.git synced 2025-07-26 04:35:39 +03:00
aports/community/minetest/0001-CMake-link-with-Intl-when-necessary.patch
TBK 3a8f304717 community/minetest: upgrade to 5.0.1
Add openrc subpkg

Signed-off-by: Leonardo Arena <rnalrd@alpinelinux.org>
2019-04-15 10:22:34 +00:00

50 lines
1.5 KiB
Diff

From 45ed3aa6be6d70cf76a4f10c81684ab86cb5017f Mon Sep 17 00:00:00 2001
From: Romain Naour <romain.naour@gmail.com>
Date: Mon, 12 Jun 2017 21:57:05 +0200
Subject: [PATCH] CMake: link with Intl when necessary
On non Glibc system linking with Intl library may be needed when
Gettext support is enabled.
Fixes:
clientlauncher.cpp:(.text+0xcac): undefined reference to `libintl_gettext'
clientlauncher.cpp:(.text+0xdf0): undefined reference to `libintl_gettext'
Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
src/CMakeLists.txt | 10 ++++++++++
1 file changed, 10 insertions(+)
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -70,6 +70,14 @@ if(ENABLE_GETTEXT)
endif()
set(USE_GETTEXT TRUE)
message(STATUS "GetText enabled; locales found: ${GETTEXT_AVAILABLE_LOCALES}")
+ # On some platforms, such as Linux with GNU libc, the gettext
+ # functions are present in the C standard library and libintl
+ # is not required. For other libc (uClibc-ng or musl) libintl
+ # may be required.
+ find_package(Intl)
+ if(NOT Intl_LIBRARIES STREQUAL "")
+ message(STATUS "GetText Intl : ${Intl_LIBRARIES}")
+ endif()
endif(GETTEXT_FOUND)
else()
mark_as_advanced(GETTEXT_ICONV_DLL GETTEXT_INCLUDE_DIR GETTEXT_LIBRARY GETTEXT_MSGFMT)
@@ -554,6 +554,7 @@
${BZIP2_LIBRARIES}
${PNG_LIBRARIES}
${X11_LIBRARIES}
+ ${Intl_LIBRARIES}
${SOUND_LIBRARIES}
${SQLITE3_LIBRARY}
${LUA_LIBRARY}
@@ -623,6 +624,7 @@
${ZLIB_LIBRARIES}
${SQLITE3_LIBRARY}
${JSON_LIBRARY}
+ ${Intl_LIBRARIES}
${LUA_LIBRARY}
${GMP_LIBRARY}
${PLATFORM_LIBS}