new package: libneatvnc

This commit is contained in:
termux-pacman-bot
2023-10-19 19:31:24 +00:00
parent 0af2df6520
commit d719f89f20
3 changed files with 47 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
--- a/src/crypto-nettle.c
+++ b/src/crypto-nettle.c
@@ -24,6 +24,11 @@
// TODO: This is linux specific
#include <sys/random.h>
+#if defined(__ANDROID__) && __ANDROID_API__ < 28
+#include <syscall.h>
+#define getrandom(buf,buflen,flags) syscall(SYS_getrandom,buf,buflen,flags)
+#endif
+
#define UDIV_UP(a, b) (((a) + (b) - 1) / (b))
struct vec;

View File

@@ -0,0 +1,18 @@
--- a/src/fb.c
+++ b/src/fb.c
@@ -33,6 +33,15 @@
#define ALIGN_UP(n, a) (UDIV_UP(n, a) * a)
#define EXPORT __attribute__((visibility("default")))
+#if defined(__ANDROID__) && __ANDROID_API__ < 26
+void *aligned_alloc(size_t align, size_t size)
+{
+ void *result = NULL;
+ posix_memalign(&result, align, size);
+ return result;
+}
+#endif
+
EXPORT
struct nvnc_fb* nvnc_fb_new(uint16_t width, uint16_t height,
uint32_t fourcc_format, uint16_t stride)

View File

@@ -0,0 +1,15 @@
TERMUX_PKG_HOMEPAGE=https://github.com/any1/neatvnc
TERMUX_PKG_DESCRIPTION="A liberally licensed VNC server library with a clean interface"
TERMUX_PKG_LICENSE="ISC"
TERMUX_PKG_MAINTAINER="@termux"
TERMUX_PKG_VERSION="0.7.0"
TERMUX_PKG_SRCURL=https://github.com/any1/neatvnc/archive/refs/tags/v$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=38c015e746ed42483107a1b711552cc3fb13a4d71993948d27b19b559746fcf7
TERMUX_PKG_DEPENDS="libaml, libdrm, libgmp, libgnutls, libjpeg-turbo, libnettle, libpixman, zlib"
TERMUX_PKG_AUTO_UPDATE=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="
-Djpeg=enabled
-Dtls=enabled
-Dnettle=enabled
-Dgbm=disabled
"