Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions extra/amqp-cpp/APKBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# Maintainer: Narayana Murthy <[email protected]>
pkgname=amqp-cpp
pkgver=4.3.27
pkgrel=0
pkgdesc="C++ library for communicating with a RabbitMQ message broker"
url="https://github.com/CopernicaMarketingSoftware/AMQP-CPP"
arch="all"
license="Apache-2.0"
depends="libc++ qnx-microkernel qnx-gcc-libs"
makedepends="cmake openssl-dev"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
makedepends="cmake openssl-dev"
makedepends="cmake openssl-dev qnx-io-sock-dev"

source="
$pkgname-$pkgver.tar.gz::https://github.com/CopernicaMarketingSoftware/AMQP-CPP/archive/refs/tags/v$pkgver.tar.gz
add_qnx_support.patch
"
builddir="$srcdir/AMQP-CPP-$pkgver"

prepare() {
default_prepare
}

build() {
export LDFLAGS="$LDFLAGS -lm -lsocket"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
export LDFLAGS="$LDFLAGS -lm -lsocket"
export LDFLAGS="$LDFLAGS -lm -lsocket"


cd "$builddir"

cmake -B build -S . \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=ON \
-DAMQP-CPP_LINUX_TCP=ON \
-DAMQP-CPP_BUILD_SHARED=ON
cmake --build build
}

check() {
# Optional: run examples if Needed but not required for packaging
return 0
}

package() {
cd "$builddir"
DESTDIR="$pkgdir" cmake --install build
}

sha512sums="
310e0d1bc1780d54bd1f9a99d114003aee7bdfe8930be198b3006f2ca174c32718844f88d72fd75259d6ce20d35a9dc77a61aea4c364e4af17ba8c87cae43259 amqp-cpp-4.3.27.tar.gz
adb37e609a794b2c06e15fcb0edb4c4fa4eb89e39bd2c81bb45010cfdaf46711035dc8ab3fd274231c6132eb91cd8b4247a3637ef0a2ce5f1e73452f6b38b6f8 add_qnx_support.patch
"
17 changes: 17 additions & 0 deletions extra/amqp-cpp/add_qnx_support.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/src/linux_tcp/addressinfo.h b/src/linux_tcp/addressinfo.h
index d9bb5cb..679d7f9 100644
--- a/src/linux_tcp/addressinfo.h
+++ b/src/linux_tcp/addressinfo.h
@@ -12,7 +12,9 @@
*/
#include <random>
#include "connectionorder.h"
-
+#ifdef __QNX__
+#include <netinet/in.h>
+#endif /* __QNX__ */
/**
* Include guard
*/
--
2.53.0