Commit f20ce61c authored by jugendhacker's avatar jugendhacker
Browse files

testing/xmppc: new aport

https://codeberg.org/Anoxinon_e.V./xmppc
Command Line Interface Tool for XMPP
parent 8db3e291
Pipeline #84553 passed with stages
in 2 minutes and 13 seconds
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
# Maintainer: j.r <j.r@jugendhacker.de>
pkgname=xmppc
pkgver=0.1.0
pkgrel=0
pkgdesc="Command Line Interface Tool for XMPP"
url="https://codeberg.org/Anoxinon_e.V./xmppc"
arch="all"
license="GPL-3.0-or-later"
depends="libstrophe glib gpgme"
makedepends="libstrophe-dev autoconf automake libtool glib-dev gpgme-dev"
subpackages="$pkgname-doc"
source="
$pkgname-$pkgver.tar.gz::https://codeberg.org/Anoxinon_e.V./xmppc/archive/$pkgver.tar.gz
10-Remove-dependency-on-strndupa.patch
"
builddir="$srcdir/$pkgname"
build() {
./bootstrap.sh
./configure \
--build=$CBUILD \
--host=$CHOST \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--localstatedir=/var
make
}
check() {
make check
}
package() {
make DESTDIR="$pkgdir" install
}
sha512sums="
554672de0e5a98b429cc9fa011f4652c8da1f0a60b0bc642edbed11cb12cbee645f44cf90d5c3fad59732e81e6ca7768cde3980d6ff7c9965a853bb8112a8297 xmppc-0.1.0.tar.gz
4f28f79b09e6011ae9d79dfd0f73482d8c15c53b8890bdd778c6aac2cc77c77da3cc6a26407529810b2f2c192b5b1434b6303082de579cea63833525c2cc5794 10-Remove-dependency-on-strndupa.patch
"
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment