diff --git a/ports/libevent/fix-LibeventConfig_cmake_in_path.patch b/ports/libevent/fix-LibeventConfig_cmake_in_path.patch index 819380bec3..b974f9da89 100644 --- a/ports/libevent/fix-LibeventConfig_cmake_in_path.patch +++ b/ports/libevent/fix-LibeventConfig_cmake_in_path.patch @@ -1,5 +1,5 @@ diff --git a/cmake/LibeventConfig.cmake.in b/cmake/LibeventConfig.cmake.in -index 7b808c3..9376a5a 100644 +index a12fc23c..fe108b8d 100644 --- a/cmake/LibeventConfig.cmake.in +++ b/cmake/LibeventConfig.cmake.in @@ -58,7 +58,7 @@ endif() @@ -11,12 +11,18 @@ index 7b808c3..9376a5a 100644 macro(message_if_needed _flag _msg) if (NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) -@@ -131,7 +131,7 @@ if(CONFIG_FOR_INSTALL_TREE) - find_library(_event_lib - NAMES "event_${_comp}" - PATHS "${_INSTALL_PREFIX}/lib" +@@ -131,12 +131,10 @@ if(CONFIG_FOR_INSTALL_TREE) + unset(_event_lib_rel CACHE) + find_library(_event_lib_dbg + NAMES "event_${_comp}d" +- PATHS "${_INSTALL_PREFIX}/lib" - NO_DEFAULT_PATH) -+ ) - if(_event_lib) ++ PATHS "${_INSTALL_PREFIX}/lib") + find_library(_event_lib_rel + NAMES "event_${_comp}" +- PATHS "${_INSTALL_PREFIX}/lib" +- NO_DEFAULT_PATH) ++ PATHS "${_INSTALL_PREFIX}/lib") + if(_event_lib_rel OR _event_lib_dbg) list(APPEND LIBEVENT_LIBRARIES "libevent::${_comp}") set_case_insensitive_found(${_comp}) diff --git a/ports/libevent/fix-android-threads.patch b/ports/libevent/fix-android-threads.patch deleted file mode 100644 index 52a46dd55d..0000000000 --- a/ports/libevent/fix-android-threads.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 5698ab6de0720f4da078423aa1676ad6a1c6d7ff Mon Sep 17 00:00:00 2001 -From: Ryan Pavlik -Date: Mon, 3 Oct 2022 09:31:10 -0500 -Subject: [PATCH] cmake: Fix Android build. - -Android/Bionic C library needs no special flags to have threading support. -Found when trying to build with vcpkg. ---- - CMakeLists.txt | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 20bdc92e..4efe834e 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -556,6 +556,11 @@ endif() - if (NOT EVENT__DISABLE_THREAD_SUPPORT) - if (WIN32) - list(APPEND SRC_CORE evthread_win32.c) -+ elseif(ANDROID) -+ # pthreads is built in to bionic -+ set(EVENT__HAVE_PTHREADS 1) -+ CHECK_TYPE_SIZE(pthread_t EVENT__SIZEOF_PTHREAD_T) -+ list(APPEND SYMBOLS_TO_CHECK pthread_mutexattr_setprotocol) - else() - find_package(Threads REQUIRED) - if (NOT CMAKE_USE_PTHREADS_INIT) --- -2.34.1 - diff --git a/ports/libevent/fix-uwp.patch b/ports/libevent/fix-uwp.patch new file mode 100644 index 0000000000..64afb42d86 --- /dev/null +++ b/ports/libevent/fix-uwp.patch @@ -0,0 +1,53 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 07520043..7eec4059 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1022,6 +1022,9 @@ if(WIN32) + add_definitions( + -D_CRT_SECURE_NO_WARNINGS + -D_CRT_NONSTDC_NO_DEPRECATE) ++ if(CMAKE_SYSTEM_NAME STREQUAL "WindowsStore") ++ add_definitions(-DWINRT) ++ endif() + + include_directories(./WIN32-Code) + endif() +diff --git a/evdns.c b/evdns.c +index 05e515c0..912f1115 100644 +--- a/evdns.c ++++ b/evdns.c +@@ -4501,8 +4501,12 @@ evdns_get_default_hosts_filename(void) + char *path_out; + size_t len_out; + ++#ifndef WINRT + if (! SHGetSpecialFolderPathA(NULL, path, CSIDL_SYSTEM, 0)) + return NULL; ++#else ++ return NULL; ++#endif + len_out = strlen(path)+strlen(hostfile)+1; + path_out = mm_malloc(len_out); + evutil_snprintf(path_out, len_out, "%s%s", path, hostfile); +diff --git a/evutil.c b/evutil.c +index d46c997b..bad21ede 100644 +--- a/evutil.c ++++ b/evutil.c +@@ -2240,6 +2240,9 @@ evutil_inet_pton_scope(int af, const char *src, void *dst, unsigned *indexp) + if (cp == NULL) + return evutil_inet_pton(af, src, dst); + ++#ifdef WINRT ++ return -1; ++#else + if_index = if_nametoindex(cp + 1); + if (if_index == 0) { + /* Could be numeric */ +@@ -2256,6 +2259,7 @@ evutil_inet_pton_scope(int af, const char *src, void *dst, unsigned *indexp) + r = evutil_inet_pton(af, tmp_src, dst); + free(tmp_src); + return r; ++#endif + } + + int diff --git a/ports/libevent/portfile.cmake b/ports/libevent/portfile.cmake index 15d1171442..d33234dd00 100644 --- a/ports/libevent/portfile.cmake +++ b/ports/libevent/portfile.cmake @@ -1,13 +1,13 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libevent/libevent - REF release-2.1.12-stable - SHA512 5d6c6f0072f69a68b190772d4c973ce8f33961912032cdc104ad0854c0950f9d7e28bc274ca9df23897937f0cd8e45d1f214543d80ec271c5a6678814a7f195e + REF 4d85d28acdbb83bb60e500e9345bab757b64d6d1 + SHA512 d03daf8e2277e8b9d67e0028d05566c8972a706e53dcb6593f8f92942ff9ce814970418a10d4c37e68228ec153f8fbc7d764a7ff92e2872277a92039380cbbe9 PATCHES + fix-uwp.patch fix-file_path.patch fix-LibeventConfig_cmake_in_path.patch fix-usage.patch - fix-android-threads.patch ) vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS @@ -28,6 +28,10 @@ else() set(LIBEVENT_STATIC_RUNTIME OFF) endif() +if(VCPKG_TARGET_IS_UWP) + list(APPEND FEATURE_OPTIONS -DEVENT__HAVE_AFUNIX_H=0) +endif() + vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" OPTIONS ${FEATURE_OPTIONS} @@ -37,6 +41,7 @@ vcpkg_cmake_configure( -DEVENT__DISABLE_TESTS=ON -DEVENT__DISABLE_REGRESS=ON -DEVENT__DISABLE_SAMPLES=ON + -DEVENT__DISABLE_MBEDTLS=ON ) vcpkg_cmake_install() diff --git a/ports/libevent/vcpkg.json b/ports/libevent/vcpkg.json index 4f4b862480..9b2f2a2ed4 100644 --- a/ports/libevent/vcpkg.json +++ b/ports/libevent/vcpkg.json @@ -1,10 +1,9 @@ { "name": "libevent", - "version": "2.1.12", - "port-version": 7, + "version": "2.1.12+20230128", "description": "An event notification library", "homepage": "https://github.com/libevent/libevent", - "supports": "!uwp", + "license": "BSD-3-Clause", "dependencies": [ { "name": "vcpkg-cmake", diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 3000256efe..dc80e8d588 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -381,8 +381,6 @@ libgpod:x64-osx=fail libepoxy:arm-uwp=fail libepoxy:x64-uwp=fail libepoxy:x64-windows-static=fail -libevent:arm-uwp=fail -libevent:x64-uwp=fail libevhtp:x86-windows=fail libevhtp:x64-windows=fail libevhtp:x64-windows-static=fail diff --git a/versions/baseline.json b/versions/baseline.json index 224e17f3f9..7bb3818dad 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3857,8 +3857,8 @@ "port-version": 1 }, "libevent": { - "baseline": "2.1.12", - "port-version": 7 + "baseline": "2.1.12+20230128", + "port-version": 0 }, "libevhtp": { "baseline": "1.2.18", diff --git a/versions/l-/libevent.json b/versions/l-/libevent.json index 1176168ab2..c73abf6518 100644 --- a/versions/l-/libevent.json +++ b/versions/l-/libevent.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "2ac9c2c5c7aedb962fd3c546c601132a5dc32788", + "version": "2.1.12+20230128", + "port-version": 0 + }, { "git-tree": "49a66da074def8806e42235e6c64af567987498f", "version": "2.1.12",