Blame SOURCES/openscap-1.3.3-fix-cmake-findacl.patch

ca8ab9
From 4982aa3da7ae00cd3656db7f47ac3706e85ab7d4 Mon Sep 17 00:00:00 2001
ca8ab9
From: =?UTF-8?q?Jan=20=C4=8Cern=C3=BD?= <jcerny@redhat.com>
ca8ab9
Date: Thu, 23 Jan 2020 16:24:37 +0100
ca8ab9
Subject: [PATCH] Fix FindACL.cmake
ca8ab9
ca8ab9
find_path parameter `NAMES` values should be separated. According to
ca8ab9
https://cmake.org/cmake/help/latest/command/find_path.html it should be:
ca8ab9
`NAMES name1 [name2 ...]`
ca8ab9
ca8ab9
find_library parameter `NAMES` either should not contain `lib` or should
ca8ab9
contain both `lib` and `.so.` The documentation at
ca8ab9
https://cmake.org/cmake/help/latest/command/find_library.html says: Each
ca8ab9
library name given to the `NAMES` option is first considered as a
ca8ab9
library file name and then considered with platform-specific prefixes
ca8ab9
(e.g. `lib`) and suffixes (e.g. `.so`).
ca8ab9
ca8ab9
This bug caused that even if cmake reported that libacl was found, the
ca8ab9
library wasn't linked to the built `libopenscap.so`. Also,
ca8ab9
`HAVE_ACL_EXTENDED_FILE`, `HAVE_ACL_LIBACL_H` and `HAVE_SYS_ACL_H` were
ca8ab9
undefined in `config.h`, which caused some guarded pieces of code to not
ca8ab9
compile, which means features missing.
ca8ab9
---
ca8ab9
 cmake/FindACL.cmake | 4 ++--
ca8ab9
 1 file changed, 2 insertions(+), 2 deletions(-)
ca8ab9
ca8ab9
diff --git a/cmake/FindACL.cmake b/cmake/FindACL.cmake
ca8ab9
index 2d4a3027c..a41f2c13a 100644
ca8ab9
--- a/cmake/FindACL.cmake
ca8ab9
+++ b/cmake/FindACL.cmake
ca8ab9
@@ -12,13 +12,13 @@ libfind_pkg_check_modules(ACL_PKGCONF libacl)
ca8ab9
 
ca8ab9
 # Include dir
ca8ab9
 find_path(ACL_INCLUDE_DIR
ca8ab9
-	NAMES "acl/libacl.h sys/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 libacl
ca8ab9
+	NAMES acl
ca8ab9
 	PATHS ${ACL_PKGCONF_LIBRARY_DIRS}
ca8ab9
 )
ca8ab9