From 12a0106d036a2fc40807fe5a39f92a1be0e59e24 Mon Sep 17 00:00:00 2001 From: Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> Date: Fri, 24 May 2019 19:36:10 +0200 Subject: [PATCH] [apr-util] Fix logic error. If find_library call is used testing for existance is strange. (#6609) Especially if APR_LIBRARIES can contain a list. Testing against NOTFOUND is better. --- ports/apr-util/CONTROL | 2 +- ports/apr-util/apr.patch | 13 +++++++++++++ ports/apr-util/portfile.cmake | 4 +++- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 ports/apr-util/apr.patch diff --git a/ports/apr-util/CONTROL b/ports/apr-util/CONTROL index 1ff406efd7f..80ca3d94da4 100644 --- a/ports/apr-util/CONTROL +++ b/ports/apr-util/CONTROL @@ -1,4 +1,4 @@ Source: apr-util -Version: 1.6.0-2 +Version: 1.6.0-3 Description: Apache Portable Runtime (APR) project mission is to create and maintain software libraries that provide a predictable and consistent interface to underlying platform-specific implementation Build-Depends: expat, apr, openssl diff --git a/ports/apr-util/apr.patch b/ports/apr-util/apr.patch new file mode 100644 index 00000000000..5a61cb9f981 --- /dev/null +++ b/ports/apr-util/apr.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 69e45541..19b86129 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -35,7 +35,7 @@ IF(NOT EXISTS "${APR_INCLUDE_DIR}/apr.h") + MESSAGE(FATAL_ERROR "APR include directory ${APR_INCLUDE_DIR} is not correct.") + ENDIF() + FOREACH(onelib ${APR_LIBRARIES}) +- IF(NOT EXISTS ${onelib}) ++ IF(${onelib} MATCHES "NOTFOUND") + MESSAGE(FATAL_ERROR "APR library ${onelib} was not found.") + ENDIF() + ENDFOREACH() diff --git a/ports/apr-util/portfile.cmake b/ports/apr-util/portfile.cmake index 6ac311d76f8..0b1c2835103 100644 --- a/ports/apr-util/portfile.cmake +++ b/ports/apr-util/portfile.cmake @@ -10,7 +10,9 @@ vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_apply_patches( SOURCE_PATH ${SOURCE_PATH} - PATCHES "${CMAKE_CURRENT_LIST_DIR}/use-vcpkg-expat.patch" + PATCHES + use-vcpkg-expat.patch + apr.patch ) if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)