[PATCH]: gnu: opencc: Update to 1.1.2

  • Open
  • quality assurance status badge
Details
2 participants
  • Zhu Zihao
  • ???
Owner
unassigned
Submitted by
Zhu Zihao
Severity
normal
Z
Z
Zhu Zihao wrote on 12 Mar 2021 12:52
(address . guix-patches@gnu.org)
86lfasmvx7.fsf@163.com

-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCYEtV5BUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQvkKzUqn2gh+paQD9HpsU5jK9+tDC+eYgAzMxf5NQIPe2
yV40HrXqXiBLkU8A/0sj0Hz/UqR1X4Ph8Oz1zypSnVFvnQLBLmGzRyLi/P0B
=6Xn/
-----END PGP SIGNATURE-----

From d8a41b46a36139bc59bcf9d95ed74b70e1d7c1ff Mon Sep 17 00:00:00 2001
From: Zhu Zihao <all_but_last@163.com>
Date: Fri, 12 Mar 2021 19:38:53 +0800
Subject: [PATCH] gnu: opencc: Update to 1.1.2.

* gnu/packages/textutils.scm(opencc):

[source]: Remove more bundled libraries.
[arguments]<configure-flags>: configure to use system libraries.
[inputs]: Add marisa and rapidjson.
[native-inputs]: Remove rapidjson.
---
gnu/packages/textutils.scm | 38 +++++++++++++++++++++++---------------
1 file changed, 23 insertions(+), 15 deletions(-)

Toggle diff (79 lines)
diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 34da04d0d8..eb2e0344cc 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2019 M?d?lin Ionel Patra?cu <madalinionel.patrascu@mdc-berlin.de>
;;; Copyright © 2019 Wiktor ?elazny <wzelazny@vurv.cz>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2021 Zhu Zihao <all_but_last@163.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -50,7 +51,9 @@
#:use-module (gnu packages)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
+ #:use-module (gnu packages check)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages datastructures)
#:use-module (gnu packages gcc)
#:use-module (gnu packages golang)
#:use-module (gnu packages gettext)
@@ -1051,7 +1054,7 @@ OpenDocument presentations (*.odp).")
(define-public opencc
(package
(name "opencc")
- (version "1.0.5")
+ (version "1.1.2")
(source
(origin
(method git-fetch)
@@ -1061,26 +1064,31 @@ OpenDocument presentations (*.odp).")
(file-name (git-file-name name version))
(sha256
(base32
- "1pv5md225qwhbn8ql932zdg6gh1qlx3paiajaks8gfsa07yzvhr4"))
+ "1a15p9idznh23b44r7rw2zjnirbxjs5pyq3k6xkz0k64cdh2zq6h"))
(modules '((guix build utils)))
(snippet
'(begin
- ;; TODO: Unbundle tclap, darts-clone, gtest
- (delete-file-recursively "deps/rapidjson-0.11") #t))))
+ ;; TODO: Unbundle tclap, darts-clone
+ (for-each
+ (lambda (dep)
+ (delete-file-recursively (string-append "deps/" dep)))
+ '("rapidjson-1.1.0"
+ "gtest-1.11.0"
+ "marisa-0.2.6"
+ "pybind11-2.5.0"
+ "google-benchmark"))
+ #t))))
(build-system cmake-build-system)
(arguments
- '(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'patch-3rd-party-references
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((rapidjson (assoc-ref inputs "rapidjson")))
- (substitute* "src/CMakeLists.txt"
- (("../deps/rapidjson-0.11")
- (string-append rapidjson "/include/rapidjson")))
- #t))))))
- (native-inputs
- `(("python" ,python-wrapper)
+ '(#:configure-flags
+ `("-DUSE_SYSTEM_RAPIDJSON=ON"
+ "-DUSE_SYSTEM_MARISA=ON"
+ "-DUSE_SYSTEM_GTEST=ON")))
+ (inputs
+ `(("marisa" ,marisa)
("rapidjson" ,rapidjson)))
+ (native-inputs
+ `(("python" ,python-wrapper)))
(home-page "https://github.com/BYVoid/OpenCC")
(synopsis "Convert between Traditional Chinese and Simplified Chinese")
(description "Open Chinese Convert (OpenCC) converts between Traditional
--
2.30.2
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
?
(name . Zhu Zihao)(address . all_but_last@163.com)(address . 47098@debbugs.gnu.org)
OSZP286MB066498B7F38DDB36919CA1C8A3679@OSZP286MB0664.JPNP286.PROD.OUTLOOK.COM
Zhu Zihao <all_but_last@163.com> writes:

Toggle quote (6 lines)
>>From d8a41b46a36139bc59bcf9d95ed74b70e1d7c1ff Mon Sep 17 00:00:00 2001
> From: Zhu Zihao <all_but_last@163.com>
> Date: Fri, 12 Mar 2021 19:38:53 +0800
> Subject: [PATCH] gnu: opencc: Update to 1.1.2.
>

Hello, this patch doesn't apply cleanly on current master, and after
some edit I get it built but failed to keep the python binding.

Could you make an update, and see if you can make the python binding
work? Also gtest seems not used...

Thank you!
Z
Z
Zhu Zihao wrote on 20 Mar 2021 15:12
(name . ???)(address . iyzsong@outlook.com)(address . 47098@debbugs.gnu.org)
86zgyx9an9.fsf@163.com
??? writes:

Toggle quote (16 lines)
> Zhu Zihao <all_but_last@163.com> writes:
>
>>>From d8a41b46a36139bc59bcf9d95ed74b70e1d7c1ff Mon Sep 17 00:00:00 2001
>> From: Zhu Zihao <all_but_last@163.com>
>> Date: Fri, 12 Mar 2021 19:38:53 +0800
>> Subject: [PATCH] gnu: opencc: Update to 1.1.2.
>>
>
> Hello, this patch doesn't apply cleanly on current master, and after
> some edit I get it built but failed to keep the python binding.
>
> Could you make an update, and see if you can make the python binding
> work? Also gtest seems not used...
>
> Thank you!

hmm, packaging the python binding for opencc 1.1.2 seems to be whole
mess[1]. I need some time to investigate into it.

references:
--
Retrieve my PGP public key:

gpg --recv-keys D47A9C8B2AE3905B563D9135BE42B352A9F6821F

Zihao
-----BEGIN PGP SIGNATURE-----

iIsEARYIADMWIQTUepyLKuOQW1Y9kTW+QrNSqfaCHwUCYFYC2hUcYWxsX2J1dF9s
YXN0QDE2My5jb20ACgkQvkKzUqn2gh/XggD9H1zwak0Ff7VRuAlWUp8A5p9Cx3hk
R23zh8FtJdRrrPQBAP8OYcG9JJodj/0t6U0ji1Og9FeUpw8kODFbM+wtYK8M
=ZOZJ
-----END PGP SIGNATURE-----

?