sysutils/libtree: new port, libtree 3.1.1

This commit is contained in:
c0dev0id
2026-07-08 11:09:42 +02:00
parent 00c32ca2ed
commit bc3689e565
6 changed files with 59 additions and 0 deletions

27
sysutils/libtree/Makefile Normal file
View File

@@ -0,0 +1,27 @@
COMMENT = ldd as a tree
GH_ACCOUNT = haampie
GH_PROJECT = libtree
GH_TAGNAME = v3.1.1
REVISION = 1
CATEGORIES = sysutils
MAINTAINER = Laurent Cheylus <foxy@free.fr>
# MIT
PERMIT_PACKAGE = Yes
WANTLIB = c
USE_GMAKE = Yes
TEST_TARGET = check
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/libtree ${PREFIX}/bin
${INSTALL_MAN_DIR} ${PREFIX}/man/man1
${INSTALL_MAN} ${WRKSRC}/doc/libtree.1 ${PREFIX}/man/man1
.include <bsd.port.mk>

View File

@@ -0,0 +1,2 @@
SHA256 (libtree-3.1.1.tar.gz) = YUhDb1QpaUXSJCAlTdeOGCnWASS7L1uYgTIKZVD3P1w=
SIZE (libtree-3.1.1.tar.gz) = 79931

View File

@@ -0,0 +1,14 @@
Default library paths for OpenBSD
Index: libtree.c
--- libtree.c.orig
+++ libtree.c
@@ -1532,7 +1532,7 @@ static void parse_ld_library_path(struct libtree_state
static void set_default_paths(struct libtree_state_t *s) {
s->default_paths_offset = s->string_table.n;
// TODO: how to retrieve this list properly at runtime?
- string_table_store(&s->string_table, "/lib:/lib64:/usr/lib:/usr/lib64");
+ string_table_store(&s->string_table, "/usr/lib:/usr/local/lib:/usr/X11R6/lib");
}
static void libtree_state_init(struct libtree_state_t *s) {

View File

@@ -0,0 +1,12 @@
Index: tests/07_origin_is_relative_to_symlink_location_not_realpath/Makefile
--- tests/07_origin_is_relative_to_symlink_location_not_realpath/Makefile.orig
+++ tests/07_origin_is_relative_to_symlink_location_not_realpath/Makefile
@@ -18,7 +18,7 @@ a/libg.so: a/libf.so
b/libg.so: a/libg.so
mkdir -p $(@D)
- ln -vs ../a/libg.so $@
+ ln -s ../a/libg.so $@
exe: a/libg.so b/libg.so
echo 'extern int g(); int _start(){return g();};' | $(CC) -Wl,-soname,$(@F) '-Wl,-rpath,$${ORIGIN}/b' -o $@ -x c - -La -lg -nostdlib

View File

@@ -0,0 +1,2 @@
libtree is a tool that turns ldd into a tree and can explain how shared
libraries are found or why they cannot be located.

View File

@@ -0,0 +1,2 @@
@bin bin/libtree
@man man/man1/libtree.1