[grpc/protobuf] Update grpc to 1.60.0 and update protobuf to 3.25.1 (#35781)

Resolves https://github.com/microsoft/vcpkg/issues/35566

This pr includes https://github.com/microsoft/vcpkg/pull/31159 and
https://github.com/microsoft/vcpkg/pull/35399

Ports changed in this pr:

Most of these changes stem from the fact that protobuf now depends on
abseil and requires c++14 while ports consume protobuf using
`target_link_libraries(lib ${Protobuf_LIBRARIES})` instead of
`target_link_libraries(lib PUBLIC protobuf::libprotobuf)`.

* **abseil** Updated to 03/04/2024 to address MSVC build issue in
openvino
* **arcus** Updated to 4.13.2
* **braft** Patched to use `find_package(Protobuf` instead of custom
FindProtobuf module. also link with `PUBLIC protobuf::libprotobuf)`.
* **brpc** Patch several `target_link_library` calls to include `PUBLIC`
instead of nothing. Patch some warnings that are treated as errors by
some OSX compiler. Patch usage of changed protobuf features most
importantly removal of `SetLogHandler`, tbd whether this patch is
acceptable with upstream.
* **cld3** Use CONFIG to find protobuf to propagate dependent abseil
libs and cxx14 correctly.
* **ecal** Use CONFIG to find protobuf. Use PUBLIC when linking it.
* **gamenetworkingsockets** Add `-DCMAKE_FIND_PACKAGE_PREFER_CONFIG=on`
for protobuf.
* **gz-transport12** Update to fix usage of removed protobuf features.
* **ignition-msgs1/5/6** Remove protobuf version check which is confused
by the duplicate versioning scheme (v25.1 vs. 3.25.1 vs 4.x). Why are we
even maintaining this no longer maintained major version of this port? I
would welcome a more strict policy on removing ports/adding them to
ci.baseline.txt
* **ignition-transport4/8/9** Same as above + cherry-pick a protobuf
deprecation patch.
* **libprotobuf-mutator** Cherry-pick two commits to address altered
protobuf functionality. Add CONFIG and PUBLIC to protobuf handling in
CMake.
* **marble** Explicitly set protobuf to not found since it is not part
of the vcpkg.json but is made available transitively but another
dependency.
* **mysql-connector-cpp** Several CMake changes and removal of
protobuf::SetLogHandler patch.
* **openvino** Find protobuf using CONFIG
* **osgearth** Link libraries using PUBLIC and link with
protobuf::libprotobuf instead of Protobuf_LIBRARIES
* **paraview** Find protobuf using CONFIG and remove version check
* **pulsar-client-cpp** Add protobuf linkage to PULSAR_OBJECT_LIB.
Simplify protoc patch. Remove -Werror.
* **shogun** Update and patch as much as possible. Users are required to
override bitsery version to 4.x to use shogun since it does not support
5.x provided by vcpkg. Therefore add shogun to ci.baseline.txt.
* **srpc** Update and fix static crt linkage. Patch protobuf linkage and
remove hardcoded `-std=c++11` flag. Protobuf requires c++14 and CMake
does not recognize the hardcoded c++11 flag and will therefore not add a
c++14 flag when the compiler uses c++14 by default.
* **upb** Update to align version with protobuf/grpc and use new github
repo. Patch usual CMake mess (they do not support CMake officially)
which should probably be `unofficial-upbConfig.cmake` but I didn't dig
into downstream implications so I kept it at `upbConfig.cmake` as
before.
* **utf8-range** Update to allign version with protobuf.
This commit is contained in:
Dennis 2024-06-21 22:39:50 +02:00 коммит произвёл GitHub
Родитель d21e70ba80
Коммит 561d171d79
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
138 изменённых файлов: 3468 добавлений и 1059 удалений

Разница между файлами не показана из-за своего большого размера Загрузить разницу

Просмотреть файл

@ -8,6 +8,8 @@ vcpkg_from_github(
REF "${VERSION}"
SHA512 5062e731ee8c9a757e6d75fc1c558652deb4dd1daab4d6143f7ad52a139501c61365f89acbf82480be0f9a4911a58286560068d8b1a8b6774e6afad51739766e
HEAD_REF master
PATCHES
0001-revert-integer-to-string-conversion-optimizations.patch # Fix openvino MSVC compile error
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS

Просмотреть файл

@ -1,6 +1,7 @@
{
"name": "abseil",
"version": "20240116.2",
"port-version": 1,
"description": [
"Abseil is an open-source collection of C++ library code designed to augment the C++ standard library. The Abseil library code is collected from Google's own C++ code base, has been extensively tested and used in production, and is the same code we depend on in our daily coding lives.",
"In some cases, Abseil provides pieces missing from the C++ standard; in others, Abseil provides alternatives to the standard for special needs we've found through usage in the Google code base. We denote those cases clearly within the library code we provide you.",

Просмотреть файл

@ -0,0 +1,37 @@
diff --git a/ArcusConfig.cmake.in b/ArcusConfig.cmake.in
index 3208a69..fb4a968 100644
--- a/ArcusConfig.cmake.in
+++ b/ArcusConfig.cmake.in
@@ -4,7 +4,7 @@
# However, if ProtobufConfig is used instead, there is a CMake option that controls
# this, which defaults to OFF. We need to force this option to ON instead.
set(protobuf_MODULE_COMPATIBLE ON CACHE "" INTERNAL FORCE)
-find_package(Protobuf 3.0.0 REQUIRED)
+find_package(Protobuf REQUIRED)
get_filename_component(SELF_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
include(${SELF_DIR}/Arcus-targets.cmake)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d736ba..66d6c13 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,7 @@ endif()
# However, if ProtobufConfig is used instead, there is a CMake option that controls
# this, which defaults to OFF. We need to force this option to ON instead.
set(protobuf_MODULE_COMPATIBLE ON CACHE INTERNAL "" FORCE)
-find_package(Protobuf 3.0.0 REQUIRED)
+find_package(Protobuf REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON) #Required if a patch to libArcus needs to be made via templates.
@@ -103,9 +103,8 @@ endif()
target_include_directories(Arcus PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
- ${PROTOBUF_INCLUDE_DIR}
)
-target_link_libraries(Arcus PUBLIC ${PROTOBUF_LIBRARIES})
+target_link_libraries(Arcus PUBLIC protobuf::libprotobuf)
if(WIN32)
add_definitions(-D_WIN32_WINNT=0x0600) # Declare we require Vista or higher, this allows us to use IPv6 functions.

Просмотреть файл

@ -1,11 +1,12 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Ultimaker/libArcus
REF 617f6f71572090f73cb44592b12f49567b539e5b #v4.10.0
SHA512 cf0954d8b10d9f94165aa5c086d0e58c2925464f9fbe4252535c36d7e6bb12b767d89efb816c9e642f9cd7f0ec0d66d61ca21c5121a05340499d38d5d851f73b
HEAD_REF master
REF ${VERSION}
SHA512 452c541360d74a8f58ab1b20df59efd36756812a9ecd09804ba16877956fb240d367bd968271a9c010496598ef0b459f62aa287553d4ba3fdb4cd2742c25553f
HEAD_REF main
PATCHES
0001-fix-protobuf-deprecated.patch
0002-protobuf-version.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ENABLE_STATIC)
@ -26,4 +27,4 @@ vcpkg_cmake_config_fixup(PACKAGE_NAME Arcus CONFIG_PATH lib/cmake/Arcus)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
configure_file("${SOURCE_PATH}/LICENSE" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "arcus",
"version-semver": "4.10.0",
"port-version": 2,
"port-version": 3,
"description": "This library contains C++ bindings for creating a socket in a thread and using this socket to send and receive messages based on the Protocol Buffers library.",
"homepage": "https://github.com/Ultimaker/libArcus",
"supports": "!uwp",

Просмотреть файл

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a851c00..d18ecd0 100644
index 3d75dd5..090a02e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -105,7 +105,7 @@ if(BRPC_WITH_GLOG)
@@ -99,7 +99,7 @@ if(BRPC_WITH_GLOG)
${OPENSSL_LIBRARIES}
${OPENSSL_CRYPTO_LIBRARY}
dl
@ -11,7 +11,7 @@ index a851c00..d18ecd0 100644
)
else()
set(DYNAMIC_LIB
@@ -117,7 +117,7 @@ else()
@@ -111,7 +111,7 @@ else()
${OPENSSL_LIBRARIES}
${OPENSSL_CRYPTO_LIBRARY}
dl
@ -21,7 +21,7 @@ index a851c00..d18ecd0 100644
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 78adc56..0ab4dce 100644
index 78adc56..50cffc6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -19,8 +19,10 @@ add_library(braft-static STATIC $<TARGET_OBJECTS:OBJ_LIB>)
@ -35,7 +35,7 @@ index 78adc56..0ab4dce 100644
target_link_libraries(braft-static PUBLIC ${DYNAMIC_LIB})
endif()
@@ -31,15 +33,31 @@ SET_TARGET_PROPERTIES(braft-shared PROPERTIES OUTPUT_NAME braft CLEAN_DIRECT_OUT
@@ -31,15 +33,32 @@ SET_TARGET_PROPERTIES(braft-shared PROPERTIES OUTPUT_NAME braft CLEAN_DIRECT_OUT
endif()
if (NOT BUILD_SHARED_LIBS)
@ -58,6 +58,7 @@ index 78adc56..0ab4dce 100644
+[[include(CMakeFindDependencyMacro)
+find_dependency(ZLIB)
+find_dependency(gflags CONFIG)
+find_dependency(Protobuf CONFIG)
+file(GLOB TARGET_FILES "${CMAKE_CURRENT_LIST_DIR}/unofficial-braftTargets.cmake")
+foreach (TARGET_FILE ${TARGET_FILES})
+ include("${TARGET_FILE}")

Просмотреть файл

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c88b0a2..bd3b74f 100644
index 090a02e..fbe0ac3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -55,12 +55,8 @@ if ((NOT GFLAGS_INCLUDE_PATH) OR (NOT GFLAGS_LIB))
@ -18,30 +18,22 @@ index c88b0a2..bd3b74f 100644
if(LEVELDB_WITH_SNAPPY)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index ff435a2..4e7591b 100644
index 70d73df..a3d3046 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -10,6 +10,9 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/src)
@@ -11,6 +11,7 @@ include_directories(${CMAKE_SOURCE_DIR}/src)
add_library(OBJ_LIB OBJECT ${SOURCES})
+target_include_directories(OBJ_LIB PUBLIC $<INSTALL_INTERFACE:include>)
+target_link_libraries(OBJ_LIB PUBLIC ${DYNAMIC_LIB})
+
+target_link_libraries(OBJ_LIB PUBLIC ${DYNAMIC_LIB})
set_property(TARGET ${OBJ_LIB} PROPERTY POSITION_INDEPENDENT_CODE 1)
if (BUILD_SHARED_LIBS)
@@ -18,13 +21,6 @@ else()
add_library(braft-static STATIC $<TARGET_OBJECTS:OBJ_LIB>)
endif()
-if (BUILD_SHARED_LIBS)
-target_include_directories(braft-shared PUBLIC $<INSTALL_INTERFACE:include>)
-target_link_libraries(braft-shared PUBLIC ${DYNAMIC_LIB})
-else()
-target_include_directories(braft-static PUBLIC $<INSTALL_INTERFACE:include>)
-target_link_libraries(braft-static PUBLIC ${DYNAMIC_LIB})
-endif()
if (NOT BUILD_SHARED_LIBS)
SET_TARGET_PROPERTIES(braft-static PROPERTIES OUTPUT_NAME braft CLEAN_DIRECT_OUTPUT 1)
add_library(braft-shared SHARED $<TARGET_OBJECTS:OBJ_LIB>)
@@ -50,6 +51,7 @@ file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/unofficial-braft-config.cmake"
[[include(CMakeFindDependencyMacro)
find_dependency(ZLIB)
find_dependency(gflags CONFIG)
+find_dependency(glog CONFIG)
find_dependency(Protobuf CONFIG)
file(GLOB TARGET_FILES "${CMAKE_CURRENT_LIST_DIR}/unofficial-braftTargets.cmake")
foreach (TARGET_FILE ${TARGET_FILES})

Просмотреть файл

@ -17,6 +17,7 @@ vcpkg_from_github(
export-target.patch
"${GCC_11_PATCH}"
fix-glog.patch
protobuf.patch
)
vcpkg_cmake_configure(

Просмотреть файл

@ -0,0 +1,23 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 28c1026..65af3ae 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,7 +22,7 @@ endif()
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(FindThreads)
-include(FindProtobuf)
+find_package(Protobuf CONFIG REQUIRED)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
# require at least gcc 4.8
@@ -69,7 +69,8 @@ if ((NOT BRPC_INCLUDE_PATH) OR (NOT BRPC_LIB))
message(FATAL_ERROR "Fail to find brpc")
endif()
-if (NOT PROTOBUF_PROTOC_EXECUTABLE)
+set(PROTOBUF_LIBRARY protobuf::libprotobuf)
+if (0)
get_filename_component(PROTO_LIB_DIR ${PROTOBUF_LIBRARY} DIRECTORY)
set (PROTOBUF_PROTOC_EXECUTABLE "${PROTO_LIB_DIR}/../bin/protoc")
endif()

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "braft",
"version-date": "2021-26-04",
"port-version": 4,
"port-version": 5,
"description": "Consensus algorithm library",
"homepage": "https://github.com/baidu/braft",
"license": "Apache-2.0",

Просмотреть файл

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b14fe17..ecce87c 100644
index b14fe178..9e9a776a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,7 +68,8 @@ endif()
@ -12,12 +12,10 @@ index b14fe17..ecce87c 100644
if (NOT THRIFT_LIB)
message(FATAL_ERROR "Fail to find Thrift")
endif()
@@ -153,7 +154,9 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif()
@@ -154,6 +155,8 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif()
-find_package(Protobuf REQUIRED)
+find_package(protobuf CONFIG REQUIRED)
find_package(Protobuf REQUIRED)
+get_target_property(PROTOBUF_INCLUDE_DIR protobuf::libprotobuf INTERFACE_INCLUDE_DIRECTORIES)
+set(PROTOBUF_LIBRARIES protobuf::libprotobuf)
if(Protobuf_VERSION GREATER 4.21)
@ -78,8 +76,17 @@ index b14fe17..ecce87c 100644
if(WITH_BORINGSSL)
list(APPEND DYNAMIC_LIB ${BORINGSSL_SSL_LIBRARY})
@@ -520,7 +527,7 @@ compile_proto(PROTO_HDRS PROTO_SRCS ${PROJECT_BINARY_DIR}
${PROJECT_SOURCE_DIR}/src
"${PROTO_FILES}")
add_library(PROTO_LIB OBJECT ${PROTO_SRCS} ${PROTO_HDRS})
-
+target_link_libraries(PROTO_LIB PUBLIC ${DYNAMIC_LIB})
set(SOURCES
${BVAR_SOURCES}
${BTHREAD_SOURCES}
diff --git a/cmake/FindGFLAGS.cmake b/cmake/FindGFLAGS.cmake
index dfad5fd..8423d55 100644
index dfad5fd8..8423d55a 100644
--- a/cmake/FindGFLAGS.cmake
+++ b/cmake/FindGFLAGS.cmake
@@ -24,7 +24,9 @@ if (GFLAGS_STATIC)
@ -94,10 +101,19 @@ index dfad5fd..8423d55 100644
set(GFLAGS_FOUND TRUE)
endif(GFLAGS_INCLUDE_PATH AND GFLAGS_LIBRARY)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1b4b233..8e836a4 100644
index 1b4b2332..638ec070 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -31,6 +31,7 @@ add_dependencies(SOURCES_LIB PROTO_LIB)
@@ -24,13 +24,16 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${PROJECT_SOURCE_DIR}/src)
add_library(BUTIL_LIB OBJECT ${BUTIL_SOURCES})
+target_link_libraries(BUTIL_LIB PUBLIC ${DYNAMIC_LIB})
add_library(SOURCES_LIB OBJECT ${SOURCES})
+target_link_libraries(SOURCES_LIB PUBLIC ${DYNAMIC_LIB})
add_dependencies(SOURCES_LIB PROTO_LIB)
# shared library needs POSITION_INDEPENDENT_CODE
set_property(TARGET ${SOURCES_LIB} PROPERTY POSITION_INDEPENDENT_CODE 1)
set_property(TARGET ${BUTIL_LIB} PROPERTY POSITION_INDEPENDENT_CODE 1)
@ -105,7 +121,7 @@ index 1b4b233..8e836a4 100644
add_library(brpc-static STATIC $<TARGET_OBJECTS:BUTIL_LIB>
$<TARGET_OBJECTS:SOURCES_LIB>
$<TARGET_OBJECTS:PROTO_LIB>)
@@ -60,12 +61,19 @@ endfunction()
@@ -60,12 +63,19 @@ endfunction()
if(WITH_THRIFT)
@ -127,7 +143,7 @@ index 1b4b233..8e836a4 100644
# for protoc-gen-mcpack
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/output/bin)
@@ -74,36 +82,64 @@ set(protoc_gen_mcpack_SOURCES
@@ -74,36 +84,63 @@ set(protoc_gen_mcpack_SOURCES
)
add_executable(protoc-gen-mcpack ${protoc_gen_mcpack_SOURCES})
@ -151,7 +167,6 @@ index 1b4b233..8e836a4 100644
endif()
SET_TARGET_PROPERTIES(brpc-shared PROPERTIES OUTPUT_NAME brpc CLEAN_DIRECT_OUTPUT 1)
-
+
+ if(0)
target_link_libraries(protoc-gen-mcpack brpc-shared ${DYNAMIC_LIB} pthread)
+ endif()

Просмотреть файл

@ -1,97 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ecce87c..3d938d3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -86,8 +86,10 @@ configure_file(${PROJECT_SOURCE_DIR}/config.h.in ${PROJECT_SOURCE_DIR}/src/butil
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
-find_package(GFLAGS REQUIRED)
-
+set(GFLAGS_USE_TARGET_NAMESPACE ON)
+find_package(gflags CONFIG REQUIRED)
+set(GFLAGS_LIBRARY gflags::gflags)
+if(0)
execute_process(
COMMAND bash -c "grep \"namespace [_A-Za-z0-9]\\+ {\" ${GFLAGS_INCLUDE_PATH}/gflags/gflags_declare.h | head -1 | awk '{print $2}' | tr -d '\n'"
OUTPUT_VARIABLE GFLAGS_NS
@@ -98,6 +100,8 @@ if(${GFLAGS_NS} STREQUAL "GFLAGS_NAMESPACE")
OUTPUT_VARIABLE GFLAGS_NS
)
endif()
+endif()
+set(GFLAGS_NS "google")
include_directories(
${PROJECT_SOURCE_DIR}/src
@@ -127,19 +131,19 @@ set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} ${DEBUG_SYMBOL} ${THRIFT_CPP_FLAG}")
set(CMAKE_CXX_FLAGS "${CMAKE_CPP_FLAGS} -O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer")
set(CMAKE_C_FLAGS "${CMAKE_CPP_FLAGS} -O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-unused-parameter -fno-omit-frame-pointer")
-macro(use_cxx11)
+macro(use_cxx14)
if(CMAKE_VERSION VERSION_LESS "3.1.3")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
endif()
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
endif()
else()
- set(CMAKE_CXX_STANDARD 11)
+ set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
endif()
-endmacro(use_cxx11)
+endmacro(use_cxx14)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
#required by butil/crc32.cc to boost performance for 10x
@@ -199,7 +203,7 @@ if(Protobuf_VERSION GREATER 4.21)
absl::variant
)
else()
- use_cxx11()
+ use_cxx14()
endif()
find_package(Threads REQUIRED)
find_package(ZLIB REQUIRED)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 8e836a4..c1b1f36 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -30,6 +30,10 @@ add_dependencies(SOURCES_LIB PROTO_LIB)
# shared library needs POSITION_INDEPENDENT_CODE
set_property(TARGET ${SOURCES_LIB} PROPERTY POSITION_INDEPENDENT_CODE 1)
set_property(TARGET ${BUTIL_LIB} PROPERTY POSITION_INDEPENDENT_CODE 1)
+if(BRPC_WITH_GLOG)
+ target_link_libraries(BUTIL_LIB PUBLIC ${GLOG_LIB})
+ target_link_libraries(SOURCES_LIB PUBLIC ${GLOG_LIB})
+endif()
if(NOT BUILD_SHARED_LIBS)
add_library(brpc-static STATIC $<TARGET_OBJECTS:BUTIL_LIB>
@@ -65,9 +69,7 @@ if(WITH_THRIFT)
endif()
target_link_libraries(brpc-static PUBLIC ${DYNAMIC_LIB})
-if(BRPC_WITH_GLOG)
- target_link_libraries(brpc-static PUBLIC ${GLOG_LIB})
-endif()
+
target_include_directories(brpc-static PUBLIC $<INSTALL_INTERFACE:include>)
SET_TARGET_PROPERTIES(brpc-static PROPERTIES OUTPUT_NAME brpc CLEAN_DIRECT_OUTPUT 1)
@@ -90,9 +92,7 @@ if(BUILD_SHARED_LIBS)
$<TARGET_OBJECTS:PROTO_LIB>)
target_link_libraries(brpc-shared PUBLIC ${DYNAMIC_LIB})
target_include_directories(brpc-shared PUBLIC $<INSTALL_INTERFACE:include>)
- if(WITH_GLOG)
- target_link_libraries(brpc-shared PUBLIC ${GLOG_LIB})
- endif()
+
if(WITH_THRIFT)
target_link_libraries(brpc-shared PUBLIC ${THRIFT_LIB})
endif()

Просмотреть файл

@ -0,0 +1,15 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9e9a776a..a8c4c1ea 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -124,8 +124,8 @@ if(WITH_MESALINK)
endif()
set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} -DBTHREAD_USE_FAST_PTHREAD_MUTEX -D__const__=__unused__ -D_GNU_SOURCE -DUSE_SYMBOLIZE -DNO_TCMALLOC -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DBRPC_REVISION=\\\"${BRPC_REVISION}\\\" -D__STRICT_ANSI__")
set(CMAKE_CPP_FLAGS "${CMAKE_CPP_FLAGS} ${DEBUG_SYMBOL} ${THRIFT_CPP_FLAG}")
-set(CMAKE_CXX_FLAGS "${CMAKE_CPP_FLAGS} -O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer")
-set(CMAKE_C_FLAGS "${CMAKE_CPP_FLAGS} -O2 -pipe -Wall -W -fPIC -fstrict-aliasing -Wno-unused-parameter -fno-omit-frame-pointer")
+set(CMAKE_CXX_FLAGS "${CMAKE_CPP_FLAGS} -O2 -pipe -w -fPIC -fstrict-aliasing -Wno-invalid-offsetof -Wno-unused-parameter -fno-omit-frame-pointer")
+set(CMAKE_C_FLAGS "${CMAKE_CPP_FLAGS} -O2 -pipe -w -fPIC -fstrict-aliasing -Wno-unused-parameter -fno-omit-frame-pointer")
macro(use_cxx11)
if(CMAKE_VERSION VERSION_LESS "3.1.3")

Просмотреть файл

@ -6,7 +6,8 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix-build.patch
fix-glog.patch
fix-warnings.patch
protobuf.patch
)
vcpkg_cmake_configure(

25
ports/brpc/protobuf.patch Normal file
Просмотреть файл

@ -0,0 +1,25 @@
diff --git a/src/brpc/thrift_message.cpp b/src/brpc/thrift_message.cpp
index ed3d7557..7b9d210a 100644
--- a/src/brpc/thrift_message.cpp
+++ b/src/brpc/thrift_message.cpp
@@ -22,7 +22,6 @@
#include <algorithm>
#include "butil/logging.h"
-#include <google/protobuf/stubs/once.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/reflection_ops.h>
diff --git a/src/brpc/thrift_message.h b/src/brpc/thrift_message.h
index 53041c85..471bafb5 100644
--- a/src/brpc/thrift_message.h
+++ b/src/brpc/thrift_message.h
@@ -101,7 +101,7 @@ public:
void SerializeWithCachedSizes(
::google::protobuf::io::CodedOutputStream* output) const PB_310_OVERRIDE;
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const PB_310_OVERRIDE;
- int GetCachedSize() const override { return ByteSize(); }
+ int GetCachedSize() const { return ByteSize(); }
protected:
::google::protobuf::Metadata GetMetadata() const override;

Просмотреть файл

@ -1,6 +1,7 @@
{
"name": "brpc",
"version": "1.9.0",
"port-version": 1,
"description": "Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services, called \"baidu-rpc\" inside Baidu.",
"homepage": "https://github.com/apache/brpc",
"license": "Apache-2.0",

Просмотреть файл

@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2e3a686..f36f15a 100644
index 2e3a686..ed161e4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -25,27 +25,33 @@ option(BUILD_GRPC "build Cartographer gRPC support" false)
@ -15,8 +15,9 @@ index 2e3a686..f36f15a 100644
find_package(Ceres REQUIRED COMPONENTS SuiteSparse)
find_package(Eigen3 REQUIRED)
-find_package(LuaGoogle REQUIRED)
-find_package(Protobuf 3.0.0 REQUIRED)
+find_package(Lua REQUIRED)
find_package(Protobuf 3.0.0 REQUIRED)
+find_package(Protobuf REQUIRED)
+find_package(glog REQUIRED)
+find_package(gflags REQUIRED)
@ -80,7 +81,7 @@ index 2e3a686..f36f15a 100644
if(${BUILD_GRPC})
google_binary(cartographer_grpc_server
@@ -213,8 +219,9 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
@@ -213,18 +219,16 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
target_link_libraries(${PROJECT_NAME} PUBLIC ${Boost_LIBRARIES})
# We expect find_package(Ceres) to have located these for us.
@ -90,45 +91,38 @@ index 2e3a686..f36f15a 100644
+#target_link_libraries(${PROJECT_NAME} PUBLIC gflags)
+#target_link_libraries(${PROJECT_NAME} PUBLIC ${CAIRO_LIBRARY})
target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
"${CAIRO_INCLUDE_DIRS}")
@@ -224,7 +231,8 @@ target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
${PROTOBUF_INCLUDE_DIR})
-target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
- "${CAIRO_INCLUDE_DIRS}")
target_link_libraries(${PROJECT_NAME} PUBLIC ${CAIRO_LIBRARIES})
-target_include_directories(${PROJECT_NAME} SYSTEM PUBLIC
- ${PROTOBUF_INCLUDE_DIR})
# TODO(hrapp): This should not explicitly list pthread and use
# PROTOBUF_LIBRARIES, but that failed on first try.
-target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY} pthread)
+#target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY} pthread)
+target_link_libraries(${PROJECT_NAME} PUBLIC ${PROTOBUF_LIBRARY})
+target_link_libraries(${PROJECT_NAME} PUBLIC protobuf::libprotobuf)
if(${BUILD_GRPC})
target_link_libraries(${PROJECT_NAME} PUBLIC grpc++)
target_link_libraries(${PROJECT_NAME} PUBLIC async_grpc)
@@ -234,7 +242,7 @@ if(${BUILD_PROMETHEUS})
target_compile_definitions(${PROJECT_NAME} PUBLIC USE_PROMETHEUS=1)
endif()
-set(TARGET_COMPILE_FLAGS "${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}")
+set(TARGET_COMPILE_FLAGS "-D_DISABLE_EXTENDED_ALIGNED_STORAGE ${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}")
@@ -237,7 +241,7 @@ endif()
set(TARGET_COMPILE_FLAGS "${TARGET_COMPILE_FLAGS} ${GOOG_CXX_FLAGS}")
set_target_properties(${PROJECT_NAME} PROPERTIES
COMPILE_FLAGS ${TARGET_COMPILE_FLAGS})
@@ -255,7 +263,7 @@ foreach(ABS_FIL ${ALL_TESTS})
get_filename_component(FIL_WE ${REL_FIL} NAME_WE)
# Replace slashes as required for CMP0037.
string(REPLACE "/" "." TEST_TARGET_NAME "${DIR}/${FIL_WE}")
- google_test("${TEST_TARGET_NAME}" ${ABS_FIL})
+ #google_test("${TEST_TARGET_NAME}" ${ABS_FIL})
if(${BUILD_GRPC})
target_link_libraries("${TEST_TARGET_NAME}" PUBLIC grpc++)
target_link_libraries("${TEST_TARGET_NAME}" PUBLIC async_grpc)
@@ -263,7 +271,7 @@ foreach(ABS_FIL ${ALL_TESTS})
if(${BUILD_PROMETHEUS})
target_link_libraries("${TEST_TARGET_NAME}" PUBLIC prometheus-cpp)
-
+if(0)
set(TEST_LIB
cartographer_test_library
)
@@ -265,7 +269,7 @@ foreach(ABS_FIL ${ALL_TESTS})
endif()
- target_link_libraries("${TEST_TARGET_NAME}" PUBLIC ${TEST_LIB})
+ #target_link_libraries("${TEST_TARGET_NAME}" PUBLIC ${TEST_LIB})
target_link_libraries("${TEST_TARGET_NAME}" PUBLIC ${TEST_LIB})
endforeach()
-
+endif()
# Add the binary directory first, so that port.h is included after it has
# been generated.
target_include_directories(${PROJECT_NAME} PUBLIC
diff --git a/cartographer/common/math.h b/cartographer/common/math.h
index c4a77ef..0248f66 100644
--- a/cartographer/common/math.h

Просмотреть файл

@ -3,7 +3,7 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO googlecartographer/cartographer
REF 1.0.0
REF ${VERSION}
SHA512 4e3b38ee40d9758cbd51f087578b82efb7d1199b4b7696d31f45938ac06250caaea2b4d85ccb0a848c958ba187a0101ee95c87323ca236c613995b23b215041c
HEAD_REF master
PATCHES
@ -14,11 +14,6 @@ vcpkg_from_github(
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
-DGFLAGS_PREFER_EXPORTED_GFLAGS_CMAKE_CONFIGURATION=OFF
-DGLOG_PREFER_EXPORTED_GLOG_CMAKE_CONFIGURATION=OFF
-Dgtest_disable_pthreads=ON
-DCMAKE_USE_PTHREADS_INIT=OFF
OPTIONS_DEBUG
-DFORCE_DEBUG_BUILD=True
)
@ -32,5 +27,4 @@ vcpkg_copy_pdbs()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
# Handle copyright of cartographer
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "cartographer",
"version": "1.0.0",
"port-version": 5,
"port-version": 6,
"description": "Google 2D & 3D SLAM package",
"homepage": "https://github.com/googlecartographer/cartographer",
"dependencies": [

Просмотреть файл

@ -0,0 +1,26 @@
diff --git a/app/app_pb/CMakeLists.txt b/app/app_pb/CMakeLists.txt
index edd036188..1aae43a81 100644
--- a/app/app_pb/CMakeLists.txt
+++ b/app/app_pb/CMakeLists.txt
@@ -68,7 +68,7 @@ target_compile_options(${PROJECT_NAME}
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_link_libraries(${PROJECT_NAME} protobuf::libprotobuf)
+target_link_libraries(${PROJECT_NAME} PUBLIC protobuf::libprotobuf)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_14)
ecal_install_library(${PROJECT_NAME})
diff --git a/ecal/core_pb/CMakeLists.txt b/ecal/core_pb/CMakeLists.txt
index e8f0704c7..502a92c11 100644
--- a/ecal/core_pb/CMakeLists.txt
+++ b/ecal/core_pb/CMakeLists.txt
@@ -63,7 +63,7 @@ target_compile_options(${PROJECT_NAME}
set_property(TARGET ${PROJECT_NAME} PROPERTY POSITION_INDEPENDENT_CODE ON)
-target_link_libraries(${PROJECT_NAME} protobuf::libprotobuf)
+target_link_libraries(${PROJECT_NAME} PUBLIC protobuf::libprotobuf)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_14)
ecal_install_library(${PROJECT_NAME})

Просмотреть файл

@ -16,6 +16,7 @@ vcpkg_from_github(
0005-remove-install-prefix-macro-value.patch
0006-use-find_dependency-in-cmake-config.patch
0007-allow-static-build-of-core.patch
0008-protobuf-linkage.patch
)
vcpkg_cmake_configure(

Просмотреть файл

@ -1,6 +1,7 @@
{
"name": "ecal",
"version-semver": "5.12.0",
"port-version": 1,
"description": "eCAL - enhanced Communication Abstraction Layer",
"homepage": "https://eclipse-ecal.github.io/ecal/",
"license": "Apache-2.0",

Просмотреть файл

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25990a5d8a..4bec4e1e72 100644
index ec370e9..4f7d770 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -219,6 +219,9 @@ if(UNIX)
@@ -237,6 +237,9 @@ if(UNIX)
endif()
if(WIN32)
set(_gRPC_PLATFORM_WINDOWS ON)
@ -11,8 +11,8 @@ index 25990a5d8a..4bec4e1e72 100644
+ endif()
endif()
# Use C11 standard
@@ -263,6 +266,9 @@ if(MSVC)
if (APPLE AND NOT DEFINED CMAKE_CXX_STANDARD)
@@ -267,6 +270,9 @@ if(MSVC)
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4267")
# TODO(jtattermusch): needed to build boringssl with VS2017, revisit later
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4987 /wd4774 /wd4819 /wd4996 /wd4619")
@ -22,7 +22,7 @@ index 25990a5d8a..4bec4e1e72 100644
# Silences thousands of trucation warnings
set(_gRPC_C_CXX_FLAGS "${_gRPC_C_CXX_FLAGS} /wd4503")
# Tell MSVC to build grpc using utf-8
@@ -430,6 +436,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
@@ -439,6 +445,10 @@ file(MAKE_DIRECTORY ${_gRPC_PROTO_GENS_DIR})
# ``.proto`` files
#
function(protobuf_generate_grpc_cpp)
@ -33,7 +33,7 @@ index 25990a5d8a..4bec4e1e72 100644
if(NOT ARGN)
message(SEND_ERROR "Error: PROTOBUF_GENERATE_GRPC_CPP() called without any proto files")
return()
@@ -552,6 +562,7 @@ if (gRPC_BUILD_GRPC_RUBY_PLUGIN)
@@ -561,6 +571,7 @@ if (gRPC_BUILD_GRPC_RUBY_PLUGIN)
list(APPEND _gRPC_PLUGIN_LIST grpc_ruby_plugin)
endif ()
@ -41,7 +41,7 @@ index 25990a5d8a..4bec4e1e72 100644
add_custom_target(plugins
DEPENDS ${_gRPC_PLUGIN_LIST}
)
@@ -567,6 +578,7 @@ add_custom_target(tools_cxx
@@ -575,6 +586,7 @@ add_custom_target(tools_cxx
add_custom_target(tools
DEPENDS tools_c tools_cxx)
@ -50,18 +50,18 @@ index 25990a5d8a..4bec4e1e72 100644
protobuf_generate_grpc_cpp_with_import_path_correction(
src/proto/grpc/channelz/channelz.proto src/proto/grpc/channelz/channelz.proto
diff --git a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc
index 5d2bdc14de..e9870c2656 100644
index b034cca..5dbdfe3 100644
--- a/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc
+++ b/src/core/lib/security/credentials/alts/check_gcp_environment_windows.cc
@@ -39,6 +39,7 @@ bool check_bios_data(const char*) { return false; }
@@ -40,6 +40,7 @@ bool check_bios_data(const char*) { return false; }
bool check_windows_registry_product_name(HKEY root_key,
const char* reg_key_path,
const char* reg_key_name) {
+#if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
+ #if !defined(WINAPI_FAMILY) || WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP
const size_t kProductNameBufferSize = 256;
char const expected_substr[] = "Google";
@@ -71,6 +72,9 @@ bool check_windows_registry_product_name(HKEY root_key,
@@ -72,6 +73,9 @@ bool check_windows_registry_product_name(HKEY root_key,
}
return strstr(buffer, expected_substr) != nullptr;

Просмотреть файл

@ -1,13 +1,13 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25990a5d8a..8a632d2289 100644
index fce68b9..220f251 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -404,7 +404,7 @@ if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds)
@@ -432,7 +432,7 @@ if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/xds)
endif()
if(WIN32)
- set(_gRPC_BASELIB_LIBRARIES ws2_32 crypt32)
+ set(_gRPC_BASELIB_LIBRARIES wsock32 ws2_32 crypt32 gdi32)
- set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} ws2_32 crypt32)
+ set(_gRPC_ALLTARGETS_LIBRARIES ${_gRPC_ALLTARGETS_LIBRARIES} wsock32 ws2_32 crypt32 gdi32)
set(_gRPC_STATIC_WIN32 STATIC)
endif()
# Create directory for proto source files

Просмотреть файл

@ -1,10 +1,10 @@
diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.cc b/src/core/ext/transport/chttp2/transport/hpack_parser.cc
index b0d3a6465b..5c48f1aa30 100644
index 31bf464..d1007e4 100644
--- a/src/core/ext/transport/chttp2/transport/hpack_parser.cc
+++ b/src/core/ext/transport/chttp2/transport/hpack_parser.cc
@@ -1037,7 +1037,7 @@ class HPackParser::Parser {
@@ -689,7 +689,7 @@ class HPackParser::Parser {
}
private:
void GPR_ATTRIBUTE_NOINLINE LogHeader(const HPackTable::Memento& memento) {
- const char* type;
+ const char* type = nullptr;
@ -12,7 +12,7 @@ index b0d3a6465b..5c48f1aa30 100644
case LogInfo::kHeaders:
type = "HDR";
diff --git a/src/core/lib/slice/slice.cc b/src/core/lib/slice/slice.cc
index 898a62823c..6b31cdc082 100644
index 6180ef1..a8e8110 100644
--- a/src/core/lib/slice/slice.cc
+++ b/src/core/lib/slice/slice.cc
@@ -188,6 +188,7 @@ grpc_slice grpc_slice_from_moved_buffer(grpc_core::UniquePtr<char> p,
@ -33,10 +33,10 @@ index 898a62823c..6b31cdc082 100644
slice.refcount = nullptr;
slice.data.inlined.length = str.size();
diff --git a/src/core/lib/surface/server.cc b/src/core/lib/surface/server.cc
index 141b16e345..89d9d6dafd 100644
index 3dda49d..202caa5 100644
--- a/src/core/lib/surface/server.cc
+++ b/src/core/lib/surface/server.cc
@@ -902,7 +902,7 @@ grpc_call_error Server::QueueRequestedCall(size_t cq_idx, RequestedCall* rc) {
@@ -1057,7 +1057,7 @@ grpc_call_error Server::QueueRequestedCall(size_t cq_idx, RequestedCall* rc) {
FailCall(cq_idx, rc, GRPC_ERROR_CREATE("Server Shutdown"));
return GRPC_CALL_OK;
}

Просмотреть файл

@ -1,60 +1,72 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 23098aa578..a8e8bc274b 100644
index a3b39a1637..8c1dc7223d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,9 @@ set_property(CACHE gRPC_SSL_PROVIDER PROPERTY STRINGS "module" "package")
set(gRPC_PROTOBUF_PROVIDER "module" CACHE STRING "Provider of protobuf library")
set_property(CACHE gRPC_PROTOBUF_PROVIDER PROPERTY STRINGS "module" "package")
+set(gRPC_UPB_PROVIDER "module" CACHE STRING "Provider of upb library")
+set_property(CACHE gRPC_UPB_PROVIDER PROPERTY STRINGS "module" "package")
+
set(gRPC_PROTOBUF_PACKAGE_TYPE "" CACHE STRING "Algorithm for searching protobuf package")
set_property(CACHE gRPC_PROTOBUF_PACKAGE_TYPE PROPERTY STRINGS "CONFIG" "MODULE")
@@ -1631,6 +1634,7 @@ target_link_libraries(gpr
absl::time
absl::optional
absl::variant
+ ${_gRPC_UPB_LIBRARIES}
)
if(_gRPC_PLATFORM_ANDROID)
target_link_libraries(gpr
@@ -2435,7 +2439,6 @@ target_link_libraries(grpc
gpr
${_gRPC_SSL_LIBRARIES}
address_sorting
- upb
)
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
target_link_libraries(grpc "-framework CoreFoundation")
@@ -2979,7 +2982,6 @@ target_link_libraries(grpc_unsecure
absl::utility
gpr
address_sorting
- upb
)
if(_gRPC_PLATFORM_IOS OR _gRPC_PLATFORM_MAC)
target_link_libraries(grpc_unsecure "-framework CoreFoundation")
@@ -4251,6 +4253,7 @@ endif()
@@ -3455,7 +3455,7 @@ target_link_libraries(gtest
endif()
+if (gRPC_UPB_PROVIDER STREQUAL "module")
add_library(upb
third_party/upb/third_party/utf8_range/naive.c
third_party/upb/third_party/utf8_range/range2-neon.c
@@ -4319,7 +4322,7 @@ if(gRPC_INSTALL)
-
+if (0)
add_library(upb ${_gRPC_STATIC_WIN32}
third_party/upb/upb/base/status.c
third_party/upb/upb/mem/alloc.c
@@ -3818,6 +3818,7 @@ if(gRPC_INSTALL)
ARCHIVE DESTINATION ${gRPC_INSTALL_LIBDIR}
)
endif()
-
+endif()
if(gRPC_BUILD_TESTS)
@@ -30412,9 +30413,9 @@ generate_pkgconfig(
"high performance general RPC framework"
"${gRPC_CORE_VERSION}"
"absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr"
- "libcares openssl re2 zlib"
+ "libcares openssl re2 zlib utf8_range"
"-lgrpc"
- "-laddress_sorting -lupb -lupb_textformat_lib -lupb_json_lib -lutf8_range_lib -lupb_collections_lib"
+ "-laddress_sorting -lupb"
"grpc.pc")
# grpc_unsecure .pc file
@@ -30423,9 +30424,9 @@ generate_pkgconfig(
"high performance general RPC framework without SSL"
"${gRPC_CORE_VERSION}"
"absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr"
- "libcares zlib"
+ "libcares zlib utf8_range"
"-lgrpc_unsecure"
- "-laddress_sorting -lutf8_range_lib -lupb -lupb_collections_lib"
+ "-laddress_sorting -lupb"
"grpc_unsecure.pc")
# grpc++ .pc file
@@ -30434,9 +30435,9 @@ generate_pkgconfig(
"C++ wrapper for gRPC"
"${gRPC_CPP_VERSION}"
"absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc"
- "libcares openssl re2 zlib"
+ "libcares openssl re2 zlib utf8_range"
"-lgrpc++"
- "-laddress_sorting -lupb -lupb_textformat_lib -lupb_json_lib -lutf8_range_lib -lupb_collections_lib"
+ "-laddress_sorting -lupb"
"grpc++.pc")
# grpc++_unsecure .pc file
@@ -30445,7 +30446,7 @@ generate_pkgconfig(
"C++ wrapper for gRPC without SSL"
"${gRPC_CPP_VERSION}"
"absl_algorithm_container absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flags absl_flags_marshalling absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_bit_gen_ref absl_random_distributions absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant gpr grpc_unsecure"
- "libcares zlib"
+ "libcares zlib utf8_range"
"-lgrpc++_unsecure"
- "-laddress_sorting -lutf8_range_lib -lupb -lupb_collections_lib"
+ "-laddress_sorting -lupb"
"grpc++_unsecure.pc")
diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in
index 3623f4aa5e..df6ced560e 100644
index 98d8c6d8b9..7cad2abca1 100644
--- a/cmake/gRPCConfig.cmake.in
+++ b/cmake/gRPCConfig.cmake.in
@@ -8,6 +8,7 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules)
@ -66,26 +78,29 @@ index 3623f4aa5e..df6ced560e 100644
# Targets
include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake)
diff --git a/cmake/upb.cmake b/cmake/upb.cmake
index f2a0e508c3..09751f5ef0 100644
index 9156e5f48f..6ff5125938 100644
--- a/cmake/upb.cmake
+++ b/cmake/upb.cmake
@@ -12,9 +12,19 @@
@@ -12,9 +12,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
+if (gRPC_UPB_PROVIDER STREQUAL "module")
+
+set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-gen" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-gen")
+if (0)
set(UPB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/upb)
set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}")
set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-generated" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-generated")
set(_gRPC_UPB_INCLUDE_DIR "${UPB_ROOT_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range")
set(_gRPC_UPB_GRPC_GENERATED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upb-gen" "${CMAKE_CURRENT_SOURCE_DIR}/src/core/ext/upbdefs-gen")
set(_gRPC_UPB_LIBRARIES upb)
+
+elseif(gRPC_UPB_PROVIDER STREQUAL "package")
+else()
+ find_package(upb CONFIG REQUIRED)
+ set(_gRPC_UPB_LIBRARIES upb::fastdecode upb::json upb::upb upb::utf8_range upb::textformat upb::reflection upb::descriptor_upb_proto)
+ set(_gRPC_UPB_INCLUDE_DIR)
+ set(_gRPC_FIND_UPB "if(NOT upb_FOUND)\n find_package(upb CONFIG REQUIRED)\nendif()")
+ add_library(upb_collections_lib ALIAS upb::upb)
+ add_library(upb_json_lib ALIAS upb::upb)
+ add_library(upb_textformat_lib ALIAS upb::upb)
+ add_library(upb ALIAS upb::upb)
+ add_library(utf8_range_lib ALIAS utf8_range::utf8_range)
+endif()
\ No newline at end of file

Просмотреть файл

@ -1,16 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 25990a5d8a..ba8df92858 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -326,6 +326,11 @@ include(cmake/xxhash.cmake)
include(cmake/zlib.cmake)
include(cmake/download_archive.cmake)
+if (ABSL_USE_CXX17)
+ message(STATUS "Found absl uses CXX17, enable CXX17 feature.")
+ set(CMAKE_CXX_STANDARD 17)
+endif()
+
# Setup external proto library at third_party/envoy-api with 2 download URLs
if (NOT EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/third_party/envoy-api)
# Download the archive via HTTP, validate the checksum, and extract to third_party/envoy-api.

Просмотреть файл

@ -1,13 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 48019cce95..1eda700ae8 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23186,7 +23186,7 @@ generate_pkgconfig(
"high performance general RPC framework"
"${gRPC_CORE_VERSION}"
"gpr openssl absl_any_invocable absl_base absl_bind_front absl_cleanup absl_cord absl_core_headers absl_flat_hash_map absl_flat_hash_set absl_function_ref absl_hash absl_inlined_vector absl_memory absl_optional absl_random_random absl_span absl_status absl_statusor absl_str_format absl_strings absl_synchronization absl_time absl_type_traits absl_utility absl_variant"
- "-lgrpc -laddress_sorting -lre2 -lupb -lcares -lz"
+ "-lgrpc -laddress_sorting -lre2 -lupb_textformat -lupb_mini_table -lupb -lupb_collections -lupb_reflection -lupb_extension_registry -lupb_json -lupb_fastdecode -lupb_utf8_range -ldescriptor_upb_proto -lcares -lz"
""
"grpc.pc")

Просмотреть файл

@ -1,5 +1,5 @@
diff --git a/cmake/download_archive.cmake b/cmake/download_archive.cmake
index 820aafafb7..a59b785c7e 100644
index 820aafa..a59b785 100644
--- a/cmake/download_archive.cmake
+++ b/cmake/download_archive.cmake
@@ -19,6 +19,7 @@ file(MAKE_DIRECTORY ${_download_archive_TEMPORARY_DIR})

Просмотреть файл

@ -0,0 +1,12 @@
diff --git a/cmake/gRPCConfig.cmake.in b/cmake/gRPCConfig.cmake.in
index 7cad2abca1..c287f3b413 100644
--- a/cmake/gRPCConfig.cmake.in
+++ b/cmake/gRPCConfig.cmake.in
@@ -12,6 +12,6 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/modules)
# Targets
include(${CMAKE_CURRENT_LIST_DIR}/gRPCTargets.cmake)
-if(NOT CMAKE_CROSSCOMPILING)
+if(@gRPC_BUILD_CODEGEN@)
include(${CMAKE_CURRENT_LIST_DIR}/gRPCPluginTargets.cmake)
endif()

Просмотреть файл

@ -1,12 +0,0 @@
diff --git a/src/core/lib/iomgr/tcp_posix.cc b/src/core/lib/iomgr/tcp_posix.cc
index 72e1b66..8dc1fd1 100644
--- a/src/core/lib/iomgr/tcp_posix.cc
+++ b/src/core/lib/iomgr/tcp_posix.cc
@@ -47,6 +47,7 @@
#include <grpc/support/string_util.h>
#include <grpc/support/sync.h>
#include <grpc/support/time.h>
+#include <absl/strings/str_cat.h>
#include "src/core/lib/address_utils/sockaddr_utils.h"
#include "src/core/lib/debug/event_log.h"

Просмотреть файл

@ -0,0 +1,36 @@
diff --git a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
index dde7570ede..43e06d7a69 100644
--- a/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
+++ b/src/core/ext/filters/client_channel/resolver/dns/c_ares/dns_resolver_ares.cc
@@ -32,6 +32,7 @@
#include "absl/strings/string_view.h"
#include "absl/strings/strip.h"
#include "absl/types/optional.h"
+#include "absl/strings/str_cat.h"
#include <grpc/impl/channel_arg_names.h>
#include <grpc/support/alloc.h>
diff --git a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc
index 74f7392af9..656cdc427b 100644
--- a/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc
+++ b/src/core/lib/event_engine/cf_engine/cfstream_endpoint.cc
@@ -21,6 +21,7 @@
#include "src/core/lib/event_engine/cf_engine/cfstream_endpoint.h"
#include "src/core/lib/event_engine/trace.h"
#include "src/core/lib/gprpp/strerror.h"
+#include "absl/strings/str_cat.h"
namespace grpc_event_engine {
namespace experimental {
diff --git a/src/core/lib/gprpp/windows/directory_reader.cc b/src/core/lib/gprpp/windows/directory_reader.cc
index 790e213e78..103d68a5a3 100644
--- a/src/core/lib/gprpp/windows/directory_reader.cc
+++ b/src/core/lib/gprpp/windows/directory_reader.cc
@@ -28,6 +28,7 @@
#include "absl/status/statusor.h"
#include "absl/strings/string_view.h"
+#include "absl/strings/str_cat.h"
#include <grpc/support/log.h>

Просмотреть файл

@ -5,8 +5,8 @@ endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO grpc/grpc
REF v1.51.1
SHA512 1bc8e7a5a15b2dca88527d111cde398b0dc1921bbc945c6df8225b4225b8ac0b43155bcf743230ce7b5962d1ab948e9363229c98a879b1befc7a939a290fb888
REF "v${VERSION}"
SHA512 91c2406ed4198509ac0d5360b3da6898fa4f40f459eb6fff541faa44cc238eed98fd7489e7ef7a80a6f4a318bc5b9130eaa0ba1beaa358d1c074fc82825648ff
HEAD_REF master
PATCHES
00001-fix-uwp.patch
@ -15,11 +15,9 @@ vcpkg_from_github(
00004-link-gdi32-on-windows.patch
00005-fix-uwp-error.patch
00009-use-system-upb.patch
snprintf.patch
00012-fix-use-cxx17.patch
00014-pkgconfig-upbdefs.patch
00015-disable-download-archive.patch
00016_add_header.patch
00016-fix-plugin-targets.patch
00017-abseil.patch
)
if(NOT TARGET_TRIPLET STREQUAL HOST_TRIPLET)
@ -52,9 +50,7 @@ vcpkg_cmake_configure(
-DgRPC_SSL_PROVIDER=package
-DgRPC_PROTOBUF_PROVIDER=package
-DgRPC_ABSL_PROVIDER=package
-DgRPC_UPB_PROVIDER=package
-DgRPC_RE2_PROVIDER=package
-DgRPC_PROTOBUF_PACKAGE_TYPE=CONFIG
-DgRPC_CARES_PROVIDER=${cares_CARES_PROVIDER}
-DgRPC_BENCHMARK_PROVIDER=none
-DgRPC_INSTALL_BINDIR:STRING=bin
@ -96,4 +92,4 @@ else()
vcpkg_fixup_pkgconfig()
endif()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

Просмотреть файл

@ -1,12 +0,0 @@
diff --git a/src/core/tsi/alts/crypt/aes_gcm.cc b/src/core/tsi/alts/crypt/aes_gcm.cc
index b761224..88a3d6b 100644
--- a/src/core/tsi/alts/crypt/aes_gcm.cc
+++ b/src/core/tsi/alts/crypt/aes_gcm.cc
@@ -19,6 +19,7 @@
#include <grpc/support/port_platform.h>
#include <string.h>
+#include <cstdio>
#include <openssl/bio.h>
#include <openssl/buffer.h>

Просмотреть файл

@ -1,7 +1,6 @@
{
"name": "grpc",
"version-semver": "1.51.1",
"port-version": 3,
"version-semver": "1.60.0",
"description": "gRPC is a modern, open source, high-performance remote procedure call (RPC) framework that can run anywhere. gRPC enables client and server applications to communicate transparently, and simplifies the building of connected systems.",
"homepage": "https://github.com/grpc/grpc",
"license": "Apache-2.0",

Просмотреть файл

@ -4,7 +4,7 @@ ignition_modular_library(
NAME ${PACKAGE_NAME}
REF ${PORT}_${VERSION}
VERSION ${VERSION}
SHA512 8f0c02b76579679d40b16bd19796e8ac84eaace6c70889fc703d4c234970be130ca1dd18f047c0b40acd46e8f9291f199b8558329a75a33fc61c235dfcb79f4d
SHA512 734d4c2eccf42a3a5a665611c44ccb450bf290763bcf8dc169b16c0c5c5c7d7be6b3cb69c69a5ef64a502b411fdb1461f036c660d8d9188146e61cf8f4beead8
OPTIONS
PATCHES
uuid-osx.patch

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "gz-transport12",
"version": "12.2.0",
"version": "12.2.1",
"description": "Transport middleware for robotics",
"license": null,
"dependencies": [

Просмотреть файл

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2eeb011..e8ffcc9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,6 @@ else()
set(PROTOBUF_PURPOSE)
endif()
ign_find_package(IgnProtobuf
- VERSION ${REQ_PROTOBUF_VER}
PKGCONFIG protobuf
PKGCONFIG_VER_COMPARISON >=
REQUIRED

Просмотреть файл

@ -20,4 +20,5 @@ ignition_modular_library(NAME msgs
# Fix linking order of protobuf libraries (backport of https://bitbucket.org/ignitionrobotics/ign-msgs/pull-requests/151)
PATCHES
fix-protobuf-static-link-order.patch
fix-Add_std_string.patch)
fix-Add_std_string.patch
fix-protobuf-version.patch)

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "ignition-msgs1",
"version": "1.0.0",
"port-version": 6,
"port-version": 7,
"description": "Middleware protobuf messages for robotics",
"license": "Apache-2.0",
"dependencies": [

Просмотреть файл

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 62b56b1..5765fd6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,7 +31,6 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======")
# Find Protobuf
set(REQ_PROTOBUF_VER 3)
ign_find_package(IgnProtobuf
- VERSION ${REQ_PROTOBUF_VER}
REQUIRED
COMPONENTS all
PRETTY Protobuf)

Просмотреть файл

@ -6,4 +6,5 @@ ignition_modular_library(NAME msgs
SHA512 645ae5317fb4c3c1b452e98c3581363fc939b5b963dae8a2097bcee97584819bd80357397d88728c5917142dd4ac9beecc335862df44fc06a46d8aa62c54e389
PATCHES
"01-protobuf.patch"
"02-Add_std_string.patch")
"02-Add_std_string.patch"
"03-protobuf-version.patch")

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "ignition-msgs5",
"version": "5.3.0",
"port-version": 6,
"port-version": 7,
"description": "Middleware protobuf messages for robotics",
"license": "Apache-2.0",
"supports": "!(arm | uwp)",

Просмотреть файл

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 27f747a..a02d312 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -58,7 +58,6 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======")
# Find Protobuf
set(REQ_PROTOBUF_VER 3)
ign_find_package(IgnProtobuf
- VERSION ${REQ_PROTOBUF_VER}
REQUIRED
COMPONENTS all
PRETTY Protobuf)

Просмотреть файл

@ -4,4 +4,4 @@
ignition_modular_library(NAME msgs
VERSION "6.0.0"
SHA512 d7b76b61d37bc4bb2fd1319e2e2d8313fbcc52f51253b7c487bcdb7dabffcf50653fc5c709eb356d8b6ae20500c1fd32ffabc1fcfb28dd14346a10030fb6cd46
PATCHES 01-Add_std_string.patch)
PATCHES 01-Add_std_string.patch 02-protobuf-version.patch)

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "ignition-msgs6",
"version": "6.0.0",
"port-version": 5,
"port-version": 6,
"description": "Middleware protobuf messages for robotics",
"license": "Apache-2.0",
"supports": "!(arm | uwp)",

Просмотреть файл

@ -0,0 +1,62 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5453cd07..c00e7329 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -39,7 +39,6 @@ else()
set(PROTOBUF_PURPOSE)
endif()
ign_find_package(IgnProtobuf
- VERSION ${REQ_PROTOBUF_VER}
REQUIRED
PRETTY Protobuf
PURPOSE ${PROTOBUF_PURPOSE})
diff --git a/include/ignition/transport/RepHandler.hh b/include/ignition/transport/RepHandler.hh
index 1163c3eb..e2cb5ca0 100644
--- a/include/ignition/transport/RepHandler.hh
+++ b/include/ignition/transport/RepHandler.hh
@@ -26,7 +26,7 @@
#pragma warning(pop)
#endif
-#if GOOGLE_PROTOBUF_VERSION > 2999999
+#if GOOGLE_PROTOBUF_VERSION > 2999999 && GOOGLE_PROTOBUF_VERSION < 4022000
#include <google/protobuf/stubs/casts.h>
#endif
@@ -127,7 +127,11 @@ namespace ignition
return false;
}
-#if GOOGLE_PROTOBUF_VERSION > 2999999
+#if GOOGLE_PROTOBUF_VERSION >= 4022000
+ auto msgReq =
+ google::protobuf::internal::DownCast<const Req*>(&_msgReq);
+ auto msgRep = google::protobuf::internal::DownCast<Rep*>(&_msgRep);
+#elif GOOGLE_PROTOBUF_VERSION > 2999999
auto msgReq = google::protobuf::down_cast<const Req*>(&_msgReq);
auto msgRep = google::protobuf::down_cast<Rep*>(&_msgRep);
#else
diff --git a/include/ignition/transport/SubscriptionHandler.hh b/include/ignition/transport/SubscriptionHandler.hh
index d9fbd224..22486730 100644
--- a/include/ignition/transport/SubscriptionHandler.hh
+++ b/include/ignition/transport/SubscriptionHandler.hh
@@ -28,7 +28,7 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION >= 3000000
+#if GOOGLE_PROTOBUF_VERSION >= 3000000 && GOOGLE_PROTOBUF_VERSION < 4022000
#include <google/protobuf/stubs/casts.h>
#endif
@@ -198,7 +198,9 @@ namespace ignition
if (!this->UpdateThrottling())
return true;
-#if GOOGLE_PROTOBUF_VERSION >= 3000000
+#if GOOGLE_PROTOBUF_VERSION >= 4022000
+ auto msgPtr = google::protobuf::internal::DownCast<const T*>(&_msg);
+#elif GOOGLE_PROTOBUF_VERSION >= 3000000
auto msgPtr = google::protobuf::down_cast<const T*>(&_msg);
#else
auto msgPtr = google::protobuf::internal::down_cast<const T*>(&_msg);

Просмотреть файл

@ -5,4 +5,5 @@ ignition_modular_library(NAME transport
DISABLE_PKGCONFIG_INSTALL
PATCHES
uuid-osx.patch
fix-protobuf.patch
)

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "ignition-transport4",
"version": "4.0.0",
"port-version": 6,
"port-version": 7,
"description": "Transport middleware for robotics",
"license": null,
"dependencies": [

Просмотреть файл

@ -0,0 +1,62 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cbf24cba..f2ba7ae6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,7 +38,6 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======")
# Find Protobuf
set(REQ_PROTOBUF_VER 3)
ign_find_package(IgnProtobuf
- VERSION ${REQ_PROTOBUF_VER}
REQUIRED
PRETTY Protobuf)
diff --git a/include/ignition/transport/RepHandler.hh b/include/ignition/transport/RepHandler.hh
index e826fd6b..4719aa4b 100644
--- a/include/ignition/transport/RepHandler.hh
+++ b/include/ignition/transport/RepHandler.hh
@@ -26,7 +26,7 @@
#pragma warning(pop)
#endif
-#if GOOGLE_PROTOBUF_VERSION > 2999999
+#if GOOGLE_PROTOBUF_VERSION > 2999999 && GOOGLE_PROTOBUF_VERSION < 4022000
#include <google/protobuf/stubs/casts.h>
#endif
@@ -140,7 +140,11 @@ namespace ignition
return false;
}
-#if GOOGLE_PROTOBUF_VERSION > 2999999
+#if GOOGLE_PROTOBUF_VERSION >= 4022000
+ auto msgReq =
+ google::protobuf::internal::DownCast<const Req*>(&_msgReq);
+ auto msgRep = google::protobuf::internal::DownCast<Rep*>(&_msgRep);
+#elif GOOGLE_PROTOBUF_VERSION > 2999999
auto msgReq = google::protobuf::down_cast<const Req*>(&_msgReq);
auto msgRep = google::protobuf::down_cast<Rep*>(&_msgRep);
#else
diff --git a/include/ignition/transport/SubscriptionHandler.hh b/include/ignition/transport/SubscriptionHandler.hh
index 96811afe..a8d7ebcd 100644
--- a/include/ignition/transport/SubscriptionHandler.hh
+++ b/include/ignition/transport/SubscriptionHandler.hh
@@ -28,7 +28,7 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION >= 3000000
+#if GOOGLE_PROTOBUF_VERSION >= 3000000 && GOOGLE_PROTOBUF_VERSION < 4022000
#include <google/protobuf/stubs/casts.h>
#endif
@@ -211,7 +211,9 @@ namespace ignition
if (!this->UpdateThrottling())
return true;
-#if GOOGLE_PROTOBUF_VERSION >= 3000000
+#if GOOGLE_PROTOBUF_VERSION >= 4022000
+ auto msgPtr = google::protobuf::internal::DownCast<const T*>(&_msg);
+#elif GOOGLE_PROTOBUF_VERSION >= 3000000
auto msgPtr = google::protobuf::down_cast<const T*>(&_msg);
#else
auto msgPtr = google::protobuf::internal::down_cast<const T*>(&_msg);

Просмотреть файл

@ -1,3 +1,6 @@
ignition_modular_library(NAME transport
VERSION "8.1.0"
SHA512 04b4cd954453505398da35b284e7db4b4691d9a705924c41e0082fd20e94176a3eaeae7329fd9992aaa50f90b2d8973c71daf763ccff58aa30d06be1da15189a)
SHA512 04b4cd954453505398da35b284e7db4b4691d9a705924c41e0082fd20e94176a3eaeae7329fd9992aaa50f90b2d8973c71daf763ccff58aa30d06be1da15189a
PATCHES
fix-protobuf.patch
)

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "ignition-transport8",
"version": "8.1.0",
"port-version": 4,
"port-version": 5,
"description": "Transport middleware for robotics",
"license": null,
"dependencies": [

Просмотреть файл

@ -0,0 +1,62 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 084b6daf..a5501b5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,7 +38,6 @@ message(STATUS "\n\n-- ====== Finding Dependencies ======")
# Find Protobuf
set(REQ_PROTOBUF_VER 3)
ign_find_package(IgnProtobuf
- VERSION ${REQ_PROTOBUF_VER}
REQUIRED
PRETTY Protobuf)
diff --git a/include/ignition/transport/RepHandler.hh b/include/ignition/transport/RepHandler.hh
index e826fd6b..4719aa4b 100644
--- a/include/ignition/transport/RepHandler.hh
+++ b/include/ignition/transport/RepHandler.hh
@@ -26,7 +26,7 @@
#pragma warning(pop)
#endif
-#if GOOGLE_PROTOBUF_VERSION > 2999999
+#if GOOGLE_PROTOBUF_VERSION > 2999999 && GOOGLE_PROTOBUF_VERSION < 4022000
#include <google/protobuf/stubs/casts.h>
#endif
@@ -140,7 +140,11 @@ namespace ignition
return false;
}
-#if GOOGLE_PROTOBUF_VERSION > 2999999
+#if GOOGLE_PROTOBUF_VERSION >= 4022000
+ auto msgReq =
+ google::protobuf::internal::DownCast<const Req*>(&_msgReq);
+ auto msgRep = google::protobuf::internal::DownCast<Rep*>(&_msgRep);
+#elif GOOGLE_PROTOBUF_VERSION > 2999999
auto msgReq = google::protobuf::down_cast<const Req*>(&_msgReq);
auto msgRep = google::protobuf::down_cast<Rep*>(&_msgRep);
#else
diff --git a/include/ignition/transport/SubscriptionHandler.hh b/include/ignition/transport/SubscriptionHandler.hh
index 96811afe..a8d7ebcd 100644
--- a/include/ignition/transport/SubscriptionHandler.hh
+++ b/include/ignition/transport/SubscriptionHandler.hh
@@ -28,7 +28,7 @@
#include <google/protobuf/stubs/common.h>
-#if GOOGLE_PROTOBUF_VERSION >= 3000000
+#if GOOGLE_PROTOBUF_VERSION >= 3000000 && GOOGLE_PROTOBUF_VERSION < 4022000
#include <google/protobuf/stubs/casts.h>
#endif
@@ -211,7 +211,9 @@ namespace ignition
if (!this->UpdateThrottling())
return true;
-#if GOOGLE_PROTOBUF_VERSION >= 3000000
+#if GOOGLE_PROTOBUF_VERSION >= 4022000
+ auto msgPtr = google::protobuf::internal::DownCast<const T*>(&_msg);
+#elif GOOGLE_PROTOBUF_VERSION >= 3000000
auto msgPtr = google::protobuf::down_cast<const T*>(&_msg);
#else
auto msgPtr = google::protobuf::internal::down_cast<const T*>(&_msg);

Просмотреть файл

@ -5,4 +5,5 @@ ignition_modular_library(NAME transport
DISABLE_PKGCONFIG_INSTALL
PATCHES
uuid-osx.patch
fix-protobuf.patch
)

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "ignition-transport9",
"version": "9.0.0",
"port-version": 4,
"port-version": 5,
"description": "Transport middleware for robotics",
"license": null,
"dependencies": [

Просмотреть файл

@ -4,6 +4,7 @@ vcpkg_from_github(
REF c81e1d9a0f69cc5b93588dbe330b2af587162c5f
SHA512 d6ddbc49dd40b1f938ae2cd1ea9342cab0a52db46bf7ed6716111a91d0a38acba12ff2e273d457db51fc240d578a5b849af77b53e600482cf52c3b22306f8c45
HEAD_REF master
PATCHES protobuf-linkage.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS FEATURES

Просмотреть файл

@ -0,0 +1,15 @@
diff --git a/libosmscout-import/CMakeLists.txt b/libosmscout-import/CMakeLists.txt
index 36fa3585c..404f61aff 100644
--- a/libosmscout-import/CMakeLists.txt
+++ b/libosmscout-import/CMakeLists.txt
@@ -146,8 +146,8 @@ endif()
if (PROTOBUF_FOUND)
target_include_directories(OSMScoutImport PRIVATE ${Protobuf_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
- target_link_libraries(OSMScoutImport ${Protobuf_LIBRARIES})
- if(WIN32)
+ target_link_libraries(OSMScoutImport protobuf::libprotobuf)
+ if(0)
target_compile_definitions(OSMScoutImport PRIVATE -DPROTOBUF_USE_DLLS)
endif()
target_compile_definitions(OSMScoutImport PRIVATE -DOSMSCOUT_IMPORT_CMAKE_BUILD)

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "libosmscout",
"version": "1.1.1",
"port-version": 4,
"port-version": 5,
"description": "libosmscout offers applications simple, high-level interfaces for offline location and POI lokup, rendering and routing functionalities based on OpenStreetMap (OSM) data.",
"homepage": "http://libosmscout.sourceforge.net/",
"documentation": "http://libosmscout.sourceforge.net/documentation/",

Просмотреть файл

@ -6,8 +6,10 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO google/libprotobuf-mutator
REF "v${VERSION}"
SHA512 cafc59c6c1e26a3e4873ec47f12db290739e98f229a17352c740aa17ac41f1435268eb0c45518b07e5c33280c18da1c4e363a31200569ffe636250e7c904b55e
SHA512 9c752cf2bdbf9228ba5a7c1e7a552ea7e12bda226ad8268e4cb9f135a79aee9c3ff0c1f2dfebe5d011282835a63d3b9cf3b3f642f02a3e00bb0b5eee9580a3dd
HEAD_REF master
PATCHES
protobuf-cmake.patch
)
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_RUNTIME)
@ -17,6 +19,8 @@ vcpkg_cmake_configure(
-DLIB_PROTO_MUTATOR_TESTING=OFF
-DLIB_PROTO_MUTATOR_MSVC_STATIC_RUNTIME=${STATIC_RUNTIME}
-DPKG_CONFIG_PATH=lib/pkgconfig
MAYBE_UNUSED_VARIABLES
LIB_PROTO_MUTATOR_MSVC_STATIC_RUNTIME
)
vcpkg_cmake_install()
@ -25,4 +29,4 @@ vcpkg_fixup_pkgconfig()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

Просмотреть файл

@ -0,0 +1,27 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 321874c..2b4b492 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -20,7 +20,7 @@ add_library(protobuf-mutator
text_format.cc
utf8_fix.cc)
target_link_libraries(protobuf-mutator
- ${Protobuf_LIBRARIES})
+ PUBLIC protobuf::libprotobuf)
set_target_properties(protobuf-mutator PROPERTIES
COMPILE_FLAGS "${NO_FUZZING_FLAGS}"
SOVERSION 0)
diff --git a/src/libfuzzer/CMakeLists.txt b/src/libfuzzer/CMakeLists.txt
index 7100ef1..9863138 100644
--- a/src/libfuzzer/CMakeLists.txt
+++ b/src/libfuzzer/CMakeLists.txt
@@ -16,8 +16,7 @@ add_library(protobuf-mutator-libfuzzer
libfuzzer_mutator.cc
libfuzzer_macro.cc)
target_link_libraries(protobuf-mutator-libfuzzer
- protobuf-mutator
- ${Protobuf_LIBRARIES})
+ PUBLIC protobuf-mutator)
set_target_properties(protobuf-mutator-libfuzzer PROPERTIES
COMPILE_FLAGS "${NO_FUZZING_FLAGS}"
SOVERSION 0)

Просмотреть файл

@ -1,6 +1,6 @@
{
"name": "libprotobuf-mutator",
"version": "1.1",
"version": "1.3",
"description": "Library for structured fuzzing with protobuffers.",
"dependencies": [
"liblzma",

12
ports/marble/cpack.patch Normal file
Просмотреть файл

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 307735839..bfdb50d2f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -356,7 +356,6 @@ add_subdirectory(doc)
add_subdirectory(src)
add_subdirectory(data)
-include(DistTarget)
add_subdirectory(tests)

Просмотреть файл

@ -7,6 +7,8 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
qtfix.patch
protobuf.patch
cpack.patch
)
vcpkg_cmake_configure(

Просмотреть файл

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8f024c2a..307735839 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -109,6 +109,7 @@ endif()
# Find Qt dependencies
find_package(Protobuf)
+set(Protobuf_FOUND 0)
set_package_properties(Protobuf PROPERTIES TYPE OPTIONAL PURPOSE "Parsing of OSM PBF files.")
if(ANDROID)

Просмотреть файл

@ -1,6 +1,7 @@
{
"name": "marble",
"version-string": "24.02.0",
"port-version": 1,
"description": "Marble KDE library",
"homepage": "https://marble.kde.org",
"license": "LGPL-2.1-or-later",

Просмотреть файл

@ -1,4 +1,4 @@
diff --git a/cdk/cmake/DepFindCompression.cmake b/cdk/cmake/DepFindCompression.cmake
diff --git a/cdk/cmake/DepFindCompression.cmake b/cdk/cmake/DepFindCompression.cmake
index f9fe519f..0f893da8 100644
--- a/cdk/cmake/DepFindCompression.cmake
+++ b/cdk/cmake/DepFindCompression.cmake

Просмотреть файл

@ -3,6 +3,7 @@
include(CMakeFindDependencyMacro)
find_dependency(OpenSSL)
find_dependency(Protobuf CONFIG)
include("${CMAKE_CURRENT_LIST_DIR}/unofficial-mysql-connector-cpp-targets.cmake")
check_required_components(mysql-connector-cpp)

Просмотреть файл

@ -8,6 +8,8 @@ vcpkg_from_github(
fix-static-build8.patch
export-targets.patch
dependencies.patch
protobuf-cmake.patch
protobuf-source.patch
)
vcpkg_check_features(
@ -29,9 +31,12 @@ vcpkg_cmake_configure(
OPTIONS
"-DWITH_SSL=${CURRENT_INSTALLED_DIR}"
"-DWITH_LZ4=${CURRENT_INSTALLED_DIR}"
"-DWITH_ZLIB=${CURRENT_INSTALLED_DIR}"
"-DWITH_ZSTD=${CURRENT_INSTALLED_DIR}"
"-DWITH_PROTOBUF=${CURRENT_INSTALLED_DIR}"
"-DWITH_ZLIB=${CURRENT_INSTALLED_DIR}"
"-DProtobuf_DIR=${CURRENT_INSTALLED_DIR}/share/protobuf" # Without these Windows is unable to find protobuf
"-Dabsl_DIR=${CURRENT_INSTALLED_DIR}/share/absl"
"-Dutf8_range_DIR=${CURRENT_INSTALLED_DIR}/share/utf8_range"
"-DProtobuf_PROTOC_EXECUTABLE=${CURRENT_INSTALLED_DIR}/tools/protobuf/protoc"
-DBUILD_STATIC=${BUILD_STATIC}
-DSTATIC_MSVCRT=${STATIC_MSVCRT}
-DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
@ -57,5 +62,4 @@ file(REMOVE
)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

Просмотреть файл

@ -0,0 +1,76 @@
diff --git a/cdk/cmake/DepFindProtobuf.cmake b/cdk/cmake/DepFindProtobuf.cmake
index 730389de..7c3fd78b 100644
--- a/cdk/cmake/DepFindProtobuf.cmake
+++ b/cdk/cmake/DepFindProtobuf.cmake
@@ -44,6 +44,7 @@
#
#
+if(0)
if(TARGET ext::protobuf)
return()
endif()
@@ -64,7 +65,7 @@ add_ext_targets(protobuf
LIBRARY protobuf pb_libprotobuf
EXECUTABLE protoc pb_protoc
)
-
+endif()
# Standard PROTOBUF_GENERATE_CPP modified to our usage
function(mysqlx_protobuf_generate_cpp SRCS HDRS)
@@ -90,7 +91,7 @@ function(mysqlx_protobuf_generate_cpp SRCS HDRS)
"${CMAKE_CURRENT_BINARY_DIR}/protobuf/${FIL_WE}.pb.h"
COMMAND ${CMAKE_COMMAND}
-E make_directory "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
- COMMAND ext::protoc
+ COMMAND protobuf::protoc
ARGS --cpp_out "${CMAKE_CURRENT_BINARY_DIR}/protobuf"
-I ${ABS_PATH} ${ABS_FIL}
diff --git a/cdk/core/CMakeLists.txt b/cdk/core/CMakeLists.txt
index 30f7baf1..2a4a9434 100644
--- a/cdk/core/CMakeLists.txt
+++ b/cdk/core/CMakeLists.txt
@@ -33,6 +33,7 @@ cmake_minimum_required(VERSION 2.8)
#ADD_SUBDIRECTORY(tests)
+find_package(Protobuf CONFIG REQUIRED)
SET(cdk_sources
session.cc
@@ -45,7 +46,7 @@ add_library(cdk STATIC ${cdk_sources} ${HEADERS})
target_link_libraries(cdk
PUBLIC cdk_mysqlx cdk_parser
- PRIVATE ext::protobuf-lite # required by codecc.cc
+ PRIVATE protobuf::libprotobuf-lite # required by codecc.cc
)
add_coverage(cdk)
diff --git a/cdk/protocol/mysqlx/CMakeLists.txt b/cdk/protocol/mysqlx/CMakeLists.txt
index cfc81daf..6c484575 100644
--- a/cdk/protocol/mysqlx/CMakeLists.txt
+++ b/cdk/protocol/mysqlx/CMakeLists.txt
@@ -26,8 +26,9 @@
# along with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-find_dependency(Protobuf)
-find_dependency(Compression)
+include(DepFindCompression)
+find_package(Protobuf CONFIG REQUIRED)
+include(DepFindProtobuf)
include(CheckIncludeFile)
@@ -132,7 +133,7 @@ target_include_directories(cdk_proto_mysqlx PRIVATE
if(use_full_protobuf)
target_link_libraries(cdk_proto_mysqlx PRIVATE ext::protobuf)
else()
- target_link_libraries(cdk_proto_mysqlx PRIVATE ext::protobuf-lite)
+ target_link_libraries(cdk_proto_mysqlx PRIVATE protobuf::libprotobuf-lite)
endif()
if (WIN32)

Просмотреть файл

@ -0,0 +1,61 @@
diff --git a/cdk/protocol/mysqlx/protocol.cc b/cdk/protocol/mysqlx/protocol.cc
index d4589c27..c61deca4 100644
--- a/cdk/protocol/mysqlx/protocol.cc
+++ b/cdk/protocol/mysqlx/protocol.cc
@@ -117,18 +117,15 @@ namespace mysqlx {
Protobuf log handler initialization.
*/
-static void log_handler(LogLevel level, const char* filename, int line, const std::string& message);
#ifdef _WIN32
BOOL CALLBACK log_handler_init(PINIT_ONCE, PVOID, PVOID*)
{
- SetLogHandler(&log_handler);
return TRUE;
}
#else
static void log_handler_init()
{
- SetLogHandler(log_handler);
}
#endif
@@ -289,37 +286,6 @@ Message* mk_message(Protocol_side side, msg_type_t msg_type)
situation occurs in Protobuf (such as parsing error etc).
*/
-static void log_handler(
- LogLevel level, const char* /*filename*/, int /*line*/,
- const std::string& message
-)
-{
- switch(level)
- {
- case LOGLEVEL_FATAL:
- case LOGLEVEL_ERROR:
- /*
- With this code the error description is:
-
- MMM: Protobuf error (cdk:NNN)
-
- where MMM is the message and NNN is the protbuf error code.
-
- TODO: Change description to:
-
- Protobuf error: MMM (cdk:NNN)
- */
- throw_error(cdkerrc::protobuf_error, message);
-
- case LOGLEVEL_WARNING:
- case LOGLEVEL_INFO:
- default:
- {
- // just ignore for now
- // TODO: this could be used for logging in the future
- }
- }
-}
/*
Implementation of protobuf's ZeroCopyOutputStream which stores

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "mysql-connector-cpp",
"version": "8.0.32",
"port-version": 1,
"port-version": 2,
"description": "This is a release of MySQL Connector/C++, the C++ interface for communicating with MySQL servers.",
"homepage": "https://github.com/mysql/mysql-connector-cpp",
"license": null,

Просмотреть файл

@ -10,6 +10,7 @@ vcpkg_from_github(
remove-tool-debug-suffix.patch
remove-lerc-gltf.patch
export-plugins.patch
protobuf.patch
)
if("tools" IN_LIST FEATURES)
@ -54,7 +55,6 @@ vcpkg_cmake_configure(
OPTIONS
${FEATURE_OPTIONS}
-DLIB_POSTFIX=
-DCMAKE_CXX_STANDARD=11
-DOSGEARTH_BUILD_SHARED_LIBS=${BUILD_SHARED}
-DOSGEARTH_BUILD_EXAMPLES=OFF
-DOSGEARTH_BUILD_TESTS=OFF
@ -66,6 +66,8 @@ vcpkg_cmake_configure(
-DCMAKE_JOB_POOL_LINK=console # Serialize linking to avoid OOM
OPTIONS_DEBUG
-DOSGEARTH_BUILD_TOOLS=OFF
MAYBE_UNUSED_VARIABLES
LIB_POSTFIX
)
vcpkg_cmake_install()
@ -95,5 +97,4 @@ endif()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# Handle copyright
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")

Просмотреть файл

@ -0,0 +1,74 @@
diff --git a/CMakeModules/OsgEarthMacroUtils.cmake b/CMakeModules/OsgEarthMacroUtils.cmake
index ccf209f6a..e961531f8 100644
--- a/CMakeModules/OsgEarthMacroUtils.cmake
+++ b/CMakeModules/OsgEarthMacroUtils.cmake
@@ -94,28 +94,28 @@ MACRO(LINK_WITH_VARIABLES TRGTNAME)
FOREACH(varname ${ARGN})
string(REPLACE "_LIBRARY" "_LIBRARIES" lwv_libraries "${varname}")
if(DEFINED ${lwv_libraries})
- TARGET_LINK_LIBRARIES(${TRGTNAME} ${${lwv_libraries}})
+ TARGET_LINK_LIBRARIES(${TRGTNAME} PUBLIC ${${lwv_libraries}})
continue()
endif()
IF(${varname}_DEBUG)
IF(${varname}_RELEASE)
- TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}_RELEASE}" debug "${${varname}_DEBUG}")
+ TARGET_LINK_LIBRARIES(${TRGTNAME} PUBLIC optimized "${${varname}_RELEASE}" debug "${${varname}_DEBUG}")
ELSE(${varname}_RELEASE)
- TARGET_LINK_LIBRARIES(${TRGTNAME} optimized "${${varname}}" debug "${${varname}_DEBUG}")
+ TARGET_LINK_LIBRARIES(${TRGTNAME} PUBLIC optimized "${${varname}}" debug "${${varname}_DEBUG}")
ENDIF(${varname}_RELEASE)
ELSE(${varname}_DEBUG)
- TARGET_LINK_LIBRARIES(${TRGTNAME} ${${varname}} )
+ TARGET_LINK_LIBRARIES(${TRGTNAME} PUBLIC ${${varname}} )
ENDIF(${varname}_DEBUG)
ENDFOREACH(varname)
ENDMACRO(LINK_WITH_VARIABLES TRGTNAME)
MACRO(LINK_INTERNAL TRGTNAME)
- TARGET_LINK_LIBRARIES(${TRGTNAME} ${ARGN})
+ TARGET_LINK_LIBRARIES(${TRGTNAME} PUBLIC ${ARGN})
ENDMACRO(LINK_INTERNAL TRGTNAME)
MACRO(LINK_EXTERNAL TRGTNAME)
FOREACH(LINKLIB ${ARGN})
- TARGET_LINK_LIBRARIES(${TRGTNAME} "${LINKLIB}" )
+ TARGET_LINK_LIBRARIES(${TRGTNAME} PUBLIC "${LINKLIB}" )
ENDFOREACH(LINKLIB)
ENDMACRO(LINK_EXTERNAL TRGTNAME)
@@ -179,7 +179,7 @@ MACRO(SETUP_LINK_LIBRARIES)
ENDIF(TARGET_LIBRARIES_VARS)
FOREACH(LINKLIB ${TARGET_EXTERNAL_LIBRARIES})
- TARGET_LINK_LIBRARIES(${TARGET_TARGETNAME} ${LINKLIB})
+ TARGET_LINK_LIBRARIES(${TARGET_TARGETNAME} PUBLIC ${LINKLIB})
ENDFOREACH(LINKLIB)
ENDMACRO(SETUP_LINK_LIBRARIES)
diff --git a/src/applications/osgearth_viewerIOS/CMakeLists.txt b/src/applications/osgearth_viewerIOS/CMakeLists.txt
index e66fd25c7..9db76784e 100644
--- a/src/applications/osgearth_viewerIOS/CMakeLists.txt
+++ b/src/applications/osgearth_viewerIOS/CMakeLists.txt
@@ -1,7 +1,7 @@
MACRO(LINK_OSG_STATIC_PLUGINS)
FOREACH(LINKLIB ${OSG_STATIC_PLUGINS})
SET(OSG_PLUGINS_PATH "${OSG_DIR}/lib")
- TARGET_LINK_LIBRARIES(${TARGET_TARGETNAME} optimized "${OSG_PLUGINS_PATH}/lib${LINKLIB}.a" debug "${OSG_PLUGINS_PATH}/lib${LINKLIB}${CMAKE_DEBUG_POSTFIX}.a")
+ TARGET_LINK_LIBRARIES(${TARGET_TARGETNAME} PUBLIC optimized "${OSG_PLUGINS_PATH}/lib${LINKLIB}.a" debug "${OSG_PLUGINS_PATH}/lib${LINKLIB}${CMAKE_DEBUG_POSTFIX}.a")
ENDFOREACH(LINKLIB)
ENDMACRO(LINK_OSG_STATIC_PLUGINS)
diff --git a/src/osgEarth/CMakeLists.txt b/src/osgEarth/CMakeLists.txt
index e320eb340..cd711a927 100644
--- a/src/osgEarth/CMakeLists.txt
+++ b/src/osgEarth/CMakeLists.txt
@@ -943,7 +943,7 @@ IF(Protobuf_FOUND AND Protobuf_PROTOC_EXECUTABLE)
ADD_DEFINITIONS(-DPROTOBUF_USE_DLLS)
ENDIF()
- LINK_WITH_VARIABLES(${LIB_NAME} Protobuf_LIBRARIES)
+ TARGET_LINK_LIBRARIES(${LIB_NAME} PUBLIC protobuf::libprotobuf)
ENDIF()
# ESRI FileGeodatabase?

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "osgearth",
"version": "3.4",
"port-version": 1,
"port-version": 2,
"description": "osgEarth - Dynamic map generation toolkit for OpenSceneGraph Copyright 2021 Pelican Mapping.",
"homepage": "https://github.com/gwaldron/osgearth",
"license": "LGPL-3.0-or-later",

Просмотреть файл

@ -59,6 +59,7 @@ vcpkg_from_github(
add-tools-option.patch
fix-build.patch
fix-configure.patch
protobuf-version.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")

Просмотреть файл

@ -0,0 +1,13 @@
diff --git a/ThirdParty/protobuf/CMakeLists.txt b/ThirdParty/protobuf/CMakeLists.txt
index 811dc3721b..02f26ae757 100644
--- a/ThirdParty/protobuf/CMakeLists.txt
+++ b/ThirdParty/protobuf/CMakeLists.txt
@@ -40,7 +40,7 @@ vtk_module_third_party(
STANDARD_INCLUDE_DIRS
EXTERNAL
PACKAGE Protobuf
- VERSION "3.4"
+ CONFIG_MODE
TARGETS protobuf::libprotobuf
STANDARD_INCLUDE_DIRS)

Просмотреть файл

@ -1,7 +1,7 @@
{
"name": "paraview",
"version": "5.12.1",
"port-version": 1,
"port-version": 2,
"description": "VTK-based Data Analysis and Visualization Application",
"homepage": "https://www.paraview.org/",
"license": "BSD-3-Clause",

Просмотреть файл

@ -1,48 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 04cb3303a..608c580be 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -242,12 +242,12 @@ endif (protobuf_BUILD_SHARED_LIBS)
if (MSVC)
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# Build with multiple processes
- add_definitions(/MP)
+ add_compile_options(/MP)
endif()
# Set source file and execution character sets to UTF-8
- add_definitions(/utf-8)
+ add_compile_options(/utf-8)
# MSVC warning suppressions
- add_definitions(
+ add_compile_options(
/wd4065 # switch statement contains 'default' but no 'case' labels
/wd4244 # 'conversion' conversion from 'type1' to 'type2', possible loss of data
/wd4251 # 'identifier' : class 'type' needs to have dll-interface to be used by clients of class 'type2'
@@ -262,23 +262,17 @@ if (MSVC)
/wd4996 # The compiler encountered a deprecated declaration.
)
# Allow big object
- add_definitions(/bigobj)
+ add_compile_options(/bigobj)
string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR})
string(REPLACE "/" "\\" PROTOBUF_BINARY_WIN32_PATH ${protobuf_BINARY_DIR})
string(REPLACE "." "," protobuf_RC_FILEVERSION "${protobuf_VERSION}")
configure_file(${protobuf_SOURCE_DIR}/cmake/extract_includes.bat.in extract_includes.bat)
# Suppress linker warnings about files with no symbols defined.
- set(CMAKE_STATIC_LINKER_FLAGS "${CMAKE_STATIC_LINKER_FLAGS} /ignore:4221")
+ string(APPEND CMAKE_STATIC_LINKER_FLAGS " /ignore:4221")
- if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
- # Configure Resource Compiler
- enable_language(RC)
- # use English language (0x409) in resource compiler
- set(rc_flags "/l0x409")
- # fix rc.exe invocations because of usage of add_definitions()
- set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> ${rc_flags} <DEFINES> /fo<OBJECT> <SOURCE>")
- endif()
+ # use English language (0x409) in resource compiler
+ string(APPEND CMAKE_RC_FLAGS " -l0x409")
# Generate the version.rc file used elsewhere.
configure_file(${protobuf_SOURCE_DIR}/cmake/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)

Просмотреть файл

@ -1,9 +1,9 @@
diff --git a/src/google/protobuf/compiler/command_line_interface.cc b/src/google/protobuf/compiler/command_line_interface.cc
index 5e9a2c4..8eaa6e0 100644
index f9e9666..d453a4c 100644
--- a/src/google/protobuf/compiler/command_line_interface.cc
+++ b/src/google/protobuf/compiler/command_line_interface.cc
@@ -261,12 +261,15 @@ void AddDefaultProtoPaths(
std::pair<std::string, std::string>("", path + "/include"));
@@ -280,12 +280,15 @@ void AddDefaultProtoPaths(
paths->emplace_back("", std::move(include_path));
return;
}
- // Check if the upper level directory has an "include" subdirectory.
@ -16,6 +16,6 @@ index 5e9a2c4..8eaa6e0 100644
}
path = path.substr(0, pos);
+ }
if (IsInstalledProtoPath(path + "/include")) {
paths->push_back(
std::pair<std::string, std::string>("", path + "/include"));
include_path = absl::StrCat(path, "/include");
if (IsInstalledProtoPath(include_path)) {
paths->emplace_back("", std::move(include_path));

Просмотреть файл

@ -1,8 +1,8 @@
diff --git a/cmake/install.cmake b/cmake/install.cmake
index 825cb25..4f453d6 100644
index 998c2e31a..233f9e400 100644
--- a/cmake/install.cmake
+++ b/cmake/install.cmake
@@ -32,7 +32,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
@@ -49,7 +49,7 @@ if (protobuf_BUILD_PROTOC_BINARIES)
install(TARGETS protoc EXPORT protobuf-targets
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc
BUNDLE DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT protoc)
@ -11,3 +11,11 @@ index 825cb25..4f453d6 100644
set_property(TARGET protoc
PROPERTY INSTALL_RPATH "$ORIGIN/../${CMAKE_INSTALL_LIBDIR}")
elseif (APPLE)
@@ -68,7 +68,6 @@ set(protobuf_HEADERS
${cpp_features_proto_proto_srcs}
${descriptor_proto_proto_srcs}
${plugin_proto_proto_srcs}
- ${java_features_proto_proto_srcs}
)
foreach(_header ${protobuf_HEADERS})
string(FIND ${_header} "${protobuf_SOURCE_DIR}/src" _find_src)

Просмотреть файл

@ -0,0 +1,48 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4137ce2e9..f1289e08a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -294,6 +294,7 @@ endif (protobuf_BUILD_TESTS)
include(${protobuf_SOURCE_DIR}/cmake/abseil-cpp.cmake)
if (protobuf_BUILD_PROTOBUF_BINARIES)
+ find_package(utf8_range CONFIG REQUIRED)
include(${protobuf_SOURCE_DIR}/cmake/utf8_range.cmake)
include(${protobuf_SOURCE_DIR}/cmake/libprotobuf-lite.cmake)
if (NOT DEFINED protobuf_LIB_PROTOBUF_LITE)
diff --git a/cmake/libprotobuf-lite.cmake b/cmake/libprotobuf-lite.cmake
index f343458cf..f4b1e0faa 100644
--- a/cmake/libprotobuf-lite.cmake
+++ b/cmake/libprotobuf-lite.cmake
@@ -42,4 +42,4 @@ set_target_properties(libprotobuf-lite PROPERTIES
)
add_library(protobuf::libprotobuf-lite ALIAS libprotobuf-lite)
-target_link_libraries(libprotobuf-lite PRIVATE utf8_validity)
+target_link_libraries(libprotobuf-lite PRIVATE utf8_range::utf8_validity)
diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake
index 422754a1a..fa9956685 100644
--- a/cmake/libprotobuf.cmake
+++ b/cmake/libprotobuf.cmake
@@ -45,4 +45,4 @@ set_target_properties(libprotobuf PROPERTIES
)
add_library(protobuf::libprotobuf ALIAS libprotobuf)
-target_link_libraries(libprotobuf PRIVATE utf8_validity)
+target_link_libraries(libprotobuf PRIVATE utf8_range::utf8_validity)
diff --git a/cmake/utf8_range.cmake b/cmake/utf8_range.cmake
index f411a8c5b..21bf8235b 100644
--- a/cmake/utf8_range.cmake
+++ b/cmake/utf8_range.cmake
@@ -1,4 +1,4 @@
-if (NOT TARGET utf8_range)
+if (0)
set(utf8_range_ENABLE_TESTS OFF CACHE BOOL "Disable utf8_range tests")
if (NOT EXISTS "${protobuf_SOURCE_DIR}/third_party/utf8_range/CMakeLists.txt")
@@ -12,4 +12,4 @@ if (NOT TARGET utf8_range)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/utf8_range)
endif ()
-set(_protobuf_FIND_UTF8_RANGE "if(NOT TARGET utf8_range)\n find_package(utf8_range CONFIG)\nendif()")
+set(_protobuf_FIND_UTF8_RANGE "if(NOT TARGET utf8_range::utf8_range)\n find_package(utf8_range CONFIG)\nendif()")

Просмотреть файл

@ -1,15 +1,13 @@
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO protocolbuffers/protobuf
REF v3.21.12
SHA512 152f8441c325e808b942153c15e82fdb533d5273b50c25c28916ec568ada880f79242bb61ee332ac5fb0d20f21239ed6f8de02ef6256cc574b1fc354d002c6b0
REF "v${VERSION}"
SHA512 ce81add9d978a6b63d4205715eac5084e81a6753da1f6c6bad6493e60253215901bffc4a60d704a873333f2b9f94fd86cb7eb5b293035f2268c12692bd808bac
HEAD_REF master
PATCHES
fix-static-build.patch
fix-default-proto-file-path.patch
compile_options.patch
fix-utf8-range.patch
)
string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" protobuf_BUILD_PROTOC_BINARIES)
@ -38,10 +36,12 @@ endif()
file(REMOVE_RECURSE
"${SOURCE_PATH}/csharp"
"${SOURCE_PATH}/java"
"${SOURCE_PATH}/lua"
"${SOURCE_PATH}/objectivec"
"${SOURCE_PATH}/php"
"${SOURCE_PATH}/python"
"${SOURCE_PATH}/ruby"
"${SOURCE_PATH}/rust"
)
vcpkg_cmake_configure(
@ -53,46 +53,20 @@ vcpkg_cmake_configure(
-DCMAKE_INSTALL_CMAKEDIR:STRING=share/protobuf
-Dprotobuf_BUILD_PROTOC_BINARIES=${protobuf_BUILD_PROTOC_BINARIES}
-Dprotobuf_BUILD_LIBPROTOC=${protobuf_BUILD_LIBPROTOC}
-Dprotobuf_ABSL_PROVIDER=package
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
# It appears that at this point the build hasn't actually finished. There is probably
# a process spawned by the build, therefore we need to wait a bit.
function(protobuf_try_remove_recurse_wait PATH_TO_REMOVE)
file(REMOVE_RECURSE ${PATH_TO_REMOVE})
if (EXISTS "${PATH_TO_REMOVE}")
execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 5)
file(REMOVE_RECURSE ${PATH_TO_REMOVE})
endif()
endfunction()
protobuf_try_remove_recurse_wait("${CURRENT_PACKAGES_DIR}/debug/include")
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-release.cmake"
"\${_IMPORT_PREFIX}/bin/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}"
"\${_IMPORT_PREFIX}/tools/protobuf/protoc${VCPKG_HOST_EXECUTABLE_SUFFIX}"
IGNORE_UNCHANGED
)
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
file(READ "${CURRENT_PACKAGES_DIR}/debug/share/protobuf/protobuf-targets-debug.cmake" DEBUG_MODULE)
string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" DEBUG_MODULE "${DEBUG_MODULE}")
string(REPLACE "\${_IMPORT_PREFIX}/debug/bin/protoc${EXECUTABLE_SUFFIX}" "\${_IMPORT_PREFIX}/tools/protobuf/protoc${EXECUTABLE_SUFFIX}" DEBUG_MODULE "${DEBUG_MODULE}")
file(WRITE "${CURRENT_PACKAGES_DIR}/share/protobuf/protobuf-targets-debug.cmake" "${DEBUG_MODULE}")
endif()
protobuf_try_remove_recurse_wait("${CURRENT_PACKAGES_DIR}/debug/share")
if(protobuf_BUILD_PROTOC_BINARIES)
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_copy_tools(TOOL_NAMES protoc AUTO_CLEAN)
else()
vcpkg_copy_tools(TOOL_NAMES protoc protoc-${VERSION}.0 AUTO_CLEAN)
string(REPLACE "." ";" VERSION_LIST ${VERSION})
list(GET VERSION_LIST 1 VERSION_MINOR)
list(GET VERSION_LIST 2 VERSION_PATCH)
vcpkg_copy_tools(TOOL_NAMES protoc protoc-${VERSION_MINOR}.${VERSION_PATCH}.0 AUTO_CLEAN)
endif()
else()
file(COPY "${CURRENT_HOST_INSTALLED_DIR}/tools/${PORT}" DESTINATION "${CURRENT_PACKAGES_DIR}/tools")
@ -100,7 +74,7 @@ endif()
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/protobuf-config.cmake"
"if(protobuf_MODULE_COMPATIBLE)"
"if(ON)"
"if(1)"
)
if(NOT protobuf_BUILD_LIBPROTOC)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/share/${PORT}/protobuf-module.cmake"
@ -109,15 +83,12 @@ if(NOT protobuf_BUILD_LIBPROTOC)
)
endif()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
protobuf_try_remove_recurse_wait("${CURRENT_PACKAGES_DIR}/bin")
protobuf_try_remove_recurse_wait("${CURRENT_PACKAGES_DIR}/debug/bin")
endif()
vcpkg_cmake_config_fixup()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/google/protobuf/stubs/platform_macros.h"
"\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_"
"\#ifndef PROTOBUF_USE_DLLS\n\#define PROTOBUF_USE_DLLS\n\#endif // PROTOBUF_USE_DLLS\n\n\#endif // GOOGLE_PROTOBUF_PLATFORM_MACROS_H_"
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/google/protobuf/port_def.inc"
"\#ifdef PROTOBUF_PORT_"
"\#ifndef PROTOBUF_USE_DLLS\n\#define PROTOBUF_USE_DLLS\n\#endif // PROTOBUF_USE_DLLS\n\n\#ifdef PROTOBUF_PORT_"
)
endif()
@ -128,23 +99,25 @@ function(replace_package_string package)
set(release_file "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${package}.pc")
if(EXISTS "${release_file}")
vcpkg_replace_string("${release_file}" "absl_abseil_dll" "abseil_dll" IGNORE_UNCHANGED)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_replace_string(${release_file} "-l${package}" "-llib${package}")
vcpkg_replace_string("${release_file}" "-l${package}" "-llib${package}" IGNORE_UNCHANGED)
endif()
endif()
if(EXISTS "${debug_file}")
vcpkg_replace_string("${debug_file}" "absl_abseil_dll" "abseil_dll" IGNORE_UNCHANGED)
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_replace_string(${debug_file} "-l${package}" "-llib${package}d")
vcpkg_replace_string("${debug_file}" "-l${package}" "-llib${package}d" IGNORE_UNCHANGED)
else()
vcpkg_replace_string(${debug_file} "-l${package}" "-l${package}d")
vcpkg_replace_string("${debug_file}" "-l${package}" "-l${package}d" IGNORE_UNCHANGED)
endif()
endif()
endfunction()
set(packages protobuf protobuf-lite)
foreach(package IN LISTS packages)
replace_package_string(${package})
replace_package_string("${package}")
endforeach()
@ -155,4 +128,7 @@ if(NOT protobuf_BUILD_PROTOC_BINARIES)
endif()
configure_file("${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" "${CURRENT_PACKAGES_DIR}/share/${PORT}/vcpkg-cmake-wrapper.cmake" @ONLY)
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/include")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

Просмотреть файл

@ -1,16 +1,3 @@
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.3)
cmake_policy(PUSH)
cmake_policy(SET CMP0057 NEW)
if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS)
if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static")
set(Protobuf_USE_STATIC_LIBS ON)
else()
set(Protobuf_USE_STATIC_LIBS OFF)
endif()
endif()
cmake_policy(POP)
endif()
find_program(Protobuf_PROTOC_EXECUTABLE NAMES protoc PATHS "${CMAKE_CURRENT_LIST_DIR}/../../../@HOST_TRIPLET@/tools/protobuf" NO_DEFAULT_PATH)
_find_package(${ARGS})
_find_package(${ARGS} CONFIG)

Просмотреть файл

@ -1,15 +1,16 @@
{
"name": "protobuf",
"version": "3.21.12",
"port-version": 4,
"version": "4.25.1",
"description": "Google's language-neutral, platform-neutral, extensible mechanism for serializing structured data.",
"homepage": "https://github.com/protocolbuffers/protobuf",
"license": "BSD-3-Clause",
"dependencies": [
"abseil",
{
"name": "protobuf",
"host": true
},
"utf8-range",
{
"name": "vcpkg-cmake",
"host": true

Просмотреть файл

@ -0,0 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b004653..4b7abd9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,7 +88,6 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
# ?? Don't have this to test with
else() # GCC or Clang are mostly compatible:
# Turn on warnings and enable warnings-as-errors:
- add_compile_options(-Wall -Wformat-security -Wvla -Werror)
# Turn off certain warnings that are too much pain for too little gain:
add_compile_options(-Wno-sign-compare -Wno-deprecated-declarations -Wno-error=cpp)
if (CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" OR APPLE)

Просмотреть файл

@ -4,6 +4,8 @@ vcpkg_from_github(
REF "v${VERSION}"
SHA512 9ee1b8d057298079c58c10226dbb07676eb94a11e7aa7b725dd9e0dd4e61e0af7127cda93c8651921fbbf00b91b89e28a88fb9edf3270360886319e94f672e12
HEAD_REF main
PATCHES
disable-warnings.patch
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC_LIB)

Просмотреть файл

@ -1,6 +1,7 @@
{
"name": "pulsar-client-cpp",
"version": "3.5.1",
"port-version": 1,
"description": "The Apache Pulsar C++ library",
"homepage": "https://github.com/apache/pulsar-client-cpp",
"license": "Apache-2.0",

Просмотреть файл

@ -1,11 +0,0 @@
diff --git a/cmake/ShogunConfig.cmake.in b/cmake/ShogunConfig.cmake.in
index e8e8035..a5097cb 100644
--- a/cmake/ShogunConfig.cmake.in
+++ b/cmake/ShogunConfig.cmake.in
@@ -2,5 +2,5 @@
set_and_check(shogun_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
-include("@PACKAGE_CONFIG_PACKAGE_DIR@/ShogunTargets.cmake")
+include("@PACKAGE_CONFIG_PACKAGE_DIR@/../../../share/shogun/ShogunTargets.cmake")
check_required_components(shogun)

Просмотреть файл

@ -1,21 +1,19 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6c48bed..6f97c8b 100644
index cb06e0cd3..e207fd5ef 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -60,8 +60,8 @@ SET(SYSTEM_C_FLAGS "${CMAKE_C_FLAGS}")
@@ -113,8 +113,6 @@ SET(SYSTEM_C_FLAGS "${CMAKE_C_FLAGS}")
SET(SYSTEM_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
STRING(TOUPPER "${CMAKE_BUILD_TYPE}" BUILD_TYPE_UC)
IF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
- SET(CMAKE_C_FLAGS "")
- SET(CMAKE_CXX_FLAGS "")
+# SET(CMAKE_C_FLAGS "")
+# SET(CMAKE_CXX_FLAGS "")
ENDIF(NOT ("${BUILD_TYPE_UC}" STREQUAL "DISTRIBUTION"))
# CCACHE
@@ -184,12 +184,12 @@ SET(SWIG_CXX_COMPILER_FLAGS "-O0 -g")
SET(CMAKE_C_FLAGS "${COMPILER_WARNINGS} ${CMAKE_C_FLAGS}")
SET(CMAKE_CXX_FLAGS "${COMPILER_WARNINGS} ${CMAKE_CXX_FLAGS}")
# compilation cache
@@ -250,12 +248,6 @@ ELSEIF(${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
SET(RELEASE_COMPILER_FLAGS "-funroll-loops")
ENDIF()
IF(MSVC)
- SET(CMAKE_C_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}")
- SET(CMAKE_CXX_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}")
@ -23,17 +21,11 @@ index 6c48bed..6f97c8b 100644
- SET(CMAKE_CXX_FLAGS_DISTRIBUTION "/Ot")
- SET(CMAKE_C_FLAGS_DEBUG "/DEBUG /Od /Zi")
- SET(CMAKE_CXX_FLAGS_DEBUG "/DEBUG /Od /Zi")
+ # SET(CMAKE_C_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}")
+ # SET(CMAKE_CXX_FLAGS_RELEASE "/O2 ${RELEASE_COMPILER_FLAGS}")
+ # SET(CMAKE_C_FLAGS_DISTRIBUTION "/Ot")
+ # SET(CMAKE_CXX_FLAGS_DISTRIBUTION "/Ot")
+ # SET(CMAKE_C_FLAGS_DEBUG "/DEBUG /Od /Zi")
+ # SET(CMAKE_CXX_FLAGS_DEBUG "/DEBUG /Od /Zi")
add_compile_options("/bigobj")
SET(SWIG_CXX_COMPILER_FLAGS "/DEBUG /Od /Zi")
ELSE()
SET(CMAKE_C_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}")
diff --git a/cmake/version.cmake b/cmake/version.cmake
index fbca111..f6847f7 100644
index f588caef3..204bc0c27 100644
--- a/cmake/version.cmake
+++ b/cmake/version.cmake
@@ -5,7 +5,7 @@ SET(MAINVERSION ${VERSION})
@ -41,15 +33,23 @@ index fbca111..f6847f7 100644
SET(EXTRA "")
-IF(EXISTS "${ROOT_DIR}/.git/")
+IF(EXISTS "${ROOT_DIR}/.git/" AND FALSE)
+IF(0)
FIND_PACKAGE(Git QUIET)
IF (NOT GIT_FOUND)
MESSAGE(FATAL_ERROR "The source is checked out from a git repository, but cannot find git executable!")
diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt
index 9e79786..fd76961 100644
index 20c4b4fa6..8fcbd87ed 100644
--- a/src/shogun/CMakeLists.txt
+++ b/src/shogun/CMakeLists.txt
@@ -145,7 +145,7 @@ endif()
@@ -42,7 +42,6 @@ ELSE()
ENDIF()
set(INCLUDE_INSTALL_DIR include)
set(THIRD_PARTY_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/third_party)
-set(SHOGUN_CLING_LIBRARY_DIR "\"${CMAKE_INSTALL_PREFIX}/${SHOGUN_LIB_INSTALL}\"")
if (MSVC OR BUILD_BENCHMARKS)
SET(LIBSHOGUN_BUILD_STATIC ON
@@ -159,7 +158,7 @@ ENDIF()
# add target for static library if enabled
if (LIBSHOGUN_BUILD_STATIC)
add_library(shogun-static STATIC $<TARGET_OBJECTS:libshogun> ${CMAKE_CURRENT_BINARY_DIR}/lib/config.h)
@ -58,16 +58,36 @@ index 9e79786..fd76961 100644
target_include_directories(shogun-static PUBLIC
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src>
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
@@ -492,10 +492,12 @@ ELSE()
ENDIF()
@@ -441,7 +440,7 @@ if (NOT RapidJSON_FOUND)
endif()
SHOGUN_INCLUDE_DIRS(SCOPE PRIVATE ${RAPIDJSON_INCLUDE_DIRS})
-include(external/bitsery)
+find_package(bitsery)
SHOGUN_INCLUDE_DIRS(SCOPE PRIVATE ${BITSERY_INCLUDE_DIR})
if (NOT WIN32)
@@ -631,10 +630,6 @@ INSTALL(
PATTERN ".settings" EXCLUDE)
# set the desidered targets to be installed
+if(NOT INSTALL_TARGETS)
set(INSTALL_TARGETS shogun)
if (LIBSHOGUN_BUILD_STATIC)
LIST(APPEND INSTALL_TARGETS shogun-static)
endif()
+endif()
-set(INSTALL_TARGETS shogun)
-if (LIBSHOGUN_BUILD_STATIC)
- LIST(APPEND INSTALL_TARGETS shogun-static)
-endif()
INSTALL(
TARGETS ${INSTALL_TARGETS}
@@ -645,10 +640,10 @@ INSTALL(
INCLUDES DESTINATION ${INCLUDE_INSTALL_DIR}
)
-file(TO_CMAKE_PATH ${SHOGUN_LIB_INSTALL}/cmake/shogun CONFIG_PACKAGE_DIR)
+file(TO_CMAKE_PATH share/shogun CONFIG_PACKAGE_DIR)
configure_package_config_file(
${CMAKE_SOURCE_DIR}/cmake/ShogunConfig.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/ShogunConfig.cmake
- INSTALL_DESTINATION ${SHOGUN_LIB_INSTALL}/cmake/shogun
+ INSTALL_DESTINATION share/shogun
PATH_VARS INCLUDE_INSTALL_DIR CONFIG_PACKAGE_DIR)
write_basic_package_version_file(

Просмотреть файл

@ -1,37 +1,57 @@
diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt
index 31a0d2c7b..e700bd7c7 100644
--- a/src/shogun/CMakeLists.txt
+++ b/src/shogun/CMakeLists.txt
@@ -307,7 +307,7 @@ IF(NOT EIGEN3_FOUND)
)
ELSE()
# https://github.com/shogun-toolbox/shogun/issues/4870
- IF(${EIGEN3_VERSION_STRING} VERSION_GREATER 3.3.9)
+ IF(0)
MESSAGE(FATAL_ERROR "The system Eigen3 version ${EIGEN3_VERSION_STRING} isn't supported!")
ENDIF()
SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC SYSTEM ${EIGEN3_INCLUDE_DIR})
diff --git a/src/shogun/machine/gp/MultiLaplaceInferenceMethod.cpp b/src/shogun/machine/gp/MultiLaplaceInferenceMethod.cpp
index a1677177e..0c9ca8f78 100644
--- a/src/shogun/machine/gp/MultiLaplaceInferenceMethod.cpp
+++ b/src/shogun/machine/gp/MultiLaplaceInferenceMethod.cpp
@@ -84,9 +84,9 @@ class CMultiPsiLine : public func_base
@@ -87,10 +87,10 @@ public:
float64_t result=0;
for(index_t bl=0; bl<C; bl++)
{
- eigen_f.block(bl*n,0,n,1)=K*alpha->block(bl*n,0,n,1)*CMath::exp(log_scale*2.0);
- eigen_f.block(bl * n, 0, n, 1) =
- K * alpha->block(bl * n, 0, n, 1) * std::exp(log_scale * 2.0);
- result+=alpha->block(bl*n,0,n,1).dot(eigen_f.block(bl*n,0,n,1))/2.0;
- eigen_f.block(bl*n,0,n,1)+=eigen_m;
+ eigen_f.segment(bl*n,n)=K*alpha->segment(bl*n,n)*CMath::exp(log_scale*2.0);
+ eigen_f.segment(bl * n, n) =
+ K * alpha->segment(bl * n, n) * std::exp(log_scale * 2.0);
+ result+=alpha->segment(bl*n,n).dot(eigen_f.segment(bl*n,n))/2.0;
+ eigen_f.segment(bl*n,n)+=eigen_m;
}
// get first and second derivatives of log likelihood
@@ -272,7 +272,7 @@ void CMultiLaplaceInferenceMethod::update_alpha()
@@ -278,9 +278,9 @@ void MultiLaplaceInferenceMethod::update_alpha()
{
Map<VectorXd> alpha(m_alpha.vector, m_alpha.vlen);
for(index_t bl=0; bl<C; bl++)
- eigen_mu.block(bl*n,0,n,1)=eigen_ktrtr*CMath::exp(m_log_scale*2.0)*alpha.block(bl*n,0,n,1);
+ eigen_mu.segment(bl*n,n)=eigen_ktrtr*CMath::exp(m_log_scale*2.0)*alpha.segment(bl*n,n);
- eigen_mu.block(bl * n, 0, n, 1) = eigen_ktrtr *
+ eigen_mu.segment(bl * n, n) = eigen_ktrtr *
std::exp(m_log_scale * 2.0) *
- alpha.block(bl * n, 0, n, 1);
+ alpha.segment(bl * n, n);
//alpha'*(f-m)/2.0
Psi_New=alpha.dot(eigen_mu)/2.0;
@@ -316,7 +316,7 @@ void CMultiLaplaceInferenceMethod::update_alpha()
@@ -324,7 +324,7 @@ void MultiLaplaceInferenceMethod::update_alpha()
for(index_t bl=0; bl<C; bl++)
{
- VectorXd eigen_sD=eigen_dpi.block(bl*n,0,n,1).cwiseSqrt();
+ VectorXd eigen_sD=eigen_dpi.segment(bl*n,n).cwiseSqrt();
LLT<MatrixXd> chol_tmp((eigen_sD*eigen_sD.transpose()).cwiseProduct(eigen_ktrtr*CMath::exp(m_log_scale*2.0))+
MatrixXd::Identity(m_ktrtr.num_rows, m_ktrtr.num_cols));
MatrixXd eigen_L_tmp=chol_tmp.matrixU();
@@ -341,11 +341,11 @@ void CMultiLaplaceInferenceMethod::update_alpha()
LLT<MatrixXd> chol_tmp(
(eigen_sD * eigen_sD.transpose())
.cwiseProduct(eigen_ktrtr * std::exp(m_log_scale * 2.0)) +
@@ -351,14 +351,14 @@ void MultiLaplaceInferenceMethod::update_alpha()
VectorXd tmp2=m_tmp.array().rowwise().sum();
for(index_t bl=0; bl<C; bl++)
@ -40,12 +60,16 @@
Map<VectorXd> &eigen_c=eigen_W;
for(index_t bl=0; bl<C; bl++)
- eigen_c.block(bl*n,0,n,1)=eigen_E.block(0,bl*n,n,n)*(eigen_ktrtr*CMath::exp(m_log_scale*2.0)*eigen_b.block(bl*n,0,n,1));
+ eigen_c.segment(bl*n,n)=eigen_E.block(0,bl*n,n,n)*(eigen_ktrtr*CMath::exp(m_log_scale*2.0)*eigen_b.segment(bl*n,n));
- eigen_c.block(bl * n, 0, n, 1) =
+ eigen_c.segment(bl * n, n) =
eigen_E.block(0, bl * n, n, n) *
(eigen_ktrtr * std::exp(m_log_scale * 2.0) *
- eigen_b.block(bl * n, 0, n, 1));
+ eigen_b.segment(bl * n, n));
Map<MatrixXd> c_tmp(eigen_c.data(),n,C);
@@ -409,7 +409,7 @@ float64_t CMultiLaplaceInferenceMethod::get_derivative_helper(SGMatrix<float64_t
@@ -422,7 +422,7 @@ float64_t MultiLaplaceInferenceMethod::get_derivative_helper(SGMatrix<float64_t>
{
result+=((eigen_E.block(0,bl*n,n,n)-eigen_U.block(0,bl*n,n,n).transpose()*eigen_U.block(0,bl*n,n,n)).array()
*eigen_dK.array()).sum();
@ -54,7 +78,7 @@
}
return result/2.0;
@@ -489,7 +489,7 @@ SGVector<float64_t> CMultiLaplaceInferenceMethod::get_derivative_wrt_mean(
@@ -504,7 +504,7 @@ SGVector<float64_t> MultiLaplaceInferenceMethod::get_derivative_wrt_mean(
result[i]=0;
//currently only compute the explicit term
for(index_t bl=0; bl<C; bl++)

Просмотреть файл

@ -1,12 +1,12 @@
diff --git a/src/shogun/base/Parallel.cpp b/src/shogun/base/Parallel.cpp
index 78ba319..53ac6c0 100644
index ad12280fa..a34a24706 100644
--- a/src/shogun/base/Parallel.cpp
+++ b/src/shogun/base/Parallel.cpp
@@ -12,6 +12,7 @@
@@ -9,6 +9,7 @@
#include <shogun/lib/RefCount.h>
#include <shogun/lib/config.h>
#include <shogun/lib/memory.h>
+#include <shogun/io/SGIO.h>
#ifdef HAVE_CXX11
#include <thread>

Просмотреть файл

@ -1,17 +0,0 @@
diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt
index fd76961..396251c 100644
--- a/src/shogun/CMakeLists.txt
+++ b/src/shogun/CMakeLists.txt
@@ -170,10 +170,10 @@ IF(MSVC)
ENDIF()
# bundle dirent
- include(external/MSDirent)
+ find_path(MSDIRENT_INCLUDE_DIR NAMES dirent.h)
SHOGUN_INCLUDE_DIRS(SCOPE PUBLIC
$<BUILD_INTERFACE:${MSDIRENT_INCLUDE_DIR}>
- $<INSTALL_INTERFACE:include/shogun/lib/external/MSDirent>
+ $<INSTALL_INTERFACE:include>
)
target_link_libraries(shogun PUBLIC winmm)

Просмотреть файл

@ -1,14 +0,0 @@
diff --git a/cmake/ShogunFindLAPACK.cmake b/cmake/ShogunFindLAPACK.cmake
index fe3d6db9c2..882a1f4218 100644
--- a/cmake/ShogunFindLAPACK.cmake
+++ b/cmake/ShogunFindLAPACK.cmake
@@ -6,7 +6,8 @@ IF (LAPACK_FOUND)
SET(HAVE_LAPACK 1)
# find out the type of Lapack/BLAS implementation we are dealing with
- IF("${LAPACK_LIBRARIES}" MATCHES ".*/Accelerate.framework$")
+ message(STATUS "LAPACK_LIBRARIES:${LAPACK_LIBRARIES}")
+ IF("${LAPACK_LIBRARIES}" MATCHES ".*/Accelerate.framework(;|$)")
# Accelerate.framework we found for LaPack/BLAS
SET(HAVE_MVEC 1)
SET(HAVE_CATLAS 1)

216
ports/shogun/fmt.patch Normal file
Просмотреть файл

@ -0,0 +1,216 @@
diff --git a/src/shogun/classifier/mkl/MKL.cpp b/src/shogun/classifier/mkl/MKL.cpp
index 2622df919..1a36aa513 100644
--- a/src/shogun/classifier/mkl/MKL.cpp
+++ b/src/shogun/classifier/mkl/MKL.cpp
@@ -369,7 +369,7 @@ bool MKL::train_machine(std::shared_ptr<Features> data)
io::info("mkl_epsilon = %1.1e", mkl_epsilon);
io::info("C_mkl = %1.1e", C_mkl);
io::info("mkl_norm = %1.3e", mkl_norm);
- io::info("solver = {}", get_solver_type());
+ io::info("solver = {}", (int)get_solver_type());
io::info("ent_lambda = {}", ent_lambda);
io::info("mkl_block_norm = {}", mkl_block_norm);
diff --git a/src/shogun/classifier/mkl/MKLMulticlass.cpp b/src/shogun/classifier/mkl/MKLMulticlass.cpp
index b50876f14..dc0f80e8a 100644
--- a/src/shogun/classifier/mkl/MKLMulticlass.cpp
+++ b/src/shogun/classifier/mkl/MKLMulticlass.cpp
@@ -104,7 +104,7 @@ void MKLMulticlass::initlpsolver()
{
error("MKLMulticlass::initlpsolver(): given kernel is not of type"
" K_COMBINED {} required by Multiclass Mkl \n",
- m_kernel->get_kernel_type());
+ (int)m_kernel->get_kernel_type());
}
int numker=std::dynamic_pointer_cast<CombinedKernel>(m_kernel)->get_num_subkernels();
diff --git a/src/shogun/evaluation/ROCEvaluation.cpp b/src/shogun/evaluation/ROCEvaluation.cpp
index 482f06528..58595c844 100644
--- a/src/shogun/evaluation/ROCEvaluation.cpp
+++ b/src/shogun/evaluation/ROCEvaluation.cpp
@@ -30,11 +30,11 @@ float64_t ROCEvaluation::evaluate(std::shared_ptr<Labels> predicted, std::shared
require(
predicted->get_label_type() == LT_BINARY,
"Given predicted labels ({}) must be binary ({}).",
- predicted->get_label_type(), LT_BINARY);
+ (int)predicted->get_label_type(), (int)LT_BINARY);
require(
ground_truth->get_label_type() == LT_BINARY,
"Given ground truth labels ({}) must be binary ({}).",
- ground_truth->get_label_type(), LT_BINARY);
+ (int)ground_truth->get_label_type(), (int)LT_BINARY);
return evaluate_roc(binary_labels(predicted),binary_labels(ground_truth));
}
diff --git a/src/shogun/io/SGIO.h b/src/shogun/io/SGIO.h
index 336e35b03..0ba7b2c0b 100644
--- a/src/shogun/io/SGIO.h
+++ b/src/shogun/io/SGIO.h
@@ -307,7 +307,7 @@ namespace shogun
if (should_log(prio))
{
fmt::memory_buffer msg;
- fmt::format_to(msg, format, std::forward<Args>(args)...);
+ fmt::format_to(std::back_inserter(msg), format, std::forward<Args>(args)...);
message_(prio, loc, fmt::string_view(msg.data(), msg.size()));
}
}
@@ -357,7 +357,7 @@ namespace shogun
"ExceptionType must be nothrow copy constructible");
fmt::memory_buffer msg;
- fmt::format_to(msg, format, std::forward<Args>(args)...);
+ fmt::format_to(std::back_inserter(msg), format, std::forward<Args>(args)...);
msg.push_back('\0');
env()->io()->message(io::MSG_ERROR, loc, msg.data());
throw ExceptionType(msg.data());
diff --git a/src/shogun/io/serialization/JsonDeserializer.cpp b/src/shogun/io/serialization/JsonDeserializer.cpp
index 24fd30edd..7667e34d3 100644
--- a/src/shogun/io/serialization/JsonDeserializer.cpp
+++ b/src/shogun/io/serialization/JsonDeserializer.cpp
@@ -49,7 +49,7 @@ public:
void on(std::vector<bool>::reference* v) override
{
*v = next_element<bool>(&ValueType::GetBool);
- SG_DEBUG("read bool with value {}", *v);
+ SG_DEBUG("read bool with value {}", (bool)*v);
}
void on(char* v) override
{
diff --git a/src/shogun/io/serialization/JsonSerializer.cpp b/src/shogun/io/serialization/JsonSerializer.cpp
index 22c99ec5c..530a14525 100644
--- a/src/shogun/io/serialization/JsonSerializer.cpp
+++ b/src/shogun/io/serialization/JsonSerializer.cpp
@@ -62,7 +62,7 @@ public:
}
void on(std::vector<bool>::reference* v) override
{
- SG_DEBUG("writing bool with value {}", *v);
+ SG_DEBUG("writing bool with value {}", (bool)*v);
m_json_writer.Bool(*v);
close_container();
}
diff --git a/src/shogun/kernel/CustomKernel.cpp b/src/shogun/kernel/CustomKernel.cpp
index 06a7e7abd..78be0ef6f 100644
--- a/src/shogun/kernel/CustomKernel.cpp
+++ b/src/shogun/kernel/CustomKernel.cpp
@@ -112,10 +112,10 @@ bool CustomKernel::init(std::shared_ptr<Features> l, std::shared_ptr<Features> r
/* Make sure l and r have the same type of CFeatures */
require(l->get_feature_class()==r->get_feature_class(),
"Different FeatureClass: l is {}, r is {}",
- l->get_feature_class(),r->get_feature_class());
+ (int)l->get_feature_class(),(int)r->get_feature_class());
require(l->get_feature_type()==r->get_feature_type(),
"Different FeatureType: l is {}, r is {}",
- l->get_feature_type(),r->get_feature_type());
+ (int)l->get_feature_type(),(int)r->get_feature_type());
/* If l and r are the type of IndexFeatures,
* the init function adds a subset to kernel matrix.
diff --git a/src/shogun/preprocessor/DensePreprocessor.cpp b/src/shogun/preprocessor/DensePreprocessor.cpp
index 56de8a9e6..05cd9a32e 100644
--- a/src/shogun/preprocessor/DensePreprocessor.cpp
+++ b/src/shogun/preprocessor/DensePreprocessor.cpp
@@ -90,7 +90,7 @@ std::shared_ptr<Features> DensePreprocessor<ST>::transform(std::shared_ptr<Featu
{
require(features->get_feature_class()==C_DENSE, "Provided features ({}) "
"has to be of C_DENSE ({}) class!",
- features->get_feature_class(), C_DENSE);
+ (int)features->get_feature_class(), (int)C_DENSE);
auto matrix = features->as<DenseFeatures<ST>>()->get_feature_matrix();
if (!inplace)
@@ -107,7 +107,7 @@ DensePreprocessor<ST>::inverse_transform(std::shared_ptr<Features> features, boo
features->get_feature_class() == C_DENSE,
"Provided features ({}) "
"has to be of C_DENSE ({}) class!",
- features->get_feature_class(), C_DENSE);
+ (int)features->get_feature_class(), (int)C_DENSE);
auto matrix = features->as<DenseFeatures<ST>>()->get_feature_matrix();
if (!inplace)
diff --git a/src/shogun/preprocessor/KernelPCA.cpp b/src/shogun/preprocessor/KernelPCA.cpp
index 6709f67cd..0707f3db9 100644
--- a/src/shogun/preprocessor/KernelPCA.cpp
+++ b/src/shogun/preprocessor/KernelPCA.cpp
@@ -125,7 +125,7 @@ std::shared_ptr<Features> KernelPCA::transform(std::shared_ptr<Features> feature
return apply_to_string_features(features);
}
- error("Feature type {} not supported", features->get_feature_type());
+ error("Feature type {} not supported", (int)features->get_feature_type());
return NULL;
}
diff --git a/src/shogun/preprocessor/StringPreprocessor.cpp b/src/shogun/preprocessor/StringPreprocessor.cpp
index c0c342b82..87629b5cb 100644
--- a/src/shogun/preprocessor/StringPreprocessor.cpp
+++ b/src/shogun/preprocessor/StringPreprocessor.cpp
@@ -95,7 +95,7 @@ namespace shogun
features->get_feature_class() == C_STRING,
"Provided features ({}) "
"has to be of C_STRING ({}) class!",
- features->get_feature_class(), C_STRING);
+ (int)features->get_feature_class(), (int)C_STRING);
diff --git a/src/shogun/structure/BeliefPropagation.cpp b/src/shogun/structure/BeliefPropagation.cpp
index e54228917..96b90c458 100644
--- a/src/shogun/structure/BeliefPropagation.cpp
+++ b/src/shogun/structure/BeliefPropagation.cpp
@@ -248,7 +248,7 @@ void TreeMaxProduct::bottom_up_pass()
for (uint32_t mi = 0; mi < m_msg_order.size(); ++mi)
{
SG_DEBUG("mi = {}, mtype: {} {} -> {}", mi,
- m_msg_order[mi]->mtype, m_msg_order[mi]->child, m_msg_order[mi]->parent);
+ (int)m_msg_order[mi]->mtype, m_msg_order[mi]->child, m_msg_order[mi]->parent);
if (m_msg_order[mi]->mtype == VAR_TO_FAC) // var -> factor
{
@@ -392,7 +392,7 @@ void TreeMaxProduct::top_down_pass()
for (int32_t mi = (int32_t)(m_msg_order.size()-1); mi >= 0; --mi)
{
SG_DEBUG("mi = {}, mtype: {} {} <- {}", mi,
- m_msg_order[mi]->mtype, m_msg_order[mi]->child, m_msg_order[mi]->parent);
+ (int)m_msg_order[mi]->mtype, m_msg_order[mi]->child, m_msg_order[mi]->parent);
if (m_msg_order[mi]->mtype == FAC_TO_VAR) // factor <- var
{
diff --git a/src/shogun/structure/CCSOSVM.cpp b/src/shogun/structure/CCSOSVM.cpp
index 8dd920ad8..8267a402c 100644
--- a/src/shogun/structure/CCSOSVM.cpp
+++ b/src/shogun/structure/CCSOSVM.cpp
@@ -321,7 +321,7 @@ bool CCSOSVM::train_machine(std::shared_ptr<Features> data)
proximal_rhs[i] = (1+rho)*delta[i] - rho*gammaG0[i];
break;
default:
- error("Invalid QPType: {}", m_qp_type);
+ error("Invalid QPType: {}", (int)m_qp_type);
}
}
@@ -351,7 +351,7 @@ bool CCSOSVM::train_machine(std::shared_ptr<Features> data)
*/
break;
default:
- error("Invalid QPType: {}", m_qp_type);
+ error("Invalid QPType: {}", (int)m_qp_type);
}
/* DEBUG */
@@ -697,12 +697,12 @@ void CCSOSVM::init()
/* check return code */
if (r != MSK_RES_OK)
- error("Error while creating mosek env: {}", r);
+ error("Error while creating mosek env: {}", (int)r);
/* initialize the environment */
r = MSK_initenv(m_msk_env);
if (r != MSK_RES_OK)
- error("Error while initializing mosek env: {}", r);
+ error("Error while initializing mosek env: {}", (int)r);
#endif
SG_ADD(&m_C, "m_C", "C");

Просмотреть файл

@ -3,17 +3,16 @@ vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO shogun-toolbox/shogun
REF ab274e7ab6bf24dd598c1daf1e626cb686d6e1cc
SHA512 fb90e5bf802c6fd59bf35ab7bbde5e8cfcdc5d46c69c52097140b30c6b29e28b8341dd1ece7f8a1f9d9123f4bc06d44d288584ce7dfddccf3d33fe05106884ae
REF 8f01b2b9e4de46a38bf70cdb603db75ebfd4b58b
SHA512 24bd0e3e2a599e81432f59bd6ebc514729453cfe808541f6842dc57e2eff329e52a3e3575580bf84b2d4768209fa2624295e4e9cdcdc656dd48a8ab66bc6dbc6
HEAD_REF master
PATCHES
cmake.patch
cmake-config.in.patch
eigen-3.4.patch
fix-dirent.patch
fix-ASSERT-not-found.patch
remove_cmake_flags.patch
fix_accelerate_detection.patch
fmt.patch
syntax.patch
remove-bitsery.patch
)
vcpkg_find_acquire_program(PYTHON3)
@ -46,7 +45,6 @@ vcpkg_cmake_configure(
-DENABLE_TESTING=OFF
-DLICENSE_GPL_SHOGUN=OFF
-DLIBSHOGUN_BUILD_STATIC=ON
-DCMAKE_DISABLE_FIND_PACKAGE_JSON=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_ViennaCL=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_TFLogger=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_GLPK=TRUE
@ -56,17 +54,18 @@ vcpkg_cmake_configure(
-DCMAKE_DISABLE_FIND_PACKAGE_LpSolve=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_ColPack=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_ARPREC=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_Ctags=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_CCache=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_Doxygen=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_CURL=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_OpenMP=TRUE
-DCMAKE_DISABLE_FIND_PACKAGE_bitsery=TRUE
-DINSTALL_TARGETS=shogun-static
${extra_opts}
-DCMAKE_CXX_STANDARD=14 # protobuf
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/shogun)
vcpkg_cmake_config_fixup()
file(REMOVE_RECURSE
# This directory is empty given the settings above
@ -76,4 +75,4 @@ file(REMOVE_RECURSE
)
# Handle copyright
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")

Просмотреть файл

@ -0,0 +1,51 @@
diff --git a/src/interfaces/swig/SGBase.i b/src/interfaces/swig/SGBase.i
index 543a8ff00..4b4df8604 100644
--- a/src/interfaces/swig/SGBase.i
+++ b/src/interfaces/swig/SGBase.i
@@ -504,10 +504,7 @@ namespace shogun
PyObject* __getstate__()
{
std::shared_ptr<io::Serializer> serializer = nullptr;
- if (pickle_ascii)
serializer = std::make_shared<io::JsonSerializer>();
- else
- serializer = std::make_shared<io::BitserySerializer>();
auto byte_stream = std::make_shared<io::ByteArrayOutputStream>();
serializer->attach(byte_stream);
serializer->write(std::shared_ptr<SGObject>($self));
@@ -537,10 +534,7 @@ namespace shogun
PyString_AsStringAndSize(py_str, &str, &len);
#endif
std::shared_ptr<io::Deserializer> deser = nullptr;
- if (pickle_ascii)
deser = std::make_shared<io::JsonDeserializer>();
- else
- deser = std::make_shared<io::BitseryDeserializer>();
auto byte_input_stream = std::make_shared<io::ByteArrayInputStream>(str, len);
deser->attach(byte_input_stream);
diff --git a/src/shogun/CMakeLists.txt b/src/shogun/CMakeLists.txt
index 20c4b4fa6..fa4be96f6 100644
--- a/src/shogun/CMakeLists.txt
+++ b/src/shogun/CMakeLists.txt
@@ -12,6 +12,7 @@ include(CheckCXXSourceCompiles)
include(CMakePackageConfigHelpers)
FILE(GLOB_RECURSE LIBSHOGUN_SRC *.${EXT_SRC_CPP} *.${EXT_SRC_C})
+list(FILTER LIBSHOGUN_SRC EXCLUDE REGEX ".*(BitserySerializer\.cpp|BitseryDeserializer\.cpp)$")
FILE(GLOB_RECURSE LIBSHOGUN_HEADERS *.${EXT_SRC_HEADER})
FILE(GLOB_RECURSE LIBSHOGUN_SRC_TMP *.${EXT_CPP_TMP})
diff --git a/src/shogun/base/class_list.cpp.py b/src/shogun/base/class_list.cpp.py
index 854d5dd1e..92c4379c1 100644
--- a/src/shogun/base/class_list.cpp.py
+++ b/src/shogun/base/class_list.cpp.py
@@ -69,7 +69,7 @@ class_blacklist = ["SGVector", "SGMatrix", "SGSparseVector", "SGSparseMatrix",
"NumericalVGLikelihood", "SingleFITCInference", "VariationalGaussianLikelihood",
"RationalApproximation", "FirstOrderStochasticMinimizer", "IndependenceTest",
"TwoDistributionTest", "TwoSampleTest", "RealDistance", "BinaryClassEvaluation",
- "MomentumCorrection", "OneDistributionTest", "DependenceMaximization"]
+ "MomentumCorrection", "OneDistributionTest", "DependenceMaximization", "BitserySerializer", "BitseryDeserializer"]
SHOGUN_TEMPLATE_CLASS = "SHOGUN_TEMPLATE_CLASS"
SHOGUN_BASIC_CLASS = "SHOGUN_BASIC_CLASS"

Просмотреть файл

@ -1,23 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94c8389f96..d4d533301a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -192,12 +192,12 @@ IF(MSVC)
# SET(CMAKE_CXX_FLAGS_DEBUG "/DEBUG /Od /Zi")
add_compile_options("/bigobj")
ELSE()
- SET(CMAKE_C_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}")
- SET(CMAKE_CXX_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}")
- SET(CMAKE_C_FLAGS_DISTRIBUTION "-O2")
- SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O2")
- SET(CMAKE_C_FLAGS_DEBUG "-g")
- SET(CMAKE_CXX_FLAGS_DEBUG "-g")
+ #SET(CMAKE_C_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}")
+ #SET(CMAKE_CXX_FLAGS_RELEASE "-O3 ${RELEASE_COMPILER_FLAGS}")
+ #SET(CMAKE_C_FLAGS_DISTRIBUTION "-O2")
+ #SET(CMAKE_CXX_FLAGS_DISTRIBUTION "-O2")
+ #SET(CMAKE_C_FLAGS_DEBUG "-g")
+ #SET(CMAKE_CXX_FLAGS_DEBUG "-g")
ENDIF()
OPTION(ENABLE_COVERAGE "Enable code coverage" OFF)

24
ports/shogun/syntax.patch Normal file
Просмотреть файл

@ -0,0 +1,24 @@
diff --git a/src/shogun/io/ShogunErrc.h b/src/shogun/io/ShogunErrc.h
index 6cb5619c5..98b08b494 100644
--- a/src/shogun/io/ShogunErrc.h
+++ b/src/shogun/io/ShogunErrc.h
@@ -8,6 +8,7 @@
#define SHOGUN_ERRORS_H__
#include <system_error>
+#include <cstdint>
#include <shogun/lib/common.h>
diff --git a/src/shogun/mathematics/linalg/LinalgNamespace.h b/src/shogun/mathematics/linalg/LinalgNamespace.h
index 40888e00c..c4293e378 100644
--- a/src/shogun/mathematics/linalg/LinalgNamespace.h
+++ b/src/shogun/mathematics/linalg/LinalgNamespace.h
@@ -1825,7 +1825,6 @@ namespace shogun
auto max_it = std::max_element(a_copy.begin(), a_copy.begin() + n);
result = (a_copy[n] + *max_it) / 2;
}
- }
return result;
}

Просмотреть файл

@ -1,14 +1,12 @@
{
"name": "shogun",
"version": "6.1.4",
"port-version": 10,
"version-date": "2023-12-19",
"description": "Unified and efficient Machine Learning",
"homepage": "https://github.com/shogun-toolbox/shogun",
"dependencies": [
"blas",
"bzip2",
"curl",
"dirent",
"eigen3",
{
"name": "hdf5",
@ -21,8 +19,10 @@
"lzo",
"nlopt",
"protobuf",
"rapidjson",
"rxcpp",
"snappy",
"spdlog",
{
"name": "vcpkg-cmake",
"host": true

Некоторые файлы не были показаны из-за слишком большого количества измененных файлов Показать больше