unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add dbacl.
@ 2016-10-16 23:00 ng0
  2016-10-16 23:00 ` ng0
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: ng0 @ 2016-10-16 23:00 UTC (permalink / raw)
  To: guix-devel

 [PATCH] gnu: Add dbacl.

Since the discussion we had about 2 weeks ago, I decided to just remove the last occurence of the dbacl-jap.* this way it builds and tests succeed.

Why have I packaged this? Maybe it was needed for "afew", I'm really not sure. The checkout is called guix-afew, the branch was 3 months behind.

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

* [PATCH] gnu: Add dbacl.
  2016-10-16 23:00 [PATCH] gnu: Add dbacl ng0
@ 2016-10-16 23:00 ` ng0
  2016-10-24 14:25 ` Kei Kebreau
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ng0 @ 2016-10-16 23:00 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/textutils.scm (dbacl): New variable.
---
 gnu/packages/textutils.scm | 145 ++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 144 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index a9725b4..6ab7cd4 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -6,6 +6,7 @@
 ;;; Copyright © 2016 Jelle Licht <jlicht@fsfe.org>
 ;;; Copyright © 2016 Alex Griffin <a@ajgrf.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -33,7 +34,12 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages python)
-  #:use-module (gnu packages zip))
+  #:use-module (gnu packages zip)
+  #:use-module (gnu packages perl)
+  #:use-module (gnu packages slang)
+  #:use-module (gnu packages readline)
+  #:use-module (gnu packages ncurses)
+  #:use-module (gnu packages pkg-config))
 
 (define-public recode
   (package
@@ -373,3 +379,140 @@ runs Word\".")
     (description "UTF8-CPP is a C++ library for handling UTF-8 encoded text
 in a portable way.")
     (license license:boost1.0)))
+
+(define-public dbacl
+  (package
+    (name "dbacl")
+    (version "1.14")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "http://www.lbreyer.com/gpl/"
+                           name "-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0224g6x71hyvy7jikfxmgcwww1r5lvk0jx36cva319cb9nmrbrq7"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:make-flags
+       (list
+        (string-append "-I" (assoc-ref %build-inputs "slang")
+                       "/include/slang")
+        (string-append "-I" (assoc-ref %build-inputs "ncurses")
+                       "/include/ncurses"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'delete-sample6-and-japanese
+           (lambda _
+             (substitute* "doc/Makefile.am"
+               (("sample6.txt") "")
+               (("japanese.txt") ""))
+             (delete-file "doc/sample6.txt")
+             (delete-file "doc/japanese.txt")
+             (substitute* (list "src/tests/Makefile.am"
+                                "src/tests/Makefile.in")
+               (("dbacl-jap.shin") "")
+               (("dbacl-jap.sh") ""))))
+         (add-after 'unpack 'delete-test
+           ;; See comments about the license.
+           (lambda _
+             (delete-file "src/tests/dbacl-jap.shin")))
+         (add-after 'delete-sample6-and-japanese 'autoreconf
+           (lambda _
+             (zero? (system* "autoreconf" "-vif"))))
+         (add-after 'unpack 'fix-test-files
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (substitute* '("src/tests/html-links.shin"
+                              "src/tests/email-xheaders.shin"
+                              "src/tests/email-forms.shin"
+                              "src/tests/dbacl-O.shin"
+                              "src/tests/mailinspect-V.shin"
+                              "src/tests/pcheck-821g.shin"
+                              "src/tests/email-badmime2.shin"
+                              "src/tests/email-style.shin"
+                              "src/tests/email-l.shin"
+                              "src/tests/reservoir.shin"
+                              "src/tests/dbacl-g.shin"
+                              "src/tests/html.shin"
+                              "src/tests/pcheck-821b.shin"
+                              "src/tests/dbacl-alpha.shin"
+                              "src/tests/dbacl-graph.shin"
+                              "src/tests/email-uu.shin"
+                              "src/tests/email-2047.shin"
+                              "src/tests/dbacl-z.shin"
+                              "src/tests/dbacl-adp.shin"
+                              "src/tests/pcheck-2822g.shin"
+                              "src/tests/email-mbox.shin"
+                              "src/tests/dbacl-alnum.shin"
+                              "src/tests/xml.shin"
+                              "src/tests/pcheck-2821b.shin"
+                              "src/tests/model-sum1.shin"
+                              "src/tests/dbacl-jap.shin"
+                              "src/tests/email-maildir.shin"
+                              "src/tests/html-alt.shin"
+                              "src/tests/dbacl-cef2.shin"
+                              "src/tests/email-pgp.shin"
+                              "src/tests/dbacl-w3.shin"
+                              "src/tests/model-sym3.shin"
+                              "src/tests/lscheck.shin"
+                              "src/tests/class-unknown1.shin"
+                              "src/tests/email-uri.shin"
+                              "src/tests/class-unknown2.shin"
+                              "src/tests/score-1.shin"
+                              "src/tests/pcheck-822b.shin"
+                              "src/tests/shannon-2.shin"
+                              "src/tests/dbacl-cef.shin"
+                              "src/tests/pcheck-2822b.shin"
+                              "src/tests/dbacl-zo.shin"
+                              "src/tests/email-badmime1.shin"
+                              "src/tests/shannon.shin"
+                              "src/tests/bayesol-V.shin"
+                              "src/tests/dbacl-V.shin"
+                              "src/tests/dbacl-o.shin"
+                              "src/tests/model-sym2.shin"
+                              "src/tests/icheck.shin"
+                              "src/tests/pcheck-822g.shin"
+                              "src/tests/dbacl-j.shin"
+                              "src/tests/model-sym1.shin"
+                              "src/tests/email-theaders.shin"
+                              "src/tests/pcheck-2821g.shin"
+                              "src/tests/score-2.shin"
+                              "src/tests/email-scripts.shin"
+                              "src/tests/dbacl-a.shin"
+                              "src/tests/shannon-1.shin"
+                              "src/tests/dbacl-l.shin"
+                              "src/tests/email-headers.shin")
+                 (("PATH=/bin:/usr/bin")
+                  "#PATH=/bin:/usr/bin")
+                 (("diff") (string-append (which "diff")))
+                 (("tr") (string-append (which "tr"))))))))))
+    (inputs
+     `(("perl" ,perl)
+       ("slang" ,slang)
+       ("ncurses" ,ncurses)
+       ("readline" ,readline)))
+    (native-inputs
+     `(("libtool" ,libtool)
+       ("autoconf" ,autoconf)
+       ("automake" ,automake)
+       ("pkg-config" ,pkg-config)))
+    (home-page "http://www.lbreyer.com/dbacl.html")
+    (synopsis "Bayesian text and email classifier")
+    (description
+     "dbacl is a fast Bayesian text and email classifier.  It builds a variety
+of language models using maximum entropy (minimum divergence) principles, and
+these can then be used to categorize input data automatically among multiple
+categories.")
+    ;; The software is licensed as GPLv3 or later, but
+    ;; includes various sample texts in the doc dir:
+    ;; - sample1.txt, sample3 and sampe5.txt are in the public domain,
+    ;;   by Mark Twain.
+    ;; - sample2.txt, sample4.txt are in the public domain, by Aristotle.
+    ;; - sample6.txt is a forwarded email, copyright unknown.
+    ;;   Guix does exclude sample6.txt.
+    ;; - japanese.txt is a Japanese unoffical translation of the
+    ;;   GNU General Public License, (c) by the Free Software Foundation.
+    ;;   Guix excludes this file.
+    (license '(license:gpl-3 license:public-domain))))
-- 
2.10.1

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

* Re: [PATCH] gnu: Add dbacl.
  2016-10-16 23:00 [PATCH] gnu: Add dbacl ng0
  2016-10-16 23:00 ` ng0
@ 2016-10-24 14:25 ` Kei Kebreau
  2016-10-24 14:25 ` Kei Kebreau
  2016-10-24 14:31 ` Kei Kebreau
  3 siblings, 0 replies; 5+ messages in thread
From: Kei Kebreau @ 2016-10-24 14:25 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

ng0 <ng0@we.make.ritual.n0.is> writes:

>  [PATCH] gnu: Add dbacl.
>
> Since the discussion we had about 2 weeks ago, I decided to just
> remove the last occurence of the dbacl-jap.* this way it builds and
> tests succeed.
>
> Why have I packaged this? Maybe it was needed for "afew", I'm really
> not sure. The checkout is called guix-afew, the branch was 3 months
> behind.

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

* Re: [PATCH] gnu: Add dbacl.
  2016-10-16 23:00 [PATCH] gnu: Add dbacl ng0
  2016-10-16 23:00 ` ng0
  2016-10-24 14:25 ` Kei Kebreau
@ 2016-10-24 14:25 ` Kei Kebreau
  2016-10-24 14:31 ` Kei Kebreau
  3 siblings, 0 replies; 5+ messages in thread
From: Kei Kebreau @ 2016-10-24 14:25 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

ng0 <ng0@we.make.ritual.n0.is> writes:

>  [PATCH] gnu: Add dbacl.
>
> Since the discussion we had about 2 weeks ago, I decided to just
> remove the last occurence of the dbacl-jap.* this way it builds and
> tests succeed.
>
> Why have I packaged this? Maybe it was needed for "afew", I'm really
> not sure. The checkout is called guix-afew, the branch was 3 months
> behind.

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

* Re: [PATCH] gnu: Add dbacl.
  2016-10-16 23:00 [PATCH] gnu: Add dbacl ng0
                   ` (2 preceding siblings ...)
  2016-10-24 14:25 ` Kei Kebreau
@ 2016-10-24 14:31 ` Kei Kebreau
  3 siblings, 0 replies; 5+ messages in thread
From: Kei Kebreau @ 2016-10-24 14:31 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 695 bytes --]

ng0 <ng0@we.make.ritual.n0.is> writes:

>  [PATCH] gnu: Add dbacl.
>
> Since the discussion we had about 2 weeks ago, I decided to just
> remove the last occurence of the dbacl-jap.* this way it builds and
> tests succeed.
>
> Why have I packaged this? Maybe it was needed for "afew", I'm really
> not sure. The checkout is called guix-afew, the branch was 3 months
> behind.

What I meant to send in those last two messages (brain glitch, sorry) is
that the patch looks good. Just make sure to remove the controversially
licensed files in a snippet so 'guix build -S dbacl' returns only the
"guaranteed free" source code.

Also, the linter said to replace gpl-3 in the license field with gpl3.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 818 bytes --]

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

end of thread, other threads:[~2016-10-24 14:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-16 23:00 [PATCH] gnu: Add dbacl ng0
2016-10-16 23:00 ` ng0
2016-10-24 14:25 ` Kei Kebreau
2016-10-24 14:25 ` Kei Kebreau
2016-10-24 14:31 ` Kei Kebreau

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).