Skip to content

Commit

Permalink
kde-misc/wacomtablet: Fix build with gcc-9
Browse files Browse the repository at this point in the history
Reported-by: Chris Smith <[email protected]>
Closes: https://bugs.gentoo.org/686822
Package-Manager: Portage-2.3.67, Repoman-2.3.13
Signed-off-by: Andreas Sturmlechner <[email protected]>
  • Loading branch information
a17r committed May 27, 2019
1 parent 2788446 commit b578daa
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 1 deletion.
29 changes: 29 additions & 0 deletions kde-misc/wacomtablet/files/wacomtablet-3.1.1-gcc9.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
From 810487c4fa240f6de598b04929bb08de8937feb5 Mon Sep 17 00:00:00 2001
From: Valerii Malov <[email protected]>
Date: Sun, 28 Apr 2019 19:10:43 +0300
Subject: (Supposedly) fix building with gcc9

I don't really have access to gcc9 right now to test, but this should
fix "static assertion failed: unique_ptr's deleter must be invocable
with a pointer"

CCBUG: 407015
---
src/common/libwacomwrapper.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/libwacomwrapper.cpp b/src/common/libwacomwrapper.cpp
index 1d11fc3..92a559a 100644
--- a/src/common/libwacomwrapper.cpp
+++ b/src/common/libwacomwrapper.cpp
@@ -60,7 +60,7 @@ libWacomWrapper::~libWacomWrapper()
bool libWacomWrapper::lookupTabletInfo(int tabletId, int vendorId, TabletInformation &tabletInfo)
{
qCDebug(COMMON) << "LibWacom lookup for" << tabletId << vendorId;
- auto errorDeleter = [](WacomError *&e){libwacom_error_free(&e);};
+ auto errorDeleter = [](WacomError *e){libwacom_error_free(&e);};
std::unique_ptr<WacomError, decltype(errorDeleter)>
error(libwacom_error_new(), errorDeleter);
std::unique_ptr<WacomDevice, decltype(&libwacom_destroy)>
--
cgit v1.1
5 changes: 4 additions & 1 deletion kde-misc/wacomtablet/wacomtablet-3.1.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ RDEPEND="${CDEPEND}
!kde-misc/wacomtablet:4
"

PATCHES=( "${FILESDIR}/${P}-xlib-optional.patch" ) # bug 681674
PATCHES=(
"${FILESDIR}/${P}-xlib-optional.patch" # bug 681674
"${FILESDIR}/${P}-gcc9.patch" # bug 686822
)

src_test() {
# test needs DBus, bug 675548
Expand Down

0 comments on commit b578daa

Please sign in to comment.