all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] kakasi + perl-kakasi -- dependencies for namazu
@ 2016-09-24 14:45 ng0
  2016-09-25 17:17 ` Leo Famulari
  0 siblings, 1 reply; 4+ messages in thread
From: ng0 @ 2016-09-24 14:45 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 127 bytes --]

Those are in namazu.scm because they are needed for namazu. Tests for
kakasi require some fixes, however I will not fix this.


[-- Attachment #1.2: 0001-gnu-Add-kakasi.patch --]
[-- Type: text/x-patch, Size: 3198 bytes --]

From d8102a06d98d3f5726b04da2cf64f09f69793ed2 Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Sat, 17 Sep 2016 23:56:29 +0000
Subject: [PATCH 1/2] gnu: Add kakasi.

* gnu/packages/namazu.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk            |  1 +
 gnu/packages/namazu.scm | 53 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 gnu/packages/namazu.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index e2cf40d..a6e2464 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -253,6 +253,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/musl.scm				\
   %D%/packages/mtools.scm			\
   %D%/packages/nano.scm				\
+  %D%/packages/namazu.scm                       \
   %D%/packages/ncdu.scm				\
   %D%/packages/ncurses.scm			\
   %D%/packages/netpbm.scm			\
diff --git a/gnu/packages/namazu.scm b/gnu/packages/namazu.scm
new file mode 100644
index 0000000..bec61df
--- /dev/null
+++ b/gnu/packages/namazu.scm
@@ -0,0 +1,53 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2016 ng0 <ngillmann@runbox.com>
+;;;
+;;; 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 namazu)
+  #:use-module (gnu packages)
+  #:use-module (gnu packages autotools)
+  #:use-module (gnu packages base)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix build-system gnu))
+
+(define-public kakasi
+  (package
+   (name "kakasi")
+   (version "2.3.6")
+   (source (origin
+            (method url-fetch)
+            (uri (string-append "http://kakasi.namazu.org/stable/"
+                                name "-" version ".tar.gz"))
+            (sha256
+             (base32
+              "14qqjr24p5s4dashr3ikp5gx8g789b8q4bc22ksh7h0ravypchh0"))))
+   (build-system gnu-build-system)
+   (arguments
+    `(;; kakasi-4 /bin/echo fails to get substituted, we need to replace
+      ;; /bin/echo with (which echo) in tests/kakasi-{1,4,5,6,7}
+      #:tests? #f))
+   (native-inputs
+    `(("autoconf" ,autoconf)
+      ("automake" ,automake)))
+   (synopsis "Kanji Kana Simple Inverter")
+   (description
+    "KAKASI is the language processing filter to convert Kanji characters
+to Hiragana, Katakana or Romaji and may be helpful to read Japanese
+documents.")
+   (license license:gpl2+)
+   (home-page "http://kakasi.namazu.org")))
-- 
2.10.0


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: 0002-gnu-Add-perl-text-kakasi.patch --]
[-- Type: text/x-patch, Size: 2281 bytes --]

From 2d81d97daa68000192c8c6a2bed3150c39d7957f Mon Sep 17 00:00:00 2001
From: ng0 <ng0@we.make.ritual.n0.is>
Date: Sun, 18 Sep 2016 01:22:42 +0000
Subject: [PATCH 2/2] gnu: Add perl-text-kakasi.

* gnu/packages/namazu.scm (perl-text-kakasi): New variable.
---
 gnu/packages/namazu.scm | 33 ++++++++++++++++++++++++++++++++-
 1 file changed, 32 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/namazu.scm b/gnu/packages/namazu.scm
index bec61df..858254c 100644
--- a/gnu/packages/namazu.scm
+++ b/gnu/packages/namazu.scm
@@ -20,10 +20,12 @@
   #:use-module (gnu packages)
   #:use-module (gnu packages autotools)
   #:use-module (gnu packages base)
+  #:use-module (gnu packages perl)
   #:use-module ((guix licenses) #:prefix license:)
   #:use-module (guix packages)
   #:use-module (guix download)
-  #:use-module (guix build-system gnu))
+  #:use-module (guix build-system gnu)
+  #:use-module (guix build-system perl))
 
 (define-public kakasi
   (package
@@ -51,3 +53,32 @@ to Hiragana, Katakana or Romaji and may be helpful to read Japanese
 documents.")
    (license license:gpl2+)
    (home-page "http://kakasi.namazu.org")))
+
+(define-public perl-text-kakasi
+  (package
+    (name "perl-text-kakasi")
+    (version "2.04")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "mirror://cpan/authors/id/D/DA/"
+                           "DANKOGAI/Text-Kakasi-" version ".tar.gz"))
+       (sha256
+        (base32
+         "186v4ibdafag1spyfx8anhlprpl8yj35m6820yfbigx4igkh2k44"))))
+    (build-system perl-build-system)
+    (native-inputs
+     `(("perl-test-harness" ,perl-test-harness)))
+    (inputs
+     `(("kakasi" ,kakasi)))
+    (arguments
+     `(#:tests? #f)) ; Requires kakasi in -lkakasi , fixme.
+    (home-page "http://search.cpan.org/dist/Text-Kakasi")
+    (synopsis "Perl frontend to kakasi")
+    (description
+     "@code{Text::Kakasi} provides an interface to kakasi.
+Kakasi is a set of programs and libraries which does what
+Japanese input methods do in reverse order.  You feed Japanese
+and kakasi converts it to phonetic representation thereof.
+Kakasi can also be used to tokenizing Japanese text.")
+    (license license:gpl2)))
-- 
2.10.0


[-- Attachment #1.4: Type: text/plain, Size: 24 bytes --]

-- 
              ng0

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

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

* Re: [PATCH] kakasi + perl-kakasi -- dependencies for namazu
  2016-09-24 14:45 [PATCH] kakasi + perl-kakasi -- dependencies for namazu ng0
@ 2016-09-25 17:17 ` Leo Famulari
  2016-09-25 17:37   ` Danny Milosavljevic
  0 siblings, 1 reply; 4+ messages in thread
From: Leo Famulari @ 2016-09-25 17:17 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

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

On Sat, Sep 24, 2016 at 02:45:16PM +0000, ng0 wrote:
> Subject: [PATCH 1/2] gnu: Add kakasi.
> 
> * gnu/packages/namazu.scm: New file.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.

Could it go in (gnu packages textutils)?

> +(define-public kakasi

> +   (arguments
> +    `(;; kakasi-4 /bin/echo fails to get substituted, we need to replace
> +      ;; /bin/echo with (which echo) in tests/kakasi-{1,4,5,6,7}
> +      #:tests? #f))

$ which echo
echo: shell built-in command

What happens if we substitute the "/bin/" out and let it call "echo"?

> Subject: [PATCH 2/2] gnu: Add perl-text-kakasi.
> 
> * gnu/packages/namazu.scm (perl-text-kakasi): New variable.

> +    (arguments
> +     `(#:tests? #f)) ; Requires kakasi in -lkakasi , fixme.

I understand you aren't interested in fixing the tests. Would anyone
else like to take a look?

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

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

* Re: [PATCH] kakasi + perl-kakasi -- dependencies for namazu
  2016-09-25 17:17 ` Leo Famulari
@ 2016-09-25 17:37   ` Danny Milosavljevic
  2016-09-25 17:39     ` Danny Milosavljevic
  0 siblings, 1 reply; 4+ messages in thread
From: Danny Milosavljevic @ 2016-09-25 17:37 UTC (permalink / raw)
  To: ng0, guix-devel

> > +     `(#:tests? #f)) ; Requires kakasi in -lkakasi , fixme.  

If you like the easy way, just set the environment variable LIBRARY_PATH (or LD_LIBRARY_PATH) before running the tests so it finds the library "kakasi".

Something like

(arguments
 ...
 #phases
 (modify-phases %standard-phases
   (add-before 'check 'check-set-library-path
      (lambda x
        (setenv "LIBRARY_PATH" (getcwd)) ; or wherever the library is; maybe extend the existing LIBRARY_PATH instead if needed.
        (apply (assoc-ref %standard-phases 'check) x)))

It's not like the tests will be installed or anything...

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

* Re: [PATCH] kakasi + perl-kakasi -- dependencies for namazu
  2016-09-25 17:37   ` Danny Milosavljevic
@ 2016-09-25 17:39     ` Danny Milosavljevic
  0 siblings, 0 replies; 4+ messages in thread
From: Danny Milosavljevic @ 2016-09-25 17:39 UTC (permalink / raw)
  To: ng0, guix-devel

Oops, I meant

(arguments
 ...
 #phases
 (modify-phases %standard-phases
   (add-before 'check 'check-set-library-path
      (lambda _
        (setenv "LIBRARY_PATH" (getcwd)))))) ; or wherever the library is; maybe extend the existing LIBRARY_PATH instead if needed.

Since setenv's environment variables survive phase switches it's fine to just set it beforehand...

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

end of thread, other threads:[~2016-09-25 17:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-24 14:45 [PATCH] kakasi + perl-kakasi -- dependencies for namazu ng0
2016-09-25 17:17 ` Leo Famulari
2016-09-25 17:37   ` Danny Milosavljevic
2016-09-25 17:39     ` Danny Milosavljevic

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.