Skip to content

Commit af3d7b8

Browse files
committed
fix(main/libevent): override FindThreads configure step
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.
1 parent 6876781 commit af3d7b8

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed
+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--- ./CMakeLists.txt.orig 2022-08-30 11:05:57.580636738 +0200
2+
+++ ./CMakeLists.txt 2022-08-30 11:06:47.268305387 +0200
3+
@@ -859,7 +859,8 @@
4+
if (WIN32)
5+
list(APPEND SRC_CORE evthread_win32.c)
6+
else()
7+
- find_package(Threads REQUIRED)
8+
+ set(CMAKE_THREAD_LIBS_INIT "")
9+
+ set(CMAKE_USE_PTHREADS_INIT 1)
10+
if (NOT CMAKE_USE_PTHREADS_INIT)
11+
message(FATAL_ERROR
12+
"Failed to find Pthreads, set EVENT__DISABLE_THREAD_SUPPORT to disable")

packages/libevent/build.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ TERMUX_PKG_DESCRIPTION="Library that provides asynchronous event notification"
33
TERMUX_PKG_LICENSE="BSD 3-Clause"
44
TERMUX_PKG_MAINTAINER="@termux"
55
TERMUX_PKG_VERSION=2.1.12
6-
TERMUX_PKG_REVISION=1
6+
TERMUX_PKG_REVISION=2
77
TERMUX_PKG_SRCURL=https://github.com/libevent/libevent/archive/release-${TERMUX_PKG_VERSION}-stable.tar.gz
88
TERMUX_PKG_SHA256=7180a979aaa7000e1264da484f712d403fcf7679b1e9212c4e3d09f5c93efc24
99
TERMUX_PKG_AUTO_UPDATE=true

0 commit comments

Comments
 (0)