nixpkgs/pkgs/applications/misc/bambu-studio/0001-not-for-upstream-CMakeLists-Link-against-webkit2gtk-.patch
Zhaofeng Li 92ec31fbee
bambu-studio: init at 01.06.02.04 (#206495)
* wxGTK31: Support enabling WebRequest component

* wxGTK31: Support enabling private fonts

* bambu-studio: init at 01.06.02.04

Co-authored-by: Phileas Lebada <gitpl@woerm.at>

* bambu-studio: 01.06.02.04 -> 01.07.00.65

* bambu-studio: 01.07.00.65 -> 01.07.06.92

The OpenSSL pin is no longer needed.

* bambu-studio: 01.07.06.92 -> 01.08.00.62

* Switch to newer tbb version

tbb was broken up into two versions for backwards compability

https://github.com/NixOS/nixpkgs/pull/217585/files

and put into prusa-slicer

https://github.com/NixOS/nixpkgs/pull/238921/files

Which fixes for 1.8 beta build
```
bambu-studio> CMake Error at src/libslic3r/CMakeLists.txt:490 (target_link_libraries):
bambu-studio>   Target "libslic3r" links to:
bambu-studio>     TBB::tbbmalloc
bambu-studio>   but the target was not found.  Possible reasons include:
bambu-studio>     * There is a typo in the target name.
bambu-studio>     * A find_package call is missing for an IMPORTED target.
bambu-studio>     * An ALIAS target is missing.
bambu-studio>
bambu-studio> -- Generating done (0.2s)
bambu-studio> CMake Warning:
bambu-studio>   Manually-specified variables were not used by the project:
bambu-studio>     CMAKE_EXPORT_NO_PACKAGE_REGISTRY
bambu-studio>     DEP_WX_GTK3
bambu-studio>
bambu-studio> CMake Generate step failed.  Build files cannot be regenerated correctly.
error: builder for '/nix/store/rzgx01p1ni2xbx5ddg0133pjjlzs8618-bambu-studio-01.08.00.57.drv' failed with exit code 1;
```

* bambu-studio: switch to custom openvdb tbb version

* Downgrade boost to 179 (181 is current default)

---------

Co-authored-by: Phileas Lebada <gitpl@woerm.at>
2023-12-10 15:28:05 +04:00

34 lines
1.4 KiB
Diff

From 7eed499898226222a949a792e0400ec10db4a1c9 Mon Sep 17 00:00:00 2001
From: Zhaofeng Li <hello@zhaofeng.li>
Date: Tue, 22 Nov 2022 13:00:39 -0700
Subject: [PATCH] [not for upstream] CMakeLists: Link against webkit2gtk in
libslic3r_gui
WebView.cpp uses symbols from webkitgtk directly. Upstream setup
links wxGTK statically so webkitgtk is already pulled in.
> /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: slic3r/liblibslic3r_gui.a(WebView.cpp.o): undefined reference to symbol 'webkit_web_view_run_javascript_finish'
> /nix/store/039g378vc3pc3dvi9dzdlrd0i4q93qwf-binutils-2.39/bin/ld: /nix/store/8yvy428jy2nwq4dhmrcs7gj5r27a2pv6-webkitgtk-2.38.2+abi=4.0/lib/libwebkit2gtk-4.0.so.37: error adding symbols: DSO missing from command line
---
src/CMakeLists.txt | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9c5cb96..e92a0e3 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -175,6 +175,11 @@ if (WIN32)
target_link_libraries(BambuStudio_app_gui PRIVATE boost_headeronly)
endif ()
+# We link against webkit2gtk symbols in src/slic3r/GUI/Widgets/WebView.cpp
+if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ target_link_libraries(libslic3r_gui "-lwebkit2gtk-4.0")
+endif ()
+
# Link the resources dir to where Slic3r GUI expects it
set(output_dlls_Release "")
set(output_dlls_Debug "")
--
2.38.1