guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

02/02: gnu: opencc: Unbundle rapidjson.


From: guix-commits
Subject: 02/02: gnu: opencc: Unbundle rapidjson.
Date: Sun, 23 Dec 2018 12:48:49 -0500 (EST)

efraim pushed a commit to branch master
in repository guix.

commit 1506d491f93e1d0ac453392401d503b80bf4fecb
Author: Efraim Flashner <address@hidden>
Date:   Sun Dec 23 19:46:40 2018 +0200

    gnu: opencc: Unbundle rapidjson.
    
    * gnu/packages/textutils.scm (opencc)[source]: Add snippet to remove
    rapidjson.
    [arguments]: Add custom phase to substitute rapidjson.
    [native-inputs]: Add rapidjson.
---
 gnu/packages/textutils.scm | 24 +++++++++++++++++++++---
 1 file changed, 21 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/textutils.scm b/gnu/packages/textutils.scm
index 1ea9c95..91bc64b 100644
--- a/gnu/packages/textutils.scm
+++ b/gnu/packages/textutils.scm
@@ -52,7 +52,8 @@
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages python)
   #:use-module (gnu packages readline)
-  #:use-module (gnu packages slang))
+  #:use-module (gnu packages slang)
+  #:use-module (gnu packages web))
 
 (define-public dos2unix
   (package
@@ -764,10 +765,27 @@ indentation.
               (commit (string-append "ver." version))))
        (file-name (git-file-name name version))
        (sha256
-        (base32 "1pv5md225qwhbn8ql932zdg6gh1qlx3paiajaks8gfsa07yzvhr4"))))
+        (base32
+         "1pv5md225qwhbn8ql932zdg6gh1qlx3paiajaks8gfsa07yzvhr4"))
+       (modules '((guix build utils)))
+       (snippet
+        '(begin
+           ;; TODO: Unbundle tclap, darts-clone, gtest
+           (delete-file-recursively "deps/rapidjson-0.11") #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)))
+     `(("python" ,python-wrapper)
+       ("rapidjson" ,rapidjson)))
     (home-page "https://github.com/BYVoid/OpenCC";)
     (synopsis "Convert between Traditional Chinese and Simplified Chinese")
     (description "Open Chinese Convert (OpenCC) converts between Traditional



reply via email to

[Prev in Thread] Current Thread [Next in Thread]