diff options
Diffstat (limited to 'user')
-rw-r--r-- | user/weechat/APKBUILD | 9 | ||||
-rw-r--r-- | user/weechat/python.patch | 86 |
2 files changed, 90 insertions, 5 deletions
diff --git a/user/weechat/APKBUILD b/user/weechat/APKBUILD index 3776d522d..5c8d91b84 100644 --- a/user/weechat/APKBUILD +++ b/user/weechat/APKBUILD @@ -3,7 +3,7 @@ # Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com> pkgname=weechat pkgver=2.5 -pkgrel=0 +pkgrel=1 pkgdesc="Fast, light, extensible ncurses-based chat client" url="https://www.weechat.org" arch="all" @@ -17,6 +17,7 @@ subpackages="$pkgname-dev $pkgname-spell:_plugin $pkgname-lua:_plugin $pkgname-perl:_plugin $pkgname-python:_plugin $pkgname-lang" source="https://www.weechat.org/files/src/$pkgname-$pkgver.tar.gz libintl-fix.patch + python.patch " # secfixes: @@ -48,9 +49,6 @@ _plugin() { local _dir=usr/lib/weechat/plugins pkgdesc="WeeChat $_name plugin" depends="weechat" - if [ "$_name" = python ]; then - depends="$depends python3" - fi if [ "$_name" = spell ]; then provides="$pkgname-aspell=$pkgver-r$pkgrel" fi @@ -65,4 +63,5 @@ check() { } sha512sums="1bf16c76e63668fc6d4b72d521f71980717b08bd2abc5c7f0825af32e6de9327c5c967067bfb025a0404eee627f54cecdd9f1f2b3618ea7a08798d8510a2487b weechat-2.5.tar.gz -59841bc343b1d10a542631eb01380789f96cac896380dbb3b159444c4806bd6367952e457b9ffd42fb87c1e19fc77eba78c38fd2178ef202ab9f7f1a543417ca libintl-fix.patch" +59841bc343b1d10a542631eb01380789f96cac896380dbb3b159444c4806bd6367952e457b9ffd42fb87c1e19fc77eba78c38fd2178ef202ab9f7f1a543417ca libintl-fix.patch +b77bd5f31bf4547d1d5505fec5018b867f0b597ed0b6819d4ed0ff6a2b7f664f2308f6c1b094debc381673b4de6208f09ca36da3413eb72f40aca9924464d746 python.patch" diff --git a/user/weechat/python.patch b/user/weechat/python.patch new file mode 100644 index 000000000..a6e194719 --- /dev/null +++ b/user/weechat/python.patch @@ -0,0 +1,86 @@ +--- weechat-2.5/cmake/FindPython.cmake 2019-06-06 18:43:20.000000000 +0000 ++++ weechat-2.5/cmake/FindPython.cmake 2019-06-24 12:22:10.659972390 +0000 +@@ -25,7 +25,6 @@ + # + # PYTHON_EXECUTABLE = full path to the python binary + # PYTHON_INCLUDE_PATH = path to where python.h can be found +-# PYTHON_LIBRARY = path to where libpython.so* can be found + # PYTHON_LFLAGS = python compiler options for linking + + if(PYTHON_FOUND) +@@ -38,11 +37,19 @@ + NAMES python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python + PATHS /usr/bin /usr/local/bin /usr/pkg/bin + ) ++ find_program(PYTHON_CONFIG ++ NAMES python3-config ++ PATHS /usr/bin /usr/local/bin /usr/pkg/bin ++ ) + else() + find_program(PYTHON_EXECUTABLE + NAMES python2.7 python2.6 python2.5 python + PATHS /usr/bin /usr/local/bin /usr/pkg/bin + ) ++ find_program(PYTHON_CONFIG ++ NAMES python-config ++ PATHS /usr/bin /usr/local/bin /usr/pkg/bin ++ ) + endif() + + if(PYTHON_EXECUTABLE) +@@ -52,32 +59,17 @@ + ) + + execute_process( +- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import *; sys.stdout.write(get_config_var('LIBPL'))" +- OUTPUT_VARIABLE PYTHON_POSSIBLE_LIB_PATH +- ) +- +- execute_process( +- COMMAND ${PYTHON_EXECUTABLE} -c "import sys; from distutils.sysconfig import *; sys.stdout.write(get_config_var('LIBS') + ' ' + get_config_var('LINKFORSHARED'))" ++ COMMAND ${PYTHON_CONFIG} --libs + OUTPUT_VARIABLE PYTHON_LFLAGS ++ OUTPUT_STRIP_TRAILING_WHITESPACE + ) + + find_path(PYTHON_INCLUDE_PATH + NAMES Python.h + HINTS ${PYTHON_INC_DIR} + ) +- if(ENABLE_PYTHON3) +- find_library(PYTHON_LIBRARY +- NAMES python3.7 python3.6 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python3 python2.7 python2.6 python2.5 python +- HINTS ${PYTHON_POSSIBLE_LIB_PATH} +- ) +- else() +- find_library(PYTHON_LIBRARY +- NAMES python2.7 python2.6 python2.5 python +- HINTS ${PYTHON_POSSIBLE_LIB_PATH} +- ) +- endif() + +- if(PYTHON_LIBRARY AND PYTHON_INCLUDE_PATH) ++ if(PYTHON_LFLAGS AND PYTHON_INCLUDE_PATH) + execute_process( + COMMAND ${PYTHON_EXECUTABLE} -c "import sys; sys.stdout.write(sys.version[:3])" + OUTPUT_VARIABLE PYTHON_VERSION +@@ -96,7 +88,6 @@ + mark_as_advanced( + PYTHON_EXECUTABLE + PYTHON_INCLUDE_PATH +- PYTHON_LIBRARY + PYTHON_LFLAGS + ) + +--- weechat-2.5/src/plugins/python/CMakeLists.txt 2019-06-06 18:43:20.000000000 +0000 ++++ weechat-2.5/src/plugins/python/CMakeLists.txt 2019-06-24 12:22:16.259972363 +0000 +@@ -24,8 +24,7 @@ + + if(PYTHON_FOUND) + include_directories(${PYTHON_INCLUDE_PATH}) +- set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${PYTHON_LFLAGS}") +- target_link_libraries(python ${PYTHON_LIBRARY} weechat_plugins_scripts coverage_config) ++ target_link_libraries(python ${PYTHON_LFLAGS} weechat_plugins_scripts coverage_config) + endif() + + install(TARGETS python LIBRARY DESTINATION ${WEECHAT_LIBDIR}/plugins) |