diff --git a/recipes/libdwarf/all/conandata.yml b/recipes/libdwarf/all/conandata.yml index 1e971725e12e4..447c92daa744f 100644 --- a/recipes/libdwarf/all/conandata.yml +++ b/recipes/libdwarf/all/conandata.yml @@ -1,7 +1,7 @@ sources: - # "0.9.1": - # url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.1.tar.gz" - # sha256: "6da3f46a9f92b4e284c97c733851879d9b91b16642bede90c7614860a946824e" + "0.9.1": + url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.1.tar.gz" + sha256: "6da3f46a9f92b4e284c97c733851879d9b91b16642bede90c7614860a946824e" "0.9.0": url: "https://github.com/davea42/libdwarf-code/archive/refs/tags/v0.9.0.tar.gz" sha256: "6d4c0ee8a869e68dfeb15c99b869cafca7a5f715ecfc699cbf4fd30729b33226" @@ -18,10 +18,10 @@ sources: url: "https://www.prevanders.net/libdwarf-20191104.tar.gz" sha256: "45f50a966314421b7dab525859853616df6c9680f0ccf2f44b030c505236eaba" patches: - # "0.9.1": - # - patch_file: "patches/0.9.1-0001-fixes.patch" - # patch_description: "fix DW_API definition and cmake" - # patch_type: "portability" + "0.9.1": + - patch_file: "patches/0.9.1-0001-fixes.patch" + patch_description: "fix DW_API definition and cmake" + patch_type: "portability" "0.9.0": - patch_file: "patches/0.9.0-0001-fixes.patch" patch_description: "fix DW_API definition and cmake" diff --git a/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch b/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch index 7e6e8b584a206..39a6c30a5adfa 100644 --- a/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch +++ b/recipes/libdwarf/all/patches/0.9.1-0001-fixes.patch @@ -1,24 +1,35 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt -index 70839abd..bac973c3 100644 +index 70839abd..04b0f86f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -198,6 +198,12 @@ if (ENABLE_DECOMPRESSION) +@@ -196,6 +196,12 @@ if (ENABLE_DECOMPRESSION) + set(HAVE_ZSTD TRUE) + set(HAVE_ZSTD_H TRUE) endif() ++ find_package(zstd CONFIG REQUIRED) ++ if(TARGET zstd::libzstd_shared) ++ set(ZSTD_LIB zstd::libzstd_shared) ++ else() ++ set(ZSTD_LIB zstd::libzstd_static) ++ endif() endif () -+if(TARGET zstd::libzstd_shared) -+ add_library(ZSTD::ZSTD ALIAS zstd::libzstd_shared) -+else() -+ add_library(ZSTD::ZSTD ALIAS zstd::libzstd_static) -+endif() -+ message(STATUS "CMAKE_SIZEOF_VOID_P ... " ${CMAKE_SIZEOF_VOID_P} ) # DW_FWALLXX are gnu C++ options. diff --git a/src/lib/libdwarf/CMakeLists.txt b/src/lib/libdwarf/CMakeLists.txt -index 7500c9f4..6024d246 100644 +index 7500c9f4..2cb66e72 100644 --- a/src/lib/libdwarf/CMakeLists.txt +++ b/src/lib/libdwarf/CMakeLists.txt +@@ -105,7 +105,7 @@ target_include_directories(dwarf PUBLIC + $ + ) + if(ZLIB_FOUND AND ZSTD_FOUND) +- target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ZSTD::ZSTD ) ++ target_link_libraries(dwarf PRIVATE ZLIB::ZLIB ${ZSTD_LIB} ) + endif() + set_target_properties(dwarf PROPERTIES PUBLIC_HEADER "libdwarf.h;dwarf.h") + @@ -116,7 +116,7 @@ install(TARGETS dwarf PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" ) @@ -34,6 +45,7 @@ index 7500c9f4..6024d246 100644 install(FILES cmake/libdwarf-config.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/libdwarf") -install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") +# install(FILES "${PROJECT_BINARY_DIR}/src/lib/libdwarf/libdwarf.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig") + diff --git a/src/lib/libdwarf/libdwarf.h b/src/lib/libdwarf/libdwarf.h index 380d2ef7..8c62ee7e 100644 --- a/src/lib/libdwarf/libdwarf.h @@ -47,3 +59,19 @@ index 380d2ef7..8c62ee7e 100644 # ifdef LIBDWARF_BUILD # define DW_API __declspec(dllexport) # else /* !LIBDWARF_BUILD */ +diff --git a/src/lib/libdwarf/libdwarf_private.h b/src/lib/libdwarf/libdwarf_private.h +index b37ae994..7fa89256 100644 +--- a/src/lib/libdwarf/libdwarf_private.h ++++ b/src/lib/libdwarf/libdwarf_private.h +@@ -26,11 +26,7 @@ + #ifdef _MSC_VER /* Macro to select VS compiler */ + #include + typedef SSIZE_T ssize_t; +-#ifdef _WIN64 +-typedef long long off_t; +-#else + typedef long off_t; +-#endif + #endif /* _MSC_VER */ + + #ifndef TRUE diff --git a/recipes/libdwarf/config.yml b/recipes/libdwarf/config.yml index 0d30b461e6eef..0df39e5417ce4 100644 --- a/recipes/libdwarf/config.yml +++ b/recipes/libdwarf/config.yml @@ -1,6 +1,6 @@ versions: - # "0.9.1": - # folder: all + "0.9.1": + folder: all "0.9.0": folder: all "0.8.0":