unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: "Artyom V. Poptsov" <poptsov.artyom@gmail.com>
Cc: 70880@debbugs.gnu.org
Subject: [bug#70880] [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4.
Date: Sun, 23 Jun 2024 23:38:14 -0400	[thread overview]
Message-ID: <87h6dj2eop.fsf@gmail.com> (raw)
In-Reply-To: <a19292814de3a41ace949042ffb9515e8c25895d.1715450052.git.poptsov.artyom@gmail.com> (Artyom V. Poptsov's message of "Sat, 11 May 2024 20:58:36 +0300")

Hi Artyom,

"Artyom V. Poptsov" <poptsov.artyom@gmail.com> writes:

> * gnu/packages/engineering.scm (prusa-slicer): Update to 2.7.4.
>   [source]: Add "prusa-slicer-boost-fixes.patch".

I think you meant 'remove' rather than 'add' here; and another patch was
removed as well.

> Move some part of the
>   snippet code to custom build phases.
>   [arguments]: In configure flags add paths to external libraries.
>   Add "fix-include-paths" phase.
>   [native-inputs]: Add "catch2".
>   [inputs]: Use "prusa-wxwidgets" instead of "wxwidgets" to fix segfaults.
>   Ad "qhull", "nanosvg", "heatshrink" and "prusa-libbgcode".
> * gnu/packages/patches/prusa-slicer-boost-fixes.patch,
>   gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch: Remove unused
>   patches.
> * gnu/local.mk (dist_patch_DATA): Remove unused "prusa-slicer" patches.

Nitpick: I typically use 'Register / De-register' wording for adding or
removing entries to local.mk.

>
> Change-Id: I15e85d63c9ad6c731c8040ef2d8ec8b2f31f2ab7
> ---
>  gnu/local.mk                                  |  2 -
>  gnu/packages/engineering.scm                  | 51 ++++++----
>  .../patches/prusa-slicer-boost-fixes.patch    | 97 -------------------
>  .../prusa-slicer-with-cereal-1.3.1.patch      | 52 ----------
>  4 files changed, 33 insertions(+), 169 deletions(-)
>  delete mode 100644 gnu/packages/patches/prusa-slicer-boost-fixes.patch
>  delete mode 100644 gnu/packages/patches/prusa-slicer-with-cereal-1.3.1.patch
>
> diff --git a/gnu/local.mk b/gnu/local.mk
> index 3ba9253ae2..3b61666803 100644
> --- a/gnu/local.mk
> +++ b/gnu/local.mk
> @@ -1816,9 +1816,7 @@ dist_patch_DATA =						\
>    %D%/packages/patches/pokerth-boost.patch			\
>    %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch		\
>    %D%/packages/patches/procps-strtod-test.patch                 \
> -  %D%/packages/patches/prusa-slicer-boost-fixes.patch		\
>    %D%/packages/patches/prusa-slicer-fix-tests.patch		\
> -  %D%/packages/patches/prusa-slicer-with-cereal-1.3.1.patch	\
>    %D%/packages/patches/pthreadpool-system-libraries.patch	\
>    %D%/packages/patches/python-3.12-fix-tests.patch		\
>    %D%/packages/patches/python-accupy-use-matplotx.patch		\
> diff --git a/gnu/packages/engineering.scm b/gnu/packages/engineering.scm
> index 08ff06fa94..99f7c82d7d 100644
> --- a/gnu/packages/engineering.scm
> +++ b/gnu/packages/engineering.scm
> @@ -3828,7 +3828,7 @@ (define-public prusa-wxwidgets
>  (define-public prusa-slicer
>    (package
>      (name "prusa-slicer")
> -    (version "2.5.2")
> +    (version "2.7.4")
>      (source
>       (origin
>         (method git-fetch)
> @@ -3837,13 +3837,11 @@ (define-public prusa-slicer
>           (url "https://github.com/prusa3d/PrusaSlicer")
>           (commit (string-append "version_" version))))
>         (file-name (git-file-name name version))
> -       (sha256 (base32 "02qcrw3fa0d8ldbp73hp14l1qxbp3f4608j4csc07ny00ra42151"))
> -       (patches (search-patches "prusa-slicer-boost-fixes.patch"
> -                                "prusa-slicer-fix-tests.patch"
> -                                "prusa-slicer-with-cereal-1.3.1.patch"))
> +       (sha256 (base32 "0s1cfvhfilyv0y98asr61c6rwlgyr1hf5v5hg8q9zwmzm2bkcql3"))
> +       (patches (search-patches "prusa-slicer-fix-tests.patch"))
>         (modules '((guix build utils)))
>         (snippet
> -        '(begin
> +        `(begin
>             ;; Prusa slicer bundles a lot of dependencies in src/ directory.
>             ;; Most of them contain prusa-specific modifications (e.g. avrdude),
>             ;; but others do not. Here we replace the latter with Guix packages.
> @@ -3851,10 +3849,12 @@ (define-public prusa-slicer
>             (delete-file-recursively "src/hidapi")
>             (delete-file-recursively "src/eigen")
>             (delete-file-recursively "src/libigl/igl")
> +           (substitute* "CMakeLists.txt"
> +             (("add_library\\(libexpat INTERFACE\\)")
> +              ""))
> +           (substitute* "src/libigl/CMakeLists.txt"
> +             (("target_link_libraries\\(libigl INTERFACE igl::core\\)") ""))
>             (substitute* "src/CMakeLists.txt"
> -             (("add_subdirectory\\(libigl\\)" all)
> -              (string-append
> -               all "\ninclude_directories(libigl INTERFACE libigl::core)"))
>               (("add_subdirectory\\(hidapi\\)")
>                "pkg_check_modules(HIDAPI REQUIRED hidapi-hidraw)")
>               (("include_directories\\(hidapi/include\\)")
> @@ -3867,13 +3867,24 @@ (define-public prusa-slicer
>               (("\\bhidapi\\b") "${HIDAPI_LIBRARIES}"))))))
>      (build-system cmake-build-system)
>      (arguments
> -     `(#:configure-flags
> -       '("-DSLIC3R_FHS=1" ;; Use The Filesystem Hierarchy Standard.
> -         "-DSLIC3R_GTK=3" ;; Use GTK+
> -         ;; Use wxWidgets 3.0.x.x to prevent GUI crashes when adding support enforcers.
> -         "-DSLIC3R_WX_STABLE=1")))
> +     (list #:configure-flags
> +           #~(list "-DSLIC3R_FHS=1" ;; Use The Filesystem Hierarchy Standard.
> +                   "-DSLIC3R_GTK=3" ;; Use GTK+
> +                   ;; Use wxWidgets 3.0.x.x to prevent GUI crashes when adding support enforcers.
> +                   "-DSLIC3R_WX_STABLE=1"
> +                   (format #f "-Dlibigl_DIR=~a/lib/cmake/igl/"
> +                           #$(this-package-input "libigl"))
> +                   (format #f "-DCatch2_DIR=~a/lib/cmake/catch2/"
> +                           #$(this-package-input "catch2")))

This may be possible to express via e.g (search-input-directory
%build-inputs "lib/cmake/igl"), if only one package provides that.

The benefit is that then that's a runtime thing that plays better with
inherited variants and package rewriting.

> +           #:phases
> +           #~(modify-phases %standard-phases
> +               (add-after 'unpack 'fix-include-paths
> +                 (lambda _
> +                   (substitute* "tests/libslic3r/test_quadric_edge_collapse.cpp"
> +                     (("#include <libigl/igl/qslim.h>")
> +                      "#include <igl/qslim.h>")))))))
>      (native-inputs
> -     (list pkg-config))
> +     (list pkg-config catch2))

Please sort in alphabetical order.

>      (inputs
>       (list boost
>             cereal
> @@ -3899,9 +3910,13 @@ (define-public prusa-slicer
>             pango
>             tbb
>             eudev
> -           ;; prusa-slicer 2.5 segfaults on startup with wxwidgets 3.2
> -           ;; See https://github.com/prusa3d/PrusaSlicer/issues/8299
> -           wxwidgets-3.0
> +           qhull
> +           nanosvg
> +           heatshrink
> +           ;; XXX: Using Prusa wxWidgets fork as PrusaSlicer segfaults when compiled
> +           ;; with regular wxwidgets.
> +           prusa-wxwidgets
> +           prusa-libbgcode

Likewise.  Otherwise LGTM.  Could you please send a v2?

-- 
Thanks,
Maxim




  reply	other threads:[~2024-06-24  3:40 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-11 17:56 [bug#70880] [PATCH 0/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 1/8] gnu: cgal: Update to 5.6.1 Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 2/8] gnu: glfw: Update to 3.3.10 Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 3/8] gnu: glfw-3.4: New variable Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 4/8] gnu: libigl: Update to 2.4.0 Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 5/8] gnu: heatshrink: New variable Artyom V. Poptsov
2024-06-24  3:22   ` Maxim Cournoyer
2024-06-24  3:24   ` Maxim Cournoyer
2024-05-11 17:58 ` [bug#70880] [PATCH 6/8] gnu: Add prusa-libbgcode Artyom V. Poptsov
2024-06-24  3:18   ` Maxim Cournoyer
2024-07-01 16:25     ` Artyom V. Poptsov
2024-07-09 18:59       ` Artyom V. Poptsov
2024-05-11 17:58 ` [bug#70880] [PATCH 7/8] gnu: Add prusa-wxwidgets Artyom V. Poptsov
2024-06-24  3:28   ` Maxim Cournoyer
2024-06-24  3:30   ` Maxim Cournoyer
2024-05-11 17:58 ` [bug#70880] [PATCH 8/8] gnu: prusa-slicer: Update to 2.7.4 Artyom V. Poptsov
2024-06-24  3:38   ` Maxim Cournoyer [this message]
2024-06-08 14:27 ` [bug#70880] [PATCH 0/8] " Artyom V. Poptsov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87h6dj2eop.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=70880@debbugs.gnu.org \
    --cc=poptsov.artyom@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).