Message ID | 20210723210037.28150-1-i.gankevich@spbu.ru |
---|---|
State | Accepted |
Headers | show |
Series | [bug#49713,1/3] gnu: cereal: Use cmake to build and install the library. | expand |
Context | Check | Description |
---|---|---|
cbaines/applying patch | fail | View Laminar job |
cbaines/issue | success | View issue |
Hi Ivan, the patches you created work. Is there something else neccessary to upstream them? Thanks very much! Regards Petr
Hi, Am Samstag, den 24.07.2021, 00:00 +0300 schrieb Ivan Gankevich: > Hello, > > this series of patches adds Prusa Slicer. I had to change "cereal" > package definition to use cmake, otherwise "prusa-slicer" failed > to find the library. Also, I added "libigl" that is a dependency > of "prusa-slicer". > > gnu/packages/serialization.scm (cereal): Use cmake. > > * Replace manual build and installation with standard cmake. > The main reason to do that is to get "cereal-config.cmake" > file that is used to find the library in other projects. > --- There are already two direct dependents of cereal. Do those still build? > > gnu/packages/serialization.scm | 39 ++++++++++++------------------ > ---- > 1 file changed, 13 insertions(+), 26 deletions(-) > > diff --git a/gnu/packages/serialization.scm > b/gnu/packages/serialization.scm > index 8f292ae408..9c34da62af 100644 > --- a/gnu/packages/serialization.scm > +++ b/gnu/packages/serialization.scm > @@ -141,32 +141,19 @@ implement RPC protocols.") > "0hc8wh9dwpc1w1zf5lfss4vg5hmgpblqxbrpp1rggicpx9ar831p")))) > (build-system cmake-build-system) > (arguments > - `(;; The only included tests are portability tests requiring > - ;; cross-compilation and boost. Since we are building cereal > on more > - ;; platforms anyway, there is no compelling reason to build > the tests. > - #:tests? #f > - #:out-of-source? #f > - #:phases > - (modify-phases %standard-phases > - (delete 'configure) > - (replace 'build > - (lambda _ > - (substitute* "doc/doxygen.in" > - (("@CMAKE_CURRENT_BINARY_DIR@") ".") > - (("@CMAKE_CURRENT_SOURCE_DIR@") ".")) > - (with-directory-excursion "doc" > - (invoke "doxygen" "doxygen.in")))) > - ;; There is no "install" target, so we have to provide our > own > - ;; "install" phase. > - (replace 'install > - (lambda* (#:key outputs #:allow-other-keys) > - (let* ((out (assoc-ref outputs "out")) > - (doc (string-append out > "/share/cereal/docs")) > - (include (string-append out "/include/cereal"))) > - (mkdir-p doc) > - (mkdir-p include) > - (copy-recursively "include/cereal" include) > - (copy-recursively "doc/html" doc))))))) > + `(#:configure-flags (list "-DSKIP_PORTABILITY_TEST=ON") > + #:tests? #f Never ever leave #:tests? #f uncommented. > + #:phases (modify-phases %standard-phases > + (add-before 'configure 'skip-sandbox > + (lambda _ > + (substitute* "CMakeLists.txt" > + (("add_subdirectory\\(sandbox\\)") "")))) > + (add-after 'install 'install-doc > + (lambda _ > + (let ((doc (string-append %output > "/share/doc/html"))) > + (invoke "make" "doc") > + (mkdir-p doc) > + (copy-recursively "doc/html" doc))))))) > (native-inputs > `(("doxygen" ,doxygen))) > (home-page "https://uscilab.github.io/cereal/")
>There are already two direct dependents of cereal. Do those still >build? Hello. I’ve successfully built “salmon” and “seqan” with this patch. >Never ever leave #:tests? #f uncommented. Removed this line. The tests work fine. I’ve submitted new version of this patch with tests. Thanks for the corrections! Regards, Ivan
diff --git a/gnu/packages/serialization.scm b/gnu/packages/serialization.scm index 8f292ae408..9c34da62af 100644 --- a/gnu/packages/serialization.scm +++ b/gnu/packages/serialization.scm @@ -141,32 +141,19 @@ implement RPC protocols.") "0hc8wh9dwpc1w1zf5lfss4vg5hmgpblqxbrpp1rggicpx9ar831p")))) (build-system cmake-build-system) (arguments - `(;; The only included tests are portability tests requiring - ;; cross-compilation and boost. Since we are building cereal on more - ;; platforms anyway, there is no compelling reason to build the tests. - #:tests? #f - #:out-of-source? #f - #:phases - (modify-phases %standard-phases - (delete 'configure) - (replace 'build - (lambda _ - (substitute* "doc/doxygen.in" - (("@CMAKE_CURRENT_BINARY_DIR@") ".") - (("@CMAKE_CURRENT_SOURCE_DIR@") ".")) - (with-directory-excursion "doc" - (invoke "doxygen" "doxygen.in")))) - ;; There is no "install" target, so we have to provide our own - ;; "install" phase. - (replace 'install - (lambda* (#:key outputs #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (doc (string-append out "/share/cereal/docs")) - (include (string-append out "/include/cereal"))) - (mkdir-p doc) - (mkdir-p include) - (copy-recursively "include/cereal" include) - (copy-recursively "doc/html" doc))))))) + `(#:configure-flags (list "-DSKIP_PORTABILITY_TEST=ON") + #:tests? #f + #:phases (modify-phases %standard-phases + (add-before 'configure 'skip-sandbox + (lambda _ + (substitute* "CMakeLists.txt" + (("add_subdirectory\\(sandbox\\)") "")))) + (add-after 'install 'install-doc + (lambda _ + (let ((doc (string-append %output "/share/doc/html"))) + (invoke "make" "doc") + (mkdir-p doc) + (copy-recursively "doc/html" doc))))))) (native-inputs `(("doxygen" ,doxygen))) (home-page "https://uscilab.github.io/cereal/")