Subject: [PATCH 1/3] testing/libmesode: new aport

From: Galen Abell <[email-masked]>
Date: Tue, 26 Nov 2019 13:16:23 +0100

https://github.com/profanity-im/libmesode
Fork of libstrophe for use with Profanity XMPP Client
testing/
---
 testing/libmesode/10-patch-configure.patch | 32 ++++++++++++++
 testing/libmesode/APKBUILD                 | 49 ++++++++++++++++++++++
 2 files changed, 81 insertions(+)
 create mode 100644 testing/libmesode/10-patch-configure.patch
 create mode 100644 testing/libmesode/APKBUILD

diff --git a/testing/libmesode/10-patch-configure.patch b/testing/libmesode/10-patch-configure.patch
new file mode 100644
index 0000000000..38a82cd887
--- /dev/null
+++ b/testing/libmesode/10-patch-configure.patch
@@ -0,0 +1,32 @@
+From 2cd7621d4ca4a3f78dbfb6b15779cbf57770670a Mon Sep 17 00:00:00 2001
+From: Stuart McLaren <[email-masked]>
+Date: Sun, 12 Mar 2017 21:21:43 +0000
+Subject: [PATCH] Allow configure to run on netbsd
+
+NetBSD's shell (/bin/sh) doesn't support '+='. Removing '+=' allows
+configure to run and the library to compile.
+
+This matches configure.ac in boothj5/profanity which also doesn't
+use '+='.
+---
+ configure.ac | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 6d19f2e..34a5fe4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -18,11 +18,11 @@ AS_CASE([$host_os],
+                    [PLATFORM="nix"])
+
+ PKG_CHECK_MODULES([expat], [expat >= 2.0.0],
+-                  [PC_REQUIRES+=(expat)],
++                  [PC_REQUIRES="expat ${PC_REQUIRES}"],
+                   [AC_CHECK_HEADER([expat.h],
+                                    [
+                                     expat_LIBS="-lexpat"
+-                                    PC_LIBS+=($expat_LIBS)
++                                    PC_LIBS="${expat_LIBS} ${PC_LIBS}"
+                                    ],
+                                    [AC_MSG_ERROR([expat not found; expat required.])]
+                                   )
diff --git a/testing/libmesode/APKBUILD b/testing/libmesode/APKBUILD
new file mode 100644
index 0000000000..4636d60113
--- /dev/null
+++ b/testing/libmesode/APKBUILD
@@ -0,0 +1,49 @@
+# Contributor: Galen Abell <[email-masked]>
+# Maintainer: Galen Abell <[email-masked]>
+pkgname="libmesode"
+pkgver="0.9.3"
+pkgrel=0
+pkgdesc="Fork of libstrophe for use with Profanity XMPP Client"
+url="https://github.com/profanity-im/libmesode"
+arch="all"
+license="GPL-3.0-only MIT"
+makedepends="expat doxygen openssl-dev"
+subpackages="$pkgname-dev $pkgname-doc"
+source="
+	$pkgname-$pkgver.tar.gz::https://github.com/profanity-im/libmesode/archive/$pkgver.tar.gz
+	10-patch-configure.patch
+"
+
+prepare() {
+	default_prepare
+
+	./bootstrap.sh
+}
+
+build() {
+	./configure	\
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--localstatedir=/var
+	make
+	doxygen
+}
+
+doc() {
+	cd "$builddir"
+	mkdir -p "$subpkgdir"/usr/share/html/$pkgname
+	mv docs/html/* "$subpkgdir"/usr/share/html/$pkgname/
+}
+
+check() {
+	make check
+}
+
+package() {
+	make DESTDIR="$pkgdir" install
+}
+sha512sums="572b51d762a9b7eabf8d49106219eb60613c054ac35915a54eb43ff153e434bc08c32003bc9d2277a679f246f90973bb0b47ac93af7cffcdbae07af4d2af3db8  libmesode-0.9.3.tar.gz
+65f7437d4ebd0e121d8b1f2c356c82a928a31df48cf68352fc9a9bce68a6ac5dda38780d9972fc10735f4b9583e67d58090eafd7bcb608d274886ca3f160ce05  10-patch-configure.patch"
-- 
2.24.0

---

From: Galen Abell <[email-masked]>
Date: Tue, 26 Nov 2019 13:16:24 +0100

https://github.com/signalapp/libsignal-protocol-c
Signal Protocol C Library
testing/
---
 testing/libsignal-protocol-c/APKBUILD | 40 +++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 testing/libsignal-protocol-c/APKBUILD

diff --git a/testing/libsignal-protocol-c/APKBUILD b/testing/libsignal-protocol-c/APKBUILD
new file mode 100644
index 0000000000..2f978e2f61
--- /dev/null
+++ b/testing/libsignal-protocol-c/APKBUILD
@@ -0,0 +1,40 @@
+# Contributor: Galen Abell <[email-masked]>
+# Maintainer: Galen Abell <[email-masked]>
+pkgname="libsignal-protocol-c"
+pkgver="2.3.2"
+pkgrel=0
+pkgdesc="Signal Protocol C Library"
+url="https://github.com/signalapp/libsignal-protocol-c"
+arch="all"
+license="GPL-3.0-only"
+makedepends="cmake"
+checkdepends="check-dev openssl-dev"
+subpackages="$pkgname-dev"
+source="$pkgname-$pkgver.tar.gz::https://github.com/signalapp/libsignal-protocol-c/archive/v$pkgver.tar.gz"
+
+build() {
+	if [ "$CBUILD" != "$CHOST" ]; then
+		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
+	fi
+	cmake \
+		-DCMAKE_INSTALL_PREFIX=/usr \
+		-DBUILD_SHARED_LIBS=True \
+		-DBUILD_TESTING=1 \
+		-DCMAKE_BUILD_TYPE=Release \
+		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
+		-DCMAKE_C_FLAGS="$CFLAGS" \
+		${CMAKE_CROSSOPTS} .
+	make
+}
+
+check() {
+	cd tests
+	make
+	cd ../
+	ctest
+}
+
+package() {
+	make DESTDIR="$pkgdir" install
+}
+sha512sums="7c63c42b9a590ed1a60a6f0094668d9948aa04e5965d052c22ae22b176df7c5582b8ec5c0e6c01ad582dfe2b04067380b9734ad08c64785242e90abcdabdfb8d  libsignal-protocol-c-2.3.2.tar.gz"
-- 
2.24.0

---

From: Galen Abell <[email-masked]>
Date: Tue, 26 Nov 2019 13:16:25 +0100

https://github.com/profanity-im/profanity
Ncurses based XMPP client
testing/
---
 testing/profanity/APKBUILD | 53 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 53 insertions(+)
 create mode 100644 testing/profanity/APKBUILD

diff --git a/testing/profanity/APKBUILD b/testing/profanity/APKBUILD
new file mode 100644
index 0000000000..dd33da6b4d
--- /dev/null
+++ b/testing/profanity/APKBUILD
@@ -0,0 +1,53 @@
+# Contributor: Galen Abell <[email-masked]>
+# Maintainer: Galen Abell <[email-masked]>
+pkgname="profanity"
+pkgver="0.7.1"
+pkgrel=0
+pkgdesc="Ncurses based XMPP client"
+url="https://github.com/profanity-im/profanity"
+arch="all"
+license="GPL-3.0-or-later"
+makedepends="
+	autoconf
+	autoconf-archive
+	automake
+	libtool
+	pkgconf
+	libmesode-dev
+	ncurses-dev
+	glib-dev
+	curl-dev
+	readline-dev
+	libnotify-dev
+	libxscrnsaver
+	libotr-dev
+	gpgme-dev
+	libsignal-protocol-c-dev
+	libgcrypt-dev
+	gtk+2.0-dev
+	python2-dev
+	cmocka-dev
+"
+subpackages="$pkgname-doc"
+source="$pkgname-$pkgver.tar.gz::https://github.com/profanity-im/profanity/archive/$pkgver.tar.gz"
+
+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="2d7ea82c33a01605a016826590ee7d8b29f6fd3df93feb4211c414d841ee0c809b257d6df79d17003afacab278935d2e8ed96b472307740fdea7ba4bf92b383d  profanity-0.7.1.tar.gz"
-- 
2.24.0