all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
To: Maxime Devos <maximedevos@telenet.be>
Cc: othacehe@gnu.org, Julien Lepiller <julien@lepiller.eu>,
	52472@debbugs.gnu.org
Subject: [bug#52472] [PATCH] gnu: Add libtree
Date: Mon, 17 Jan 2022 22:14:08 +0300	[thread overview]
Message-ID: <87iluijhtr.fsf@gmail.com> (raw)
In-Reply-To: <b4910fd9166b93d64831b68536e7884a8d99673e.camel@telenet.be> (Maxime Devos's message of "Mon, 17 Jan 2022 20:02:13 +0100")


[-- Attachment #1.1: Type: text/plain, Size: 644 bytes --]

Hello,

> I suggest removing '#:tests?

Okay, done.

> Guix doesn't do staged installation

Unfortunately it seems to me that libtree fails when I remove
'(string-append "DESTDIR=" #$output)' from the make flags.

The reason is this code from libtree Makefile:

--8<---------------cut here---------------start------------->8---
install: all
	mkdir -p $(DESTDIR)$(BINDIR)
	cp -p libtree $(DESTDIR)$(BINDIR)
	mkdir -p $(DESTDIR)$(SHAREDIR)/man/man1
	cp -p doc/libtree.1 $(DESTDIR)$(SHAREDIR)/man/man1
--8<---------------cut here---------------end--------------->8---

As you can see it's using 'DESTDIR' as prefix for the installation.

- Artyom

[-- Attachment #1.2: 0001-gnu-Add-libtree.patch --]
[-- Type: text/x-diff, Size: 2415 bytes --]

From 1808690c43044fdd9340c75c6d726a5f71dd8c64 Mon Sep 17 00:00:00 2001
From: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Date: Mon, 13 Dec 2021 23:34:29 +0300
Subject: [PATCH] gnu: Add libtree

* gnu/packages/linux.scm (libtree): New variable.
---
 gnu/packages/linux.scm | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm
index 5f471beaaf..a68f35ebf0 100644
--- a/gnu/packages/linux.scm
+++ b/gnu/packages/linux.scm
@@ -60,6 +60,8 @@
 ;;; Copyright © 2021 Olivier Dion <olivier.dion@polymtl.ca>
 ;;; Copyright © 2021 Solene Rapenne <solene@perso.pw>
 ;;; Copyright © 2021 Petr Hodina <phodina@protonmail.com>
+;;; Copyright © 2022 Artyom V. Poptsov <poptsov.artyom@gmail.com>
+
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -8761,3 +8763,37 @@ older system-wide @file{/sys} interface.")
     (license (list license:lgpl2.1+   ;; libgpiod
                    license:gpl2+      ;; gpio-tools
                    license:lgpl3+)))) ;; C++ bindings
+
+(define-public libtree
+  (package
+    (name "libtree")
+    (version "3.0.2")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/haampie/libtree")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "072624anz9g01mp5vfkahfmzy0nb7axg5rwk3n1yrdm4hr3d4zrb"))))
+    (arguments
+     (list #:make-flags
+           ;; NOTE: Official documentation recommends to build libtree with
+           ;; "-static" flag.
+           #~(list (string-append "CC=" #$(cc-for-target))
+                   "PREFIX=/"
+                   (string-append "DESTDIR=" #$output))
+           #:phases
+           #~(modify-phases %standard-phases
+               (delete 'configure)
+               (replace 'build
+                 (lambda* (#:key make-flags #:allow-other-keys)
+                   (apply invoke "make" make-flags))))))
+    (build-system gnu-build-system)
+    (home-page "https://github.com/haampie/libtree")
+    (synopsis "Show output of @command{ldd} as a tree")
+    (description
+     "This tool turns @command{ldd} into a tree and explains how shared
+libraries are found or why they cannot be located.")
+    (license license:expat)))
-- 
2.25.1


[-- Attachment #1.3: Type: text/plain, Size: 207 bytes --]


-- 
Artyom "avp" Poptsov <poptsov.artyom@gmail.com>
Home page: https://memory-heap.org/~avp/
CADR Hackerspace co-founder: https://cadrspace.ru/
GPG: D0C2 EAC1 3310 822D 98DE  B57C E9C5 A2D9 0898 A02F

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

  reply	other threads:[~2022-01-17 19:15 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-13 20:42 [bug#52472] [PATCH] gnu: Add libtree Artyom V. Poptsov
2021-12-18  8:02 ` Artyom V. Poptsov
2021-12-19  9:48   ` Mathieu Othacehe
2021-12-19 12:50     ` Julien Lepiller
2022-01-13  3:30       ` Artyom V. Poptsov
2022-01-13  7:38         ` Maxime Devos
2022-01-13 17:18           ` Artyom V. Poptsov
2022-01-13 17:37             ` Maxime Devos
2022-01-13 17:51               ` Artyom V. Poptsov
2022-01-17 18:09                 ` Artyom V. Poptsov
2022-01-17 19:02                   ` Maxime Devos
2022-01-17 19:14                     ` Artyom V. Poptsov [this message]
2022-01-17 19:22                       ` Maxime Devos
2022-01-28 18:30                         ` Artyom V. Poptsov
2022-01-28 18:54                           ` Maxime Devos
2022-02-04 18:25                             ` Artyom V. Poptsov
2022-02-04 19:19                               ` Maxime Devos
2022-02-05  5:50                                 ` Artyom V. Poptsov
2022-02-05 10:56                                   ` Maxime Devos
2022-02-05 11:34                                     ` Artyom V. Poptsov
2022-03-09 22:06                                       ` bug#52472: " Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87iluijhtr.fsf@gmail.com \
    --to=poptsov.artyom@gmail.com \
    --cc=52472@debbugs.gnu.org \
    --cc=julien@lepiller.eu \
    --cc=maximedevos@telenet.be \
    --cc=othacehe@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.