summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Kozik2019-05-16 22:24:04 +0200
committerAndrew Kozik2019-05-16 22:24:04 +0200
commit10ce6c2fc641f24c8b983590a1f31acb6da9b275 (patch)
treefa6b098a86e5ff80763185d2b09b8ece12b2fac2
parent43a731e081452e88219ecc3ef1bb4d84c1ebac84 (diff)
downloadaur-10ce6c2fc641f24c8b983590a1f31acb6da9b275.tar.gz
Moved to using mingw pthreads instead of the pthread shim provided by libressl
-rw-r--r--01-pthread.patch14
-rw-r--r--PKGBUILD9
2 files changed, 21 insertions, 2 deletions
diff --git a/01-pthread.patch b/01-pthread.patch
new file mode 100644
index 00000000000..68f4dcb9a91
--- /dev/null
+++ b/01-pthread.patch
@@ -0,0 +1,14 @@
+--- pthread.h 2019-05-16 21:30:41.620331620 +0200
++++ pthread_new.h 2019-05-16 21:21:14.130277483 +0200
+@@ -0,0 +1,11 @@
++/*
++ * Public domain
++ * pthread.h compatibility shim
++ */
++
++#ifndef LIBCRYPTOCOMPAT_PTHREAD_H
++#define LIBCRYPTOCOMPAT_PTHREAD_H
++
++#include_next <pthread.h>
++
++#endif
diff --git a/PKGBUILD b/PKGBUILD
index 6d3349ec858..3644c4171e2 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -28,9 +28,14 @@ pkgver() {
build() {
cd "${srcdir}/${_gitname}"
for _arch in $_architectures; do
- mkdir -p "${srcdir}/build-${_arch}" && cp -a "${srcdir}/${_gitname}/"* "${srcdir}/build-${_arch}" && cd "${srcdir}/build-${_arch}"
+ mkdir -p "${srcdir}/build-${_arch}"
+ cp -a "${srcdir}/${_gitname}/"* "${srcdir}/build-${_arch}"
+ cd "${srcdir}/build-${_arch}"
+ ## Remove pthread shim code
+ patch include/compat/pthread.h < ../../01-pthread.patch
./autogen.sh
- CC="${_arch}-gcc" CPPFLAGS="-D__MINGW_USE_VC2005_COMPAT" ./configure --host=${_arch} --prefix=/usr/${_arch}
+ CC="${_arch}-gcc" CCFLAGS="-pthread" CPPFLAGS="-D__MINGW_USE_VC2005_COMPAT"\
+ ./configure --host=${_arch} --prefix=/usr/${_arch}
make
## make check
done