diff options
Diffstat (limited to 'meta-oe/recipes-support/avro')
7 files changed, 244 insertions, 88 deletions
diff --git a/meta-oe/recipes-support/avro/avro-c++/0001-Remove-cpp-unittest-compilation.patch b/meta-oe/recipes-support/avro/avro-c++/0001-Remove-cpp-unittest-compilation.patch new file mode 100644 index 0000000000..bcfafdda55 --- /dev/null +++ b/meta-oe/recipes-support/avro/avro-c++/0001-Remove-cpp-unittest-compilation.patch @@ -0,0 +1,86 @@ +From 6be1c45e1f7ee78499bdca76c25ec23a61317134 Mon Sep 17 00:00:00 2001 +From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com> +Date: Wed, 20 Mar 2024 14:58:27 +0000 +Subject: [PATCH] Remove cpp unittest compilation + +Upstream-Status: Inappropriate [oe-specific] + +--- + lang/c++/CMakeLists.txt | 61 ----------------------------------------- + 1 file changed, 61 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4a3793152..d94ba42d3 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -131,70 +131,9 @@ set_target_properties (avrocpp_s PROPERTIES + target_link_libraries (avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) + target_include_directories(avrocpp PRIVATE ${SNAPPY_INCLUDE_DIR}) + +-add_executable (precompile test/precompile.cc) +- +-target_link_libraries (precompile avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) +- +-macro (gen file ns) +- add_custom_command (OUTPUT ${file}.hh +- COMMAND avrogencpp +- -p - +- -i ${CMAKE_CURRENT_SOURCE_DIR}/jsonschemas/${file} +- -o ${file}.hh -n ${ns} -U +- DEPENDS avrogencpp ${CMAKE_CURRENT_SOURCE_DIR}/jsonschemas/${file}) +- add_custom_target (${file}_hh DEPENDS ${file}.hh) +-endmacro (gen) +- +-gen (empty_record empty) +-gen (bigrecord testgen) +-gen (bigrecord_r testgen_r) +-gen (bigrecord2 testgen2) +-gen (tweet testgen3) +-gen (union_array_union uau) +-gen (union_map_union umu) +-gen (union_conflict uc) +-gen (recursive rec) +-gen (reuse ru) +-gen (circulardep cd) +-gen (tree1 tr1) +-gen (tree2 tr2) +-gen (crossref cr) +-gen (primitivetypes pt) +-gen (cpp_reserved_words cppres) +- + add_executable (avrogencpp impl/avrogencpp.cc) + target_link_libraries (avrogencpp avrocpp_s ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) + +-enable_testing() +- +-macro (unittest name) +- add_executable (${name} test/${name}.cc) +- target_link_libraries (${name} avrocpp ${Boost_LIBRARIES} ${SNAPPY_LIBRARIES}) +- 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) +- + include (InstallRequiredSystemLibraries) + + set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}") diff --git a/meta-oe/recipes-support/avro/avro-c++/0002-Add-package-configuration-files.patch b/meta-oe/recipes-support/avro/avro-c++/0002-Add-package-configuration-files.patch new file mode 100644 index 0000000000..437a3fa138 --- /dev/null +++ b/meta-oe/recipes-support/avro/avro-c++/0002-Add-package-configuration-files.patch @@ -0,0 +1,84 @@ +From 86aa3f2333a9b8e6f1c631e6d5cb7296b6e8380b Mon Sep 17 00:00:00 2001 +From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com> +Date: Fri, 22 Mar 2024 13:27:38 +0000 +Subject: [PATCH] Add package configuration files + +Upstream-Status: Pending + +--- + lang/c++/CMakeLists.txt | 45 ++++++++++++++++++++++++------ + lang/c++/cmake/AvroCppConfig.cmake | 5 ++++ + 2 files changed, 42 insertions(+), 8 deletions(-) + create mode 100644 lang/c++/cmake/AvroCppConfig.cmake + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index d94ba42d3..4748b111d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -140,14 +140,18 @@ set (CPACK_PACKAGE_FILE_NAME "avrocpp-${AVRO_VERSION_MAJOR}") + + include (CPack) + +-install (TARGETS avrocpp avrocpp_s +- LIBRARY DESTINATION lib +- ARCHIVE DESTINATION lib +- RUNTIME DESTINATION lib) +- +-install (TARGETS avrogencpp RUNTIME DESTINATION bin) +- +-install (DIRECTORY api/ DESTINATION include/avro ++install (TARGETS avrocpp ++ EXPORT AvroCppTargets ++ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ RUNTIME DESTINATION ${CMAKE_INSTALL_LIBDIR} ++ INCLUDES DESTINATION include) ++ ++install (TARGETS avrogencpp ++ EXPORT AvroCppTargets ++ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) ++ ++install (DIRECTORY api/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/avro + FILES_MATCHING PATTERN *.hh) + + if (NOT CMAKE_BUILD_TYPE) +@@ -155,3 +159,28 @@ if (NOT CMAKE_BUILD_TYPE) + "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." + FORCE) + endif (NOT CMAKE_BUILD_TYPE) ++ ++# Create cmake config files ++include(CMakePackageConfigHelpers) ++write_basic_package_version_file( ++ "${CMAKE_CURRENT_BINARY_DIR}/AvroCppConfigVersion.cmake" ++ VERSION ${AVRO_VERSION_MAJOR}.${AVRO_VERSION_MINOR}.${AVRO_VERSION_PATCH} ++ COMPATIBILITY AnyNewerVersion ++) ++ ++configure_file(cmake/AvroCppConfig.cmake ++ "${CMAKE_CURRENT_BINARY_DIR}/AvroCppConfig.cmake" ++ COPYONLY ++) ++ ++set(ConfigPackageLocation ${CMAKE_INSTALL_LIBDIR}/cmake/avrocpp) ++install(EXPORT AvroCppTargets ++ FILE AvroCppTargets.cmake ++ NAMESPACE AvroCpp:: ++ DESTINATION ${ConfigPackageLocation} ++) ++install(FILES ++ "cmake/AvroCppConfig.cmake" ++ "${CMAKE_CURRENT_BINARY_DIR}/AvroCppConfigVersion.cmake" ++ DESTINATION ${ConfigPackageLocation} ++ COMPONENT Devel) +diff --git a/cmake/AvroCppConfig.cmake b/cmake/AvroCppConfig.cmake +new file mode 100644 +index 000000000..deb8aaa31 +--- /dev/null ++++ b/cmake/AvroCppConfig.cmake +@@ -0,0 +1,5 @@ ++include(CMakeFindDependencyMacro) ++find_dependency(Boost 1.38 REQUIRED ++ COMPONENTS filesystem iostreams program_options regex system) ++ ++include("${CMAKE_CURRENT_LIST_DIR}/AvroCppTargets.cmake") diff --git a/meta-oe/recipes-support/avro/avro-c++/0003-Update-CXX-standard-to-CXX14.patch b/meta-oe/recipes-support/avro/avro-c++/0003-Update-CXX-standard-to-CXX14.patch new file mode 100644 index 0000000000..3e65cb7a72 --- /dev/null +++ b/meta-oe/recipes-support/avro/avro-c++/0003-Update-CXX-standard-to-CXX14.patch @@ -0,0 +1,24 @@ +From 66c08ade24e4472b5af5dca48097ed9a2ec035ec Mon Sep 17 00:00:00 2001 +From: Rui Costa <rui.ms.costa@ctw.bmwgroup.com> +Date: Fri, 5 Apr 2024 11:33:51 +0000 +Subject: [PATCH] Update CXX standard to CXX14 + +Upstream-Status: Inappropriate [oe-specific] + +--- + lang/c++/CMakeLists.txt | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 4748b111d..1e45c13d5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -21,7 +21,7 @@ cmake_minimum_required (VERSION 3.1) + set (CMAKE_LEGACY_CYGWIN_WIN32 0) + + if (NOT DEFINED CMAKE_CXX_STANDARD) +- set(CMAKE_CXX_STANDARD 11) ++ set(CMAKE_CXX_STANDARD 14) + endif() + + set(CMAKE_CXX_STANDARD_REQUIRED ON) diff --git a/meta-oe/recipes-support/avro/avro-c++_1.11.3.bb b/meta-oe/recipes-support/avro/avro-c++_1.11.3.bb new file mode 100644 index 0000000000..0ac1decccf --- /dev/null +++ b/meta-oe/recipes-support/avro/avro-c++_1.11.3.bb @@ -0,0 +1,27 @@ +SUMMARY = "Apache Avro data serialization system." +HOMEPAGE = "https://avro.apache.org/" +SECTION = "libs" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=43abf34d8b9908494f83c55d213a7f89" + +DEPENDS = "boost zlib xz" + +BRANCH = "branch-1.11" +SRCREV = "35ff8b997738e4d983871902d47bfb67b3250734" +SRC_URI = "git://github.com/apache/avro;branch=${BRANCH};protocol=https \ + file://0001-Remove-cpp-unittest-compilation.patch \ + file://0002-Add-package-configuration-files.patch \ + file://0003-Update-CXX-standard-to-CXX14.patch \ + " + +S = "${WORKDIR}/git/lang/c++" + +inherit cmake pkgconfig + +BBCLASSEXTEND = "native nativesdk" + +# http://errors.yoctoproject.org/Errors/Details/766913/ +# avro-c++/1.11.3/git/lang/c++/impl/Compiler.cc:304:18: error: possibly dangling reference to a temporary [-Werror=dangling-reference] +# avro-c++/1.11.3/git/lang/c++/impl/Compiler.cc:370:18: error: possibly dangling reference to a temporary [-Werror=dangling-reference] +CXXFLAGS += "-Wno-error=dangling-reference" diff --git a/meta-oe/recipes-support/avro/avro-c/0001-cmake-Use-GNUInstallDirs-instead-of-hard-coded-paths.patch b/meta-oe/recipes-support/avro/avro-c/0001-cmake-Use-GNUInstallDirs-instead-of-hard-coded-paths.patch deleted file mode 100644 index 6496b92dfe..0000000000 --- a/meta-oe/recipes-support/avro/avro-c/0001-cmake-Use-GNUInstallDirs-instead-of-hard-coded-paths.patch +++ /dev/null @@ -1,70 +0,0 @@ -From f24f863f3a8ca86f44123a58613f62c3b511da1e Mon Sep 17 00:00:00 2001 -From: Khem Raj <raj.khem@gmail.com> -Date: Thu, 19 Dec 2019 18:23:41 -0800 -Subject: [PATCH] cmake: Use GNUInstallDirs instead of hard-coded paths - -This ensures that it can be built on platforms where libdir is not -/usr/lib e.g. ppc64 - -Upstream-Status: Submitted [https://github.com/apache/avro/pull/749] -Signed-off-by: Khem Raj <raj.khem@gmail.com> ---- - lang/c/CMakeLists.txt | 2 +- - lang/c/src/CMakeLists.txt | 16 +++++++++------- - 2 files changed, 10 insertions(+), 8 deletions(-) - -diff --git a/lang/c/CMakeLists.txt b/lang/c/CMakeLists.txt -index 11cbf018e..6c8d7aaf3 100644 ---- a/lang/c/CMakeLists.txt -+++ b/lang/c/CMakeLists.txt -@@ -16,7 +16,7 @@ - # specific language governing permissions and limitations - # under the License. - # --cmake_minimum_required(VERSION 2.4) -+cmake_minimum_required(VERSION 3.1) - project(AvroC) - enable_testing() - -diff --git a/lang/c/src/CMakeLists.txt b/lang/c/src/CMakeLists.txt -index 6f5659750..c1761c8de 100644 ---- a/lang/c/src/CMakeLists.txt -+++ b/lang/c/src/CMakeLists.txt -@@ -106,17 +106,19 @@ install(DIRECTORY - DESTINATION include - FILES_MATCHING PATTERN "*.h") - -+include(GNUInstallDirs) -+ - if (WIN32) - install(TARGETS avro-static -- RUNTIME DESTINATION bin -- LIBRARY DESTINATION lib -- ARCHIVE DESTINATION lib -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) - else(WIN32) - install(TARGETS avro-static avro-shared -- RUNTIME DESTINATION bin -- LIBRARY DESTINATION lib -- ARCHIVE DESTINATION lib -+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} -+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} -+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) - endif(WIN32) - -@@ -126,7 +128,7 @@ set(prefix ${CMAKE_INSTALL_PREFIX}) - set(VERSION ${AVRO_VERSION}) - configure_file(avro-c.pc.in avro-c.pc) - install(FILES ${CMAKE_CURRENT_BINARY_DIR}/avro-c.pc -- DESTINATION lib/pkgconfig) -+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) - - add_executable(avrocat avrocat.c) - target_link_libraries(avrocat avro-static) --- -2.24.1 - diff --git a/meta-oe/recipes-support/avro/avro-c_1.11.3.bb b/meta-oe/recipes-support/avro/avro-c_1.11.3.bb new file mode 100644 index 0000000000..bf84242e29 --- /dev/null +++ b/meta-oe/recipes-support/avro/avro-c_1.11.3.bb @@ -0,0 +1,23 @@ +SUMMARY = "Apache Avro data serialization system." +HOMEPAGE = "https://avro.apache.org/" +SECTION = "libs" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM = "file://LICENSE;md5=6d502b41f76179fc84e536236f359cae" + +DEPENDS = "jansson zlib xz" + +BRANCH = "branch-1.11" +SRCREV = "35ff8b997738e4d983871902d47bfb67b3250734" +SRC_URI = "git://github.com/apache/avro;branch=${BRANCH};protocol=https \ + " + +S = "${WORKDIR}/git/lang/c" + +inherit cmake pkgconfig + +# http://errors.yoctoproject.org/Errors/Details/766902/ +# avro-c/1.11.3/git/lang/c/examples/quickstop.c:123:61: error: passing argument 3 of 'first_value.iface->get_string' from incompatible pointer type [-Wincompatible-pointer-types] +# avro-c/1.11.3/git/lang/c/examples/quickstop.c:127:60: error: passing argument 3 of 'last_value.iface->get_string' from incompatible pointer type [-Wincompatible-pointer-types] +# avro-c/1.11.3/git/lang/c/examples/quickstop.c:131:61: error: passing argument 3 of 'phone_value.iface->get_string' from incompatible pointer type [-Wincompatible-pointer-types] +CFLAGS += "-Wno-error=incompatible-pointer-types" diff --git a/meta-oe/recipes-support/avro/avro-c_1.9.2.bb b/meta-oe/recipes-support/avro/avro-c_1.9.2.bb deleted file mode 100644 index 0642179fb3..0000000000 --- a/meta-oe/recipes-support/avro/avro-c_1.9.2.bb +++ /dev/null @@ -1,18 +0,0 @@ -SUMMARY = "Apache Avro data serialization system." -HOMEPAGE = "http://apr.apache.org/" -SECTION = "libs" - -LICENSE = "Apache-2.0" -LIC_FILES_CHKSUM = "file://LICENSE;md5=6d502b41f76179fc84e536236f359cae" - -DEPENDS = "jansson zlib xz" - -BRANCH = "branch-1.9" -SRCREV = "bf20128ca6138a830b2ea13e0490f3df6b035639" -SRC_URI = "git://github.com/apache/avro;branch=${BRANCH} \ - file://0001-cmake-Use-GNUInstallDirs-instead-of-hard-coded-paths.patch;patchdir=../../ \ - " - -S = "${WORKDIR}/git/lang/c" - -inherit cmake |