mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 23:01:38 +08:00
[libev] Fix build on windows (#39985)
This commit is contained in:
parent
136a0d8b8c
commit
cef7db8009
14
ports/libev/0000-event-fix-undefined-struct-timeval.patch
Normal file
14
ports/libev/0000-event-fix-undefined-struct-timeval.patch
Normal file
@ -0,0 +1,14 @@
|
||||
diff --git a/event.c b/event.c
|
||||
index 5586cd3..a67ca54 100644
|
||||
--- a/event.c
|
||||
+++ b/event.c
|
||||
@@ -40,6 +40,9 @@
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <assert.h>
|
||||
+#ifdef _WIN32
|
||||
+#include <winsock2.h>
|
||||
+#endif
|
||||
|
||||
#ifdef EV_EVENT_H
|
||||
# include EV_EVENT_H
|
@ -7,11 +7,19 @@ vcpkg_download_distfile(ARCHIVE
|
||||
vcpkg_extract_source_archive(
|
||||
SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
PATCHES "0000-event-fix-undefined-struct-timeval.patch"
|
||||
)
|
||||
|
||||
set(LIBEV_LINK_FLAGS "")
|
||||
|
||||
if(VCPKG_TARGET_IS_WINDOWS)
|
||||
list(APPEND LIBEV_LINK_FLAGS "LDFLAGS=-no-undefined -lws2_32 \$LDFLAGS")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_make(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
AUTOCONFIG
|
||||
OPTIONS ${LIBEV_LINK_FLAGS}
|
||||
)
|
||||
|
||||
vcpkg_install_make()
|
||||
|
@ -1,9 +1,8 @@
|
||||
{
|
||||
"name": "libev",
|
||||
"version": "4.33",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "libev is a high-performance event loop/event model with lots of features.",
|
||||
"homepage": "http://software.schmorp.de/pkg/libev.html",
|
||||
"license": "BSD-2-Clause OR GPL-2.0-or-later",
|
||||
"supports": "!windows"
|
||||
"license": "BSD-2-Clause OR GPL-2.0-or-later"
|
||||
}
|
||||
|
@ -4414,7 +4414,7 @@
|
||||
},
|
||||
"libev": {
|
||||
"baseline": "4.33",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"libevent": {
|
||||
"baseline": "2.1.12+20230128",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "048b4e081061376e4e6fdcd18670669162f79c7a",
|
||||
"version": "4.33",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "1287c21bdb7398762b3906c5daaab7b537bea188",
|
||||
"version": "4.33",
|
||||
|
Loading…
Reference in New Issue
Block a user