aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorj.r <j.r@jugendhacker.de>2021-06-26 12:49:25 +0000
committerLeo <thinkabit.ukim@gmail.com>2021-07-25 01:06:42 +0000
commitbf02f19d2777ac1680034ff3ecb0394623903662 (patch)
treeecbbd59d56c404c69fbed513d5f5b8afdd3374d7
parent71b1b89f9181ec637a6b8614c53a5489343d1ccd (diff)
downloadaports-bf02f19d2777ac1680034ff3ecb0394623903662.tar.gz
aports-bf02f19d2777ac1680034ff3ecb0394623903662.tar.bz2
aports-bf02f19d2777ac1680034ff3ecb0394623903662.tar.xz
testing/xmppc: new aport
https://codeberg.org/Anoxinon_e.V./xmppc Command Line Interface Tool for XMPP
-rw-r--r--testing/xmppc/10-Remove-dependency-on-strndupa.patch28
-rw-r--r--testing/xmppc/APKBUILD44
2 files changed, 72 insertions, 0 deletions
diff --git a/testing/xmppc/10-Remove-dependency-on-strndupa.patch b/testing/xmppc/10-Remove-dependency-on-strndupa.patch
new file mode 100644
index 0000000000..d959ed47ef
--- /dev/null
+++ b/testing/xmppc/10-Remove-dependency-on-strndupa.patch
@@ -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
+
diff --git a/testing/xmppc/APKBUILD b/testing/xmppc/APKBUILD
new file mode 100644
index 0000000000..93e72a797e
--- /dev/null
+++ b/testing/xmppc/APKBUILD
@@ -0,0 +1,44 @@
+# 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"
+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"
+
+prepare() {
+ default_prepare
+
+ ./bootstrap.sh
+}
+
+build() {
+ ./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
+"