diff options
author | Guilherme Amadio <amadio@gentoo.org> | 2018-05-16 10:54:26 +0200 |
---|---|---|
committer | Guilherme Amadio <amadio@gentoo.org> | 2018-05-16 10:57:59 +0200 |
commit | bc2c00767e39112706a023b6ed5b0bf38cd0ba1d (patch) | |
tree | 0b06d3a2b96e9a268903fe158bfc84621983165a /net-libs | |
parent | dev-util/debootstrap: Old. (diff) | |
download | gentoo-bc2c00767e39112706a023b6ed5b0bf38cd0ba1d.tar.gz gentoo-bc2c00767e39112706a023b6ed5b0bf38cd0ba1d.tar.bz2 gentoo-bc2c00767e39112706a023b6ed5b0bf38cd0ba1d.zip |
net-libs/davix: Fix Finduuid.cmake to work on macOS
Diffstat (limited to 'net-libs')
-rw-r--r-- | net-libs/davix/davix-0.6.7.ebuild | 1 | ||||
-rw-r--r-- | net-libs/davix/files/davix-0.6.7-uuid.patch | 66 |
2 files changed, 67 insertions, 0 deletions
diff --git a/net-libs/davix/davix-0.6.7.ebuild b/net-libs/davix/davix-0.6.7.ebuild index 1e3fe6f79bfd..4ca799254b21 100644 --- a/net-libs/davix/davix-0.6.7.ebuild +++ b/net-libs/davix/davix-0.6.7.ebuild @@ -32,6 +32,7 @@ RDEPEND="${CDEPEND}" PATCHES=( "${FILESDIR}"/${P}-uio.patch + "${FILESDIR}"/${P}-uuid.patch ) REQUIRED_USE="test? ( tools )" diff --git a/net-libs/davix/files/davix-0.6.7-uuid.patch b/net-libs/davix/files/davix-0.6.7-uuid.patch new file mode 100644 index 000000000000..97d56315ca3d --- /dev/null +++ b/net-libs/davix/files/davix-0.6.7-uuid.patch @@ -0,0 +1,66 @@ +--- + cmake/modules/Finduuid.cmake | 48 +++++++++++++++++------------------- + 1 file changed, 22 insertions(+), 26 deletions(-) + +diff --git a/cmake/modules/Finduuid.cmake b/cmake/modules/Finduuid.cmake +index 2f97a1f..e2c7d13 100644 +--- a/cmake/modules/Finduuid.cmake ++++ b/cmake/modules/Finduuid.cmake +@@ -1,32 +1,28 @@ +-# Try to find uuid +-# Once done, this will define +-# +-# UUID_FOUND - system has uuid +-# UUID_INCLUDE_DIRS - uuid include directories +-# UUID_LIBRARIES - libraries needed to use uuid +- ++include(CheckCXXSymbolExists) ++include(CheckLibraryExists) + include(FindPackageHandleStandardArgs) + +-if(UUID_INCLUDE_DIRS AND UUID_LIBRARIES) +- set(UUID_FIND_QUIETLY TRUE) +-else() +- find_path( +- UUID_INCLUDE_DIR +- NAMES uuid.h +- HINTS ${UUID_ROOT_DIR} +- PATH_SUFFIXES include uuid) +- +- find_library( +- UUID_LIBRARY +- NAMES uuid +- HINTS ${UUID_ROOT_DIR} +- PATH_SUFFIXES ${LIBRARY_PATH_PREFIX}) ++if(NOT UUID_INCLUDE_DIR) ++ find_path(UUID_INCLUDE_DIR uuid/uuid.h) ++endif() + ++if(EXISTS UUID_INCLUDE_DIR) + set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR}) +- set(UUID_LIBRARIES ${UUID_LIBRARY}) +- +- find_package_handle_standard_args( +- uuid DEFAULT_MSG UUID_LIBRARY UUID_INCLUDE_DIR) ++ set(CMAKE_REQUIRED_INCLUDES ${UUID_INCLUDE_DIRS}) ++ check_cxx_symbol_exists("uuid_generate_random" "uuid/uuid.h" _uuid_header_only) ++endif() + +- mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARY) ++if(NOT _uuid_header_only AND NOT UUID_LIBRARY) ++ check_library_exists("uuid" "uuid_generate_random" "" _have_libuuid) ++ if(_have_libuuid) ++ set(UUID_LIBRARY "uuid") ++ set(UUID_LIBRARIES ${UUID_LIBRARY}) ++ endif() + endif() ++ ++unset(CMAKE_REQUIRED_INCLUDES) ++unset(_uuid_header_only) ++unset(_have_libuuid) ++ ++find_package_handle_standard_args(uuid DEFAULT_MSG UUID_INCLUDE_DIR) ++mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARY) +-- +2.17.0 + |