early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

@@ -0,0 +1,33 @@
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 == "-") {

106
externals/vcpkg/ports/avro-cpp/install.patch vendored Executable file
View File

@@ -0,0 +1,106 @@
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)
project (Avro-cpp)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR})
+find_package(ZLIB REQUIRED)
+
if (WIN32 AND NOT CYGWIN AND NOT MSYS)
add_definitions (/EHa)
add_definitions (
@@ -125,12 +127,12 @@ set_target_properties (avrocpp PROPERTIES
set_target_properties (avrocpp_s PROPERTIES
VERSION ${AVRO_VERSION_MAJOR}.${AVRO_VERSION_MINOR}.${AVRO_VERSION_PATCH})
-target_link_libraries (avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES})
+target_link_libraries (avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB)
target_include_directories(avrocpp PRIVATE ${SNAPPY_INCLUDE_DIR})
add_executable (precompile test/precompile.cc)
-target_link_libraries (precompile avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES})
+target_link_libraries (precompile avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB)
macro (gen file ns)
add_custom_command (OUTPUT ${file}.hh
@@ -160,37 +162,42 @@ gen (primitivetypes pt)
gen (cpp_reserved_words cppres)
add_executable (avrogencpp impl/avrogencpp.cc)
-target_link_libraries (avrogencpp avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES})
+target_link_libraries (avrogencpp avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES} ZLIB::ZLIB)
-enable_testing()
+if(BUILD_TESTING)
+ enable_testing()
+endif()
macro (unittest name)
add_executable (${name} test/${name}.cc)
- target_link_libraries (${name} avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES})
+ 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})
endmacro (unittest)
-unittest (buffertest)
-unittest (unittest)
-unittest (SchemaTests)
-unittest (LargeSchemaTests)
-unittest (CodecTests)
-unittest (StreamTests)
-unittest (SpecificTests)
-unittest (DataFileTests)
-unittest (JsonTests)
-unittest (AvrogencppTests)
-unittest (CompilerTests)
-unittest (AvrogencppTestReservedWords)
-
-add_dependencies (AvrogencppTestReservedWords cpp_reserved_words_hh)
-
-add_dependencies (AvrogencppTests bigrecord_hh bigrecord_r_hh bigrecord2_hh
- tweet_hh
- 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)
+if(BUILD_TESTING)
+ unittest (buffertest)
+ unittest (unittest)
+ unittest (SchemaTests)
+ unittest (LargeSchemaTests)
+ unittest (CodecTests)
+ unittest (StreamTests)
+ unittest (SpecificTests)
+ unittest (DataFileTests)
+ unittest (JsonTests)
+ unittest (AvrogencppTests)
+ unittest (CompilerTests)
+ unittest (AvrogencppTestReservedWords)
+
+ add_dependencies (AvrogencppTestReservedWords cpp_reserved_words_hh)
+
+ add_dependencies (AvrogencppTests bigrecord_hh bigrecord_r_hh bigrecord2_hh
+ tweet_hh
+ 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)
install (TARGETS avrocpp avrocpp_s
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
- RUNTIME DESTINATION lib)
+ RUNTIME DESTINATION bin)
-install (TARGETS avrogencpp RUNTIME DESTINATION bin)
+install (TARGETS avrogencpp RUNTIME DESTINATION tools/bin)
install (DIRECTORY api/ DESTINATION include/avro
FILES_MATCHING PATTERN *.hh)

36
externals/vcpkg/ports/avro-cpp/portfile.cmake vendored Executable file
View File

@@ -0,0 +1,36 @@
vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO apache/avro
REF 2ab8fa85d05f04387bd5d63b10ad1c8fd2243616
SHA512 fd21f0919b0e5e884bdf4d66c4d5ba056f04c426b309ec0b5ab26642a5f6b00d46f4dd965431b10130bc5f0d81699e2195780e90e127f63049ee5763403ef7c8
HEAD_REF master
PATCHES
install.patch
fix-windows-build.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
INVERTED_FEATURES
snappy CMAKE_DISABLE_FIND_PACKAGE_Snappy
)
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/lang/c++
PREFER_NINJA
DISABLE_PARALLEL_CONFIGURE
OPTIONS
-DBUILD_TESTING=OFF
${FEATURE_OPTIONS}
OPTIONS_DEBUG
-DAVRO_ADD_PROTECTOR_FLAGS=1
)
vcpkg_install_cmake(ADD_BIN_TO_PATH)
vcpkg_copy_pdbs()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
file(INSTALL ${SOURCE_PATH}/lang/c++/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)

32
externals/vcpkg/ports/avro-cpp/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,32 @@
{
"name": "avro-cpp",
"version-date": "2021-06-01",
"port-version": 1,
"description": "Apache Avro is a data serialization system",
"homepage": "https://github.com/apache/avro",
"supports": "!(windows & static)",
"dependencies": [
"boost-crc",
"boost-filesystem",
"boost-format",
"boost-iostreams",
"boost-math",
"boost-program-options",
"boost-random",
"boost-test",
"boost-thread",
"bzip2",
"liblzma",
"libzip",
"zlib",
"zstd"
],
"features": {
"snappy": {
"description": "Support Snappy for compression",
"dependencies": [
"snappy"
]
}
}
}