From 93ff4c35d29ac6cfb6ecd7a33e2c8bebd9562348 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 13 Jul 2017 15:52:03 -0700 Subject: [PATCH] [libevent] Add missing openssl dependency. Simplify portfile. Fixes #1456. --- ports/libevent/CONTROL | 3 ++- ports/libevent/portfile.cmake | 36 +++++++++-------------------------- 2 files changed, 11 insertions(+), 28 deletions(-) diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL index 56ca1f4c71..87c0d0a641 100644 --- a/ports/libevent/CONTROL +++ b/ports/libevent/CONTROL @@ -1,3 +1,4 @@ Source: libevent -Version: 2.1.8-1 +Version: 2.1.8-2 +Build-Depends: openssl Description: An event notification library \ No newline at end of file diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index ce0bc73ba5..1c70dd11f8 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -1,11 +1,11 @@ include(vcpkg_common_functions) -set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/libevent-release-2.1.8-stable) -vcpkg_download_distfile(ARCHIVE - URLS "https://github.com/libevent/libevent/archive/release-2.1.8-stable.tar.gz" - FILENAME "libevent-2.1.8-stable.tar.gz" + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO libevent/libevent + REF release-2.1.8-stable SHA512 0d5c872dc797b69ab8ea4b83aebcbac20735b8c6f5adfcc2950aa4d6013d240f5fac3376e817da75ae0ccead50cec0d931619e135a050add438777457b086549 ) -vcpkg_extract_source_archive(${ARCHIVE}) vcpkg_configure_cmake( SOURCE_PATH ${SOURCE_PATH} @@ -14,27 +14,9 @@ vcpkg_configure_cmake( vcpkg_install_cmake() file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) -file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) -file(RENAME ${CURRENT_PACKAGES_DIR}/cmake ${CURRENT_PACKAGES_DIR}/share/libevent) -file(READ ${CURRENT_PACKAGES_DIR}/debug/cmake/LibeventTargets-debug.cmake DEBUG_MODULE) -string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}") -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" DEBUG_MODULE "${DEBUG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-debug.cmake "${DEBUG_MODULE}") - -file(READ ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-release.cmake RELEASE_MODULE) -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${_IMPORT_PREFIX}" RELEASE_MODULE "${RELEASE_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets-release.cmake "${RELEASE_MODULE}") - -file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/cmake) - -file(READ ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventConfig.cmake CONFIG_MODULE) -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${LIBEVENT_CMAKE_DIR}/../.." CONFIG_MODULE "${CONFIG_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventConfig.cmake "${CONFIG_MODULE}") -file(READ ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets.cmake TARGETS_MODULE) -string(REPLACE "${CURRENT_PACKAGES_DIR}" "\${LIBEVENT_CMAKE_DIR}/../.." TARGETS_MODULE "${TARGETS_MODULE}") -file(WRITE ${CURRENT_PACKAGES_DIR}/share/libevent/LibeventTargets.cmake "${TARGETS_MODULE}") - -file(COPY ${CURRENT_BUILDTREES_DIR}/src/libevent-release-2.1.8-stable/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) -file(RENAME ${CURRENT_PACKAGES_DIR}/share/libevent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libevent/copyright) +vcpkg_fixup_cmake_targets(CONFIG_PATH cmake) vcpkg_copy_pdbs() + +file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libevent) +file(RENAME ${CURRENT_PACKAGES_DIR}/share/libevent/LICENSE ${CURRENT_PACKAGES_DIR}/share/libevent/copyright)