mirror of
https://github.com/void-linux/void-packages.git
synced 2025-09-04 19:12:57 +02:00
inkscape: build with std::filesystem
This commit is contained in:
parent
8d7c2ad59b
commit
df86503455
2 changed files with 90 additions and 1 deletions
85
srcpkgs/inkscape/patches/std-filesystem.patch
Normal file
85
srcpkgs/inkscape/patches/std-filesystem.patch
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
--- a/CMakeScripts/DefineDependsandFlags.cmake
|
||||||
|
+++ b/CMakeScripts/DefineDependsandFlags.cmake
|
||||||
|
@@ -308,7 +308,6 @@ elseif(APPLE)
|
||||||
|
find_package(Boost 1.19.0 REQUIRED COMPONENTS filesystem stacktrace_basic)
|
||||||
|
list(APPEND INKSCAPE_CXX_FLAGS "-D_GNU_SOURCE")
|
||||||
|
else()
|
||||||
|
- find_package(Boost 1.19.0 REQUIRED COMPONENTS filesystem)
|
||||||
|
# The package stacktrace_backtrace may not be available on all distros.
|
||||||
|
find_package(Boost 1.19.0 COMPONENTS stacktrace_backtrace)
|
||||||
|
if (BOOST_FOUND)
|
||||||
|
--- a/src/CMakeLists.txt
|
||||||
|
+++ b/src/CMakeLists.txt
|
||||||
|
@@ -417,8 +417,6 @@ else()
|
||||||
|
set_target_properties(inkscape_base PROPERTIES INSTALL_RPATH "@loader_path/..")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-target_link_libraries(inkscape_base PUBLIC Boost::filesystem)
|
||||||
|
-
|
||||||
|
# Link the inkscape_base library against all external dependencies
|
||||||
|
target_link_libraries(inkscape_base
|
||||||
|
PRIVATE
|
||||||
|
--- a/src/io/file-export-cmd.cpp
|
||||||
|
+++ b/src/io/file-export-cmd.cpp
|
||||||
|
@@ -51,13 +51,8 @@
|
||||||
|
// Temporary dependency : once all compilers we want to support have support for
|
||||||
|
// C++17 std::filesystem (with #include <filesystem> ) then we drop this dep
|
||||||
|
// (Dev meeting, 2020-09-25)
|
||||||
|
-#ifdef G_OS_WIN32
|
||||||
|
#include <filesystem>
|
||||||
|
namespace filesystem = std::filesystem;
|
||||||
|
-#else
|
||||||
|
-#include <boost/filesystem.hpp>
|
||||||
|
-namespace filesystem = boost::filesystem;
|
||||||
|
-#endif
|
||||||
|
|
||||||
|
InkFileExportCmd::InkFileExportCmd()
|
||||||
|
: export_overwrite(false)
|
||||||
|
--- a/src/ui/dialog/dialog-manager.cpp
|
||||||
|
+++ b/src/ui/dialog/dialog-manager.cpp
|
||||||
|
@@ -10,14 +10,8 @@
|
||||||
|
#include <gdkmm/monitor.h>
|
||||||
|
#include <gtkmm/window.h>
|
||||||
|
|
||||||
|
-#ifdef G_OS_WIN32
|
||||||
|
#include <filesystem>
|
||||||
|
namespace filesystem = std::filesystem;
|
||||||
|
-#else
|
||||||
|
-// Waiting for compiler on MacOS to catch up to C++x17
|
||||||
|
-#include <boost/filesystem.hpp>
|
||||||
|
-namespace filesystem = boost::filesystem;
|
||||||
|
-#endif // G_OS_WIN32
|
||||||
|
|
||||||
|
#include "io/resource.h"
|
||||||
|
#include "inkscape-application.h"
|
||||||
|
--- a/src/ui/widget/canvas/framecheck.cpp
|
||||||
|
+++ b/src/ui/widget/canvas/framecheck.cpp
|
||||||
|
@@ -2,9 +2,9 @@
|
||||||
|
#include <fstream>
|
||||||
|
#include <iostream>
|
||||||
|
#include <mutex>
|
||||||
|
-#include <boost/filesystem.hpp> // Using boost::filesystem instead of std::filesystem due to broken C++17 on MacOS.
|
||||||
|
#include "framecheck.h"
|
||||||
|
-namespace fs = boost::filesystem;
|
||||||
|
+#include <filesystem>
|
||||||
|
+namespace fs = std::filesystem;
|
||||||
|
|
||||||
|
namespace Inkscape::FrameCheck {
|
||||||
|
|
||||||
|
--- a/src/util/font-discovery.cpp
|
||||||
|
+++ b/src/util/font-discovery.cpp
|
||||||
|
@@ -23,14 +23,8 @@
|
||||||
|
#include <unordered_map>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
-#ifdef G_OS_WIN32
|
||||||
|
#include <filesystem>
|
||||||
|
namespace filesystem = std::filesystem;
|
||||||
|
-#else
|
||||||
|
-// Waiting for compiler on MacOS to catch up to C++x17
|
||||||
|
-#include <boost/filesystem.hpp>
|
||||||
|
-namespace filesystem = boost::filesystem;
|
||||||
|
-#endif // G_OS_WIN32
|
||||||
|
|
||||||
|
namespace Inkscape {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'inkscape'
|
# Template file for 'inkscape'
|
||||||
pkgname=inkscape
|
pkgname=inkscape
|
||||||
version=1.4.2
|
version=1.4.2
|
||||||
revision=1
|
revision=2
|
||||||
build_style=cmake
|
build_style=cmake
|
||||||
make_check_target="check"
|
make_check_target="check"
|
||||||
hostmakedepends="automake gettext glib-devel intltool libgraphicsmagick-devel
|
hostmakedepends="automake gettext glib-devel intltool libgraphicsmagick-devel
|
||||||
|
@ -32,6 +32,10 @@ else
|
||||||
configure_args+=" -DBUILD_TESTING=OFF"
|
configure_args+=" -DBUILD_TESTING=OFF"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$XBPS_TARGET_LIBC" != musl ]; then
|
||||||
|
makedepends+=" libbacktrace"
|
||||||
|
fi
|
||||||
|
|
||||||
post_patch() {
|
post_patch() {
|
||||||
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
if [ "$XBPS_TARGET_LIBC" = musl ]; then
|
||||||
# disable errors for missing sentinels in glib variadic functions,
|
# disable errors for missing sentinels in glib variadic functions,
|
||||||
|
|
Loading…
Add table
Reference in a new issue