opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

Commit: d8a43db4fbfba5ab9c25e1303558c41546374658
Parent: d63e62ca4c3150eb1f8ee3ceb441432abd13e2cc
Author: Randy Palamar
Date:   Tue,  4 Jun 2024 05:49:21 -0600

add libevent2 from oasis

Diffstat:
M.gitmodules | 3+++
Mpkg/libs/gen.lua | 1+
Apkg/libs/libevent/config.h | 195+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/libs/libevent/evconfig-private.h | 0
Apkg/libs/libevent/gen.lua | 55+++++++++++++++++++++++++++++++++++++++++++++++++++++++
Apkg/libs/libevent/src | 1+
Apkg/libs/libevent/ver | 1+
7 files changed, 256 insertions(+), 0 deletions(-)

diff --git a/.gitmodules b/.gitmodules @@ -46,6 +46,9 @@ path = pkg/libs/bearssl/src url = https://www.bearssl.org/git/BearSSL ignore = all +[submodule "pkg/libs/libevent/src"] + path = pkg/libs/libevent/src + url = https://github.com/libevent/libevent.git [submodule "pkg/libs/libgit2/src"] path = pkg/libs/libgit2/src url = https://github.com/libgit2/libgit2.git diff --git a/pkg/libs/gen.lua b/pkg/libs/gen.lua @@ -1,4 +1,5 @@ subgen('bearssl') +subgen('libevent') subgen('libgit2') subgen('libpng') subgen('libtermkey') diff --git a/pkg/libs/libevent/config.h b/pkg/libs/libevent/config.h @@ -0,0 +1,195 @@ +/* disabled to prevent building extra backends */ +/* #undef HAVE_POLL */ +/* #undef HAVE_SELECT */ + +#define DISABLE_DEBUG_MODE 1 +#define DISABLE_MM_REPLACEMENT 1 +/* #undef DISABLE_THREAD_SUPPORT */ +#define HAVE_ACCEPT4 1 +/* #undef HAVE_AFUNIX_H */ +/* #undef HAVE_ARC4RANDOM */ +/* #undef HAVE_ARC4RANDOM_ADDRANDOM */ +/* #undef HAVE_ARC4RANDOM_BUF */ +#define HAVE_ARPA_INET_H 1 +#define HAVE_CLOCK_GETTIME 1 +/* #undef HAVE_DECL_CTL_KERN */ +/* #undef HAVE_DECL_KERN_ARND */ +/* #undef HAVE_DEVPOLL */ +#define HAVE_DLFCN_H 1 +#define HAVE_EPOLL 1 +#define HAVE_EPOLL_CREATE1 1 +#define HAVE_EPOLL_CTL 1 +#define HAVE_ERRNO_H 1 +#define HAVE_EVENTFD 1 +/* #undef HAVE_EVENT_PORTS */ +#define HAVE_FCNTL 1 +#define HAVE_FCNTL_H 1 +#define HAVE_FD_MASK 1 +#define HAVE_GETADDRINFO 1 +#define HAVE_GETEGID 1 +#define HAVE_GETEUID 1 +/* #undef HAVE_GETHOSTBYNAME_R */ +/* #undef HAVE_GETHOSTBYNAME_R_3_ARG */ +/* #undef HAVE_GETHOSTBYNAME_R_5_ARG */ +/* #undef HAVE_GETHOSTBYNAME_R_6_ARG */ +#define HAVE_GETIFADDRS 1 +#define HAVE_GETNAMEINFO 1 +#define HAVE_GETPROTOBYNUMBER 1 +#define HAVE_GETRANDOM 1 +#define HAVE_GETSERVBYNAME 1 +#define HAVE_GETTIMEOFDAY 1 +#define HAVE_IFADDRS_H 1 +#define HAVE_INET_NTOP 1 +#define HAVE_INET_PTON 1 +#define HAVE_INTTYPES_H 1 +#define HAVE_ISSETUGID 1 +/* #undef HAVE_KQUEUE */ +/* #undef HAVE_LIBWS2_32 */ +/* #undef HAVE_LIBZ */ +/* #undef HAVE_MACH_ABSOLUTE_TIME */ +/* #undef HAVE_MACH_MACH_H */ +/* #undef HAVE_MACH_MACH_TIME_H */ +#define HAVE_MEMORY_H 1 +#define HAVE_MMAP 1 +#define HAVE_NANOSLEEP 1 +#define HAVE_NETDB_H 1 +/* #undef HAVE_NETINET_IN6_H */ +#define HAVE_NETINET_IN_H 1 +#define HAVE_NETINET_TCP_H 1 +/* #undef HAVE_OPENSSL */ +/* #undef HAVE_OPENSSL_SSL_H */ +#define HAVE_PIPE 1 +#define HAVE_PIPE2 1 +#define HAVE_POLL_H 1 +/* #undef HAVE_PORT_CREATE */ +/* #undef HAVE_PORT_H */ +/* #undef HAVE_PTHREAD */ +#define HAVE_PTHREADS 1 +#define HAVE_PUTENV 1 +#define HAVE_SA_FAMILY_T 1 +#define HAVE_SENDFILE 1 +#define HAVE_SETENV 1 +#define HAVE_SETFD 1 +#define HAVE_SETRLIMIT 1 +#define HAVE_SIGACTION 1 +#define HAVE_SIGNAL 1 +#define HAVE_SPLICE 1 +#define HAVE_STDARG_H 1 +#define HAVE_STDDEF_H 1 +#define HAVE_STDINT_H 1 +#define HAVE_STDLIB_H 1 +#define HAVE_STRINGS_H 1 +#define HAVE_STRING_H 1 +#define HAVE_STRLCPY 1 +#define HAVE_STRSEP 1 +#define HAVE_STRTOK_R 1 +#define HAVE_STRTOLL 1 +#define HAVE_STRUCT_ADDRINFO 1 +#define HAVE_STRUCT_IN6_ADDR 1 +#define HAVE_STRUCT_IN6_ADDR_S6_ADDR16 1 +#define HAVE_STRUCT_IN6_ADDR_S6_ADDR32 1 +#define HAVE_STRUCT_LINGER 1 +#define HAVE_STRUCT_SOCKADDR_IN6 1 +/* #undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_LEN */ +/* #undef HAVE_STRUCT_SOCKADDR_IN_SIN_LEN */ +#define HAVE_STRUCT_SOCKADDR_STORAGE 1 +#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 +/* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_FAMILY */ +#define HAVE_STRUCT_SOCKADDR_UN 1 +/* #undef HAVE_SYSCTL */ +/* #undef HAVE_SYS_DEVPOLL_H */ +#define HAVE_SYS_EPOLL_H 1 +#define HAVE_SYS_EVENTFD_H 1 +/* #undef HAVE_SYS_EVENT_H */ +#define HAVE_SYS_IOCTL_H 1 +#define HAVE_SYS_MMAN_H 1 +#define HAVE_SYS_PARAM_H 1 +/* #undef HAVE_SYS_QUEUE_H */ +#define HAVE_SYS_RANDOM_H 1 +#define HAVE_SYS_RESOURCE_H 1 +#define HAVE_SYS_SELECT_H 1 +#define HAVE_SYS_SENDFILE_H 1 +#define HAVE_SYS_SOCKET_H 1 +#define HAVE_SYS_STAT_H 1 +/* #undef HAVE_SYS_SYSCTL_H */ +#define HAVE_SYS_TIMERFD_H 1 +#define HAVE_SYS_TIME_H 1 +#define HAVE_SYS_TYPES_H 1 +#define HAVE_SYS_UIO_H 1 +#define HAVE_SYS_UN_H 1 +#define HAVE_SYS_WAIT_H 1 +/* #undef HAVE_TAILQFOREACH */ +#define HAVE_TIMERADD 1 +#define HAVE_TIMERCLEAR 1 +#define HAVE_TIMERCMP 1 +#define HAVE_TIMERFD_CREATE 1 +#define HAVE_TIMERISSET 1 +#define HAVE_UINT16_T 1 +#define HAVE_UINT32_T 1 +#define HAVE_UINT64_T 1 +#define HAVE_UINT8_T 1 +#define HAVE_UINTPTR_T 1 +#define HAVE_UMASK 1 +#define HAVE_UNISTD_H 1 +#define HAVE_UNSETENV 1 +#define HAVE_USLEEP 1 +#define HAVE_VASPRINTF 1 +/* #undef HAVE_WORKING_KQUEUE */ +/* #undef HAVE_ZLIB_H */ +/* #undef HAVE__GMTIME64 */ +/* #undef HAVE__GMTIME64_S */ +#define HAVE___FUNCTION__ 1 +#define HAVE___func__ 1 +#define LT_OBJDIR ".libs/" +#define NUMERIC_VERSION 0x02010c00 +#define PACKAGE "libevent" +#define PACKAGE_BUGREPORT "" +#define PACKAGE_NAME "libevent" +#define PACKAGE_STRING "libevent 2.1.12-stable" +#define PACKAGE_TARNAME "libevent" +#define PACKAGE_URL "" +#define PACKAGE_VERSION "2.1.12-stable" +/* #undef PTHREAD_CREATE_JOINABLE */ +#define SIZEOF_INT 4 +#define SIZEOF_LONG 8 +#define SIZEOF_LONG_LONG 8 +#define SIZEOF_OFF_T 8 +#define SIZEOF_PTHREAD_T 8 +#define SIZEOF_SHORT 2 +#define SIZEOF_SIZE_T 8 +#define SIZEOF_TIME_T 8 +#define SIZEOF_VOID_P 8 +#define STDC_HEADERS 1 +#define TIME_WITH_SYS_TIME 1 +#ifndef _ALL_SOURCE +# define _ALL_SOURCE 1 +#endif +#ifndef _GNU_SOURCE +# define _GNU_SOURCE 1 +#endif +#ifndef _POSIX_PTHREAD_SEMANTICS +# define _POSIX_PTHREAD_SEMANTICS 1 +#endif +#ifndef _TANDEM_SOURCE +# define _TANDEM_SOURCE 1 +#endif +#ifndef __EXTENSIONS__ +# define __EXTENSIONS__ 1 +#endif +#define VERSION "2.1.12-stable" +#ifndef _DARWIN_USE_64_BIT_INODE +# define _DARWIN_USE_64_BIT_INODE 1 +#endif +/* #undef _FILE_OFFSET_BITS */ +/* #undef _LARGE_FILES */ +/* #undef _MINIX */ +/* #undef _POSIX_1_SOURCE */ +/* #undef _POSIX_SOURCE */ +/* #undef const */ +#ifndef __cplusplus +/* #undef inline */ +#endif +/* #undef pid_t */ +/* #undef size_t */ +/* #undef socklen_t */ +/* #undef ssize_t */ diff --git a/pkg/libs/libevent/evconfig-private.h b/pkg/libs/libevent/evconfig-private.h diff --git a/pkg/libs/libevent/gen.lua b/pkg/libs/libevent/gen.lua @@ -0,0 +1,55 @@ +cflags({ + '-I $dir', + '-I $outdir/include', + '-I $srcdir/include', + '-isystem $builddir/pkg/sys/openbsd/include', +}) + +build('sed', '$outdir/include/event2/event-config.h', {'$dir/config.h', '|', '$srcdir/make-event-config.sed'}, { + expr='-f $srcdir/make-event-config.sed', +}) + +pkg.hdrs = { + copy('$outdir/include/event2', '$srcdir/include/event2', { + 'buffer.h', + 'bufferevent.h', + 'dns.h', + 'event.h', + 'http.h', + 'http_struct.h', + 'util.h', + 'visibility.h', + }), + '$outdir/include/event2/event-config.h', +} +pkg.deps = { + '$gendir/headers', + 'pkg/sys/openbsd/headers', +} + +lib('libevent.a', { + 'buffer.c', + 'bufferevent.c', + 'bufferevent_filter.c', + 'bufferevent_pair.c', + 'bufferevent_ratelim.c', + 'bufferevent_sock.c', + 'event.c', + 'evmap.c', + 'evthread.c', + 'evutil.c', + 'evutil_rand.c', + 'evutil_time.c', + 'listener.c', + 'log.c', + + 'evdns.c', + 'event_tagging.c', + 'evrpc.c', + 'http.c', + + 'epoll.c', + 'signal.c', +}) + +fetch('git') diff --git a/pkg/libs/libevent/src b/pkg/libs/libevent/src @@ -0,0 +1 @@ +Subproject commit 5df3037d10556bfcb675bc73e516978b75fc7bc7 diff --git a/pkg/libs/libevent/ver b/pkg/libs/libevent/ver @@ -0,0 +1 @@ +2.1.12 r0