unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: dan <i@dan.games>
To: 65107@debbugs.gnu.org
Subject: [bug#65107] [PATCH v2] gnu: Add gf.
Date: Tue,  8 Aug 2023 09:57:59 +0800	[thread overview]
Message-ID: <20230808015808.5485-1-i@dan.games> (raw)
In-Reply-To: <20230806055213.29704-1-i@dan.games>

The following is the updated patch changed according to Hilton's
suggestion. Note that for the vim version in guix we don't have `--servername'
support, but I patched it anyway.

---
 gnu/packages/debug.scm | 91 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 91 insertions(+)

diff --git a/gnu/packages/debug.scm b/gnu/packages/debug.scm
index e2a29a3ae9..57d0d3b479 100644
--- a/gnu/packages/debug.scm
+++ b/gnu/packages/debug.scm
@@ -13,6 +13,7 @@
 ;;; Copyright © 2022 Matthew James Kraai <kraai@ftbfs.org>
 ;;; Copyright © 2023 Andy Tai <atai@atai.org>
 ;;; Copyright © 2023 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2023 dan <i@dan.games>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -50,6 +51,8 @@ (define-module (gnu packages debug)
   #:use-module (gnu packages code)
   #:use-module (gnu packages compression)
   #:use-module (gnu packages flex)
+  #:use-module (gnu packages fontutils)
+  #:use-module (gnu packages gawk)
   #:use-module (gnu packages gdb)
   #:use-module (gnu packages glib)
   #:use-module (gnu packages gtk)
@@ -71,6 +74,7 @@ (define-module (gnu packages debug)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages serialization)
   #:use-module (gnu packages texinfo)
+  #:use-module (gnu packages vim)
   #:use-module (gnu packages virtualization)
   #:use-module (gnu packages xdisorg)
   #:use-module (gnu packages xorg)
@@ -918,3 +922,90 @@ (define-public delve
     (synopsis "Debugger for the Go programming language")
     (description "Delve is a debugger for the Go programming language.")
     (license license:expat)))
+
+(define-public gf
+  (let ((commit "77a1f69204ceca5e62936976f97c62085a705126")
+        (revision "0"))
+    (package
+      (name "gf")
+      (version (git-version "0.0.0" revision commit))
+      (source (origin
+                (method git-fetch)
+                (uri (git-reference
+                      (url "https://github.com/nakst/gf")
+                      (commit commit)))
+                (sha256
+                 (base32
+                  "167ykfv7vf5vajxd5m3ggw4avpcim0i0bfmbxb495n8rgpaiizdy"))
+                (file-name (git-file-name name version))))
+      (build-system gnu-build-system)
+      (arguments
+       (list #:tests? #f ; no test
+             #:make-flags #~(list "-g"
+                                  "-O2"
+                                  "-lX11"
+                                  "-lfreetype"
+                                  "-pthread"
+                                  (string-append "-I"
+                                                 #$(this-package-input
+                                                    "freetype")
+                                                 "/include/freetype2")
+                                  "-DUI_FREETYPE"
+                                  "-DUI_NO_COLOR_PICKER"
+                                  "-DUI_SSE2"
+                                  "-Wall"
+                                  "-Wextra"
+                                  "-Wno-unused-parameter"
+                                  "-Wno-unused-result"
+                                  "-Wno-missing-field-initializers"
+                                  "-Wno-format-truncation")
+             #:phases #~(modify-phases %standard-phases
+                          (add-after 'unpack 'patch-path
+                            (lambda* (#:key inputs outputs #:allow-other-keys)
+                              (substitute* "gf2.cpp"
+                                (("\"gdb\";")
+                                 (format #f "\"~a\";"
+                                         (search-input-file inputs "/bin/gdb")))
+                                (("\"vim ")
+                                 (format #f "\"~a "
+                                         (search-input-file inputs "/bin/vim")))
+                                (("grep")
+                                 (format #f "~a"
+                                         (search-input-file inputs "/bin/grep")))
+                                (("fc-list")
+                                 (format #f "~a"
+                                         (search-input-file inputs
+                                                            "/bin/fc-list")))
+                                (("fc-match")
+                                 (format #f "~a"
+                                         (search-input-file inputs
+                                                            "/bin/fc-match")))
+                                (("awk")
+                                 (format #f "~a"
+                                         (search-input-file inputs "/bin/awk"))))))
+                          (delete 'configure)
+                          (replace 'build
+                            (lambda* (#:key make-flags #:allow-other-keys)
+                              (apply invoke
+                                     #$(cxx-for-target)
+                                     "gf2.cpp"
+                                     "-o"
+                                     "gf2"
+                                     make-flags)))
+                          (replace 'install
+                            (lambda* _
+                              (install-file "gf2"
+                                            (string-append #$output "/bin")))))))
+      (inputs (list fontconfig
+                    freetype
+                    gawk
+                    gdb
+                    grep
+                    libx11
+                    libxext
+                    libxcursor
+                    vim))
+      (home-page "https://github.com/nakst/gf")
+      (synopsis "GDB frontend")
+      (description "A graphical GDB frontend for Linux.")
+      (license license:expat))))

base-commit: d43b53c476b4e9322b31274b788e851d37e72302
-- 
2.41.0





  parent reply	other threads:[~2023-08-08  2:00 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-06  5:52 [bug#65107] [PATCH] gnu: Add gf dan
2023-08-06 14:51 ` Hilton Chain via Guix-patches via
2023-08-07  1:58   ` Hilton Chain via Guix-patches via
2023-08-08  1:57 ` dan [this message]
2023-08-16 14:23   ` [bug#65107] [PATCH v2] " Hilton Chain via Guix-patches via

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20230808015808.5485-1-i@dan.games \
    --to=i@dan.games \
    --cc=65107@debbugs.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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).