GNU bug report logs -
#57337
[PATCH 0/2] Add docxbox
Previous Next
Full log
View this message in rfc822 format
Wiktor Żelazny <wz <at> freeshell.de> skribis:
> * gnu/packages/textutils.scm (docxbox): New variable.
[...]
> + (snippet '(begin
> + (for-each delete-file-recursively
> + '("bin" "vendor/json" "vendor/miniz-cpp"
> + "vendor/tinyxml2"))))))
No need for ‘begin’.
> + (build-system cmake-build-system)
> + ;; (native-inputs (list bats)) ; Enable after fixing tests, use bash module
> + (inputs `(("json-modern-cxx" ,json-modern-cxx)
> + ("miniz-cpp" ,miniz-cpp)
> + ("tinyxml2-source" ,(package-source tinyxml2))))
You can write:
(inputs (list json-modern-cxx miniz-cpp))
and…
> + (arguments
> + `(#:phases (modify-phases %standard-phases
> + (add-after 'unpack 'unvendor
> + (lambda* (#:key inputs #:allow-other-keys)
> + (substitute* "CMakeLists.txt"
> + (("vendor/miniz-cpp/zip_file.hpp")
> + ""))
> + (with-directory-excursion "docxbox"
> + (substitute* (find-files "." "\\.(cc|h)$")
> + (("#include <vendor/json/single_include/")
> + "#include <"))
> + (substitute* (find-files "." "\\.hpp$")
> + (("#include <vendor/miniz-cpp/")
> + "#include <")))))
> + (add-after 'unpack 'unpack-tinyxml2
> + (lambda* (#:key inputs #:allow-other-keys)
> + (mkdir-p "vendor/tinyxml2")
> + (copy-recursively (assoc-ref inputs "tinyxml2-source")
> + "vendor/tinyxml2")))
… this:
(arguments
(list #:phases
#~(modify-phases …
(copy-recursively #$(package-source tinyxml2) …)
…)))
It would be best if it could depend on TinyXML2 directly, rather than
rebuilding it as part of the build process, but I supposed that’s
trickier so we can leave that for later.
Could you send an updated patch, together with the miniz-cpp one?
Thanks in advance!
Ludo’.
This bug report was last modified 2 years and 227 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.