libtree for linux portable?

With minimal patching, it kinda work.
What I did install: devel/cxxopts, devel/termcolor, devel/elfio
For patching:
Creating directory: /usr/local/share/elfio/cmake

And adding the file: elfioConfig.cmake, elfioConfigVersion.cmake, elfioTargets.cmake from a cmake build directory of elfio (don't know why elfio didn't install them, maybe they used autoconf for the ports tree)

And finally since AT_PLATFORM is not defined (and I didn't bother to check where is getauxval), here is a patch for libtree
Code:
diff --git a/src/main.cpp b/src/main.cpp
index cebca68..9266ada 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -18,7 +18,7 @@ namespace fs = std::filesystem;
 int main(int argc, char ** argv) {
     cxxopts::Options options("libtree", "Show the dependency tree of binaries and optionally bundle them into a single folder.");
 
-#if defined(LIBTREE_HAS_AUXV_HEADER)
+#if defined(LIBTREE_HAS_AUXV_HEADER) and not defined(__FreeBSD__)
     auto default_platform = reinterpret_cast<char const *>(getauxval(AT_PLATFORM));
 #else
     // Default to x86_64 substitution for PLATFORM if getauxval is not available.
 

Attachments

  • libtree.png
    libtree.png
    66.3 KB · Views: 82
Back
Top