From 3d9cc9a555e06725e9dbd8bc53d2e3875b82e198 Mon Sep 17 00:00:00 2001 From: CQ_Undefine <60255716+cqundefine@users.noreply.github.com> Date: Mon, 6 Oct 2025 19:35:13 +0200 Subject: [PATCH] [epoll-shim] Add new port (#47557) --- ...ll-pkg-config-into-standard-location.patch | 13 ++++++++++ ports/epoll-shim/portfile.cmake | 24 +++++++++++++++++++ ports/epoll-shim/vcpkg.json | 18 ++++++++++++++ versions/baseline.json | 4 ++++ versions/e-/epoll-shim.json | 9 +++++++ 5 files changed, 68 insertions(+) create mode 100644 ports/epoll-shim/000-install-pkg-config-into-standard-location.patch create mode 100644 ports/epoll-shim/portfile.cmake create mode 100644 ports/epoll-shim/vcpkg.json create mode 100644 versions/e-/epoll-shim.json diff --git a/ports/epoll-shim/000-install-pkg-config-into-standard-location.patch b/ports/epoll-shim/000-install-pkg-config-into-standard-location.patch new file mode 100644 index 0000000000..52a1213630 --- /dev/null +++ b/ports/epoll-shim/000-install-pkg-config-into-standard-location.patch @@ -0,0 +1,13 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 744c9e8..02ef4aa 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -62,7 +62,7 @@ add_library(${_namespace}::epoll-shim-interpose ALIAS epoll-shim-interpose)\n") + configure_file("${PROJECT_SOURCE_DIR}/${_pc_filename}.pc.cmakein" + "${PROJECT_BINARY_DIR}/${_pc_filename}.pc" @ONLY) + install(FILES "${PROJECT_BINARY_DIR}/${_pc_filename}.pc" +- DESTINATION "${CMAKE_INSTALL_PKGCONFIGDIR}") ++ DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + endforeach() + + set(CMAKE_INSTALL_INCLUDEDIR "${CMAKE_INSTALL_INCLUDEDIR}/libepoll-shim") diff --git a/ports/epoll-shim/portfile.cmake b/ports/epoll-shim/portfile.cmake new file mode 100644 index 0000000000..690492dba0 --- /dev/null +++ b/ports/epoll-shim/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO jiixyj/epoll-shim + REF v${VERSION} + SHA512 03f2cf64854dcb7c065284bbe765e6b52a9504969a733b450746226334fb9852e210b3db0d8ae40733abf62d75d35cc539140e9b5fb3507de9e47ebbc15f2ae3 + HEAD_REF master + PATCHES + 000-install-pkg-config-into-standard-location.patch +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/epoll-shim) +vcpkg_fixup_pkgconfig() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/ports/epoll-shim/vcpkg.json b/ports/epoll-shim/vcpkg.json new file mode 100644 index 0000000000..97aaae13a5 --- /dev/null +++ b/ports/epoll-shim/vcpkg.json @@ -0,0 +1,18 @@ +{ + "name": "epoll-shim", + "version": "0.0.20240608", + "description": "Small epoll implementation using kqueue", + "homepage": "https://github.com/jiixyj/epoll-shim", + "license": "MIT", + "supports": "osx | freebsd | openbsd", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} diff --git a/versions/baseline.json b/versions/baseline.json index f7aa28ae2e..c0373ca1ad 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -2732,6 +2732,10 @@ "baseline": "3.15.0", "port-version": 0 }, + "epoll-shim": { + "baseline": "0.0.20240608", + "port-version": 0 + }, "eraser": { "baseline": "2.2.1", "port-version": 0 diff --git a/versions/e-/epoll-shim.json b/versions/e-/epoll-shim.json new file mode 100644 index 0000000000..0e195e5819 --- /dev/null +++ b/versions/e-/epoll-shim.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "07865cb81a0586ba5dbd0b09441a88ebce34e19d", + "version": "0.0.20240608", + "port-version": 0 + } + ] +}