aboutsummaryrefslogtreecommitdiff
path: root/ports/libevent
diff options
context:
space:
mode:
authorJackBoosY <yuzaiyang@beyondsoft.com>2020-01-13 23:55:59 -0800
committerJackBoosY <yuzaiyang@beyondsoft.com>2020-01-13 23:55:59 -0800
commit2514481b42ebdeec28649582fc666955cf206c84 (patch)
tree60c9809a5c3c8adbad240a40b1088a6f8e42c019 /ports/libevent
parentb751326c91c9a307aaf5e340b61ab9f2d1ad45a4 (diff)
parent28eee51adb36f2165be846e77ef7b3ee5b3f8789 (diff)
downloadvcpkg-2514481b42ebdeec28649582fc666955cf206c84.tar.gz
vcpkg-2514481b42ebdeec28649582fc666955cf206c84.zip
Merge branch 'master' of https://github.com/Microsoft/vcpkg into dev/jack/upgrade_libi
Diffstat (limited to 'ports/libevent')
-rw-r--r--ports/libevent/CONTROL11
-rw-r--r--ports/libevent/fix-LibeventConfig_cmake_in_path.patch13
-rw-r--r--ports/libevent/portfile.cmake19
3 files changed, 33 insertions, 10 deletions
diff --git a/ports/libevent/CONTROL b/ports/libevent/CONTROL
index a05a77edd..64067f15c 100644
--- a/ports/libevent/CONTROL
+++ b/ports/libevent/CONTROL
@@ -1,5 +1,12 @@
Source: libevent
-Version: 2.1.11
-Build-Depends: openssl
+Version: 2.1.11-4
Homepage: https://github.com/libevent/libevent
Description: An event notification library
+Default-Features: thread
+
+Feature: openssl
+Description: Support for openssl
+Build-Depends: openssl, libevent[thread]
+
+Feature: thread
+Description: Support for thread
diff --git a/ports/libevent/fix-LibeventConfig_cmake_in_path.patch b/ports/libevent/fix-LibeventConfig_cmake_in_path.patch
new file mode 100644
index 000000000..b444ae3e7
--- /dev/null
+++ b/ports/libevent/fix-LibeventConfig_cmake_in_path.patch
@@ -0,0 +1,13 @@
+diff --git a/cmake/LibeventConfig.cmake.in b/cmake/LibeventConfig.cmake.in
+index 5422336..d436100 100644
+--- a/cmake/LibeventConfig.cmake.in
++++ b/cmake/LibeventConfig.cmake.in
+@@ -8,7 +8,7 @@
+ get_filename_component(LIBEVENT_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
+
+ # Set the include directories.
+-set(LIBEVENT_INCLUDE_DIRS "@EVENT_INSTALL_INCLUDE_DIR@")
++set(LIBEVENT_INCLUDE_DIRS "${LIBEVENT_CMAKE_DIR}/../../include")
+
+ # Include the project Targets file, this contains definitions for IMPORTED targets.
+ include(${LIBEVENT_CMAKE_DIR}/LibeventTargets.cmake)
diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake
index 1ce0ab450..bd44d8428 100644
--- a/ports/libevent/portfile.cmake
+++ b/ports/libevent/portfile.cmake
@@ -1,8 +1,4 @@
-include(vcpkg_common_functions)
-
-if(VCPKG_CMAKE_SYSTEM_NAME MATCHES "WindowsStore")
- message(FATAL_ERROR "${PORT} does not currently support UWP")
-endif()
+vcpkg_fail_port_install(MESSAGE "${PORT} does not currently support UWP" ON_TARGET "uwp")
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
@@ -12,6 +8,13 @@ vcpkg_from_github(
PATCHES
fix-file_path.patch
fix-crt_linkage.patch
+ fix-LibeventConfig_cmake_in_path.patch
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ INVERTED_FEATURES
+ openssl EVENT__DISABLE_OPENSSL
+ thread EVENT__DISABLE_THREAD_SUPPORT
)
if (VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
@@ -23,7 +26,7 @@ endif()
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS
+ OPTIONS ${FEATURE_OPTIONS}
-DEVENT_INSTALL_CMAKE_DIR:PATH=share/libevent
-DEVENT__LIBRARY_TYPE=${LIBEVENT_LIB_TYPE}
-DVCPKG_CRT_LINKAGE=${VCPKG_CRT_LINKAGE}
@@ -51,5 +54,5 @@ endif()
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)
+#Handle copyright
+file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)