Subject: [PATCH 2/3] gnu: Add lttoolbox.

From: Arun Isaac <[email-masked]>
Date: Fri, 30 Nov 2018 12:46:11 +0530

* gnu/packages/dictionaries.scm (lttoolbox): New variable.
---
 gnu/packages/dictionaries.scm | 43 ++++++++++++++++++++++++++++++++++-
 1 file changed, 42 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm
index 57aac87fc..b97535979 100644
--- a/gnu/packages/dictionaries.scm
+++ b/gnu/packages/dictionaries.scm
@@ -30,15 +30,18 @@
   #:use-module (guix build-system python)
   #:use-module (guix build-system trivial)
   #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
   #:use-module (gnu packages curl)
   #:use-module (gnu packages emacs)
   #:use-module (gnu packages fribidi)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages readline)
   #:use-module (gnu packages texinfo)
   #:use-module (gnu packages compression)
-  #:use-module (gnu packages tcl))
+  #:use-module (gnu packages tcl)
+  #:use-module (gnu packages xml))

 (define-public vera
@@ -286,3 +289,41 @@ Yandex.Translate and Apertium.  It gives you easy access to one of these
 translation engines from your terminal.")
     (license license:public-domain)))
 
+(define-public lttoolbox
+  (package
+    (name "lttoolbox")
+    (version "3.5.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://github.com/apertium/lttoolbox/releases/download/v"
+             version "/lttoolbox-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0p8yjjyx1jqhxj8n5afmmhb55h4xg8gn2pysx0k2mnp8ic1hnzri"))
+       (file-name (string-append name "-" version ".tar.gz"))))
+    (build-system gnu-build-system)
+    (inputs
+     `(("libxml2" ,libxml2)))
+    (native-inputs
+     `(("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("libtool" ,libtool)
+       ("pkg-config" ,pkg-config)))
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-autogen
+           (lambda _
+             (substitute* "autogen.sh"
+               ((" && ./configure \"\\$@\"") ""))
+             #t)))))
+    (home-page "http://wiki.apertium.org/wiki/Lttoolbox")
+    (synopsis "Lexical processing toolbox")
+    (description "Lttoolbox is a toolbox for lexical processing, morphological
+analysis and generation of words.  Analysis is the process of splitting a
+word (e.g. cats) into its lemma \"cat\" and the grammatical information
+<n><pl>.  Generation is the opposite process.")
+    (license (list license:gpl2 ; main license
+                   license:expat)))) ; utf8/*
-- 
2.19.1