diff options
| author | Park DongHa <luncliff@gmail.com> | 2021-08-31 01:51:19 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-08-30 09:51:19 -0700 |
| commit | 047e8ef16e2cdb431b9857b79fdfa237b0f038e2 (patch) | |
| tree | eaf7c5c251c78ab11a5f8f9eac2c35c34eebd66b | |
| parent | 8602e5facbc255cff84f0101cac150bb74296e20 (diff) | |
| download | vcpkg-047e8ef16e2cdb431b9857b79fdfa237b0f038e2.tar.gz vcpkg-047e8ef16e2cdb431b9857b79fdfa237b0f038e2.zip | |
[libunifex] create a new port (#19279)
* [libunifex] create a new port
* [libunifex] update version/baseline
* [libunifex] fix wrong support expression
* update version SHA
* [libunifex] more warning comments
* [libunifex] use `unofficial::` namespace
* [libunifex] allow warnings in build
* simplify the patch file
* Update ports/libunifex/vcpkg.json
Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
* [libunifex] update patch files
* [libunifex] replace INCLUDEDIR to include
Co-authored-by: ras0219 <533828+ras0219@users.noreply.github.com>
| -rw-r--r-- | ports/libunifex/allow-warnings.patch | 15 | ||||
| -rw-r--r-- | ports/libunifex/fix-install.patch | 33 | ||||
| -rw-r--r-- | ports/libunifex/portfile.cmake | 40 | ||||
| -rw-r--r-- | ports/libunifex/vcpkg.json | 29 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/l-/libunifex.json | 9 |
6 files changed, 130 insertions, 0 deletions
diff --git a/ports/libunifex/allow-warnings.patch b/ports/libunifex/allow-warnings.patch new file mode 100644 index 000000000..272624f06 --- /dev/null +++ b/ports/libunifex/allow-warnings.patch @@ -0,0 +1,15 @@ +diff --git a/cmake/unifex_env.cmake b/cmake/unifex_env.cmake
+index cb99ae4..9825532 100644
+--- a/cmake/unifex_env.cmake
++++ b/cmake/unifex_env.cmake
+@@ -21,8 +21,8 @@ endif()
+
+ if (MSVC)
+ # warning level 3 and all warnings as errors
+- add_compile_options(/W3 /WX)
++ add_compile_options(/W3)
+ else()
+ # lots of warnings and all warnings as errors
+- add_compile_options(-Wall -Wextra -pedantic -Werror)
++ add_compile_options(-Wall -Wextra -pedantic)
+ endif()
diff --git a/ports/libunifex/fix-install.patch b/ports/libunifex/fix-install.patch new file mode 100644 index 000000000..2b454c49c --- /dev/null +++ b/ports/libunifex/fix-install.patch @@ -0,0 +1,33 @@ +diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt +index 3f25517..3c34a54 100644 +--- a/source/CMakeLists.txt ++++ b/source/CMakeLists.txt +@@ -67,10 +67,27 @@ configure_file( + target_include_directories(unifex + PUBLIC + $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include/> +- "${PROJECT_BINARY_DIR}/include") ++ $<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include> ++ $<INSTALL_INTERFACE:include>) + + target_compile_features(unifex PUBLIC cxx_std_17) + + if(CXX_COROUTINES_HAVE_COROUTINES) + target_link_libraries(unifex PUBLIC std::coroutines) + endif() ++ ++install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/unifex ++ DESTINATION include ++) ++install(FILES ${PROJECT_BINARY_DIR}/include/unifex/config.hpp ++ DESTINATION include/unifex ++) ++ ++install(TARGETS unifex ++ EXPORT unifex-config ++ DESTINATION lib ++) ++install(EXPORT unifex-config ++ NAMESPACE unofficial:: ++ DESTINATION lib/cmake/unifex ++) diff --git a/ports/libunifex/portfile.cmake b/ports/libunifex/portfile.cmake new file mode 100644 index 000000000..f7379fc20 --- /dev/null +++ b/ports/libunifex/portfile.cmake @@ -0,0 +1,40 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO facebookexperimental/libunifex + REF e36b43834329acc75f99910316d3ecec15c0f665 + SHA512 58f738b49d18982fd3916500c78e8090a266738ec4a8ba416b004fa2c7db718db5ce0e27f5e4e22eaddcc27c8d1618bcb2bc080eee1a31d98543e2595ccc1135 + HEAD_REF master + PATCHES + fix-install.patch + allow-warnings.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + test BUILD_TESTING + test UNIFEX_BUILD_EXAMPLES +) + +vcpkg_cmake_configure( + SOURCE_PATH ${SOURCE_PATH} + OPTIONS + ${FEATURE_OPTIONS} +) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME unifex CONFIG_PATH lib/cmake/unifex) +vcpkg_copy_pdbs() + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" + DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/include/unifex/config.hpp.in" +) +if(VCPKG_TARGET_IS_WINDOWS) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/unifex/linux") +elseif(VCPKG_TARGET_IS_LINUX) + file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include/unifex/win32") +endif() diff --git a/ports/libunifex/vcpkg.json b/ports/libunifex/vcpkg.json new file mode 100644 index 000000000..c42782e1c --- /dev/null +++ b/ports/libunifex/vcpkg.json @@ -0,0 +1,29 @@ +{ + "name": "libunifex", + "version-date": "2021-08-01", + "description": "Unified Executors", + "homepage": "https://github.com/facebookexperimental/libunifex", + "supports": "!osx", + "dependencies": [ + { + "name": "liburing", + "platform": "linux" + }, + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "test": { + "description": "Build test/example programs", + "dependencies": [ + "gtest" + ] + } + } +} diff --git a/versions/baseline.json b/versions/baseline.json index 8c910d006..9a0efc8c4 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3724,6 +3724,10 @@ "baseline": "4.3-0", "port-version": 0 }, + "libunifex": { + "baseline": "2021-08-01", + "port-version": 0 + }, "libunistring": { "baseline": "0.9.10", "port-version": 1 diff --git a/versions/l-/libunifex.json b/versions/l-/libunifex.json new file mode 100644 index 000000000..621c7b834 --- /dev/null +++ b/versions/l-/libunifex.json @@ -0,0 +1,9 @@ +{ + "versions": [ + { + "git-tree": "150573588108677bf5bbcb832d1249bd73f76e36", + "version-date": "2021-08-01", + "port-version": 0 + } + ] +} |
