You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.9 KiB

diff -u -r ../weechat-1.4/cmake/FindPerl.cmake ./cmake/FindPerl.cmake
--- ../weechat-1.4/cmake/FindPerl.cmake 2016-01-10 03:17:50.000000000 -0500
+++ ./cmake/FindPerl.cmake 2016-04-21 22:40:24.209760454 -0400
@@ -28,57 +28,16 @@
# PERL_CFLAGS = perl compiler options for compiling
# PERL_LFLAGS = perl compiler options for linking
-if(PERL_FOUND)
- # Already in cache, be silent
- set(PERL_FIND_QUIETLY TRUE)
-endif()
-
-find_program(PERL_EXECUTABLE
- NAMES perl perl5
- PATHS /usr/bin /usr/local/bin /usr/pkg/bin
- )
-
-if(PERL_EXECUTABLE)
-
- execute_process(
- COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \"\$Config{archlibexp}/CORE\""
- OUTPUT_VARIABLE PERL_INTERNAL_DIR
- )
-
- execute_process(
- COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ccopts
- OUTPUT_VARIABLE PERL_CFLAGS
- )
-
- execute_process(
- COMMAND ${PERL_EXECUTABLE} -MExtUtils::Embed -e ldopts
- OUTPUT_VARIABLE PERL_LFLAGS
- )
-
- # 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}
- )
-
- find_library(PERL_LIBRARY
- NAMES perl
- PATHS /usr/lib /usr/local/lib /usr/pkg/lib ${PERL_INTERNAL_DIR}
- )
-
- 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
- )
-endif()
+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
+)