libevent: Update from 2.0.22 to 2.1.8
This commit is contained in:
parent
f0b5573cc7
commit
b18f952d99
21
packages/libevent/bufferevent_compat.h.patch
Normal file
21
packages/libevent/bufferevent_compat.h.patch
Normal file
@ -0,0 +1,21 @@
|
||||
See https://github.com/libevent/libevent/pull/442
|
||||
|
||||
diff -u -r ../libevent-release-2.1.8-stable/include/event2/bufferevent_compat.h ./include/event2/bufferevent_compat.h
|
||||
--- ../libevent-release-2.1.8-stable/include/event2/bufferevent_compat.h 2017-01-26 00:37:15.000000000 +0100
|
||||
+++ ./include/event2/bufferevent_compat.h 2017-01-28 00:45:04.068858074 +0100
|
||||
@@ -72,6 +72,7 @@
|
||||
error occurred
|
||||
@see bufferevent_base_set(), bufferevent_free()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
struct bufferevent *bufferevent_new(evutil_socket_t fd,
|
||||
evbuffercb readcb, evbuffercb writecb, everrorcb errorcb, void *cbarg);
|
||||
|
||||
@@ -83,6 +84,7 @@
|
||||
@param timeout_read the read timeout
|
||||
@param timeout_write the write timeout
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
void bufferevent_settimeout(struct bufferevent *bufev,
|
||||
int timeout_read, int timeout_write);
|
||||
|
@ -1,7 +1,29 @@
|
||||
TERMUX_PKG_HOMEPAGE=http://libevent.org/
|
||||
TERMUX_PKG_DESCRIPTION="Library that provides asynchronous event notification"
|
||||
TERMUX_PKG_VERSION=2.0.22
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://github.com/libevent/libevent/releases/download/release-${TERMUX_PKG_VERSION}-stable/libevent-${TERMUX_PKG_VERSION}-stable.tar.gz
|
||||
TERMUX_PKG_VERSION=2.1.8
|
||||
TERMUX_PKG_SRCURL=https://github.com/libevent/libevent/archive/release-${TERMUX_PKG_VERSION}-stable.tar.gz
|
||||
TERMUX_PKG_SHA256=316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d
|
||||
# Strip away libevent core, extra and openssl libraries until someone uses them
|
||||
TERMUX_PKG_RM_AFTER_INSTALL="bin/event_rpcgen.py lib/libevent_*"
|
||||
TERMUX_PKG_FOLDERNAME=libevent-release-${TERMUX_PKG_VERSION}-stable
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="\
|
||||
-DEVENT__BUILD_SHARED_LIBRARIES=ON
|
||||
-DEVENT__DISABLE_BENCHMARK=ON
|
||||
-DEVENT__DISABLE_OPENSSL=ON
|
||||
-DEVENT__DISABLE_REGRESS=ON
|
||||
-DEVENT__DISABLE_SAMPLES=ON
|
||||
-DEVENT__DISABLE_TESTS=ON
|
||||
-DEVENT__DISABLE_TESTS=ON
|
||||
-DEVENT__HAVE_WAITPID_WITH_WNOWAIT=ON
|
||||
-DEVENT__SIZEOF_PTHREAD_T=$((TERMUX_ARCH_BITS/8))
|
||||
"
|
||||
termux_step_post_make_install() {
|
||||
# Building with cmake does not install .pc files, see
|
||||
# https://github.com/libevent/libevent/issues/443
|
||||
cat > "$PKG_CONFIG_LIBDIR/libevent.pc" <<-HERE
|
||||
Name: libevent
|
||||
Description: libevent is an asynchronous notification event loop library
|
||||
Version: ${TERMUX_PKG_VERSION}-stable
|
||||
Libs: -levent
|
||||
HERE
|
||||
}
|
||||
|
153
packages/libevent/dns_compat.h.patch
Normal file
153
packages/libevent/dns_compat.h.patch
Normal file
@ -0,0 +1,153 @@
|
||||
See https://github.com/libevent/libevent/pull/442
|
||||
|
||||
diff -u -r ../libevent-release-2.1.8-stable/include/event2/dns_compat.h ./include/event2/dns_compat.h
|
||||
--- ../libevent-release-2.1.8-stable/include/event2/dns_compat.h 2017-01-26 00:37:15.000000000 +0100
|
||||
+++ ./include/event2/dns_compat.h 2017-01-28 01:02:54.391639424 +0100
|
||||
@@ -66,6 +66,7 @@
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_shutdown()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_init(void);
|
||||
|
||||
struct evdns_base;
|
||||
@@ -76,6 +77,7 @@
|
||||
@deprecated This function is deprecated because use of the global
|
||||
evdns_base is error-prone.
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
struct evdns_base *evdns_get_global_base(void);
|
||||
|
||||
/**
|
||||
@@ -93,6 +95,7 @@
|
||||
active requests will return DNS_ERR_SHUTDOWN.
|
||||
@see evdns_init()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
void evdns_shutdown(int fail_requests);
|
||||
|
||||
/**
|
||||
@@ -109,6 +112,7 @@
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_nameserver_ip_add()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_nameserver_add(unsigned long int address);
|
||||
|
||||
/**
|
||||
@@ -126,6 +130,7 @@
|
||||
@return the number of configured nameservers
|
||||
@see evdns_nameserver_add()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_count_nameservers(void);
|
||||
|
||||
/**
|
||||
@@ -140,6 +145,7 @@
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resume()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_clear_nameservers_and_suspend(void);
|
||||
|
||||
/**
|
||||
@@ -155,6 +161,7 @@
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_clear_nameservers_and_suspend()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_resume(void);
|
||||
|
||||
/**
|
||||
@@ -170,6 +177,7 @@
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_nameserver_add()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_nameserver_ip_add(const char *ip_as_string);
|
||||
|
||||
/**
|
||||
@@ -186,6 +194,7 @@
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resolve_ipv6(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_resolve_ipv4(const char *name, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
/**
|
||||
@@ -198,6 +207,7 @@
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resolve_ipv4(), evdns_resolve_reverse(), evdns_resolve_reverse_ipv6()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_resolve_ipv6(const char *name, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
struct in_addr;
|
||||
@@ -217,6 +227,7 @@
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resolve_reverse_ipv6()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_resolve_reverse(const struct in_addr *in, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
/**
|
||||
@@ -233,6 +244,7 @@
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
@see evdns_resolve_reverse_ipv6()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_resolve_reverse_ipv6(const struct in6_addr *in, int flags, evdns_callback_type callback, void *ptr);
|
||||
|
||||
/**
|
||||
@@ -251,6 +263,7 @@
|
||||
@param flags Ignored.
|
||||
@return 0 if successful, or -1 if an error occurred
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_set_option(const char *option, const char *val, int flags);
|
||||
|
||||
/**
|
||||
@@ -278,6 +291,7 @@
|
||||
occurred (see above)
|
||||
@see resolv.conf(3), evdns_config_windows_nameservers()
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_resolv_conf_parse(int flags, const char *const filename);
|
||||
|
||||
/**
|
||||
@@ -287,6 +301,7 @@
|
||||
caller to specify which evdns_base it applies to. The recommended
|
||||
function is evdns_base_search_clear().
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
void evdns_search_clear(void);
|
||||
|
||||
/**
|
||||
@@ -298,6 +313,7 @@
|
||||
|
||||
@param domain the domain to be added to the search list
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
void evdns_search_add(const char *domain);
|
||||
|
||||
/**
|
||||
@@ -312,6 +328,7 @@
|
||||
|
||||
@param ndots the new ndots parameter
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
void evdns_search_ndots_set(const int ndots);
|
||||
|
||||
/**
|
||||
@@ -322,9 +339,11 @@
|
||||
function is evdns_add_server_port_with_base().
|
||||
|
||||
*/
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
struct evdns_server_port *evdns_add_server_port(evutil_socket_t socket, int flags, evdns_request_callback_fn_type callback, void *user_data);
|
||||
|
||||
#ifdef _WIN32
|
||||
+EVENT2_EXPORT_SYMBOL
|
||||
int evdns_config_windows_nameservers(void);
|
||||
#define EVDNS_CONFIG_WINDOWS_NAMESERVERS_IMPLEMENTED
|
||||
#endif
|
@ -1,19 +1,19 @@
|
||||
diff -u -r ../libevent-2.0.22-stable/evdns.c ./evdns.c
|
||||
--- ../libevent-2.0.22-stable/evdns.c 2014-03-26 11:09:18.000000000 -0400
|
||||
+++ ./evdns.c 2016-08-26 17:17:43.939853284 -0400
|
||||
@@ -49,6 +49,9 @@
|
||||
*/
|
||||
diff -u -r ../libevent-release-2.1.8-stable/evdns.c ./evdns.c
|
||||
--- ../libevent-release-2.1.8-stable/evdns.c 2017-01-26 00:37:15.000000000 +0100
|
||||
+++ ./evdns.c 2017-01-28 00:02:43.332229763 +0100
|
||||
@@ -52,6 +52,9 @@
|
||||
#include "evconfig-private.h"
|
||||
|
||||
#include <sys/types.h>
|
||||
+#ifdef __ANDROID__
|
||||
+# include <sys/system_properties.h>
|
||||
+#endif
|
||||
#include "event2/event-config.h"
|
||||
|
||||
#ifndef _FORTIFY_SOURCE
|
||||
@@ -3892,6 +3895,21 @@
|
||||
#define _FORTIFY_SOURCE 3
|
||||
@@ -3959,6 +3962,21 @@
|
||||
int r;
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
r = evdns_base_config_windows_nameservers(base);
|
||||
+#elif defined(__ANDROID__)
|
||||
+ /** From: http://www.programering.com/a/MjMwcjMwATA.html */
|
||||
|
14
packages/libevent/evutil_rand.c.patch
Normal file
14
packages/libevent/evutil_rand.c.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff -u -r ../libevent-release-2.1.8-stable/evutil_rand.c ./evutil_rand.c
|
||||
--- ../libevent-release-2.1.8-stable/evutil_rand.c 2017-01-26 00:37:15.000000000 +0100
|
||||
+++ ./evutil_rand.c 2017-01-27 23:51:13.124764486 +0100
|
||||
@@ -195,8 +195,10 @@
|
||||
void
|
||||
evutil_secure_rng_add_bytes(const char *buf, size_t n)
|
||||
{
|
||||
+#ifndef __ANDROID__
|
||||
arc4random_addrandom((unsigned char*)buf,
|
||||
n>(size_t)INT_MAX ? INT_MAX : (int)n);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void
|
@ -1,26 +0,0 @@
|
||||
Patch taken from https://gitweb.torproject.org/orbot.git/tree/external/libevent-patch-1
|
||||
For some reason arc4random_addrandom isn't present in 64-bit android archs. !
|
||||
|
||||
--- ./configure.ac 2015-01-05 20:00:02.000000000 +0530
|
||||
+++ ../configure.ac 2016-12-06 10:15:44.617028345 +0530
|
||||
@@ -290,7 +290,7 @@
|
||||
|
||||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS([gettimeofday vasprintf fcntl clock_gettime strtok_r strsep])
|
||||
-AC_CHECK_FUNCS([getnameinfo strlcpy inet_ntop inet_pton signal sigaction strtoll inet_aton pipe eventfd sendfile mmap splice arc4random arc4random_buf issetugid geteuid getegid getprotobynumber setenv unsetenv putenv sysctl])
|
||||
+AC_CHECK_FUNCS([getnameinfo strlcpy inet_ntop inet_pton signal sigaction strtoll inet_aton pipe eventfd sendfile mmap splice arc4random arc4random_buf arc4random_addrandom issetugid geteuid getegid getprotobynumber setenv unsetenv putenv sysctl])
|
||||
AC_CHECK_FUNCS([umask])
|
||||
|
||||
AC_CACHE_CHECK(
|
||||
--- ./evutil_rand.c 2013-11-01 23:48:57.000000000 +0530
|
||||
+++ ../evutil_rand.c 2016-12-06 10:38:19.748912002 +0530
|
||||
@@ -174,7 +176,9 @@
|
||||
void
|
||||
evutil_secure_rng_add_bytes(const char *buf, size_t n)
|
||||
{
|
||||
+#ifdef _EVENT_HAVE_ARC4RANDOM_ADDRANDOM
|
||||
arc4random_addrandom((unsigned char*)buf,
|
||||
n>(size_t)INT_MAX ? INT_MAX : (int)n);
|
||||
+#endif
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
TERMUX_PKG_HOMEPAGE=https://tmate.io
|
||||
TERMUX_PKG_DESCRIPTION="Terminal multiplexer with instant terminal sharing"
|
||||
TERMUX_PKG_VERSION=2.2.1
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/tmate-io/tmate/archive/${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_SHA256=d9c2ac59f42e65aac5f500f0548ea8056fd79c9c5285e5af324d833e2a84c305
|
||||
TERMUX_PKG_FOLDERNAME=tmate-${TERMUX_PKG_VERSION}
|
||||
|
@ -3,6 +3,7 @@ TERMUX_PKG_DESCRIPTION="Terminal multiplexer implementing switching between seve
|
||||
# Link against libandroid-support for wcwidth(), see https://github.com/termux/termux-packages/issues/224
|
||||
TERMUX_PKG_DEPENDS="ncurses, libevent, libutil, libandroid-support"
|
||||
TERMUX_PKG_VERSION=2.3
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_SRCURL=https://github.com/tmux/tmux/releases/download/${TERMUX_PKG_VERSION}/tmux-${TERMUX_PKG_VERSION}.tar.gz
|
||||
TERMUX_PKG_BUILD_IN_SRC=yes
|
||||
|
||||
|
@ -2,8 +2,9 @@ TERMUX_PKG_HOMEPAGE=http://www.transmissionbt.com/
|
||||
TERMUX_PKG_DESCRIPTION="Easy, lean and powerful BitTorrent client"
|
||||
TERMUX_PKG_DEPENDS="curl, libevent, openssl"
|
||||
TERMUX_PKG_VERSION=2.92
|
||||
TERMUX_PKG_REVISION=1
|
||||
TERMUX_PKG_REVISION=2
|
||||
TERMUX_PKG_SRCURL=https://transmission.cachefly.net/transmission-${TERMUX_PKG_VERSION}.tar.xz
|
||||
TERMUX_PKG_SHA256=3a8d045c306ad9acb7bf81126939b9594553a388482efa0ec1bfb67b22acd35f
|
||||
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--disable-gtk --enable-lightweight --cache-file=termux_configure.cache"
|
||||
|
||||
termux_step_pre_configure() {
|
||||
|
Loading…
Reference in New Issue
Block a user