[PATCH] gnu: Add ddd

  • Done
  • quality assurance status badge
Details
2 participants
  • Andy Tai
  • Nicolas Goaziou
Owner
unassigned
Submitted by
Andy Tai
Severity
normal

Debbugs page

Andy Tai wrote 2 years ago
(address . guix-patches@gnu.org)(name . Andy Tai)(address . atai@atai.org)
20230212004023.2459-1-atai@atai.org
* gnu/packages/debug.scm (ddd): New variable
---
gnu/packages/debug.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (75 lines)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 22b3cd862d..e91d798a3b 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2022 Matthew James Kraai <kraai@ftbfs.org>
+;;; Copyright © 2023 Andy Tai <atai@atai.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -53,6 +54,7 @@ (define-module (gnu packages debug)
#:use-module (gnu packages gtk)
#:use-module (gnu packages golang)
#:use-module (gnu packages image)
+ #:use-module (gnu packages lesstif) ; motif
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
@@ -70,6 +72,7 @@ (define-module (gnu packages debug)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xorg)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1))
@@ -860,6 +863,44 @@ (define-public seer-gdb
;; Note: Some icons in src/resources are creative commons 3.0 and/or 4.0.
(license license:gpl3+)))
+(define-public ddd
+ (package
+ (name "ddd")
+ (version "3.3.12")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/ddd/ddd-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0p5nx387857w3v2jbgvps2p6mlm0chajcdw5sfrddcglsxkwvmis"))))
+ (build-system gnu-build-system)
+ (inputs (list motif ncurses gdb))
+ (native-inputs (list pkg-config xorg-server-for-tests))
+ (arguments
+ (list #:tests? #f ;Those are manual
+ ;; avoid "friend declaration specifies default arguments and isn’t a definition" errors.
+ #:configure-flags #~(list "CXXFLAGS=-fpermissive")
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'pre-check
+ (lambda* (#:key native-inputs inputs
+ #:allow-other-keys)
+ (setenv "HOME" "/tmp")
+ (let ((xvfb (search-input-file (or native-inputs
+ inputs)
+ "bin/Xvfb"))
+ (display ":1"))
+ (setenv "DISPLAY" display)
+ (system (string-append xvfb " " display " &"))))))))
+ (synopsis "graphical front end for the command-line debugger GDB")
+ (description
+ "GNU Data Display Debugger (GNU DDD) is a graphical user interface ]
+(using the Motif toolkit) for command-line debuggers such as GDB,
+DBX, JDB, HP Wildebeest Debugger, XDB, the Perl debugger, the Bash
+debugger, the Python debugger, and the GNU Make debugger.")
+ (home-page "https://www.gnu.org/software/ddd/")
+ (license license:gpl3+)))
+
+
(define-public delve
(package
(name "delve")
--
2.39.1
Nicolas Goaziou wrote 2 years ago
(name . Andy Tai)(address . atai@atai.org)(address . 61442@debbugs.gnu.org)
877cwftdhl.fsf@nicolasgoaziou.fr
Hello,

Andy Tai <atai@atai.org> writes:

Toggle quote (2 lines)
> * gnu/packages/debug.scm (ddd): New variable

Thank you. Some comments follow.

Toggle quote (4 lines)
> + (build-system gnu-build-system)
> + (inputs (list motif ncurses gdb))
> + (native-inputs (list pkg-config xorg-server-for-tests))

Nitpick: Could you move these 2 lines after arguments?

Toggle quote (3 lines)
> + (arguments
> + (list #:tests? #f ;Those are manual

If I understand correctly, you're running tests in the `pre-check'
phase. Then this is not the correct way to proceed.

First you need to remove this keyword, and use (replace 'check ...)
instead of (add-before 'check 'pre-check ...)

Toggle quote (2 lines)
> + ;; avoid "friend declaration specifies default arguments and isn’t a definition" errors.

Nitpick: ;; Avoid ...

and proper filling.

Toggle quote (6 lines)
> + #:configure-flags #~(list "CXXFLAGS=-fpermissive")
> + #:phases #~(modify-phases %standard-phases
> + (add-before 'check 'pre-check
> + (lambda* (#:key native-inputs inputs
> + #:allow-other-keys)

Here you need to add "tests?" key, then wrap the function body within

(when tests? ...)
Toggle quote (8 lines)
> + (setenv "HOME" "/tmp")
> + (let ((xvfb (search-input-file (or native-inputs
> + inputs)
> + "bin/Xvfb"))
> + (display ":1"))
> + (setenv "DISPLAY" display)
> + (system (string-append xvfb " " display " &"))))))))

Should this be (invoke xvfb ":1 &") ?

Toggle quote (2 lines)
> + (synopsis "graphical front end for the command-line debugger GDB")

graphical -> Graphical.

Toggle quote (3 lines)
> + (description
> + "GNU Data Display Debugger (GNU DDD) is a graphical user interface ]

Spurious "]" character.

Could you send an updated patch?

Regards,
--
Nicolas Goaziou
Andy Tai wrote 2 years ago
[PATCH v2] gnu: Add ddd
(name . Andy Tai)(address . atai@atai.org)
20230219010836.18268-1-atai@atai.org
* gnu/packages/debug.scm (ddd): New variable
---
gnu/packages/debug.scm | 33 +++++++++++++++++++++++++++++++++
1 file changed, 33 insertions(+)

Toggle diff (69 lines)
diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index 22b3cd862d..d70a653667 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -11,6 +11,7 @@
;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
;;; Copyright © 2022 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2022 Matthew James Kraai <kraai@ftbfs.org>
+;;; Copyright © 2023 Andy Tai <atai@atai.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -53,6 +54,7 @@ (define-module (gnu packages debug)
#:use-module (gnu packages gtk)
#:use-module (gnu packages golang)
#:use-module (gnu packages image)
+ #:use-module (gnu packages lesstif) ; motif
#:use-module (gnu packages libusb)
#:use-module (gnu packages linux)
#:use-module (gnu packages llvm)
@@ -70,6 +72,7 @@ (define-module (gnu packages debug)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages virtualization)
#:use-module (gnu packages xdisorg)
+ #:use-module (gnu packages xorg)
#:use-module (ice-9 match)
#:use-module (srfi srfi-1))
@@ -860,6 +863,36 @@ (define-public seer-gdb
;; Note: Some icons in src/resources are creative commons 3.0 and/or 4.0.
(license license:gpl3+)))
+(define-public ddd
+ (package
+ (name "ddd")
+ (version "3.3.12")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/ddd/ddd-" version ".tar.gz"))
+ (sha256
+ (base32
+ "0p5nx387857w3v2jbgvps2p6mlm0chajcdw5sfrddcglsxkwvmis"))))
+ (build-system gnu-build-system)
+ (inputs
+ (list motif ncurses gdb))
+ (native-inputs
+ (list pkg-config))
+ (arguments
+ (list #:tests? #f ;Those tests are manual
+ ;; Avoid "friend declaration specifies default arguments
+ ;; and isn’t a definition" errors.
+ #:configure-flags #~(list "CXXFLAGS=-fpermissive")))
+ (synopsis "Graphical front-end for GDB and other debuggers")
+ (description "GNU DDD, the Data Display Debugger, is a graphical front-end for
+command-line debuggers. Many back-end debuggers are supported, notably the
+GNU debugger, GDB. In addition to usual debugging features such as viewing
+the source files, DDD has additional graphical, interactive features to aid
+in debugging.")
+ (home-page "https://www.gnu.org/software/ddd/")
+ (license license:gpl3+)))
+
+
(define-public delve
(package
(name "delve")

base-commit: 037c1b254a84d656b87b6bbb9c339bc04cfdb0a8
--
2.39.1
Andy Tai wrote 2 years ago
CAJsg1E88UQKAanFyYCnW+KWnjje+MSBSUM6gY4s1+WCzKOE-dA@mail.gmail.com
as test is disabled (requiring manual interaction), scheme code
driving tests removed
Nicolas Goaziou wrote 2 years ago
Re: [bug#61442] [PATCH v2] gnu: Add ddd
(name . Andy Tai)(address . atai@atai.org)(address . 61442-done@debbugs.gnu.org)
87cz66rl5j.fsf@nicolasgoaziou.fr
Hello,

Andy Tai <atai@atai.org> writes:

Toggle quote (2 lines)
> * gnu/packages/debug.scm (ddd): New variable

Applied. Thank you.

Regards,
--
Nicolas Goaziou
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 61442@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 61442
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help