kde-frameworks/kfilemetadata: Fix build with >=sys-apps/attr-2.4.48

Thanks-to: Lars Wendler <polynomial-c@gentoo.org>
Bug: https://bugs.gentoo.org/644594
Package-Manager: Portage-2.3.19, Repoman-2.3.6
This commit is contained in:
Andreas Sturmlechner
2018-01-14 22:40:06 +01:00
parent bb05c9cd86
commit 06be4ad326
2 changed files with 48 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
From 6de64a4e3f2713c0096eb7ee1ba52e5fbbbc401f Mon Sep 17 00:00:00 2001
From: Lars Wendler <polynomial-c@gentoo.org>
Date: Sun, 14 Jan 2018 22:29:25 +0100
Subject: [PATCH] Fix build with >=attr-2.4.48
It was looking for long deprecated attr/xattr.h header.
---
cmake/FindXattr.cmake | 2 +-
src/xattr_p.h | 4 +---
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/cmake/FindXattr.cmake b/cmake/FindXattr.cmake
index 3004061..a33f316 100644
--- a/cmake/FindXattr.cmake
+++ b/cmake/FindXattr.cmake
@@ -13,7 +13,7 @@ if (XATTR_INCLUDE_DIRS AND XATTR_LIBRARIES)
set(XATTR_FOUND TRUE)
else ()
- find_path(XATTR_INCLUDE attr/xattr.h
+ find_path(XATTR_INCLUDE sys/xattr.h
/usr/include
/usr/local/include
${CMAKE_INCLUDE_PATH}
diff --git a/src/xattr_p.h b/src/xattr_p.h
index 4663347..542c021 100644
--- a/src/xattr_p.h
+++ b/src/xattr_p.h
@@ -32,13 +32,11 @@
#include <sys/types.h>
#include <sys/xattr.h>
-#if defined(Q_OS_ANDROID)
+#if defined(Q_OS_ANDROID) || defined(Q_OS_LINUX)
// attr/xattr.h is not available in the Android NDK so we are defining ENOATTR ourself
#ifndef ENOATTR
# define ENOATTR ENODATA /* No such attribute */
#endif
-#else
-#include <attr/xattr.h>
#endif
#include <errno.h>
--
2.15.1

View File

@@ -28,6 +28,8 @@ DEPEND="${RDEPEND}
test? ( ${PYTHON_DEPS} )
"
PATCHES=( "${FILESDIR}/${P}-xattr-header.patch" )
pkg_setup() {
use test && python-any-r1_pkg_setup
kde5_pkg_setup