diff options
| author | Park DongHa <luncliff@gmail.com> | 2021-07-17 04:53:49 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-16 12:53:49 -0700 |
| commit | bbe9763f6254298470dddb6eaf186b13c37459fd (patch) | |
| tree | 287168b08e14dbe430f6a76818cbf8399219c57d | |
| parent | 588b1e66f9c18e0887eeaea8dfb49ff856acf683 (diff) | |
| download | vcpkg-bbe9763f6254298470dddb6eaf186b13c37459fd.tar.gz vcpkg-bbe9763f6254298470dddb6eaf186b13c37459fd.zip | |
[liburing] create a new port (#17623)
* [liburing] create a new port
* [liburing] patch datadir
* [liburing] add port usage
* with CMake module: FindPkgConfig
* Update ports/liburing/portfile.cmake
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
* [liburing] comments for BUILD_SHARED
* update git-tree SHA
* [liburing] fix portfile
* [liburing] configure with ENABLE_SHARED
* update git-tree SHA
* Update ports/liburing/usage
* [liburing] fix mistype in usage
* update git-tree SHA
Co-authored-by: NancyLi1013 <46708020+NancyLi1013@users.noreply.github.com>
Co-authored-by: nicole mazzuca <83086508+strega-nil-ms@users.noreply.github.com>
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
| -rw-r--r-- | ports/liburing/fix-configure.patch | 35 | ||||
| -rw-r--r-- | ports/liburing/fix-spec-version.patch | 11 | ||||
| -rw-r--r-- | ports/liburing/portfile.cmake | 35 | ||||
| -rw-r--r-- | ports/liburing/usage | 6 | ||||
| -rw-r--r-- | ports/liburing/vcpkg.json | 7 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/l-/liburing.json | 9 |
7 files changed, 107 insertions, 0 deletions
diff --git a/ports/liburing/fix-configure.patch b/ports/liburing/fix-configure.patch new file mode 100644 index 000000000..92ebf2826 --- /dev/null +++ b/ports/liburing/fix-configure.patch @@ -0,0 +1,35 @@ +diff --git a/configure b/configure +index 3b96cde..56d5cb0 100755 +--- a/configure ++++ b/configure +@@ -18,16 +18,18 @@ for opt do + ;; + --mandir=*) mandir="$optarg" + ;; +- --datadir=*) datadir="$optarg" ++ --datarootdir=*) datadir="$optarg" + ;; + --cc=*) cc="$optarg" + ;; + --cxx=*) cxx="$optarg" + ;; ++ --enable-shared) ENABLE_SHARED=1 ++ ;; ++ --enable-static) ENABLE_SHARED=0 ++ ;; + *) +- echo "ERROR: unknown option $opt" +- echo "Try '$0 --help' for more information" +- exit 1 ++ echo "WARNING: unknown option $opt" + ;; + esac + done +@@ -119,6 +121,7 @@ echo "# Automatically generated by configure - do not modify" > $config_host_mak + printf "# Configured with:" >> $config_host_mak + printf " '%s'" "$0" "$@" >> $config_host_mak + echo >> $config_host_mak ++echo "ENABLE_SHARED=${ENABLE_SHARED}" >> $config_host_mak + + do_cxx() { + # Run the compiler, capturing its output to the log. diff --git a/ports/liburing/fix-spec-version.patch b/ports/liburing/fix-spec-version.patch new file mode 100644 index 000000000..9acb1fc40 --- /dev/null +++ b/ports/liburing/fix-spec-version.patch @@ -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 diff --git a/ports/liburing/portfile.cmake b/ports/liburing/portfile.cmake new file mode 100644 index 000000000..304bef5ec --- /dev/null +++ b/ports/liburing/portfile.cmake @@ -0,0 +1,35 @@ +vcpkg_fail_port_install(ON_TARGET "windows" "uwp" "osx" "ios" "android") + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO axboe/liburing + REF liburing-2.0 + SHA512 8a7b37600246d44a94d3fed1ca4bb60e76f9ddc60bd3c237e600b60e77961a1125c8a1f230cb7569f959acf10b68b91aafb4935c1c2fd13d5df7373b374e47f5 + HEAD_REF master + PATCHES + fix-spec-version.patch # update version value for pkgconfig(.pc) files + fix-configure.patch # ignore unsupported options, handle ENABLE_SHARED +) + +# 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}) + +# 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") + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/lib/liburing.a + ${CURRENT_PACKAGES_DIR}/lib/liburing.a + ) +endif() +file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/man) diff --git a/ports/liburing/usage b/ports/liburing/usage new file mode 100644 index 000000000..36a718895 --- /dev/null +++ b/ports/liburing/usage @@ -0,0 +1,6 @@ +The package liburing can be imported via CMake FindPkgConfig module: + + include(FindPkgConfig) + pkg_check_modules(liburing REQUIRED IMPORTED_TARGET GLOBAL liburing>=2.0) + + target_link_libraries(main PRIVATE PkgConfig::liburing) diff --git a/ports/liburing/vcpkg.json b/ports/liburing/vcpkg.json new file mode 100644 index 000000000..e2bb1b53e --- /dev/null +++ b/ports/liburing/vcpkg.json @@ -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" +} diff --git a/versions/baseline.json b/versions/baseline.json index 99807fbd1..84820cd75 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3668,6 +3668,10 @@ "baseline": "4.3-0", "port-version": 0 }, + "liburing": { + "baseline": "2.0", + "port-version": 0 + }, "libusb": { "baseline": "1.0.24", "port-version": 4 diff --git a/versions/l-/liburing.json b/versions/l-/liburing.json new file mode 100644 index 000000000..0ec46a4a7 --- /dev/null +++ b/versions/l-/liburing.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "b4d90242721d15d6dc5287690c3b8d42c2e8d0f0", + "version": "2.0", + "port-version": 0 + } + ] +} |
