chiark / gitweb /
weechat: Update from 1.4 to 1.5
[termux-packages] / packages / weechat / cmake-FindPython.cmake.patch
1 diff -u -r ../weechat-1.5/cmake/FindPython.cmake ./cmake/FindPython.cmake
2 --- ../weechat-1.5/cmake/FindPython.cmake       2016-05-01 06:50:12.000000000 -0400
3 +++ ./cmake/FindPython.cmake    2016-05-03 04:00:56.742055189 -0400
4 @@ -33,65 +33,11 @@
5     set(PYTHON_FIND_QUIETLY TRUE)
6  endif()
7  
8 -if(ENABLE_PYTHON3)
9 -  find_program(PYTHON_EXECUTABLE
10 -    NAMES python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python
11 -    PATHS /usr/bin /usr/local/bin /usr/pkg/bin
12 -    )
13 -else()
14 -  find_program(PYTHON_EXECUTABLE
15 -    NAMES python2.7 python2.6 python2.5 python
16 -    PATHS /usr/bin /usr/local/bin /usr/pkg/bin
17 -    )
18 -endif()
19 -
20 -if(PYTHON_EXECUTABLE)
21 -  execute_process(
22 -    COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import *; sys.stdout.write(get_config_var('INCLUDEPY'))"
23 -    OUTPUT_VARIABLE PYTHON_INC_DIR
24 -    )
25 -
26 -  execute_process(
27 -    COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import *; sys.stdout.write(get_config_var('LIBPL'))"
28 -    OUTPUT_VARIABLE PYTHON_POSSIBLE_LIB_PATH
29 -    )
30 -
31 -  execute_process(
32 -    COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import *; sys.stdout.write(get_config_var('LIBS') + ' ' + get_config_var('LINKFORSHARED'))"
33 -    OUTPUT_VARIABLE PYTHON_LFLAGS
34 -    )
35 -
36 -  find_path(PYTHON_INCLUDE_PATH
37 -    NAMES Python.h
38 -    HINTS ${PYTHON_INC_DIR}
39 -    )
40 -  if(ENABLE_PYTHON3)
41 -    find_library(PYTHON_LIBRARY
42 -      NAMES python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python
43 -      HINTS ${PYTHON_POSSIBLE_LIB_PATH}
44 -      )
45 -  else()
46 -    find_library(PYTHON_LIBRARY
47 -      NAMES python2.7 python2.6 python2.5 python
48 -      HINTS ${PYTHON_POSSIBLE_LIB_PATH}
49 -      )
50 -  endif()
51 -
52 -  if(PYTHON_LIBRARY AND PYTHON_INCLUDE_PATH)
53 -    execute_process(
54 -      COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.version[:3])"
55 -      OUTPUT_VARIABLE PYTHON_VERSION
56 -      )
57 -    execute_process(
58 -      COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(str(sys.version_info < (2,5)))"
59 -      OUTPUT_VARIABLE PYTHON_OLD_VERSION
60 -      )
61 -    if(${PYTHON_OLD_VERSION} STREQUAL "True")
62 -      message("Python >= 2.5 is needed to build python plugin, version found: ${PYTHON_VERSION}")
63 -    else()
64 -      set(PYTHON_FOUND TRUE)
65 -    endif()
66 -  endif()
67 +set(PYTHON_EXECUTABLE "@TERMUX_PREFIX@/bin/python")
68 +set(PYTHON_INCLUDE_PATH "@TERMUX_PREFIX@/include/python3.5m")
69 +set(PYTHON_LIBRARY "@TERMUX_PREFIX@/lib")
70 +set(PYTHON_LFLAGS "-Xlinker -export-dynamic -lpython3.5m")
71 +set(PYTHON_FOUND TRUE)
72  
73    mark_as_advanced(
74      PYTHON_EXECUTABLE
75 @@ -100,4 +46,3 @@
76      PYTHON_LFLAGS
77      )
78  
79 -endif()