From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51140) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gTrS1-0000nr-Sl for guix-patches@gnu.org; Mon, 03 Dec 2018 11:52:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gTrRz-0002do-0D for guix-patches@gnu.org; Mon, 03 Dec 2018 11:52:05 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:55112) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gTrRy-0002dj-TQ for guix-patches@gnu.org; Mon, 03 Dec 2018 11:52:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1gTrRy-0007tf-R1 for guix-patches@gnu.org; Mon, 03 Dec 2018 11:52:02 -0500 Subject: [bug#33540] [PATCH v2 3/3] gnu: Add apertium. Resent-Message-ID: From: Arun Isaac Date: Mon, 3 Dec 2018 22:20:23 +0530 Message-Id: <20181203165024.25334-4-arunisaac@systemreboot.net> In-Reply-To: <20181203165024.25334-1-arunisaac@systemreboot.net> References: <20181203165024.25334-1-arunisaac@systemreboot.net> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 33540@debbugs.gnu.org * gnu/packages/dictionaries.scm (apertium): New variable. --- gnu/packages/dictionaries.scm | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/gnu/packages/dictionaries.scm b/gnu/packages/dictionaries.scm index 6f58eee0a..039ec4596 100644 --- a/gnu/packages/dictionaries.scm +++ b/gnu/packages/dictionaries.scm @@ -26,6 +26,7 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system python) #:use-module (guix build-system trivial) @@ -34,9 +35,12 @@ #:use-module (gnu packages base) #:use-module (gnu packages curl) #:use-module (gnu packages emacs) + #:use-module (gnu packages flex) #:use-module (gnu packages fribidi) #:use-module (gnu packages linux) + #:use-module (gnu packages pcre) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages readline) #:use-module (gnu packages texinfo) #:use-module (gnu packages compression) @@ -316,3 +320,58 @@ word (e.g. cats) into its lemma \"cat\" and the grammatical information @code{}. Generation is the opposite process.") (license (list license:gpl2 ; main license license:expat)))) ; utf8/* + +(define-public apertium + (package + (name "apertium") + (version "3.5.2") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/apertium/apertium/releases/download/v" + version "/apertium-" version ".tar.gz")) + (sha256 + (base32 + "0lrx58ipx2kzh1pd3xm1viz05dqyrq38jbnj9dnk92c9ckkwkp4h")) + (file-name (string-append name "-" version ".tar.gz")))) + (build-system gnu-build-system) + (inputs + `(("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("lttoolbox" ,lttoolbox) + ("pcre" ,pcre))) + (native-inputs + `(("apertium-get" + ,(origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/apertium/apertium-get") + (commit "692d030e68008fc123089cf2446070fe8c6e3a3b"))) + (sha256 + (base32 + "0kgp68azvds7yjwfz57z8sa5094fyk5yr0qxzblrw7bisrrihnav")))) + ("flex" ,flex) + ("pkg-config" ,pkg-config) + ;; python is only required for running the test suite + ("python-minimal" ,python-minimal))) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; If apertium-get does not exist in the source tree, the build tries + ;; to download it using an svn checkout. To avoid this, copy + ;; apertium-get into the source tree. + (add-after 'unpack 'unpack-apertium-get + (lambda* (#:key inputs #:allow-other-keys) + (copy-recursively (assoc-ref inputs "apertium-get") + "apertium/apertium-get") + #t))))) + (home-page "https://www.apertium.org/") + (synopsis "Rule based machine translation system") + (description "Apertium is a rule based machine translation system +featuring a shallow-transfer machine translation engine. The design of the +system makes translations fast (translating tens of thousands of words per +second on ordinary desktop computers) and, in spite of the errors, reasonably +intelligible and easily correctable.") + (license (list license:gpl2 ; main license + license:expat)))) ; utf8/* -- 2.19.1