all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add ding.
@ 2016-09-03 20:26 John Darrington
  2016-09-05 21:05 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: John Darrington @ 2016-09-03 20:26 UTC (permalink / raw)
  To: guix-devel; +Cc: John Darrington

* gnu/packages/dictionaries.scm (ding): New variable.
---
 gnu/packages/dictionaries.scm | 70 ++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 69 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 931db62..b38b6d0 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -26,7 +26,9 @@
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages base)
   #:use-module (gnu packages texinfo)
-  #:use-module (gnu packages compression))
+  #:use-module (gnu packages compression)
+  #:use-module (gnu packages tcl))
+
 
 (define-public vera
   (package
@@ -138,3 +140,69 @@ body of text.  Style instead analyzes surface aspects of a written
 work, such as sentence length and other readability measures.")
     (home-page "https://www.gnu.org/software/diction/")
     (license gpl3+)))
+
+(define-public ding
+  (package
+    (name "ding")
+    (version "1.8")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "http://ftp.tu-chemnitz.de/pub/Local/urz/" name
+                                  "/" name "-" version ".tar.gz"))
+              (sha256
+               (base32
+                "00z97ndwmzsgig9q6y98y8nbxy76pyi9qyj5qfpbbck24gakpz5l"))))
+    (build-system gnu-build-system)
+    (inputs `(("tk" ,tk)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (delete 'configure)
+         (delete 'build)
+         (delete 'check)
+         (replace
+             'install
+           (lambda _
+             (let ((bindir (string-append
+                            (assoc-ref %outputs "out") "/bin"))
+                   (wish (string-append
+                          (assoc-ref %build-inputs "tk")
+                          "/bin/wish8.6"))
+                   (sharedir (string-append
+                              (assoc-ref %outputs "out")
+                              "/share/applications"))
+                   (libdir (string-append
+                            (assoc-ref %outputs "out") "/lib")))
+               (mkdir-p bindir)
+               (mkdir-p libdir)
+               (mkdir-p sharedir)
+
+               (substitute* "ding.desktop"
+                 (("Exec=/usr/bin/ding")
+                  (string-append "Exec=" bindir "/ding")))
+               ;; It seems that substitute* cannot handle this file.
+               ;; ISO-8859-1 encoding ?
+               (zero? (system*
+                       "sed" "-i" "-e"
+                       (string-append
+                        "s%exec wish%" "exec " wish "%" ) "ding"))
+               (substitute* "install.sh"
+                 (("/bin/cp") "cp")
+                 (("/bin/mv") "mv")
+                 (("NEEDPROG=\"wish\"")
+                  (string-append "NEEDPROG=\"" wish "\""))
+                 (("DEFBINDIR=\"/usr/local/bin\"")
+                  (string-append "DEFBINDIR=\"" bindir "\""))
+                 (("DEFLIBDIR=\"/usr/local/lib\"")
+                  (string-append "DEFLIBDIR=\"" libdir "\"")))
+               (copy-file "ding.desktop"
+                          (string-append sharedir "/ding.desktop"))
+               (copy-file "ding.png"
+                          (string-append sharedir "/ding.png"))
+               (zero?
+                (system* "./install.sh"))))))))
+    (synopsis "Dictionary lookup program with a German-English dictionary")
+    (description "Ding is a dictionary lookup program for the X window system.
+It comes with a German-English dictionary with approximately 270,000 entries.")
+    (home-page  "http://www-user.tu-chemnitz.de/~fri/ding/")
+    (license gpl2+)))
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: Add ding.
  2016-09-03 20:26 [PATCH] gnu: Add ding John Darrington
@ 2016-09-05 21:05 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-09-05 21:05 UTC (permalink / raw)
  To: John Darrington; +Cc: guix-devel

John Darrington <jmd@gnu.org> skribis:

> * gnu/packages/dictionaries.scm (ding): New variable.

Please add a copyright line for yourself.

> +               ;; It seems that substitute* cannot handle this file.
> +               ;; ISO-8859-1 encoding ?
> +               (zero? (system*
> +                       "sed" "-i" "-e"
> +                       (string-append
> +                        "s%exec wish%" "exec " wish "%" ) "ding"))

Should work with:

  (with-fluids ((%default-port-encoding "ISO-8859-1"))
    (substitute* …))

> +               (copy-file "ding.desktop"
> +                          (string-append sharedir "/ding.desktop"))

Rather: (install-file "ding.desktop" sharedir).

> +               (copy-file "ding.png"
> +                          (string-append sharedir "/ding.png"))

Likewise.

> +               (zero?
> +                (system* "./install.sh"))))))))
> +    (synopsis "Dictionary lookup program with a German-English dictionary")
> +    (description "Ding is a dictionary lookup program for the X window system.
> +It comes with a German-English dictionary with approximately 270,000 entries.")
> +    (home-page  "http://www-user.tu-chemnitz.de/~fri/ding/")
> +    (license gpl2+)))

OK with these changes.

Thank you!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-09-05 21:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-03 20:26 [PATCH] gnu: Add ding John Darrington
2016-09-05 21:05 ` Ludovic Courtès

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.