aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libthreadar
diff options
context:
space:
mode:
authorSimon Rupf <simon@rupf.net>2020-02-14 07:03:35 +0100
committerRasmus Thomsen <oss@cogitri.dev>2020-02-16 01:46:51 +0100
commit2624d3d443becadd096f46105ffc46ce83a3ae9e (patch)
tree424f99d8680785ef3161d4bfabad02d415ecd262 /testing/libthreadar
parenta188ba22708c1000fb191da2b41c7622b573be60 (diff)
downloadaports-2624d3d443becadd096f46105ffc46ce83a3ae9e.tar.bz2
aports-2624d3d443becadd096f46105ffc46ce83a3ae9e.tar.xz
testing/libthreadar: new aport
http://libthreadar.sourceforge.net/ a C++ library that provides several classes to manipulate threads
Diffstat (limited to 'testing/libthreadar')
-rw-r--r--testing/libthreadar/APKBUILD27
-rw-r--r--testing/libthreadar/alpine_strerror_r.patch19
2 files changed, 46 insertions, 0 deletions
diff --git a/testing/libthreadar/APKBUILD b/testing/libthreadar/APKBUILD
new file mode 100644
index 0000000000..0efc8c7715
--- /dev/null
+++ b/testing/libthreadar/APKBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Simon Rupf <simon@rupf.net>
+pkgname=libthreadar
+pkgver=1.2.1
+pkgrel=0
+pkgdesc="a C++ library that provides several classes to manipulate threads"
+url="http://libthreadar.sourceforge.net/"
+arch="all"
+license="LGPL-3.0-or-later"
+subpackages="$pkgname-dev"
+source="https://downloads.sourceforge.net/libthreadar/libthreadar-$pkgver.tar.gz
+ alpine_strerror_r.patch"
+
+build() {
+ ./configure --prefix=/usr --enable-static=no
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make DESTDIR="$pkgdir" install
+}
+
+sha512sums="52b2df3ef58b72ec3d504594528c09d9d4345321bc8dde2cfe3badc577eff5d4bbdbfc08d4c8685e47df1ce3d13ea2867f267a2c70b4e66d21f7d05810644f65 libthreadar-1.2.1.tar.gz
+f741bb9d0b16456061148f365a52bc06767aad13f870126e975a6ba598b33494b6e486c948a94591d05d5955dfac190a4f88cac5377ba9f45adf73976f6017a2 alpine_strerror_r.patch"
diff --git a/testing/libthreadar/alpine_strerror_r.patch b/testing/libthreadar/alpine_strerror_r.patch
new file mode 100644
index 0000000000..fe26c895bb
--- /dev/null
+++ b/testing/libthreadar/alpine_strerror_r.patch
@@ -0,0 +1,19 @@
+--- ./src/exceptions.cpp
++++ ./src/exceptions.cpp
+@@ -59,16 +59,10 @@
+ const unsigned int MSGSIZE = 300;
+ char buffer[MSGSIZE];
+
+-#if (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE
+ // we expect the XSI-compliant strerror_r
+ int val = strerror_r(error_code, buffer, MSGSIZE);
+ if(val != 0)
+ strncpy(buffer, "Error code to message conversion, failed", MSGSIZE);
+-#else
+- char *val = strerror_r(error_code, buffer, MSGSIZE);
+- if(val != buffer)
+- strncpy(buffer, val, MSGSIZE);
+-#endif
+ buffer[MSGSIZE-1] = '\0';
+
+ reset_first_message(buffer);