From c710cd3d64e81b1e2cb80d0bc0cf69f21243ecb7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Sat, 5 Sep 2015 22:39:09 +0200 Subject: [PATCH 1/3] gnu: Add PyZy. * gnu/packages/ibus.scm (pyzy): New variable. --- gnu/packages/ibus.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) diff --git a/gnu/packages/ibus.scm b/gnu/packages/ibus.scm index 1abe70a..9c64530 100644 --- a/gnu/packages/ibus.scm +++ b/gnu/packages/ibus.scm @@ -21,13 +21,18 @@ #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system glib-or-gtk) #:use-module (gnu packages) + #:use-module (gnu packages autotools) + #:use-module (gnu packages base) + #:use-module (gnu packages databases) #:use-module (gnu packages glib) #:use-module (gnu packages gnome) #:use-module (gnu packages gtk) #:use-module (gnu packages iso-codes) + #:use-module (gnu packages linux) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python)) @@ -90,3 +95,57 @@ input method user interface. It comes with multilingual input support. It may also simplify input method development.") (home-page "http://ibus.googlecode.com/") (license lgpl2.1+))) + +(define-public pyzy + ;; There is no release tarball, so we take the last commit. + (let ((commit "6d9c3cdff")) + (package + (name "pyzy") + (version "0.1.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/pyzy/pyzy.git") + (commit commit))) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0i7lnh5gp25wi9rk5f2pjdlhn7vzs2s7pnfbfgk9q8cmzqkgrh6g")) + (patches (list (search-patch "pyzy-no-download.patch"))))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags '("--enable-db-open-phrase" + "--enable-db-android") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'unpack-database + (lambda* (#:key inputs #:allow-other-keys) + (zero? (system* "tar" "-C" "data" "-xvf" + (assoc-ref inputs "pyzy-database"))))) + (add-before 'configure 'autoreconf + (lambda _ (zero? (system* "autoreconf" "-vif"))))))) + (inputs + `(("glib" ,glib) + ("libuuid" ,util-linux) + ("sqlite" ,sqlite) + ("pyzy-database" + ,(origin + (method url-fetch) + (uri (string-append "https://pyzy.googlecode.com/files/" + "pyzy-database-1.0.0.tar.bz2")) + (sha256 + (base32 + "08f3jhk48m4pqjaaq69bgxz3djz6m3n593q0z70dzqa1kxxx1irj")))))) + (native-inputs + `(("python" ,python-2) + ("tar" ,tar) + ("pkg-config" ,pkg-config) + ("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) + (synopsis "Conversion library for Chinese Pinyin and Bopomofo") + (description + "PyZy is a conversion library for the Chinese input methods Pinyin and +Bopomofo.") + (home-page "https://github.com/pyzy/pyzy") + (license lgpl2.1+)))) -- 2.5.0