Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[liburing] create a new port #17623

Merged
merged 10 commits into from
Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions ports/liburing/fix-configure.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
diff --git a/configure b/configure
index 3b96cde..8233294 100755
--- a/configure
+++ b/configure
@@ -18,16 +18,16 @@ for opt do
;;
--mandir=*) mandir="$optarg"
;;
- --datadir=*) datadir="$optarg"
+ --datarootdir=*) datadir="$optarg"
;;
--cc=*) cc="$optarg"
;;
--cxx=*) cxx="$optarg"
;;
*)
- echo "ERROR: unknown option $opt"
- echo "Try '$0 --help' for more information"
- exit 1
+ echo "WARNING: unknown option $opt"
+ # echo "Try '$0 --help' for more information"
+ # exit 1
;;
esac
done
11 changes: 11 additions & 0 deletions ports/liburing/fix-spec-version.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
diff --git a/liburing.spec b/liburing.spec
index fa4d970..8607074 100644
--- a/liburing.spec
+++ b/liburing.spec
@@ -1,5 +1,5 @@
Name: liburing
-Version: 0.7
+Version: 2.0
Release: 1%{?dist}
Summary: Linux-native io_uring I/O access library
License: (GPLv2 with exceptions and LGPLv2+) or MIT
41 changes: 41 additions & 0 deletions ports/liburing/portfile.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
vcpkg_fail_port_install(MESSAGE "'${PORT}' is for Linux" ON_TARGET "windows" "uwp" "osx" "ios" "android")
luncliff marked this conversation as resolved.
Show resolved Hide resolved

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO axboe/liburing
REF liburing-2.0
SHA512 8a7b37600246d44a94d3fed1ca4bb60e76f9ddc60bd3c237e600b60e77961a1125c8a1f230cb7569f959acf10b68b91aafb4935c1c2fd13d5df7373b374e47f5
HEAD_REF master
PATCHES
fix-configure.patch # ignore unsupported options
fix-spec-version.patch # update version value for pkgconfig(.pc) files
)

# note: check ${SOURCE_PATH}/liburing.spec before updating configure options
vcpkg_configure_make(
SOURCE_PATH ${SOURCE_PATH}
COPY_SOURCE
NO_DEBUG
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()

file(INSTALL ${SOURCE_PATH}/LICENSE
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
file(INSTALL ${CURRENT_PORT_DIR}/usage
DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})

if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/liburing.a
${CURRENT_PACKAGES_DIR}/lib/liburing.a
)
else()
file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/liburing.so
${CURRENT_PACKAGES_DIR}/debug/lib/liburing.so.2
${CURRENT_PACKAGES_DIR}/debug/lib/liburing.so.2.0.0
${CURRENT_PACKAGES_DIR}/lib/liburing.so
${CURRENT_PACKAGES_DIR}/lib/liburing.so.2
${CURRENT_PACKAGES_DIR}/lib/liburing.so.2.0.0
)
endif()
JackBoosY marked this conversation as resolved.
Show resolved Hide resolved
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/man)
11 changes: 11 additions & 0 deletions ports/liburing/usage
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
The package liburing can be imported via CMake FindPkgConfig module:

include(FindPkgConfig)
pkg_check_modules(URING liburing>=2.0)

target_include_directories(main PRIVATE ${URING_INCLUDE_DIRS})
target_link_libraries(main PRIVATE ${URING_LINK_LIBRARIES})

If you are using CMake v3.13 or higher:

target_link_directories(main PRIVATE ${URING_LIBRARY_DIRS})
luncliff marked this conversation as resolved.
Show resolved Hide resolved
strega-nil-ms marked this conversation as resolved.
Show resolved Hide resolved
7 changes: 7 additions & 0 deletions ports/liburing/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "liburing",
"version": "2.0",
"description": "Linux-native io_uring I/O access library",
"homepage": "https://github.com/axboe/liburing",
"supports": "linux"
}
4 changes: 4 additions & 0 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -3588,6 +3588,10 @@
"baseline": "4.3-0",
"port-version": 0
},
"liburing": {
"baseline": "2.0",
"port-version": 0
},
"libusb": {
"baseline": "1.0.24",
"port-version": 4
Expand Down
9 changes: 9 additions & 0 deletions versions/l-/liburing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"versions": [
{
"git-tree": "501b1ea101653c05156172f3881d1bc0093ff397",
"version": "2.0",
"port-version": 0
}
]
}