diff --git a/libraries/cmake/source/augeas/CMakeLists.txt b/libraries/cmake/source/augeas/CMakeLists.txt index a751ada971b..d1d8b66c084 100644 --- a/libraries/cmake/source/augeas/CMakeLists.txt +++ b/libraries/cmake/source/augeas/CMakeLists.txt @@ -6,7 +6,7 @@ # SPDX-License-Identifier: (Apache-2.0 OR GPL-2.0-only) function(augeasMain) - set(library_root "${CMAKE_CURRENT_SOURCE_DIR}/src") + set(library_root "${OSQUERY_augeas_ROOT_DIR}") if(PLATFORM_LINUX) set(generated_include_headers_path diff --git a/libraries/cmake/source/augeas/patches/src/remove-libxml2-dep.patch b/libraries/cmake/source/augeas/patches/src/remove-libxml2-dep.patch new file mode 100644 index 00000000000..3140dc537cd --- /dev/null +++ b/libraries/cmake/source/augeas/patches/src/remove-libxml2-dep.patch @@ -0,0 +1,32 @@ +diff --git a/src/augeas.h b/src/augeas.h +index 228a67ac..abc1b663 100644 +--- a/src/augeas.h ++++ b/src/augeas.h +@@ -21,7 +21,6 @@ + */ + + #include +-#include + + #ifndef AUGEAS_H_ + #define AUGEAS_H_ +@@ -412,19 +411,6 @@ int aug_print(const augeas *aug, FILE *out, const char *path); + */ + int aug_source(const augeas *aug, const char *path, char **file_path); + +-/* Function: aug_to_xml +- * +- * Turn the Augeas tree(s) matching PATH into an XML tree XMLDOC. The +- * parameter FLAGS is currently unused and must be set to 0. +- * +- * Returns: +- * 0 on success, or a negative value on failure +- * +- * In case of failure, *xmldoc is set to NULL +- */ +-int aug_to_xml(const augeas *aug, const char *path, xmlNode **xmldoc, +- unsigned int flags); +- + /* + * Function: aug_transform + * diff --git a/libraries/cmake/source/modules/Findaugeas.cmake b/libraries/cmake/source/modules/Findaugeas.cmake index 77186b9df2a..04ac8757785 100644 --- a/libraries/cmake/source/modules/Findaugeas.cmake +++ b/libraries/cmake/source/modules/Findaugeas.cmake @@ -19,4 +19,6 @@ importSourceSubmodule( NO_RECURSIVE SHALLOW_SUBMODULES "src" + + PATCH "src" )