Skip to content

Commit

Permalink
fix(main/libevent): override FindThreads configure step
Browse files Browse the repository at this point in the history
The cmake test to find the pthreads functions looks for
pthread_cancel, which is not implemented on android.  As such, it
fails to find any library with pthread functionality, and the
configure step fails.

This is a cmake issue and not a libevent issue.
  • Loading branch information
Grimler91 committed Aug 30, 2022
1 parent 6876781 commit af3d7b8
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions packages/libevent/CMakeLists.txt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
--- ./CMakeLists.txt.orig 2022-08-30 11:05:57.580636738 +0200
+++ ./CMakeLists.txt 2022-08-30 11:06:47.268305387 +0200
@@ -859,7 +859,8 @@
if (WIN32)
list(APPEND SRC_CORE evthread_win32.c)
else()
- find_package(Threads REQUIRED)
+ set(CMAKE_THREAD_LIBS_INIT "")
+ set(CMAKE_USE_PTHREADS_INIT 1)
if (NOT CMAKE_USE_PTHREADS_INIT)
message(FATAL_ERROR
"Failed to find Pthreads, set EVENT__DISABLE_THREAD_SUPPORT to disable")
2 changes: 1 addition & 1 deletion packages/libevent/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Library that provides asynchronous event notification"
TERMUX_PKG_LICENSE="BSD 3-Clause"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION=2.1.12
TERMUX_PKG_REVISION=1
TERMUX_PKG_REVISION=2
TERMUX_PKG_SRCURL=https://github.com/libevent/libevent/archive/release-${TERMUX_PKG_VERSION}-stable.tar.gz
TERMUX_PKG_SHA256=7180a979aaa7000e1264da484f712d403fcf7679b1e9212c4e3d09f5c93efc24
TERMUX_PKG_AUTO_UPDATE=true
Expand Down

0 comments on commit af3d7b8

Please sign in to comment.