From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id B0AD7158086 for ; Sat, 4 Dec 2021 20:15:36 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EA8842BC170; Sat, 4 Dec 2021 20:15:35 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2B5DB2BC16E for ; Sat, 4 Dec 2021 20:15:35 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C7E26342CA1 for ; Sat, 4 Dec 2021 20:15:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 2329B1A0 for ; Sat, 4 Dec 2021 20:15:32 +0000 (UTC) From: "Yahor Berdnikau" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Yahor Berdnikau" Message-ID: <1638648919.62b321a0809520d9454e284736301b19f12b273d.egorr.berd@gentoo> Subject: [gentoo-commits] repo/proj/guru:dev commit in: media-gfx/superslicer/, media-gfx/superslicer/files/ X-VCS-Repository: repo/proj/guru X-VCS-Files: media-gfx/superslicer/Manifest media-gfx/superslicer/files/Support-for-HiDPI-in-OpenGL-on-Linux-GTK3-2.2.53.4.patch media-gfx/superslicer/files/boost-endian-2.2.53.4.patch media-gfx/superslicer/files/boost-mouse-atomic-2.2.53.4.patch media-gfx/superslicer/files/freecad-dialog-2.2.53.4.patch media-gfx/superslicer/files/miniz-zip-header-2.2.53.4.patch media-gfx/superslicer/files/missing-imports-2.3.56.9.patch media-gfx/superslicer/files/string-to-char-conversion-2.3.56.9.patch media-gfx/superslicer/files/version-suffix-2.2.53.4.patch media-gfx/superslicer/files/version-suffix-2.3.56.9.patch media-gfx/superslicer/files/wxwidget-canvas-set-context-2.3.56.9.patch media-gfx/superslicer/metadata.xml media-gfx/superslicer/superslicer-2.2.53.4.ebuild media-gfx/superslicer/superslicer-2.3.56.9.ebuild X-VCS-Directories: media-gfx/superslicer/files/ media-gfx/superslicer/ X-VCS-Committer: egorr.berd X-VCS-Committer-Name: Yahor Berdnikau X-VCS-Revision: 62b321a0809520d9454e284736301b19f12b273d X-VCS-Branch: dev Date: Sat, 4 Dec 2021 20:15:32 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 32f1c402-4e13-44d0-82e3-87b24f928ce9 X-Archives-Hash: 248a6d0e1d8510c5059001048a27c472 commit: 62b321a0809520d9454e284736301b19f12b273d Author: Yahor Berdnikau gmail com> AuthorDate: Sat Dec 4 19:57:06 2021 +0000 Commit: Yahor Berdnikau gmail com> CommitDate: Sat Dec 4 20:15:19 2021 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=62b321a0 media-gfx/superslicer: new package Added slotted ebuilds for 2.2.53.4 and 2.3.56.9 SuperSlicer versions. Signed-off-by: Yahor Berdnikau gmail.com> media-gfx/superslicer/Manifest | 16 +++ ...or-HiDPI-in-OpenGL-on-Linux-GTK3-2.2.53.4.patch | 64 +++++++++++ .../superslicer/files/boost-endian-2.2.53.4.patch | 49 +++++++++ .../files/boost-mouse-atomic-2.2.53.4.patch | 9 ++ .../files/freecad-dialog-2.2.53.4.patch | 9 ++ .../files/miniz-zip-header-2.2.53.4.patch | 20 ++++ .../files/missing-imports-2.3.56.9.patch | 118 +++++++++++++++++++++ .../files/string-to-char-conversion-2.3.56.9.patch | 10 ++ .../files/version-suffix-2.2.53.4.patch | 13 +++ .../files/version-suffix-2.3.56.9.patch | 17 +++ .../wxwidget-canvas-set-context-2.3.56.9.patch | 11 ++ media-gfx/superslicer/metadata.xml | 14 +++ media-gfx/superslicer/superslicer-2.2.53.4.ebuild | 88 +++++++++++++++ media-gfx/superslicer/superslicer-2.3.56.9.ebuild | 112 +++++++++++++++++++ 14 files changed, 550 insertions(+) diff --git a/media-gfx/superslicer/Manifest b/media-gfx/superslicer/Manifest new file mode 100644 index 000000000..db834aeb2 --- /dev/null +++ b/media-gfx/superslicer/Manifest @@ -0,0 +1,16 @@ +AUX Support-for-HiDPI-in-OpenGL-on-Linux-GTK3-2.2.53.4.patch 2485 BLAKE2B 3dbb842ec582212b91c3938750d42afb32e790e2f3f0e42ee11ed7bff0e8b5c3c8deb8968d3e3b8fd5fcf12767c06361489c24c780121681991a29d9435d38b3 SHA512 6412b8492ef8581b412f8e35d88f2a78a00a317db2aa3a9a35a85881b4b71b62c54982bc2aa1a74c022a7aaa31611687457e3f00adcb1f619a2ff7b54bcecd1c +AUX boost-endian-2.2.53.4.patch 1789 BLAKE2B b436e2e15edcee8e1713231e18a4973764ee20c7d142248a71b2ff6f9deabab7e7540f5043db8d60732eea07c8eac77d2086356a6875f0c475e0d1c0db0a3517 SHA512 a31808a54232fa68e09f737981cae75e785ae20d07dd8b1b885431532bb6d2c11aea81bb625f90a84bbd34d66d0d0922556c17feab75f624bb1df44a52df22b1 +AUX boost-mouse-atomic-2.2.53.4.patch 201 BLAKE2B 51de568b16301cd0ffb4b8645b29b74c791b532815fcc53291f87a7eaf1077169996cd6a8d4ef0bad990774e27931c522441980ac7e8b4e0b598e016dfc7d751 SHA512 84292f447a88e35b3046c6ed838af1297cc5ba340768adacaf000de0a2d2f7f5d97ac30e54eafce93d8007524cd245b2d6700ff095ba5d0c8ceb08a3515f5a0f +AUX freecad-dialog-2.2.53.4.patch 481 BLAKE2B 1ad2d3e195c5c5bada1200133f702e0072e67b93f0ba56c5971bff52416f44e05ccba5eb3e47a240c76306b333884c4e1e0104052f9ade58265cb56b230e078b SHA512 a42806fe4fd64fea888cdb45b70ad9846022b6acf80ce6a8cc5cac758bbec161fd70379be95d2f62a3197f961fbccdd408eb2d6895d920748d14c134d22efac4 +AUX miniz-zip-header-2.2.53.4.patch 627 BLAKE2B f75874226b8e3b42080fb9adabc7b0bc73cc62f01839925f7d5c565df4eb9368c8ea5396760d8ff917f22766da0a60cfa1bb48a9b2c428a03ab0221de1cd796b SHA512 4b668d32fa66c192c6130b678061b6c63388971a950a9610d03041983972b7ce3f49405f2d7b4e2b41bb8146ab3b8ed95c009ef8be5c5f8c57067c7887adb306 +AUX missing-imports-2.3.56.9.patch 3114 BLAKE2B ff21f476f0e04df3c694a4962cfb3b588c9799ffe4a60df2d1149800dc81edd734110eb06841dd0da3118b6d4174e58ab581021b826779f221c66b46af4448b9 SHA512 0f30957f28140de61a10adcf625358d0df7ea6c0a4ef48061a31a324d9487496792f72506ac5f235d749402ad049cea9e418f9fd8814e641f5815f43c6c295ce +AUX string-to-char-conversion-2.3.56.9.patch 713 BLAKE2B 726166a605a711350bc436bd31a69211750e3e9cc459a03091c4e857ae600b6d0b5c3ed8528334eed09ff0453c39f381cc4aef7391a9e310f5ffdee55225cb89 SHA512 1156f1cdbc8d27d5b24cce0cecbfa26479e5e340e8895d20bbd0d4588068011d12e3a57a536c4ac7d4c5a3105d4c8d6b7274df9cf1b7c45c33642401ab3f3985 +AUX version-suffix-2.2.53.4.patch 468 BLAKE2B 9b698a981bf0101d8ce39c32afe3b1e9559fe1fcb00cbd45bec95d56d222736abd79394b181d9eb164aa67096542bfcc61a8d031b8f82bda41a48a7aa5235968 SHA512 5bd96eb4b4ae6b1050a8843868479a3cead2fa214476170c05305a98b48e8d3bb3d3c57cfc1e5993a33fa95989b07a83ae117820de3e1892cfd7b95a819ea079 +AUX version-suffix-2.3.56.9.patch 628 BLAKE2B 0890f85e487b33012a498845319042faf653e50a9a7857a5792fc5ee4c273a45954db7e228ccdbbfb3d95f46a59c3c737447a8de44e44dc833b55c80685a7eff SHA512 3a457236422b9124ee405d5e97432419da8a2fff2b1d1e88de109670218d9456c26d613aa05341db973e283e0bc6d8ef27a756398726f6d546eb44fc8f16c948 +AUX wxwidget-canvas-set-context-2.3.56.9.patch 404 BLAKE2B 443e6a78147d002e54c552ebd217c494125d092a3c241a5407b3df2198ef0be4ab25bd074ca213d3bf75c8459d3c15772d4de44b71d2bd94af14513765eed573 SHA512 0ad5754c82d6e4273d6860aacaa05a26b84f876d7eb34703f506fe97e9f916ffc735ec203fe2d5da1aa16eee3918e26594364fca0d54984f4988256f980a0dba +DIST superslicer-2.2.53.4.tar.gz 33791161 BLAKE2B c8454ac66a5d75f5bbcd1c29f600897c697f03ad581c97539033758942eac1d4ba0d2acbac43e75307a06e565d25a39b192e6cde522cce6b728afc04c42f82bb SHA512 f883cca3eb2575186c5077e2c1f9ca37e497ff6ed9aeae45a58c1db4de1c52db36fc0f14e7fdcd95aaf375b340932674014614cdab8c6995c56b9988fe5baa06 +DIST superslicer-2.3.56.9-profiles.zip 12193950 BLAKE2B c61be0190345bf886cbe60495f95266ec0b07824c803eaca7a29853a3465ab3d631d794899aebb9ef5f7660cb9341c70e9c38d6f8247a58655ed720deebbc584 SHA512 6beab170ae7e50e9880288673fd482f2903d5e9b87a0ddd6549098fa35f9b87e4891f015d0a26aedfac9736c3f55dcd1794d8abb3f9cc072bcdbb7e87f42a9fa +DIST superslicer-2.3.56.9.tar.gz 32260311 BLAKE2B 2da3201d789dd66a4a26c365b020f67dd5f43a71b9616681eb5dfed1ec759943398ce82fa2c8d5fd9a4f66a6887c25f0f86286ec4f52364a97a29cee548c3f0c SHA512 05c57765770889dc365eb721a2e6491f16de5a03c03493a682c49b769435d6db6e0ad52c0cfced7aa402dc751e4fdcbfc0623fa82d8431e45a590e64b12b6769 +EBUILD superslicer-2.2.53.4.ebuild 2170 BLAKE2B 24d707ffe3d2feb9ba625411755056337df14b6cd540ca64551d0fe32b080c597604fe404b0239ac0e13eca54b1622f90f4ebcb201ac627acbc2f7e4bdc4a0f4 SHA512 bbc8bf3a2b66dd7ae5fa3749c7ab123a1983f9842966ea5bf3024dfc75ccd57c5dc2fc45b2cabc9dd0a5e01af97716603fbdab9052e19728a2b1f8b94264037d +EBUILD superslicer-2.3.56.9.ebuild 3374 BLAKE2B 40f8173e21a5fd676a5f674d362669740d9a3b35c070218c0d674254c2bd9cf615b29c1a181129d937e1d877aefa54129839af26927ed4b50068c24a9a498a11 SHA512 fd785be9d565132f7709399ae6247d792036ec7cbb4cd961b6dfde6bcb99fcd8f168004a9a4ccb1d3ea3f936066311ebaebf74806252657d6b920677cc6fa742 +MISC metadata.xml 469 BLAKE2B 542259ec3961e5fbeae4a0fd894f2a289278a86039a9a7862e6ec2c745b32433ed9b6dbf6659a171f2decddea2018dc7e608404f4b7c99aa94d236a86fdc5b2d SHA512 28a53bfcfc4ab83cf071f2d7e5ec939251b569d1a657bc725ee5530a7a1d18c67926fabb911dc48912a0bb43a2058fad84622f04e4fe3dd9838935d8cd3e4fb6 diff --git a/media-gfx/superslicer/files/Support-for-HiDPI-in-OpenGL-on-Linux-GTK3-2.2.53.4.patch b/media-gfx/superslicer/files/Support-for-HiDPI-in-OpenGL-on-Linux-GTK3-2.2.53.4.patch new file mode 100644 index 000000000..214395524 --- /dev/null +++ b/media-gfx/superslicer/files/Support-for-HiDPI-in-OpenGL-on-Linux-GTK3-2.2.53.4.patch @@ -0,0 +1,64 @@ +From a13b35ce92efed202ef43f02debb83dfb533d9b0 Mon Sep 17 00:00:00 2001 +From: Vojtech Bubnik +Date: Tue, 15 Dec 2020 12:14:30 +0100 +Subject: [PATCH] Support for HiDPI in OpenGL on Linux / GTK3. wxGTK3 HiDPI + support seems to emulate what OSX does quite closely, thus the changes are + relatively minimal. + +Also fixed an ugly rounding issue when populating the ImGUI font map +with image thumbnails. + +Fixes Gtk3 issue on 4k+ screens #4135 +Fixes HiDPI screens with Wayland on Fedora 30 cause Plater view to be too small. #3245 + +Signed-off-by: Yahor Berdnikau +--- + src/slic3r/GUI/GLCanvas3D.cpp | 10 +++++++++- + src/slic3r/GUI/GLCanvas3D.hpp | 5 +++-- + src/slic3r/GUI/ImGuiWrapper.cpp | 8 ++++++-- + src/slic3r/GUI/MainFrame.cpp | 3 ++- + 4 files changed, 20 insertions(+), 6 deletions(-) + +diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp +index e778de879..c2e442431 100644 +--- a/src/slic3r/GUI/GLCanvas3D.cpp ++++ b/src/slic3r/GUI/GLCanvas3D.cpp +@@ -86,6 +86,13 @@ static const size_t VERTEX_BUFFER_RESERVE_SIZE_SUM_MAX = 1024 * 1024 * 128 / 4; + namespace Slic3r { + namespace GUI { + ++#ifdef __WXGTK3__ ++// wxGTK3 seems to simulate OSX behavior in regard to HiDPI scaling support. ++RetinaHelper::RetinaHelper(wxWindow* window) : m_window(window), m_self(nullptr) {} ++RetinaHelper::~RetinaHelper() {} ++float RetinaHelper::get_scale_factor() { return float(m_window->GetContentScaleFactor()); } ++#endif // __WXGTK3__ ++ + Size::Size() + : m_width(0) + , m_height(0) +@@ -3732,7 +3739,8 @@ void GLCanvas3D::update_ui_from_settings() + { + m_dirty = true; + +-#if ENABLE_RETINA_GL ++#if __APPLE__ ++ // Update OpenGL scaling on OSX after the user toggled the "use_retina_opengl" settings in Preferences dialog. + const float orig_scaling = m_retina_helper->get_scale_factor(); + + const bool use_retina = wxGetApp().app_config->get("use_retina_opengl") == "1"; +diff --git a/src/slic3r/GUI/GLCanvas3D.hpp b/src/slic3r/GUI/GLCanvas3D.hpp +index 9c80aa236..e64e65d1b 100644 +--- a/src/slic3r/GUI/GLCanvas3D.hpp ++++ b/src/slic3r/GUI/GLCanvas3D.hpp +@@ -31,7 +31,8 @@ class wxPaintEvent; + class wxGLCanvas; + class wxGLContext; + +-// Support for Retina OpenGL on Mac OS +-#define ENABLE_RETINA_GL __APPLE__ ++// Support for Retina OpenGL on Mac OS. ++// wxGTK3 seems to simulate OSX behavior in regard to HiDPI scaling support, enable it as well. ++#define ENABLE_RETINA_GL (__APPLE__ || __WXGTK3__) + + namespace Slic3r { diff --git a/media-gfx/superslicer/files/boost-endian-2.2.53.4.patch b/media-gfx/superslicer/files/boost-endian-2.2.53.4.patch new file mode 100644 index 000000000..226ad261a --- /dev/null +++ b/media-gfx/superslicer/files/boost-endian-2.2.53.4.patch @@ -0,0 +1,49 @@ +--- a/src/admesh/stlinit.cpp ++++ b/src/admesh/stlinit.cpp +@@ -28,7 +28,7 @@ + + #include + #include +-#include ++#include + + #include "stl.h" + +@@ -36,9 +36,9 @@ + #error "SEEK_SET not defined" + #endif + +-#ifndef BOOST_LITTLE_ENDIAN ++#if BOOST_ENDIAN_BIG_BYTE + extern void stl_internal_reverse_quads(char *buf, size_t cnt); +-#endif /* BOOST_LITTLE_ENDIAN */ ++#endif /* BOOST_ENDIAN_BIG_BYTE */ + + static FILE* stl_open_count_facets(stl_file *stl, const char *file) + { +@@ -89,10 +89,10 @@ + // Read the int following the header. This should contain # of facets. + uint32_t header_num_facets; + bool header_num_faces_read = fread(&header_num_facets, sizeof(uint32_t), 1, fp) != 0; +-#ifndef BOOST_LITTLE_ENDIAN ++#if BOOST_ENDIAN_BIG_BYTE + // Convert from little endian to big endian. + stl_internal_reverse_quads((char*)&header_num_facets, 4); +-#endif /* BOOST_LITTLE_ENDIAN */ ++#endif /* BOOST_ENDIAN_BIG_BYTE */ + if (! header_num_faces_read || num_facets != header_num_facets) + BOOST_LOG_TRIVIAL(info) << "stl_open_count_facets: Warning: File size doesn't match number of facets in the header: " << file; + } +@@ -158,10 +158,10 @@ + // Read a single facet from a binary .STL file. We assume little-endian architecture! + if (fread(&facet, 1, SIZEOF_STL_FACET, fp) != SIZEOF_STL_FACET) + return false; +-#ifndef BOOST_LITTLE_ENDIAN ++#if BOOST_ENDIAN_BIG_BYTE + // Convert the loaded little endian data to big endian. + stl_internal_reverse_quads((char*)&facet, 48); +-#endif /* BOOST_LITTLE_ENDIAN */ ++#endif /* BOOST_ENDIAN_BIG_BYTE */ + } else { + // Read a single facet from an ASCII .STL file + // skip solid/endsolid diff --git a/media-gfx/superslicer/files/boost-mouse-atomic-2.2.53.4.patch b/media-gfx/superslicer/files/boost-mouse-atomic-2.2.53.4.patch new file mode 100644 index 000000000..e7556e0aa --- /dev/null +++ b/media-gfx/superslicer/files/boost-mouse-atomic-2.2.53.4.patch @@ -0,0 +1,9 @@ +--- a/src/slic3r/GUI/Mouse3DController.hpp ++++ b/src/slic3r/GUI/Mouse3DController.hpp +@@ -11,5 +11,6 @@ + #include "hidapi.h" + + #include ++#include + #include + #include diff --git a/media-gfx/superslicer/files/freecad-dialog-2.2.53.4.patch b/media-gfx/superslicer/files/freecad-dialog-2.2.53.4.patch new file mode 100644 index 000000000..880ef6b1f --- /dev/null +++ b/media-gfx/superslicer/files/freecad-dialog-2.2.53.4.patch @@ -0,0 +1,9 @@ +--- a/src/slic3r/GUI/FreeCADDialog.cpp ++++ b/src/slic3r/GUI/FreeCADDialog.cpp +@@ -706,5 +706,5 @@ + m_text->Bind(wxEVT_KEY_DOWN, &FreeCADDialog::on_key_type, this); + m_text->Bind(wxEVT_CHAR, &FreeCADDialog::on_char_type, this); +- m_text->Bind(wxEVT_STC_AUTOCOMP_COMPLETED, &FreeCADDialog::on_autocomp_complete, this); ++ //m_text->Bind(wxEVT_STC_AUTOCOMP_COMPLETED, &FreeCADDialog::on_autocomp_complete, this); + m_text->Connect(wxID_ANY, + wxEVT_KEY_DOWN, diff --git a/media-gfx/superslicer/files/miniz-zip-header-2.2.53.4.patch b/media-gfx/superslicer/files/miniz-zip-header-2.2.53.4.patch new file mode 100644 index 000000000..2294ba0b5 --- /dev/null +++ b/media-gfx/superslicer/files/miniz-zip-header-2.2.53.4.patch @@ -0,0 +1,20 @@ +https://bugs.gentoo.org/761541 +--- a/src/libslic3r/miniz_extension.hpp 2021-01-11 08:01:51.000000000 -0500 ++++ b/src/libslic3r/miniz_extension.hpp 2021-01-12 01:16:10.503404521 -0500 +@@ -4,4 +4,5 @@ + #include + #include ++#include + + namespace Slic3r { + +--- a/src/libslic3r/Format/3mf.cpp ++++ b/src/libslic3r/Format/3mf.cpp +@@ -30,6 +30,7 @@ namespace pt = boost::property_tree; + #include + #include + #include "miniz_extension.hpp" ++#include + + // VERSION NUMBERS + // 0 : .3mf, files saved by older slic3r or other applications. No version definition in them. diff --git a/media-gfx/superslicer/files/missing-imports-2.3.56.9.patch b/media-gfx/superslicer/files/missing-imports-2.3.56.9.patch new file mode 100644 index 000000000..200f1663c --- /dev/null +++ b/media-gfx/superslicer/files/missing-imports-2.3.56.9.patch @@ -0,0 +1,118 @@ +--- a/src/libslic3r/AppConfig.cpp ++++ b/src/libslic3r/AppConfig.cpp +@@ -10,6 +10,7 @@ + + #include + #include ++#include + #include + #include + #include + +--- a/src/libslic3r/Format/CWS.cpp ++++ b/src/libslic3r/Format/CWS.cpp +@@ -1,6 +1,8 @@ + #include "libslic3r/Format/CWS.hpp" + #include "libslic3r/PrintConfig.hpp" + #include "libslic3r/Time.hpp" ++#include ++#include + + namespace Slic3r { + +--- a/src/slic3r/GUI/CalibrationAbstractDialog.cpp ++++ b/src/slic3r/GUI/CalibrationAbstractDialog.cpp +@@ -5,6 +5,7 @@ + #include "GUI.hpp" + #include "GUI_ObjectList.hpp" + #include "Tab.hpp" ++#include + #include + #include + #include + +--- a/src/slic3r/GUI/Preferences.cpp ++++ b/src/slic3r/GUI/Preferences.cpp +@@ -4,6 +4,7 @@ + #include "Plater.hpp" + #include "I18N.hpp" + #include "libslic3r/AppConfig.hpp" ++#include + #include + + namespace Slic3r { + +--- a/src/slic3r/GUI/GUI_ObjectList.cpp ++++ b/src/slic3r/GUI/GUI_ObjectList.cpp +@@ -15,6 +15,7 @@ + #include "Selection.hpp" + + #include ++#include + #include "slic3r/Utils/FixModelByWin10.hpp" + + #ifdef __WXMSW__ +--- a/src/slic3r/GUI/Tab.cpp ++++ b/src/slic3r/GUI/Tab.cpp +@@ -22,6 +22,7 @@ + + #include + #include ++#include + #include + #include + #include +--- a/src/slic3r/GUI/3DBed.cpp ++++ b/src/slic3r/GUI/3DBed.cpp +@@ -16,7 +16,11 @@ + + #include + #include ++#include + #include ++#include ++#include ++#include + + static const float GROUND_Z = -0.02f; + +--- a/src/slic3r/Utils/PresetUpdater.cpp ++++ b/src/slic3r/Utils/PresetUpdater.cpp +@@ -12,6 +12,8 @@ + #include + #include + #include ++#include ++#include + + #include + #include +--- a/src/slic3r/GUI/NotificationManager.hpp ++++ b/src/slic3r/GUI/NotificationManager.hpp +@@ -6,6 +6,7 @@ + + #include + #include ++#include "libslic3r_version.h" + + #include + +--- a/src/slic3r/GUI/Search.cpp ++++ b/src/slic3r/GUI/Search.cpp +@@ -2,6 +2,7 @@ + + #include + #include ++#include + #include + #include + #include +--- a/src/libslic3r/Optimize/Optimizer.hpp ++++ b/src/libslic3r/Optimize/Optimizer.hpp +@@ -8,5 +8,6 @@ + #include + #include + #include ++#include + + namespace Slic3r { namespace opt { diff --git a/media-gfx/superslicer/files/string-to-char-conversion-2.3.56.9.patch b/media-gfx/superslicer/files/string-to-char-conversion-2.3.56.9.patch new file mode 100644 index 000000000..6cb596bf0 --- /dev/null +++ b/media-gfx/superslicer/files/string-to-char-conversion-2.3.56.9.patch @@ -0,0 +1,10 @@ +--- a/src/slic3r/GUI/GUI_App.cpp ++++ b/src/slic3r/GUI/GUI_App.cpp +@@ -837,7 +837,7 @@ bool GUI_App::on_init_inner() + } + wxString artist; + if (!file_name.empty() && file_name != (std::string(SLIC3R_APP_NAME) + L(" icon"))) { +- wxString splash_screen_path = wxString::FromUTF8((boost::filesystem::path(Slic3r::resources_dir()) / "splashscreen" / file_name).string()); ++ wxString splash_screen_path = wxString::FromUTF8((boost::filesystem::path(Slic3r::resources_dir()) / "splashscreen" / file_name).c_str()); + // make a bitmap with dark grey banner on the left side + bmp = SplashScreen::MakeBitmap(wxBitmap(splash_screen_path, wxBITMAP_TYPE_JPEG)); diff --git a/media-gfx/superslicer/files/version-suffix-2.2.53.4.patch b/media-gfx/superslicer/files/version-suffix-2.2.53.4.patch new file mode 100644 index 000000000..d7408fe5d --- /dev/null +++ b/media-gfx/superslicer/files/version-suffix-2.2.53.4.patch @@ -0,0 +1,13 @@ +--- a/version.inc ++++ b/version.inc +@@ -1,8 +1,8 @@ + # Included by CMakeLists, edited by the build script + # (the version numbers are generated by the build script from the git current label) + +-set(SLIC3R_APP_NAME "SuperSlicer") +-set(SLIC3R_APP_KEY "SuperSlicer") ++set(SLIC3R_APP_NAME "SuperSlicer2.2") ++set(SLIC3R_APP_KEY "SuperSlicer2.2") + set(SLIC3R_VERSION "2.2.53") + set(SLIC3R_BUILD_ID "SuperSlicer_${SLIC3R_VERSION}+UNKNOWN") + set(SLIC3R_RC_VERSION "2,2,53,0") diff --git a/media-gfx/superslicer/files/version-suffix-2.3.56.9.patch b/media-gfx/superslicer/files/version-suffix-2.3.56.9.patch new file mode 100644 index 000000000..74e982cad --- /dev/null +++ b/media-gfx/superslicer/files/version-suffix-2.3.56.9.patch @@ -0,0 +1,17 @@ +--- a/version.inc ++++ b/version.inc +@@ -2,11 +2,11 @@ + # (the version numbers are generated by the build script from the git current label) + + # name of the slicer +-set(SLIC3R_APP_NAME "SuperSlicer") ++set(SLIC3R_APP_NAME "SuperSlicer2.3") + # Key fo the slicer, must only contains ascii chars and no spaces (be valid in all filesystems) +-set(SLIC3R_APP_KEY "SuperSlicer") ++set(SLIC3R_APP_KEY "SuperSlicer2.3") + # exe name of the slicer, should be lowercase and valid in all os +-set(SLIC3R_APP_CMD "superslicer") ++set(SLIC3R_APP_CMD "superslicer-2.3") + # versions + set(SLIC3R_VERSION "2.3.56") + set(SLIC3R_VERSION_FULL "2.3.56.7") diff --git a/media-gfx/superslicer/files/wxwidget-canvas-set-context-2.3.56.9.patch b/media-gfx/superslicer/files/wxwidget-canvas-set-context-2.3.56.9.patch new file mode 100644 index 000000000..598780949 --- /dev/null +++ b/media-gfx/superslicer/files/wxwidget-canvas-set-context-2.3.56.9.patch @@ -0,0 +1,11 @@ +--- a/src/slic3r/GUI/GLCanvas3D.cpp ++++ b/src/slic3r/GUI/GLCanvas3D.cpp +@@ -4834,5 +4833,5 @@ bool GLCanvas3D::_init_collapse_toolbar() + + bool GLCanvas3D::_set_current() + { +- return m_context != nullptr && m_canvas->SetCurrent(*m_context); ++ return m_context != nullptr && _is_shown_on_screen() && m_canvas->SetCurrent(*m_context); + } + + void GLCanvas3D::_resize(unsigned int w, unsigned int h) diff --git a/media-gfx/superslicer/metadata.xml b/media-gfx/superslicer/metadata.xml new file mode 100644 index 000000000..7b63c69a8 --- /dev/null +++ b/media-gfx/superslicer/metadata.xml @@ -0,0 +1,14 @@ + + + + + egorr.berd@gmail.com + Yahor Berdnikau + + + A mesh slicer to generated G-Code for fused-filament fabrication based on PrusaSlicer. + + + Install additional 3d printer profiles. + + diff --git a/media-gfx/superslicer/superslicer-2.2.53.4.ebuild b/media-gfx/superslicer/superslicer-2.2.53.4.ebuild new file mode 100644 index 000000000..a985d7c65 --- /dev/null +++ b/media-gfx/superslicer/superslicer-2.2.53.4.ebuild @@ -0,0 +1,88 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +WX_GTK_VER="3.0-gtk3" + +inherit xdg cmake desktop wxwidgets + +MY_PN="SuperSlicer" +DESCRIPTION="A mesh slicer to generated G-Code for fused-filament fabrication" +HOMEPAGE="https://github.com/supermerill/SuperSlicer" +SRC_URI="https://github.com/supermerill/SuperSlicer/archive/${PV}.tar.gz -> ${P}.tar.gz" +S="${WORKDIR}/${MY_PN}-${PV}" + +LICENSE="AGPL-3" +SLOT="22" +KEYWORDS="~amd64" +IUSE="gui test" + +# tests fail to link with USE=-gui, bug #760096 +REQUIRED_USE="test? ( gui )" +RESTRICT="!test? ( test )" + +RDEPEND=" + dev-cpp/tbb + >=dev-libs/boost-1.73.0:=[nls,threads(+)] + dev-libs/c-blosc + dev-libs/cereal + dev-libs/openssl + >=dev-libs/miniz-2.1.0-r2 + >=media-gfx/openvdb-5.0.0 + media-libs/qhull:= + media-libs/openexr:= + sci-libs/libigl + sci-libs/nlopt + >=sci-mathematics/cgal-5.0:= + sys-libs/zlib:= + gui? ( + dev-libs/glib:2 + media-libs/glew:0= + net-misc/curl + virtual/glu + virtual/opengl + x11-libs/gtk+:3 + x11-libs/wxGTK:${WX_GTK_VER}[X,opengl] + ) +" +DEPEND="${RDEPEND} + media-libs/qhull[static-libs] + test? ( dev-cpp/gtest ) +" + +PATCHES=( + "${FILESDIR}/boost-endian-${PV}.patch" + "${FILESDIR}/miniz-zip-header-${PV}.patch" + "${FILESDIR}/freecad-dialog-${PV}.patch" + "${FILESDIR}/boost-mouse-atomic-${PV}.patch" + "${FILESDIR}/Support-for-HiDPI-in-OpenGL-on-Linux-GTK3-${PV}.patch" + "${FILESDIR}/version-suffix-${PV}.patch" +) + +src_configure() { + use gui && setup-wxwidgets + + CMAKE_BUILD_TYPE=Release + local mycmakeargs=( + -DSLIC3R_BUILD_TESTS=$(usex test) + -DSLIC3R_FHS=1 + -DSLIC3R_GUI=$(usex gui) + -DSLIC3R_PCH=0 + -DSLIC3R_WX_STABLE=1 + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + if use gui; then + newicon -s 128 resources/icons/Slic3r_128px.png SuperSli3er_2.2.png + make_desktop_entry superslicer "SuperSlicer 2.2" "SuperSli3er_2.2" "Graphics;3DGraphics;Engineering;" \ + "MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;" \ + "GenericName=3D Printing Software" \ + "Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA" + fi +} diff --git a/media-gfx/superslicer/superslicer-2.3.56.9.ebuild b/media-gfx/superslicer/superslicer-2.3.56.9.ebuild new file mode 100644 index 000000000..5bef37976 --- /dev/null +++ b/media-gfx/superslicer/superslicer-2.3.56.9.ebuild @@ -0,0 +1,112 @@ +# Copyright 2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +WX_GTK_VER="3.0-gtk3" + +inherit xdg cmake desktop wxwidgets + +MY_PN="SuperSlicer" +DESCRIPTION="A mesh slicer to generated G-Code for fused-filament fabrication" +HOMEPAGE="https://github.com/supermerill/SuperSlicer" +SRC_URI="https://github.com/supermerill/SuperSlicer/archive/${PV}.tar.gz -> ${P}.tar.gz + profiles? ( https://github.com/slic3r/slic3r-profiles/archive/118aa919c16837eb2ff6ba97e2934fa4144ef806.zip -> ${P}-profiles.zip )" +S="${WORKDIR}/${MY_PN}-${PV}" + +LICENSE="AGPL-3" +SLOT="23" +KEYWORDS="~amd64" +IUSE="gui test profiles" + +# tests fail to link with USE=-gui, bug #760096 +REQUIRED_USE="test? ( gui )" +RESTRICT="!test? ( test )" + +BDEPEND="profiles? ( app-arch/unzip )" +RDEPEND=" + dev-cpp/eigen:3 + dev-cpp/tbb + >=dev-libs/boost-1.73.0:=[nls,threads(+)] + dev-libs/cereal + dev-libs/expat + dev-libs/c-blosc + dev-libs/gmp:= + >=dev-libs/miniz-2.1.0-r2 + dev-libs/mpfr:= + >=media-gfx/openvdb-5.0.0 + media-libs/ilmbase:= + media-libs/libpng:0= + media-libs/openexr:0= + media-libs/qhull:= + sci-libs/libigl + sci-libs/nlopt + >=sci-mathematics/cgal-5.0:= + sys-apps/dbus + sys-libs/zlib:= + gui? ( + dev-libs/glib:2 + media-libs/glew:0= + net-misc/curl + virtual/glu + virtual/opengl + x11-libs/gtk+:3 + >=x11-libs/wxGTK-3.0.5.1:=[X,opengl] + ) +" +DEPEND="${RDEPEND} + media-libs/qhull[static-libs] + test? ( dev-cpp/gtest ) +" + +PATCHES=( + "${FILESDIR}/miniz-zip-header-2.2.53.4.patch" + "${FILESDIR}/freecad-dialog-2.2.53.4.patch" + "${FILESDIR}/missing-imports-${PV}.patch" + "${FILESDIR}/string-to-char-conversion-${PV}.patch" + "${FILESDIR}/version-suffix-${PV}.patch" + "${FILESDIR}/wxwidget-canvas-set-context-2.3.56.9.patch" +) + +src_unpack() { + unpack ${P}.tar.gz + mv "${S}/resources/icons/SuperSlicer_192px.png" "${S}/resources/icons/SuperSlicer2.3_192px.png" || die "Failed to rename icons" + mv "${S}/resources/icons/SuperSlicer_128px.png" "${S}/resources/icons/SuperSlicer2.3_128px.png" || die "Failed to rename icons" + mv "${S}/resources/icons/SuperSlicer-gcodeviewer_128px.png" "${S}/resources/icons/SuperSlicer2.3-gcodeviewer_128px.png" || die "Failed to rename icons" + mv "${S}/resources/icons/SuperSlicer-gcodeviewer_192px.png" "${S}/resources/icons/SuperSlicer2.3-gcodeviewer_192px.png" || die "Failed to rename icons" + + use profiles && unpack ${P}-profiles.zip && + if use profiles ; then + cp -r "${WORKDIR}/slic3r-profiles-118aa919c16837eb2ff6ba97e2934fa4144ef806/"* "${S}/resources/profiles" || die "Failed to copy profiles" + fi +} + +src_configure() { + use gui && setup-wxwidgets + + CMAKE_BUILD_TYPE=Release + local mycmakeargs=( + -DSLIC3R_BUILD_TESTS=$(usex test) + -DSLIC3R_FHS=ON + -DSLIC3R_GTK=3 + -DSLIC3R_GUI=$(usex gui) + -DSLIC3R_PCH=OFF + -DSLIC3R_WX_STABLE=ON + -Wno-dev + ) + + cmake_src_configure +} + +src_install() { + cmake_src_install + + if use gui; then + newicon -s 128 resources/icons/Slic3r_128px.png SuperSli3er_2.3.png + dosym superslicer-2.3 /usr/bin/superslicer-2.3-gcodeviewer + make_desktop_entry superslicer "SuperSlicer 2.3" "SuperSli3er_2.3" "Graphics;3DGraphics;Engineering;" \ + "MimeType=model/stl;application/vnd.ms-3mfdocument;application/prs.wavefront-obj;application/x-amf;" \ + "GenericName=3D Printing Software" \ + "Keywords=3D;Printing;Slicer;slice;3D;printer;convert;gcode;stl;obj;amf;SLA" + fi +}