diff options
author | Sebastian Pipping <sping@gentoo.org> | 2021-01-31 18:19:19 +0100 |
---|---|---|
committer | Sebastian Pipping <sping@gentoo.org> | 2021-01-31 18:21:11 +0100 |
commit | 4513980b9b0042067415a706732fccde87014d7f (patch) | |
tree | 68e939ffca585bfb0ffa3ec46d0a7390fde9bf4c | |
parent | kde-misc/kio-fuse: Requires CONFIG_FUSE_FS in linux kernel (diff) | |
download | gentoo-4513980b9b0042067415a706732fccde87014d7f.tar.gz gentoo-4513980b9b0042067415a706732fccde87014d7f.tar.bz2 gentoo-4513980b9b0042067415a706732fccde87014d7f.zip |
sys-apps/usbguard: Fix pthreads linking issue
Thanks for the patch (that went upstream) to Dennis Schridde!
Closes: https://bugs.gentoo.org/754906
Signed-off-by: Sebastian Pipping <sping@gentoo.org>
Package-Manager: Portage-3.0.14, Repoman-3.0.2
-rw-r--r-- | sys-apps/usbguard/files/usbguard-1.0.0-pthreads-link.patch | 36 | ||||
-rw-r--r-- | sys-apps/usbguard/usbguard-0.7.8.ebuild | 13 | ||||
-rw-r--r-- | sys-apps/usbguard/usbguard-1.0.0.ebuild | 11 |
3 files changed, 59 insertions, 1 deletions
diff --git a/sys-apps/usbguard/files/usbguard-1.0.0-pthreads-link.patch b/sys-apps/usbguard/files/usbguard-1.0.0-pthreads-link.patch new file mode 100644 index 000000000000..7edeb86b60bf --- /dev/null +++ b/sys-apps/usbguard/files/usbguard-1.0.0-pthreads-link.patch @@ -0,0 +1,36 @@ +From 9249ff391ee0765ac5e8d4e113e28b8a908c136f Mon Sep 17 00:00:00 2001 +From: Dennis Schridde <devurandom@gmx.net> +Date: Sat, 16 Jan 2021 10:40:26 +0100 +Subject: [PATCH] Link against libpthread + +`CFLAGS` is needed in addition to `LIBS`, because on some systems it +contains `-pthread` and `LIBS` is empty. + +Closes: https://github.com/USBGuard/usbguard/issues/432 +--- + Makefile.am | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index 402854fd..34a2e960 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -167,6 +167,7 @@ libusbguard_la_CPPFLAGS=\ + -I$(top_srcdir)/src/Library/public \ + -I$(top_builddir)/src/Library/IPC \ + ${BOOST_CPPFLAGS} \ ++ ${PTHREAD_CPPFLAGS} \ + @qb_CFLAGS@ \ + @protobuf_CFLAGS@ \ + @crypto_CFLAGS@ \ +@@ -185,7 +186,9 @@ libusbguard_la_LIBADD=\ + @pegtl_LIBS@ \ + @atomic_LIBS@ \ + @umockdev_LIBS@ \ +- ${BOOST_IOSTREAMS_LIB} ++ ${BOOST_IOSTREAMS_LIB} \ ++ ${PTHREAD_CFLAGS} \ ++ ${PTHREAD_LIBS} + + EXTRA_DIST+=\ + src/Library/IPC/Devices.proto \ diff --git a/sys-apps/usbguard/usbguard-0.7.8.ebuild b/sys-apps/usbguard/usbguard-0.7.8.ebuild index 317ca17a882b..be1f9ae5b840 100644 --- a/sys-apps/usbguard/usbguard-0.7.8.ebuild +++ b/sys-apps/usbguard/usbguard-0.7.8.ebuild @@ -1,8 +1,10 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 +inherit autotools + DESCRIPTION="Daemon protecting your computer against BadUSB" HOMEPAGE="https://github.com/USBGuard/usbguard" SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz" @@ -45,6 +47,15 @@ DEPEND="${CDEPEND} ) " +PATCHES=( + "${FILESDIR}"/${PN}-1.0.0-pthreads-link.patch +) + +src_prepare() { + default + eautoreconf +} + src_configure() { local myargs=( $(use_with dbus) diff --git a/sys-apps/usbguard/usbguard-1.0.0.ebuild b/sys-apps/usbguard/usbguard-1.0.0.ebuild index 761a616c07c0..78b104813dad 100644 --- a/sys-apps/usbguard/usbguard-1.0.0.ebuild +++ b/sys-apps/usbguard/usbguard-1.0.0.ebuild @@ -3,6 +3,8 @@ EAPI=7 +inherit autotools + DESCRIPTION="Daemon protecting your computer against BadUSB" HOMEPAGE="https://github.com/USBGuard/usbguard" SRC_URI="https://github.com/USBGuard/usbguard/releases/download/${P}/${P}.tar.gz" @@ -45,6 +47,15 @@ DEPEND="${CDEPEND} ) " +PATCHES=( + "${FILESDIR}"/${PN}-1.0.0-pthreads-link.patch +) + +src_prepare() { + default + eautoreconf +} + src_configure() { local myargs=( $(use_with dbus) |