Patchwork gnu: link-grammar: New module.

login
register
mail settings
Submitter Amirouche Boubekki
Date Oct. 23, 2016, 2:54 p.m.
Message ID <CAL7_Mo_VO9zNDJeUHniNYAoqBy+jQRj-Pb4SLwjc73cHUntUNA@mail.gmail.com>
Download mbox | patch
Permalink /patch/16748/
State New
Headers show

Comments

Amirouche Boubekki - Oct. 23, 2016, 2:54 p.m.

Catonano - Oct. 23, 2016, 3:13 p.m.
2016-10-23 16:54 GMT+02:00 Amirouche Boubekki <amirouche.boubekki@gmail.com>
:

>
>
just a typo: in the synopsys: "... several langageS"
Leo Famulari - Oct. 23, 2016, 9:20 p.m.
On Sun, Oct 23, 2016 at 04:54:17PM +0200, Amirouche Boubekki wrote:
> From 391889d22f102368cc44d6a0a928fccd20810269 Mon Sep 17 00:00:00 2001
> From: Amirouche <amirouche@hypermove.net>
> Date: Sun, 23 Oct 2016 16:46:12 +0200
> Subject: [PATCH] gnu: link-grammar: New module
> 
> * gnu/packages/link-grammar.scm: New module.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add new file.

Thanks! This should go in (gnu packages language). I would have moved it
there myself if not for a different problem...

> +    (inputs `(("sqlite" ,sqlite)
> +              ("zlib" ,zlib)))

The built output of the package does not refer to sqlite or zlib:

$ guix gc --references $(./pre-inst-env guix build link-grammar)
/gnu/store/7njyh7586r6kk2lfbz2wg52n3la89zda-link-grammar-5.3.11
/gnu/store/9nifwk709wajpyfwa0jzaa3p6mf10vxs-gcc-4.9.3-lib
/gnu/store/m9vxvhdj691bq1f85lpflvnhcvrdilih-glibc-2.23

This means that when the user eventually collects garbage with `guix
gc`, the sqlite and zlib libraries that link-grammar uses may be
deleted, breaking link-grammar.

If sqlite and zlib are only used when building, but not when running
link-grammar, then they should be native-inputs.

Otherwise, we will need to figure out how to make link-grammar retain
references to these libraries.

Patch

From 391889d22f102368cc44d6a0a928fccd20810269 Mon Sep 17 00:00:00 2001
From: Amirouche <amirouche@hypermove.net>
Date: Sun, 23 Oct 2016 16:46:12 +0200
Subject: [PATCH] gnu: link-grammar: New module

* gnu/packages/link-grammar.scm: New module.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add new file.
---
 gnu/local.mk                  |  1 +
 gnu/packages/link-grammar.scm | 52 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 53 insertions(+)
 create mode 100644 gnu/packages/link-grammar.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index eb8322e..31ad798 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -221,6 +221,7 @@  GNU_SYSTEM_MODULES =				\
   %D%/packages/libunwind.scm			\
   %D%/packages/libupnp.scm			\
   %D%/packages/lighting.scm                     \
+  %D%/packages/link-grammar.scm			\
   %D%/packages/links.scm			\
   %D%/packages/linux.scm			\
   %D%/packages/lirc.scm				\
diff --git a/gnu/packages/link-grammar.scm b/gnu/packages/link-grammar.scm
new file mode 100644
index 0000000..6d1b302
--- /dev/null
+++ b/gnu/packages/link-grammar.scm
@@ -0,0 +1,52 @@ 
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 Amirouche Boubekki <amirouche@hypermove.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages link-grammar)
+  #:use-module (guix packages)
+  #:use-module (guix build-system gnu)
+  #:use-module ((guix licenses) #:select (lgpl2.1+))
+  #:use-module (guix download)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages databases)
+  #:use-module (gnu packages compression))  
+
+(define-public link-grammar
+  (package
+    (name "link-grammar")
+    (version "5.3.11")
+    (source (origin
+             (method url-fetch)
+             (uri (string-append "http://www.abiword.org/downloads/link-grammar/"
+                                 version "/link-grammar-" version ".tar.gz"))
+             (sha256
+              (base32
+               "1mqc2zhq360k2xslsjw5x8nfmbsk55x03dvyhb7bzpf75vl3mjkk"))))
+    (build-system gnu-build-system)
+    (inputs `(("sqlite" ,sqlite)
+              ("zlib" ,zlib)))
+    (home-page "http://www.abisource.com/projects/link-grammar/")
+    (synopsis "Syntactic parser for several language")
+    (description
+     "Link Grammar is a syntactic parser of English, Russian, Arabic and
+Persian (and other languages as well), based on Link Grammar, an original
+theory of syntax and morphology.  Given a sentence, the system assigns to it a
+syntactic structure, which consists of a set of labelled links connecting
+pairs of words.  The parser also produces a \"constituent\" (HPSG style phrase
+tree) representation of a sentence (showing noun phrases, verb phrases,
+etc.). ")
+    (license lgpl2.1+)))
-- 
2.10.0