зеркало из https://github.com/microsoft/vcpkg.git
[avro-cpp] Update to latest version (2022-11-07) (#27825)
* [avro-cpp] Update to 1.11.1 * [avro-cpp] Update version file * [Avro-cpp] Add "licence" to port file Co-authored-by: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com> * [Avro-cpp] Fix HEAD_REF branch (revert to master) * [avro-cpp] Update version file * [avro-cpp] Fix build 'test' feature, update version * [avro-cpp] Update version * [avro-cpp] Update 'usage' file and replace deprecated function * [avro-cpp] Update version * [avro-cpp] Update 'usage' file * [avro-cpp] Update version * [avro-cpp] Update 'usage' file * [avro-cpp] Update version Co-authored-by: MonicaLiu <110024546+MonicaLiu0311@users.noreply.github.com>
This commit is contained in:
Родитель
5c1f4069b8
Коммит
7432ae01e9
|
@ -1,33 +0,0 @@
|
|||
diff --git a/lang/c++/impl/avrogencpp.cc b/lang/c++/impl/avrogencpp.cc
|
||||
index 61570413..0b6b35a2 100644
|
||||
--- a/lang/c++/impl/avrogencpp.cc
|
||||
+++ b/lang/c++/impl/avrogencpp.cc
|
||||
@@ -804,8 +804,8 @@ static string readGuard(const string &filename) {
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
const string NS("namespace");
|
||||
- const string OUT("output");
|
||||
- const string IN("input");
|
||||
+ const string OUT_FILE("output");
|
||||
+ const string IN_FILE("input");
|
||||
const string INCLUDE_PREFIX("include-prefix");
|
||||
const string NO_UNION_TYPEDEF("no-union-typedef");
|
||||
|
||||
@@ -817,14 +817,14 @@ int main(int argc, char **argv) {
|
||||
po::store(po::parse_command_line(argc, argv, desc), vm);
|
||||
po::notify(vm);
|
||||
|
||||
- if (vm.count("help") || vm.count(IN) == 0 || vm.count(OUT) == 0) {
|
||||
+ if (vm.count("help") || vm.count(IN_FILE) == 0 || vm.count(OUT_FILE) == 0) {
|
||||
std::cout << desc << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
string ns = vm.count(NS) > 0 ? vm[NS].as<string>() : string();
|
||||
- string outf = vm.count(OUT) > 0 ? vm[OUT].as<string>() : string();
|
||||
- string inf = vm.count(IN) > 0 ? vm[IN].as<string>() : string();
|
||||
+ string outf = vm.count(OUT_FILE) > 0 ? vm[OUT_FILE].as<string>() : string();
|
||||
+ string inf = vm.count(IN_FILE) > 0 ? vm[IN_FILE].as<string>() : string();
|
||||
string incPrefix = vm[INCLUDE_PREFIX].as<string>();
|
||||
bool noUnion = vm.count(NO_UNION_TYPEDEF) != 0;
|
||||
if (incPrefix == "-") {
|
|
@ -1,8 +1,8 @@
|
|||
diff --git a/lang/c++/CMakeLists.txt b/lang/c++/CMakeLists.txt
|
||||
index bf764ce4..e84524d0 100644
|
||||
--- a/lang/c++/CMakeLists.txt
|
||||
+++ b/lang/c++/CMakeLists.txt
|
||||
@@ -48,6 +48,8 @@ list(GET AVRO_VERSION 2 AVRO_VERSION_PATCH)
|
||||
diff --git "a/lang/c++/CMakeLists.txt" "b/lang/c++/CMakeLists.txt"
|
||||
index 52d6ac8a..39d59cd8 100644
|
||||
--- "a/lang/c++/CMakeLists.txt"
|
||||
+++ "b/lang/c++/CMakeLists.txt"
|
||||
@@ -51,6 +51,8 @@ list(GET AVRO_VERSION 2 AVRO_VERSION_PATCH)
|
||||
project (Avro-cpp)
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR})
|
||||
|
||||
|
@ -11,7 +11,17 @@ index bf764ce4..e84524d0 100644
|
|||
if (WIN32 AND NOT CYGWIN AND NOT MSYS)
|
||||
add_definitions (/EHa)
|
||||
add_definitions (
|
||||
@@ -125,12 +127,12 @@ set_target_properties (avrocpp PROPERTIES
|
||||
@@ -64,7 +66,8 @@ if (WIN32 AND NOT CYGWIN AND NOT MSYS)
|
||||
endif()
|
||||
|
||||
if (CMAKE_COMPILER_IS_GNUCXX)
|
||||
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic -Werror")
|
||||
+ # Remove " -Werror" because of warning from boost-math (will require C++ 14 soon)
|
||||
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -pedantic")
|
||||
if (AVRO_ADD_PROTECTOR_FLAGS)
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fstack-protector-all -D_GLIBCXX_DEBUG")
|
||||
# Unset _GLIBCXX_DEBUG for avrogencpp.cc because using Boost Program Options
|
||||
@@ -131,12 +134,12 @@ set_target_properties (avrocpp PROPERTIES
|
||||
set_target_properties (avrocpp_s PROPERTIES
|
||||
VERSION ${AVRO_VERSION_MAJOR}.${AVRO_VERSION_MINOR}.${AVRO_VERSION_PATCH})
|
||||
|
||||
|
@ -26,7 +36,7 @@ index bf764ce4..e84524d0 100644
|
|||
|
||||
macro (gen file ns)
|
||||
add_custom_command (OUTPUT ${file}.hh
|
||||
@@ -160,37 +162,42 @@ gen (primitivetypes pt)
|
||||
@@ -166,37 +169,41 @@ gen (primitivetypes pt)
|
||||
gen (cpp_reserved_words cppres)
|
||||
|
||||
add_executable (avrogencpp impl/avrogencpp.cc)
|
||||
|
@ -39,8 +49,9 @@ index bf764ce4..e84524d0 100644
|
|||
+endif()
|
||||
|
||||
macro (unittest name)
|
||||
add_executable (${name} test/${name}.cc)
|
||||
- add_executable (${name} test/${name}.cc)
|
||||
- target_link_libraries (${name} avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES})
|
||||
+ add_executable (${name} test/${name}.cc impl/json/JsonIO.cc impl/json/JsonDom.cc)
|
||||
+ target_link_libraries (${name} avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB)
|
||||
add_test (NAME ${name} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/${name})
|
||||
|
@ -87,12 +98,11 @@ index bf764ce4..e84524d0 100644
|
|||
+ union_array_union_hh union_map_union_hh union_conflict_hh
|
||||
+ recursive_hh reuse_hh circulardep_hh tree1_hh tree2_hh crossref_hh
|
||||
+ primitivetypes_hh empty_record_hh)
|
||||
+
|
||||
+endif()
|
||||
|
||||
include (InstallRequiredSystemLibraries)
|
||||
|
||||
@@ -201,9 +208,9 @@ include (CPack)
|
||||
@@ -207,9 +214,9 @@ include (CPack)
|
||||
install (TARGETS avrocpp avrocpp_s
|
||||
LIBRARY DESTINATION lib
|
||||
ARCHIVE DESTINATION lib
|
||||
|
|
|
@ -3,34 +3,31 @@ vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO apache/avro
|
||||
REF 2ab8fa85d05f04387bd5d63b10ad1c8fd2243616
|
||||
SHA512 fd21f0919b0e5e884bdf4d66c4d5ba056f04c426b309ec0b5ab26642a5f6b00d46f4dd965431b10130bc5f0d81699e2195780e90e127f63049ee5763403ef7c8
|
||||
REF e44b680621328c4e6524bd2983af1ce11afeebed
|
||||
SHA512 932f642f272997b5c0be467d3a3ccc354c6edf425c36b33aa7e61984f67312c712bb1d74cb1a5fd8066169104851e73830f0ed3fdb450e005a5c5bef33c34f20
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
install.patch
|
||||
fix-windows-build.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
FEATURES
|
||||
test BUILD_TESTING
|
||||
INVERTED_FEATURES
|
||||
snappy CMAKE_DISABLE_FIND_PACKAGE_Snappy
|
||||
snappy CMAKE_DISABLE_FIND_PACKAGE_Snappy
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}/lang/c++
|
||||
PREFER_NINJA
|
||||
DISABLE_PARALLEL_CONFIGURE
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}/lang/c++"
|
||||
OPTIONS
|
||||
-DBUILD_TESTING=OFF
|
||||
${FEATURE_OPTIONS}
|
||||
OPTIONS_DEBUG
|
||||
-DAVRO_ADD_PROTECTOR_FLAGS=1
|
||||
)
|
||||
|
||||
vcpkg_install_cmake(ADD_BIN_TO_PATH)
|
||||
vcpkg_cmake_install(ADD_BIN_TO_PATH)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
file(INSTALL ${SOURCE_PATH}/lang/c++/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
|
||||
file(INSTALL "${SOURCE_PATH}/lang/c++/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
The package avro-cpp can be used from CMake via:
|
||||
|
||||
find_path(AVROCPP_INCLUDE_DIR avro/Encoder.hh)
|
||||
find_library(AVROCPP_LIBRARY_DEBUG avrocpp PATH_SUFFIXES "debug/lib" REQUIRED)
|
||||
get_filename_component(AVROCPP_ROOT_FIND_DIR ${AVROCPP_INCLUDE_DIR} DIRECTORY)
|
||||
find_library(AVROCPP_LIBRARY_RELEASE avrocpp PATHS "${AVROCPP_ROOT_FIND_DIR}/lib/" REQUIRED NO_DEFAULT_PATH)
|
||||
|
||||
target_include_directories(main PRIVATE "${AVROCPP_INCLUDE_DIR}")
|
||||
target_link_libraries(main PRIVATE optimized "${AVROCPP_LIBRARY_RELEASE}" debug "${AVROCPP_LIBRARY_DEBUG}")
|
|
@ -1,25 +1,27 @@
|
|||
{
|
||||
"name": "avro-cpp",
|
||||
"version-date": "2021-06-01",
|
||||
"port-version": 1,
|
||||
"version-date": "2022-11-07",
|
||||
"description": "Apache Avro is a data serialization system",
|
||||
"homepage": "https://github.com/apache/avro",
|
||||
"license": "Apache-2.0",
|
||||
"supports": "!(windows & static)",
|
||||
"dependencies": [
|
||||
"boost-algorithm",
|
||||
"boost-any",
|
||||
"boost-crc",
|
||||
"boost-filesystem",
|
||||
"boost-format",
|
||||
"boost-iostreams",
|
||||
"boost-lexical-cast",
|
||||
"boost-math",
|
||||
"boost-program-options",
|
||||
"boost-random",
|
||||
"boost-test",
|
||||
"boost-thread",
|
||||
"bzip2",
|
||||
"liblzma",
|
||||
"libzip",
|
||||
"zlib",
|
||||
"zstd"
|
||||
"boost-tuple",
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
],
|
||||
"features": {
|
||||
"snappy": {
|
||||
|
@ -27,6 +29,16 @@
|
|||
"dependencies": [
|
||||
"snappy"
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"description": "Build tests",
|
||||
"dependencies": [
|
||||
"boost-asio",
|
||||
"boost-bind",
|
||||
"boost-smart-ptr",
|
||||
"boost-test",
|
||||
"boost-thread"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "08f82323ee0bb00a297cc1318c04dd3bce5d963e",
|
||||
"version-date": "2022-11-07",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "7804bfb279bdea0b9e270f010e1683b9b8d7ee38",
|
||||
"version-date": "2021-06-01",
|
||||
|
|
|
@ -281,8 +281,8 @@
|
|||
"port-version": 3
|
||||
},
|
||||
"avro-cpp": {
|
||||
"baseline": "2021-06-01",
|
||||
"port-version": 1
|
||||
"baseline": "2022-11-07",
|
||||
"port-version": 0
|
||||
},
|
||||
"aws-c-auth": {
|
||||
"baseline": "0.6.3",
|
||||
|
|
Загрузка…
Ссылка в новой задаче