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

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