From nobody Sat Dec 03 07:05:56 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4NPLSN38ycz4jp4m; Sat, 3 Dec 2022 07:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4NPLSN2bXgz41W4; Sat, 3 Dec 2022 07:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670051156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0j5iilFMGZ2EPcQ2uwAa7fTRwT4JF/yjfSXeChELlEg=; b=MMx8RvRDtHtexiu7PpnhfhuK55MPYCqVLjp8v79hseBilDhyQ118VRj/NVE94bUzkQdSNe NEXRSF+D7lGXwud6jK7TzTIIUt4bFsc2rZzgCEa8/3Pdd+EjhxFp90Krocmn4KhTu9Xa0z FXgw/m1Am4giKXIxqwVbLYOZVr7P8pnVX7KFkYjCw38B/SHZmoTqzns54RcZhNrBvyrJ2k q1poCZm7dcgHFxmoc32xc7ijk1KIzArbR+ksRQeF2V1c5rpoPU0zZFYOkalhbtLKo9LFlU HEBEMCUHUdHRnBn5YmbllysgBXmEwB0fx3kY3P6NsobMDX8dyd3QNksgK3GEZw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1670051156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0j5iilFMGZ2EPcQ2uwAa7fTRwT4JF/yjfSXeChELlEg=; b=lB3Mp+qCJKqq9+H9mjat334QMu22Q4tRJZ0NE3Y9d4Qda2eFvSvrqkNrkAVfFs4USmb/kE CJPGBIrmeSa0hRqI+MNIc6aJCk1Glt8cozgJPimkx5JUIROPzuK0GbkAQkZF6rLO0GBKQp QSMmgV/fhcZ38BD/xbS4EViOEZqCGSr3RjjAKcBVhWBIHVCREXe37vjDTiji+PC/V4reOg ReFlITsvjQtDUZhLRbnNB6Q3Nq57A3iWw7+a63m7UPK9gw6DoABJV2eFfm7dLgUOxdOf+d rKD62RvPzRwvG+YAB3qBmUWhbiLScpZSG+hx2cOtND/HBvKXZ2OCeczVejZ9eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1670051156; a=rsa-sha256; cv=none; b=DrKb9qVUN6ooLJ1HeuTTjUIo+DwCYiGBxs7Z1hLmeajeWBrDx7Nwm1k/hmhAJLaT4hLlHb xypE2B4fkbaNd47SkW0YwI201Y0vG+107loUnk3mHnQSTi86CRgqgEvEhltAUlRC1jUHCQ scekwz69mag5L8SIJAPGP24wM61UPcax5myZlyoN86nvK3pt598JWin7cW+0o+eO+rCjnX kr7PFvHJobyE+8lvR2I6ZYatUKD7+YutI8/U7CaczAGM/pkiL6jh8qjhyk3Yu9djJDBRmW 0IhjzHMgWon/7zpR0txeLvSnykQocBLmJIaCrkHZmKzPoExxhht76Adz2j4lzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4NPLSN1cZwzmCb; Sat, 3 Dec 2022 07:05:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2B375uHb042668; Sat, 3 Dec 2022 07:05:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2B375utZ042667; Sat, 3 Dec 2022 07:05:56 GMT (envelope-from git) Date: Sat, 3 Dec 2022 07:05:56 GMT Message-Id: <202212030705.2B375utZ042667@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Michael Zhilin Subject: git: f788ec6d2e36 - main - cad/PrusaSlicer: backport fix from upstream List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mizhka X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f788ec6d2e3641a01e2207a207a797463a72b28a Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mizhka (src committer): URL: https://cgit.FreeBSD.org/ports/commit/?id=f788ec6d2e3641a01e2207a207a797463a72b28a commit f788ec6d2e3641a01e2207a207a797463a72b28a Author: Michael Zhilin AuthorDate: 2022-12-03 06:59:56 +0000 Commit: Michael Zhilin CommitDate: 2022-12-03 07:05:30 +0000 cad/PrusaSlicer: backport fix from upstream - The app is crashing when tries to set default language. - Make QA tests a bit more happy PR: 267883 Submitted by: michal.zielonka.8001@gmail.com --- cad/PrusaSlicer/Makefile | 21 ++++++++++---- .../files/patch-src_slic3r_GUI_GUI__App.cpp | 32 ++++++++++++++++++++-- 2 files changed, 46 insertions(+), 7 deletions(-) diff --git a/cad/PrusaSlicer/Makefile b/cad/PrusaSlicer/Makefile index 8b94985334b7..92e0df80a298 100644 --- a/cad/PrusaSlicer/Makefile +++ b/cad/PrusaSlicer/Makefile @@ -1,4 +1,5 @@ PORTNAME= PrusaSlicer +PORTREVISION= 1 DISTVERSIONPREFIX=version_ DISTVERSION= 2.5.0 CATEGORIES= cad @@ -23,17 +24,27 @@ LIB_DEPENDS= libtbb.so:devel/onetbb \ libgmp.so:math/gmp \ libmpfr.so:math/mpfr \ libdbus-1.so:devel/dbus \ - libpng.so:graphics/png + libpng.so:graphics/png \ + libTKXDESTEP.so:cad/opencascade \ + libtiff.so:graphics/tiff \ + libfontconfig.so:x11-fonts/fontconfig \ + libfreeimage.so:graphics/freeimage \ + libfreetype.so:print/freetype2 \ + libavcodec.so:multimedia/ffmpeg \ + libharfbuzz.so:print/harfbuzz -USES= cmake cpe desktop-file-utils eigen:3 gettext gl iconv pkgconfig +USES= cmake cpe desktop-file-utils eigen:3 gettext gl pkgconfig jpeg iconv gnome xorg CPE_VENDOR= prusa3d -CMAKE_ARGS+= -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \ - -DSLIC3R_GTK=3 \ - -DSLIC3R_FHS=1 USE_GITHUB= yes GH_ACCOUNT= prusa3d USE_GL= gl glu glew +USE_GNOME= gtk30 pango atk cairo gdkpixbuf2 glib20 USE_WX= 3.2 +USE_XORG= x11 + +CMAKE_ARGS+= -DwxWidgets_CONFIG_EXECUTABLE="${WX_CONFIG}" \ + -DSLIC3R_GTK=3 \ + -DSLIC3R_FHS=1 PORTDATA= * diff --git a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp index 16c1ad89dcd4..1fa790d4d704 100644 --- a/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp +++ b/cad/PrusaSlicer/files/patch-src_slic3r_GUI_GUI__App.cpp @@ -1,6 +1,6 @@ --- src/slic3r/GUI/GUI_App.cpp.orig 2022-09-06 07:09:19 UTC +++ src/slic3r/GUI/GUI_App.cpp -@@ -2072,7 +2072,7 @@ bool GUI_App::load_language(wxString language, bool in +@@ -2072,21 +2072,24 @@ bool GUI_App::load_language(wxString language, bool in BOOST_LOG_TRIVIAL(trace) << boost::format("System language detected (user locales and such): %1%") % m_language_info_system->CanonicalName.ToUTF8().data(); } } @@ -9,7 +9,35 @@ // Allocating a temporary locale will switch the default wxTranslations to its internal wxTranslations instance. wxLocale temp_locale; // Set the current translation's language to default, otherwise GetBestTranslation() may not work (see the wxWidgets source code). -@@ -2096,6 +2096,7 @@ bool GUI_App::load_language(wxString language, bool in +- wxTranslations::Get()->SetLanguage(wxLANGUAGE_DEFAULT); +- // Let the wxFileTranslationsLoader enumerate all translation dictionaries for PrusaSlicer +- // and try to match them with the system specific "preferred languages". +- // There seems to be a support for that on Windows and OSX, while on Linuxes the code just returns wxLocale::GetSystemLanguage(). +- // The last parameter gets added to the list of detected dictionaries. This is a workaround +- // for not having the English dictionary. Let's hope wxWidgets of various versions process this call the same way. +- wxString best_language = wxTranslations::Get()->GetBestTranslation(SLIC3R_APP_KEY, wxLANGUAGE_ENGLISH); +- if (! best_language.IsEmpty()) { +- m_language_info_best = wxLocale::FindLanguageInfo(best_language); +- BOOST_LOG_TRIVIAL(trace) << boost::format("Best translation language detected (may be different from user locales): %1%") % m_language_info_best->CanonicalName.ToUTF8().data(); +- } ++ wxTranslations *wx_trp = wxTranslations::Get(); ++ if (wx_trp) { ++ wxTranslations::Get()->SetLanguage(wxLANGUAGE_DEFAULT); ++ // Let the wxFileTranslationsLoader enumerate all translation dictionaries for PrusaSlicer ++ // and try to match them with the system specific "preferred languages". ++ // There seems to be a support for that on Windows and OSX, while on Linuxes the code just returns wxLocale::GetSystemLanguage(). ++ // The last parameter gets added to the list of detected dictionaries. This is a workaround ++ // for not having the English dictionary. Let's hope wxWidgets of various versions process this call the same way. ++ wxString best_language = wxTranslations::Get()->GetBestTranslation(SLIC3R_APP_KEY, wxLANGUAGE_ENGLISH); ++ if (! best_language.IsEmpty()) { ++ m_language_info_best = wxLocale::FindLanguageInfo(best_language); ++ BOOST_LOG_TRIVIAL(trace) << boost::format("Best translation language detected (may be different from user locales): %1%") % m_language_info_best->CanonicalName.ToUTF8().data(); ++ } ++ } + #ifdef __linux__ + wxString lc_all; + if (wxGetEnv("LC_ALL", &lc_all) && ! lc_all.IsEmpty()) { +@@ -2096,6 +2099,7 @@ bool GUI_App::load_language(wxString language, bool in } #endif }