summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-05-29 19:06:56 +0200
committerAndrew Ammerlaan <andrewammerlaan@gentoo.org>2024-05-29 19:07:37 +0200
commit4f8dbb6345ae081b5bb65af4ea20c0c8eb09e92e (patch)
tree021c1ea8dc2f2d74fc8c2df9507eeaf2556e8efb /media-gfx/freecad
parentmedia-gfx/svg2rlg: Fix distfile suffix (diff)
downloadgentoo-4f8dbb6345ae081b5bb65af4ea20c0c8eb09e92e.tar.gz
gentoo-4f8dbb6345ae081b5bb65af4ea20c0c8eb09e92e.tar.bz2
gentoo-4f8dbb6345ae081b5bb65af4ea20c0c8eb09e92e.zip
media-gfx/freecad: fix build with boost 1.75
and properly pass through arguments in wrapper Closes: https://bugs.gentoo.org/932454 Closes: https://bugs.gentoo.org/932818 Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'media-gfx/freecad')
-rw-r--r--media-gfx/freecad/files/freecad-0.21.2-boost-175-1.patch22
-rw-r--r--media-gfx/freecad/files/freecad-0.21.2-boost-175-2.patch22
-rw-r--r--media-gfx/freecad/files/freecad-0.21.2-boost-175-3.patch25
-rw-r--r--media-gfx/freecad/freecad-0.21.2-r2.ebuild5
-rw-r--r--media-gfx/freecad/freecad-9999.ebuild2
5 files changed, 74 insertions, 2 deletions
diff --git a/media-gfx/freecad/files/freecad-0.21.2-boost-175-1.patch b/media-gfx/freecad/files/freecad-0.21.2-boost-175-1.patch
new file mode 100644
index 000000000000..cbb78d5bdc94
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.21.2-boost-175-1.patch
@@ -0,0 +1,22 @@
+From f555a25f9e67e628e8075fc8599d7c11807eaddd Mon Sep 17 00:00:00 2001
+From: wmayer <wmayer@users.sourceforge.net>
+Date: Sun, 21 Apr 2024 08:36:16 +0200
+Subject: [PATCH] Fixes #13549: smesh doesn't compile with boost 1.85
+
+---
+ src/3rdParty/salomesmesh/src/SMESH/DriverGMF.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/3rdParty/salomesmesh/src/SMESH/DriverGMF.cpp b/src/3rdParty/salomesmesh/src/SMESH/DriverGMF.cpp
+index d72ff2363f39..f108cbbcb2cf 100644
+--- a/src/3rdParty/salomesmesh/src/SMESH/DriverGMF.cpp
++++ b/src/3rdParty/salomesmesh/src/SMESH/DriverGMF.cpp
+@@ -55,7 +55,7 @@ namespace DriverGMF
+
+ bool isExtensionCorrect( const std::string& fileName )
+ {
+- std::string ext = boost::filesystem::extension(fileName);
++ std::string ext = boost::filesystem::path(fileName).extension().string();
+ switch ( ext.size() ) {
+ case 5: return ( ext == ".mesh" || ext == ".solb" );
+ case 6: return ( ext == ".meshb" );
diff --git a/media-gfx/freecad/files/freecad-0.21.2-boost-175-2.patch b/media-gfx/freecad/files/freecad-0.21.2-boost-175-2.patch
new file mode 100644
index 000000000000..5f0807028859
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.21.2-boost-175-2.patch
@@ -0,0 +1,22 @@
+From aa54ba73df4d42878130c99688be35acf10725a0 Mon Sep 17 00:00:00 2001
+From: ppphp <kevinniub@gmail.com>
+Date: Sat, 30 Mar 2024 13:52:32 +0800
+Subject: [PATCH] fix: c++20 deprecate copy_option
+
+---
+ src/Gui/PreferencePackManager.cpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Gui/PreferencePackManager.cpp b/src/Gui/PreferencePackManager.cpp
+index e0e6184a3147..e1773a436852 100644
+--- a/src/Gui/PreferencePackManager.cpp
++++ b/src/Gui/PreferencePackManager.cpp
+@@ -224,7 +224,7 @@ void Gui::PreferencePackManager::importConfig(const std::string& packName,
+ auto savedPreferencePacksDirectory =
+ fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
+ auto cfgFilename = savedPreferencePacksDirectory / packName / (packName + ".cfg");
+- fs::copy_file(path, cfgFilename, fs::copy_option::overwrite_if_exists);
++ fs::copy_file(path, cfgFilename, fs::copy_options::overwrite_existing);
+ rescan();
+ }
+
diff --git a/media-gfx/freecad/files/freecad-0.21.2-boost-175-3.patch b/media-gfx/freecad/files/freecad-0.21.2-boost-175-3.patch
new file mode 100644
index 000000000000..c4c8039dab49
--- /dev/null
+++ b/media-gfx/freecad/files/freecad-0.21.2-boost-175-3.patch
@@ -0,0 +1,25 @@
+From 91457bbdee2422c7f0372688cf72d021cf222073 Mon Sep 17 00:00:00 2001
+From: ppphp <kevinniub@gmail.com>
+Date: Sat, 30 Mar 2024 19:17:56 +0800
+Subject: [PATCH] add version check macro for compatibility
+
+---
+ src/Gui/PreferencePackManager.cpp | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/src/Gui/PreferencePackManager.cpp b/src/Gui/PreferencePackManager.cpp
+index e1773a436852..dfc54240c00c 100644
+--- a/src/Gui/PreferencePackManager.cpp
++++ b/src/Gui/PreferencePackManager.cpp
+@@ -224,7 +224,11 @@ void Gui::PreferencePackManager::importConfig(const std::string& packName,
+ auto savedPreferencePacksDirectory =
+ fs::path(App::Application::getUserAppDataDir()) / "SavedPreferencePacks";
+ auto cfgFilename = savedPreferencePacksDirectory / packName / (packName + ".cfg");
++#if BOOST_VERSION >= 107400
+ fs::copy_file(path, cfgFilename, fs::copy_options::overwrite_existing);
++#else
++ fs::copy_file(path, cfgFilename, fs::copy_option::overwrite_if_exists);
++#endif
+ rescan();
+ }
+
diff --git a/media-gfx/freecad/freecad-0.21.2-r2.ebuild b/media-gfx/freecad/freecad-0.21.2-r2.ebuild
index b0f1d3fac470..b65ac07c0858 100644
--- a/media-gfx/freecad/freecad-0.21.2-r2.ebuild
+++ b/media-gfx/freecad/freecad-0.21.2-r2.ebuild
@@ -165,6 +165,9 @@ PATCHES=(
"${FILESDIR}"/${PN}-0.21.0-0001-Gentoo-specific-disable-ccache-usage.patch
"${FILESDIR}"/${PN}-0.21.1-Gentoo-specific-don-t-check-vcs.patch
"${FILESDIR}"/${PN}-0.21.2-vtk9.3-fix.patch
+ "${FILESDIR}"/${PN}-0.21.2-boost-175-1.patch
+ "${FILESDIR}"/${PN}-0.21.2-boost-175-2.patch
+ "${FILESDIR}"/${PN}-0.21.2-boost-175-3.patch
)
DOCS=( CODE_OF_CONDUCT.md README.md )
@@ -336,7 +339,7 @@ src_install() {
# https://github.com/coin3d/coin/issues/451
: \${QT_QPA_PLATFORM:=xcb}
export QT_QPA_PLATFORM
- exec /usr/$(get_libdir)/${PN}/bin/FreeCAD
+ exec /usr/$(get_libdir)/${PN}/bin/FreeCAD \${@}
_EOF_
mv "${ED}"/usr/$(get_libdir)/${PN}/share/* "${ED}"/usr/share || die "failed to move shared resources"
fi
diff --git a/media-gfx/freecad/freecad-9999.ebuild b/media-gfx/freecad/freecad-9999.ebuild
index ad9a9580164b..f5778af821ff 100644
--- a/media-gfx/freecad/freecad-9999.ebuild
+++ b/media-gfx/freecad/freecad-9999.ebuild
@@ -333,7 +333,7 @@ src_install() {
# https://github.com/coin3d/coin/issues/451
: \${QT_QPA_PLATFORM:=xcb}
export QT_QPA_PLATFORM
- exec /usr/$(get_libdir)/${PN}/bin/FreeCAD
+ exec /usr/$(get_libdir)/${PN}/bin/FreeCAD \${@}
_EOF_
mv "${ED}"/usr/$(get_libdir)/${PN}/share/* "${ED}"/usr/share || die "failed to move shared resources"
fi