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

Trying to upgrade libraries in VCPKG #3862

Merged
merged 8 commits into from
Sep 30, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ProtoBlockJsonConverter::serialize(const interface::Block &block) const
google::protobuf::util::MessageToJsonString(proto_block, &result);

if (not status.ok()) {
return iroha::expected::makeError(status.error_message());
return iroha::expected::makeError(status.message());
}
return iroha::expected::makeValue(result);
}
Expand All @@ -35,7 +35,7 @@ ProtoBlockJsonConverter::deserialize(
iroha::protocol::Block block;
auto status = google::protobuf::util::JsonStringToMessage(json, &block);
if (not status.ok()) {
return iroha::expected::makeError(status.error_message());
return iroha::expected::makeError(status.message());
}
std::unique_ptr<interface::Block> result =
std::make_unique<Block>(std::move(block.block_v1()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace shared_model {
if (status.ok()) {
return result;
}
return status.error_message();
return status.message();
}
} // namespace protobuf
} // namespace converters
Expand Down
69 changes: 0 additions & 69 deletions vcpkg/patches/0002-rxcpp-from-master-2020-08-22.patch

This file was deleted.

146 changes: 146 additions & 0 deletions vcpkg/patches/0002-upgrade_rxcpp_to_4.1.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
diff --git a/ports/rxcpp/CONTROL b/ports/rxcpp/CONTROL
deleted file mode 100644
index b34395f12..000000000
--- a/ports/rxcpp/CONTROL
+++ /dev/null
@@ -1,4 +0,0 @@
-Source: rxcpp
-Version: 4.1.0-1
-Homepage: https://github.com/Reactive-Extensions/RxCpp
-Description: Reactive Extensions for C++
diff --git a/ports/rxcpp/disable-tests.patch b/ports/rxcpp/disable-tests.patch
new file mode 100644
index 000000000..8378c7f0c
--- /dev/null
+++ b/ports/rxcpp/disable-tests.patch
@@ -0,0 +1,34 @@
+diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt
+index 8856aa42e..2b3d57e97 100755
+--- a/projects/CMake/CMakeLists.txt
++++ b/projects/CMake/CMakeLists.txt
+@@ -11,18 +11,20 @@ get_filename_component(RXCPP_DIR "${RXCPP_DIR}" PATH)
+
+ MESSAGE( STATUS "RXCPP_DIR: " ${RXCPP_DIR} )
+
+-add_subdirectory(${RXCPP_DIR}/Rx/v2/test ${CMAKE_CURRENT_BINARY_DIR}/test)
++if (NOT ${RXCPP_DISABLE_TESTS_AND_EXAMPLES})
++ add_subdirectory(${RXCPP_DIR}/Rx/v2/test ${CMAKE_CURRENT_BINARY_DIR}/test)
+
+-add_subdirectory(${RXCPP_DIR}/projects/doxygen ${CMAKE_CURRENT_BINARY_DIR}/projects/doxygen)
++ add_subdirectory(${RXCPP_DIR}/projects/doxygen ${CMAKE_CURRENT_BINARY_DIR}/projects/doxygen)
+
+-set(EXAMPLES_DIR ${RXCPP_DIR}/Rx/v2/examples)
++ set(EXAMPLES_DIR ${RXCPP_DIR}/Rx/v2/examples)
+
+-add_subdirectory(${EXAMPLES_DIR}/cep ${CMAKE_CURRENT_BINARY_DIR}/examples/cep)
+-add_subdirectory(${EXAMPLES_DIR}/stop ${CMAKE_CURRENT_BINARY_DIR}/examples/stop)
+-add_subdirectory(${EXAMPLES_DIR}/linesfrombytes ${CMAKE_CURRENT_BINARY_DIR}/examples/linesfrombytes)
+-add_subdirectory(${EXAMPLES_DIR}/println ${CMAKE_CURRENT_BINARY_DIR}/examples/println)
+-add_subdirectory(${EXAMPLES_DIR}/pythagorian ${CMAKE_CURRENT_BINARY_DIR}/examples/pythagorian)
+-add_subdirectory(${EXAMPLES_DIR}/tests ${CMAKE_CURRENT_BINARY_DIR}/examples/tests)
++ add_subdirectory(${EXAMPLES_DIR}/cep ${CMAKE_CURRENT_BINARY_DIR}/examples/cep)
++ add_subdirectory(${EXAMPLES_DIR}/stop ${CMAKE_CURRENT_BINARY_DIR}/examples/stop)
++ add_subdirectory(${EXAMPLES_DIR}/linesfrombytes ${CMAKE_CURRENT_BINARY_DIR}/examples/linesfrombytes)
++ add_subdirectory(${EXAMPLES_DIR}/println ${CMAKE_CURRENT_BINARY_DIR}/examples/println)
++ add_subdirectory(${EXAMPLES_DIR}/pythagorian ${CMAKE_CURRENT_BINARY_DIR}/examples/pythagorian)
++ add_subdirectory(${EXAMPLES_DIR}/tests ${CMAKE_CURRENT_BINARY_DIR}/examples/tests)
++endif ()
+
+ # The list of RxCpp source files. Please add every new file to this list
+ set(RX_SOURCES
diff --git a/ports/rxcpp/portfile.cmake b/ports/rxcpp/portfile.cmake
index b98701132..56c14927b 100644
--- a/ports/rxcpp/portfile.cmake
+++ b/ports/rxcpp/portfile.cmake
@@ -1,21 +1,19 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ReactiveX/RxCpp
- REF v4.1.0
- SHA512 a92e817ecbdf6f235cae724ada2615af9fa0c243249625d0f2c2f09ff5dd7f53fdabd03a0278fe2995fe27528c5511d71f87b7a6b3d54f73b49b65aef56e32fd
+ REF v4.1.1
+ SHA512 387e1276151a19b62fd1d36b486ff5f3ed28f0f48ae8b00902bf13464d20603f492ecd63ab4444d04293fc3d92a8f7ce3e67a4c68836415c4655331fb6b54edb
HEAD_REF master
- PATCHES support_find_package.patch
+ PATCHES
+ disable-tests.patch # from https://github.com/ReactiveX/RxCpp/pull/574
)

-vcpkg_configure_cmake(
- SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
- OPTIONS
- -DBUILD_TESTS=OFF
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
)

-vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH share/${PORT}/cmake/)
+vcpkg_cmake_install()
+vcpkg_cmake_config_fixup(CONFIG_PATH share/${PORT}/cmake/)

file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
file(COPY ${SOURCE_PATH}/license.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT})
diff --git a/ports/rxcpp/support_find_package.patch b/ports/rxcpp/support_find_package.patch
deleted file mode 100644
index bb1da2d2d..000000000
--- a/ports/rxcpp/support_find_package.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-diff --git a/projects/CMake/CMakeLists.txt b/projects/CMake/CMakeLists.txt
-index 3d0744740..293f187c5 100644
---- a/projects/CMake/CMakeLists.txt
-+++ b/projects/CMake/CMakeLists.txt
-@@ -146,3 +146,27 @@ set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY TRUE CACHE BOOL "Don't require all project
-
- install(DIRECTORY ${RXCPP_DIR}/Rx/v2/src/rxcpp/ DESTINATION include/rxcpp
- FILES_MATCHING PATTERN "*.hpp")
-+
-+# Here we are exporting TARGETS so that other projects can import rxcpp
-+# just with find_package(rxcpp CONFIG) after rxcpp is installed into system by "make install".
-+add_library(rxcpp INTERFACE)
-+
-+target_include_directories(rxcpp INTERFACE
-+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
-+ $<INSTALL_INTERFACE:include/rxcpp>
-+)
-+
-+install(TARGETS rxcpp EXPORT rxcppConfig)
-+install(EXPORT rxcppConfig DESTINATION share/rxcpp/cmake)
-+
-+# When find_package(rxcpp SOME_VERSION REQUIRED) will be used in third party project
-+# where SOME_VERSION is any version incompatible with ${PROJECT_VERSION} then cmake will generate the error.
-+# It means you don't need track versions manually.
-+include(CMakePackageConfigHelpers)
-+write_basic_package_version_file("${PROJECT_BINARY_DIR}/rxcppConfigVersion.cmake"
-+ VERSION
-+ ${PROJECT_VERSION}
-+ COMPATIBILITY
-+ AnyNewerVersion
-+)
-+install(FILES "${PROJECT_BINARY_DIR}/rxcppConfigVersion.cmake" DESTINATION share/rxcpp/cmake)
diff --git a/ports/rxcpp/vcpkg.json b/ports/rxcpp/vcpkg.json
new file mode 100644
index 000000000..27a475cd0
--- /dev/null
+++ b/ports/rxcpp/vcpkg.json
@@ -0,0 +1,18 @@
+{
+ "name": "rxcpp",
+ "version": "4.1.1",
+ "port-version": 1,
+ "description": "Reactive Extensions for C++",
+ "homepage": "https://github.com/Reactive-Extensions/RxCpp",
+ "license": "Apache-2.0",
+ "dependencies": [
+ {
+ "name": "vcpkg-cmake",
+ "host": true
+ },
+ {
+ "name": "vcpkg-cmake-config",
+ "host": true
+ }
+ ]
+}
42 changes: 0 additions & 42 deletions vcpkg/patches/0007-repaired-ambiguous-template-usage.patch

This file was deleted.

Loading