2021-07-17 04:53:49 +09:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO axboe/liburing
|
2023-06-02 11:17:21 -07:00
|
|
|
REF "liburing-${VERSION}"
|
2024-11-23 00:23:52 +01:00
|
|
|
SHA512 d40d041b94bb0f004bd92890988c0e4b8a7bb9ae43659790ee4b19e5417f7dc5b9a554489834769ee71edfc6a44bcd87a5fca34845f61cc80e4e8e588c6950ec
|
2021-07-17 04:53:49 +09:00
|
|
|
HEAD_REF master
|
|
|
|
PATCHES
|
|
|
|
fix-configure.patch # ignore unsupported options, handle ENABLE_SHARED
|
2022-09-19 20:40:16 +02:00
|
|
|
disable-tests-and-examples.patch
|
2021-07-17 04:53:49 +09:00
|
|
|
)
|
|
|
|
|
2024-11-23 00:23:52 +01:00
|
|
|
# https://github.com/axboe/liburing/blob/liburing-2.8/src/Makefile#L13
|
2024-09-09 02:34:56 +08:00
|
|
|
set(ENV{CFLAGS} "$ENV{CFLAGS} -O3 -Wall -Wextra -fno-stack-protector")
|
|
|
|
|
2021-07-17 04:53:49 +09:00
|
|
|
# note: check ${SOURCE_PATH}/liburing.spec before updating configure options
|
|
|
|
vcpkg_configure_make(
|
2022-05-12 07:39:01 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-07-17 04:53:49 +09:00
|
|
|
COPY_SOURCE
|
2024-08-26 09:58:07 +02:00
|
|
|
DETERMINE_BUILD_TRIPLET
|
2023-06-22 22:50:07 +02:00
|
|
|
OPTIONS
|
|
|
|
[[--libdevdir=\${prefix}/lib]] # must match libdir
|
2021-07-17 04:53:49 +09:00
|
|
|
)
|
|
|
|
vcpkg_install_make()
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
# note: {SOURCE_PATH}/src/Makefile makes liburing.so from liburing.a.
|
|
|
|
# For dynamic, remove intermediate file liburing.a when install is finished.
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
2022-05-12 07:39:01 +08:00
|
|
|
file(REMOVE "${CURRENT_PACKAGES_DIR}/debug/lib/liburing.a"
|
|
|
|
"${CURRENT_PACKAGES_DIR}/lib/liburing.a"
|
2021-07-17 04:53:49 +09:00
|
|
|
)
|
|
|
|
endif()
|
2022-05-12 07:39:01 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/man")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man2")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man3")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/${PORT}/man7")
|
2024-07-15 20:43:55 +02:00
|
|
|
|
|
|
|
# Cf. README
|
|
|
|
vcpkg_install_copyright(COMMENT [[
|
|
|
|
All software contained from liburing is dual licensed LGPL and MIT, see
|
|
|
|
COPYING and LICENSE, except for a header coming from the kernel which is
|
|
|
|
dual licensed GPL with a Linux-syscall-note exception and MIT, see
|
|
|
|
COPYING.GPL and <https://spdx.org/licenses/Linux-syscall-note.html>.
|
|
|
|
]]
|
|
|
|
FILE_LIST
|
|
|
|
"${SOURCE_PATH}/LICENSE"
|
|
|
|
"${SOURCE_PATH}/COPYING"
|
|
|
|
"${SOURCE_PATH}/COPYING.GPL"
|
|
|
|
)
|