2019-12-12 00:42:30 +01:00
|
|
|
diff -u -r ../weechat-2.7/cmake/FindPerl.cmake ./cmake/FindPerl.cmake
|
|
|
|
--- ../weechat-2.7/cmake/FindPerl.cmake 2019-12-08 08:48:53.000000000 +0000
|
|
|
|
+++ ./cmake/FindPerl.cmake 2019-12-11 22:43:40.749343000 +0000
|
2016-04-22 09:25:58 +02:00
|
|
|
@@ -28,57 +28,16 @@
|
|
|
|
# PERL_CFLAGS = perl compiler options for compiling
|
|
|
|
# PERL_LFLAGS = perl compiler options for linking
|
|
|
|
|
|
|
|
-if(PERL_FOUND)
|
2019-12-12 00:42:30 +01:00
|
|
|
- # Already in cache, be silent
|
|
|
|
- set(PERL_FIND_QUIETLY TRUE)
|
2016-04-22 09:25:58 +02:00
|
|
|
-endif()
|
|
|
|
-
|
|
|
|
-find_program(PERL_EXECUTABLE
|
|
|
|
- NAMES perl perl5
|
|
|
|
- PATHS /usr/bin /usr/local/bin /usr/pkg/bin
|
2019-12-12 00:42:30 +01:00
|
|
|
+set(PERL_EXECUTABLE "@TERMUX_PREFIX@/bin/perl")
|
|
|
|
+set(PERL_INCLUDE_PATH "@TERMUX_PREFIX@/include/perl/")
|
|
|
|
+set(PERL_LIBRARY "@TERMUX_PREFIX@/lib")
|
|
|
|
+set(PERL_LFLAGS "-lperl")
|
|
|
|
+set(PERL_FOUND TRUE)
|
|
|
|
+
|
|
|
|
+mark_as_advanced(
|
|
|
|
+ PERL_EXECUTABLE
|
|
|
|
+ PERL_INCLUDE_PATH
|
|
|
|
+ PERL_LIBRARY
|
|
|
|
+ PERL_CFLAGS
|
|
|
|
+ PERL_LFLAGS
|
|
|
|
)
|
2016-04-22 09:25:58 +02:00
|
|
|
-
|
|
|
|
-if(PERL_EXECUTABLE)
|
|
|
|
-
|
|
|
|
- execute_process(
|
|
|
|
- COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \"\$Config{archlibexp}/CORE\""
|
|
|
|
- OUTPUT_VARIABLE PERL_INTERNAL_DIR
|
2019-12-12 00:42:30 +01:00
|
|
|
- )
|
2016-04-22 09:25:58 +02:00
|
|
|
-
|
|
|
|
- execute_process(
|
|
|
|
- COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ccopts
|
|
|
|
- OUTPUT_VARIABLE PERL_CFLAGS
|
2019-12-12 00:42:30 +01:00
|
|
|
- )
|
2016-04-22 09:25:58 +02:00
|
|
|
-
|
|
|
|
- execute_process(
|
|
|
|
- COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ldopts
|
|
|
|
- OUTPUT_VARIABLE PERL_LFLAGS
|
2019-12-12 00:42:30 +01:00
|
|
|
- )
|
2016-04-22 09:25:58 +02:00
|
|
|
-
|
|
|
|
- # remove the new lines from the output by replacing them with empty strings
|
|
|
|
- string(REPLACE "\n" "" PERL_INTERNAL_DIR "${PERL_INTERNAL_DIR}")
|
|
|
|
- string(REPLACE "\n" "" PERL_CFLAGS "${PERL_CFLAGS}")
|
|
|
|
- string(REPLACE "\n" "" PERL_LFLAGS "${PERL_LFLAGS}")
|
|
|
|
-
|
|
|
|
- find_path(PERL_INCLUDE_PATH
|
|
|
|
- NAMES perl.h
|
|
|
|
- PATHS ${PERL_INTERNAL_DIR}
|
2019-12-12 00:42:30 +01:00
|
|
|
- )
|
2016-04-22 09:25:58 +02:00
|
|
|
-
|
|
|
|
- find_library(PERL_LIBRARY
|
|
|
|
- NAMES perl
|
|
|
|
- PATHS /usr/lib /usr/local/lib /usr/pkg/lib ${PERL_INTERNAL_DIR}
|
2019-12-12 00:42:30 +01:00
|
|
|
- )
|
2016-04-22 09:25:58 +02:00
|
|
|
-
|
|
|
|
- if(PERL_LIBRARY AND PERL_INCLUDE_PATH)
|
|
|
|
- set(PERL_FOUND TRUE)
|
|
|
|
- endif()
|
|
|
|
-
|
|
|
|
- mark_as_advanced(
|
|
|
|
- PERL_EXECUTABLE
|
|
|
|
- PERL_INCLUDE_PATH
|
|
|
|
- PERL_LIBRARY
|
|
|
|
- PERL_CFLAGS
|
|
|
|
- PERL_LFLAGS
|
2019-12-12 00:42:30 +01:00
|
|
|
- )
|
2016-04-22 09:25:58 +02:00
|
|
|
-endif()
|