parent
09b9911da9
commit
a3fe7ce09c
28
packages/xmppc/Remove-dependency-on-strndupa.patch
Normal file
28
packages/xmppc/Remove-dependency-on-strndupa.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
From b4e134b66dbb54f784f879fd4fb3d16afa9c8de3 Mon Sep 17 00:00:00 2001
|
||||||
|
From: "j.r" <j.r@jugendhacker.de>
|
||||||
|
Date: Mon, 15 Mar 2021 17:04:23 +0100
|
||||||
|
Subject: [PATCH] Remove dependency on strndupa
|
||||||
|
|
||||||
|
Actually only glibc seems to implement this
|
||||||
|
---
|
||||||
|
src/mode/pgp.c | 4 +++-
|
||||||
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/src/mode/pgp.c b/src/mode/pgp.c
|
||||||
|
index 26ac252..9742035 100644
|
||||||
|
--- a/src/mode/pgp.c
|
||||||
|
+++ b/src/mode/pgp.c
|
||||||
|
@@ -175,7 +175,9 @@ char* _pgp_encrypt_message(xmppc_t *xmppc, char* recipient, char* message) {
|
||||||
|
}
|
||||||
|
|
||||||
|
static char* _pgp_remove_PGP_MESSAGE_comment(const char* message) {
|
||||||
|
- char* tmp = strndupa(message, strlen(message) - (strlen(PGP_END)+1));
|
||||||
|
+ char* tmp = alloca((strlen(message) - strlen(PGP_END)+1) + 1);
|
||||||
|
+ strncpy(tmp, message, (strlen(message) - strlen(PGP_END)+1));
|
||||||
|
+ tmp[(strlen(message) - strlen(PGP_END)+1)] = '\0';
|
||||||
|
tmp = tmp+((strlen(PGP_BEGIN) +1) * sizeof(char));
|
||||||
|
char* result = malloc(strlen(tmp)+1);
|
||||||
|
strcpy(result, tmp);
|
||||||
|
--
|
||||||
|
2.30.2
|
||||||
|
|
12
packages/xmppc/build.sh
Normal file
12
packages/xmppc/build.sh
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
TERMUX_PKG_HOMEPAGE=https://codeberg.org/Anoxinon_e.V./xmppc
|
||||||
|
TERMUX_PKG_DESCRIPTION="Command Line Interface Tool for XMPP"
|
||||||
|
TERMUX_PKG_LICENSE="GPL-3.0"
|
||||||
|
TERMUX_PKG_MAINTAINER="j.r <j.r@jugendhacker.de>"
|
||||||
|
TERMUX_PKG_VERSION=0.1.0
|
||||||
|
TERMUX_PKG_SRCURL=https://codeberg.org/Anoxinon_e.V./xmppc/archive/${TERMUX_PKG_VERSION}.tar.gz
|
||||||
|
TERMUX_PKG_SHA256=98d68deb57924e5ed06613d8b275fb0bf98aab822fb590fe8d9894410a8544ee
|
||||||
|
TERMUX_PKG_DEPENDS="libstrophe, glib, gpgme"
|
||||||
|
|
||||||
|
termux_step_pre_configure() {
|
||||||
|
./bootstrap.sh
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user