Skip to content

[libcoppp] Update version to 1.3.0#12264

Merged
ras0219-msft merged 2 commits intomicrosoft:masterfrom
owent-contrib:master
Jul 7, 2020
Merged

[libcoppp] Update version to 1.3.0#12264
ras0219-msft merged 2 commits intomicrosoft:masterfrom
owent-contrib:master

Conversation

@owent
Copy link
Copy Markdown
Contributor

@owent owent commented Jul 4, 2020

Describe the pull request

  • What does your PR fix?

Nothing

  • Which triplets are supported/not supported? Have you updated the CI baseline?

All x86 and x64 triplets. Yes

Yes

@JackBoosY JackBoosY added the category:port-update The issue is with a library, which is requesting update new revision label Jul 6, 2020
Update ports/libcopp/portfile.cmake

Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>

Update libcopp to 1.3.1

Update CONTROL of libcopp

Remove useless ```if() ... endif()``` branch

Replace ```file(COPY ...)``` with ```file(INSTALL ...)```
@ras0219-msft
Copy link
Copy Markdown
Contributor

Hi @owt5008137, this looks 95% ready to merge!

However, we do not intend usage to be the channel for information about how to use static linking, nor for the library's changelog; the purpose of this file is only to handle cases where our built-in heuristics fail.

For information about static linking, we prefer users access our docs[1]. For library changes, we encourage users to visit the homepage.

Here is the diff that brings this PR to 100% -- I was unable to push it to this PR because you've unchecked the "allow edits" box:

diff --git a/ports/libcopp/CONTROL b/ports/libcopp/CONTROL
index 415c2a90c..8c9162540 100644
--- a/ports/libcopp/CONTROL
+++ b/ports/libcopp/CONTROL
@@ -1,5 +1,6 @@
 Source: libcopp
 Version: 1.3.1
+Port-Version: 1
 Description: A cross-platfrom coroutine library for C++
 Maintainer: owent <admin@owent.net>
 Homepage: https://libcopp.atframe.work/
diff --git a/ports/libcopp/portfile.cmake b/ports/libcopp/portfile.cmake
index e0e59c5d8..5b6be64bb 100644
--- a/ports/libcopp/portfile.cmake
+++ b/ports/libcopp/portfile.cmake
@@ -6,17 +6,14 @@ vcpkg_from_github(
     HEAD_REF v2
 )
 
-# Use libcopp's own build process, skipping examples and tests
 vcpkg_configure_cmake(
     SOURCE_PATH ${SOURCE_PATH}
     DISABLE_PARALLEL_CONFIGURE
-    # PREFER_NINJA # Disabled because Ninja does not invoke masm correctly for this project
 )
 
 vcpkg_install_cmake()
 
 file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT})
-file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
 file(INSTALL ${SOURCE_PATH}/BOOST_LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
 file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
 
diff --git a/ports/libcopp/usage b/ports/libcopp/usage
deleted file mode 100644
index 6e992196c..000000000
--- a/ports/libcopp/usage
+++ /dev/null
@@ -1,31 +0,0 @@
-The package libcopp provides CMake integration:
-
-    find_package(Libcopp CONFIG REQUIRED)
-    target_link_libraries(main PRIVATE libcopp::cotask)
-    # Or just using copp by target_link_libraries(main PRIVATE libcopp::copp)
-
-If using MSVC, CRT must match the triplet of vcpkg, these codes below may be helpful:
-
-    if (MSVC AND VCPKG_TOOLCHAIN)
-        string(REGEX MATCH "^.*windows-static$" CHECK_VCPKG_TARGET_TRIPLET_RUNTIME ${VCPKG_TARGET_TRIPLET})
-        message(STATUS "CHECK_VCPKG_TARGET_TRIPLET_RUNTIME=${CHECK_VCPKG_TARGET_TRIPLET_RUNTIME}")
-        if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET)
-            set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "")
-        endif()
-        if (CHECK_VCPKG_TARGET_TRIPLET_RUNTIME)
-            set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "")
-            set(CMAKE_MSVC_RUNTIME "/MT$<$<CONFIG:Debug>:d>")
-        else ()
-            set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" CACHE STRING "")
-            set(CMAKE_MSVC_RUNTIME "/MD$<$<CONFIG:Debug>:d>")
-        endif ()
-        target_compile_options(main PRIVATE ${CMAKE_MSVC_RUNTIME})
-    endif ()
-
-BREAK CHANGES & UPGRADE GUIDE FROM 1.2.X
-
-+ Rename ```cotask::task::await``` into ```cotask::task::await_task```
-+ Replace ```cotask::task<TCO_MACRO, TTASK_MACRO>``` with ```cotask::task<TCO_MACRO>``` , we don't allow to custom id allocator now.
-+ Replace ```cotask::core::standard_int_id_allocator<uint64_t>``` with ```copp::util::uint64_id_allocator``` , we don't allow to custom id allocator now.
-+ Require gcc 4.7+, MSVC 14+(Visual Studio 2015)>)
-+ Require cmake 3.12.0 or upper
diff --git a/ports/libcopp/vcpkg-cmake-wrapper.cmake b/ports/libcopp/vcpkg-cmake-wrapper.cmake
deleted file mode 100644
index 175ff8d25..000000000
--- a/ports/libcopp/vcpkg-cmake-wrapper.cmake
+++ /dev/null
@@ -1 +0,0 @@
-_find_package(${ARGS} CONFIG)
\ No newline at end of file

@owent
Copy link
Copy Markdown
Contributor Author

owent commented Jul 7, 2020

Hi @owt5008137, this looks 95% ready to merge!

However, we do not intend usage to be the channel for information about how to use static linking, nor for the library's changelog; the purpose of this file is only to handle cases where our built-in heuristics fail.

For information about static linking, we prefer users access our docs[1]. For library changes, we encourage users to visit the homepage.

Here is the diff that brings this PR to 100% -- I was unable to push it to this PR because you've unchecked the "allow edits" box:

diff --git a/ports/libcopp/CONTROL b/ports/libcopp/CONTROL
index 415c2a90c..8c9162540 100644
--- a/ports/libcopp/CONTROL
+++ b/ports/libcopp/CONTROL
@@ -1,5 +1,6 @@
 Source: libcopp
 Version: 1.3.1
+Port-Version: 1
 Description: A cross-platfrom coroutine library for C++
 Maintainer: owent <admin@owent.net>
 Homepage: https://libcopp.atframe.work/
diff --git a/ports/libcopp/portfile.cmake b/ports/libcopp/portfile.cmake
index e0e59c5d8..5b6be64bb 100644
--- a/ports/libcopp/portfile.cmake
+++ b/ports/libcopp/portfile.cmake
@@ -6,17 +6,14 @@ vcpkg_from_github(
     HEAD_REF v2
 )
 
-# Use libcopp's own build process, skipping examples and tests
 vcpkg_configure_cmake(
     SOURCE_PATH ${SOURCE_PATH}
     DISABLE_PARALLEL_CONFIGURE
-    # PREFER_NINJA # Disabled because Ninja does not invoke masm correctly for this project
 )
 
 vcpkg_install_cmake()
 
 file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/${PORT})
-file(INSTALL ${CMAKE_CURRENT_LIST_DIR}/usage DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
 file(INSTALL ${SOURCE_PATH}/BOOST_LICENSE_1_0.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
 file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
 
diff --git a/ports/libcopp/usage b/ports/libcopp/usage
deleted file mode 100644
index 6e992196c..000000000
--- a/ports/libcopp/usage
+++ /dev/null
@@ -1,31 +0,0 @@
-The package libcopp provides CMake integration:
-
-    find_package(Libcopp CONFIG REQUIRED)
-    target_link_libraries(main PRIVATE libcopp::cotask)
-    # Or just using copp by target_link_libraries(main PRIVATE libcopp::copp)
-
-If using MSVC, CRT must match the triplet of vcpkg, these codes below may be helpful:
-
-    if (MSVC AND VCPKG_TOOLCHAIN)
-        string(REGEX MATCH "^.*windows-static$" CHECK_VCPKG_TARGET_TRIPLET_RUNTIME ${VCPKG_TARGET_TRIPLET})
-        message(STATUS "CHECK_VCPKG_TARGET_TRIPLET_RUNTIME=${CHECK_VCPKG_TARGET_TRIPLET_RUNTIME}")
-        if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET)
-            set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "")
-        endif()
-        if (CHECK_VCPKG_TARGET_TRIPLET_RUNTIME)
-            set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "")
-            set(CMAKE_MSVC_RUNTIME "/MT$<$<CONFIG:Debug>:d>")
-        else ()
-            set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL" CACHE STRING "")
-            set(CMAKE_MSVC_RUNTIME "/MD$<$<CONFIG:Debug>:d>")
-        endif ()
-        target_compile_options(main PRIVATE ${CMAKE_MSVC_RUNTIME})
-    endif ()
-
-BREAK CHANGES & UPGRADE GUIDE FROM 1.2.X
-
-+ Rename ```cotask::task::await``` into ```cotask::task::await_task```
-+ Replace ```cotask::task<TCO_MACRO, TTASK_MACRO>``` with ```cotask::task<TCO_MACRO>``` , we don't allow to custom id allocator now.
-+ Replace ```cotask::core::standard_int_id_allocator<uint64_t>``` with ```copp::util::uint64_id_allocator``` , we don't allow to custom id allocator now.
-+ Require gcc 4.7+, MSVC 14+(Visual Studio 2015)>)
-+ Require cmake 3.12.0 or upper
diff --git a/ports/libcopp/vcpkg-cmake-wrapper.cmake b/ports/libcopp/vcpkg-cmake-wrapper.cmake
deleted file mode 100644
index 175ff8d25..000000000
--- a/ports/libcopp/vcpkg-cmake-wrapper.cmake
+++ /dev/null
@@ -1 +0,0 @@
-_find_package(${ARGS} CONFIG)
\ No newline at end of file

Merged. I can not see the "allow edits" box on this PR page.
图片
There is nothing here, while the document shows it should be.

@owent owent requested a review from JackBoosY July 7, 2020 17:49
@ras0219-msft ras0219-msft merged commit 279a28e into microsoft:master Jul 7, 2020
@ras0219-msft
Copy link
Copy Markdown
Contributor

Thanks for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category:port-update The issue is with a library, which is requesting update new revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants