Blame SOURCES/03-fix-cmake-test-for-libcap-xattr-h.patch

ca8ab9
From 3fbf36004eec55b9a88916559029332d7f356bae Mon Sep 17 00:00:00 2001
ca8ab9
From: Gabe <redhatrises@gmail.com>
ca8ab9
Date: Wed, 15 Jan 2020 15:02:32 -0700
ca8ab9
Subject: [PATCH] Fix case where CMake couldn't find libacl or xattr.h
ca8ab9
ca8ab9
---
ca8ab9
 CMakeLists.txt      | 2 +-
ca8ab9
 cmake/FindACL.cmake | 6 +++---
ca8ab9
 2 files changed, 4 insertions(+), 4 deletions(-)
ca8ab9
ca8ab9
diff --git a/CMakeLists.txt b/CMakeLists.txt
ca8ab9
index 720d8d8eb..fe20992a5 100644
ca8ab9
--- a/CMakeLists.txt
ca8ab9
+++ b/CMakeLists.txt
ca8ab9
@@ -238,7 +238,7 @@ cmake_dependent_option(OPENSCAP_PROBE_INDEPENDENT_XMLFILECONTENT "Independent xm
ca8ab9
 # UNIX PROBES
ca8ab9
 cmake_dependent_option(OPENSCAP_PROBE_UNIX_DNSCACHE "Unix dnscache probe" ON "ENABLE_PROBES_UNIX" OFF)
ca8ab9
 cmake_dependent_option(OPENSCAP_PROBE_UNIX_FILE "Unix file probe" ON "ENABLE_PROBES_UNIX" OFF)
ca8ab9
-cmake_dependent_option(OPENSCAP_PROBE_UNIX_FILEEXTENDEDATTRIBUTE "Unix fileextendedattribute probe" ON "ENABLE_PROBES_UNIX; (HAVE_SYS_XATTR_H OR HAVE_ATTR_XATTR_H)" OFF)
ca8ab9
+cmake_dependent_option(OPENSCAP_PROBE_UNIX_FILEEXTENDEDATTRIBUTE "Unix fileextendedattribute probe" ON "ENABLE_PROBES_UNIX; HAVE_SYS_XATTR_H OR HAVE_ATTR_XATTR_H" OFF)
ca8ab9
 cmake_dependent_option(OPENSCAP_PROBE_UNIX_GCONF "Unix gconf probe" ON "ENABLE_PROBES_UNIX; GCONF_FOUND" OFF)
ca8ab9
 cmake_dependent_option(OPENSCAP_PROBE_UNIX_INTERFACE "Unix interface probe" ON "ENABLE_PROBES_UNIX" OFF)
ca8ab9
 cmake_dependent_option(OPENSCAP_PROBE_UNIX_PASSWORD "Unix password probe" ON "ENABLE_PROBES_UNIX" OFF)
ca8ab9
diff --git a/cmake/FindACL.cmake b/cmake/FindACL.cmake
ca8ab9
index 1753b0dd3..2d4a3027c 100644
ca8ab9
--- a/cmake/FindACL.cmake
ca8ab9
+++ b/cmake/FindACL.cmake
ca8ab9
@@ -8,17 +8,17 @@
ca8ab9
 include(LibFindMacros)
ca8ab9
 
ca8ab9
 # Use pkg-config to get hints about paths
ca8ab9
-libfind_pkg_check_modules(ACL_PKGCONF acl)
ca8ab9
+libfind_pkg_check_modules(ACL_PKGCONF libacl)
ca8ab9
 
ca8ab9
 # Include dir
ca8ab9
 find_path(ACL_INCLUDE_DIR
ca8ab9
-	NAMES acl/libacl.h
ca8ab9
+	NAMES "acl/libacl.h sys/libacl.h"
ca8ab9
 	PATHS ${ACL_PKGCONF_INCLUDE_DIRS}
ca8ab9
 )
ca8ab9
 
ca8ab9
 # Finally the library itself
ca8ab9
 find_library(ACL_LIBRARY
ca8ab9
-	NAMES acl
ca8ab9
+	NAMES libacl
ca8ab9
 	PATHS ${ACL_PKGCONF_LIBRARY_DIRS}
ca8ab9
 )
ca8ab9