summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2024-01-31 00:02:39 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2024-01-31 12:15:24 +0100
commit274c82d3e1d6c131a2b50b20472eb5c1d32064a2 (patch)
treea367d0d13b1b1cfb5df58129dc82f98cea00b0a3 /media-sound/supercollider
parentnet-misc/curl: sync live (diff)
downloadgentoo-274c82d3e1d6c131a2b50b20472eb5c1d32064a2.tar.gz
gentoo-274c82d3e1d6c131a2b50b20472eb5c1d32064a2.tar.bz2
gentoo-274c82d3e1d6c131a2b50b20472eb5c1d32064a2.zip
media-sound/supercollider: Fix build with >=dev-libs/boost-1.84
Closes: https://bugs.gentoo.org/921595 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
Diffstat (limited to 'media-sound/supercollider')
-rw-r--r--media-sound/supercollider/files/supercollider-3.13.0-boost-1.84.patch110
-rw-r--r--media-sound/supercollider/supercollider-3.13.0.ebuild5
2 files changed, 113 insertions, 2 deletions
diff --git a/media-sound/supercollider/files/supercollider-3.13.0-boost-1.84.patch b/media-sound/supercollider/files/supercollider-3.13.0-boost-1.84.patch
new file mode 100644
index 000000000000..d3b2340a3d61
--- /dev/null
+++ b/media-sound/supercollider/files/supercollider-3.13.0-boost-1.84.patch
@@ -0,0 +1,110 @@
+From 6e4e12826fd144c874c93c2efb669fbb119b831a Mon Sep 17 00:00:00 2001
+From: Andreas Sturmlechner <asturm@gentoo.org>
+Date: Tue, 30 Jan 2024 23:56:14 +0100
+Subject: [PATCH] Import boost_string_file.hpp from boost-1.83 and put it to
+ use immediately
+
+string_file.hpp was deprecated in boost-1.79.0 and removed in 1.84.0
+
+Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
+---
+ common/boost_string_file.hpp | 59 ++++++++++++++++++++++++++++++++++
+ lang/LangSource/PyrLexer.cpp | 2 +-
+ server/scsynth/SC_GraphDef.cpp | 2 +-
+ 3 files changed, 61 insertions(+), 2 deletions(-)
+ create mode 100644 common/boost_string_file.hpp
+
+diff --git a/common/boost_string_file.hpp b/common/boost_string_file.hpp
+new file mode 100644
+index 000000000..1ccb63de6
+--- /dev/null
++++ b/common/boost_string_file.hpp
+@@ -0,0 +1,59 @@
++// filesystem/string_file.hpp --------------------------------------------------------//
++
++// Copyright Beman Dawes 2015
++
++// Distributed under the Boost Software License, Version 1.0.
++// See http://www.boost.org/LICENSE_1_0.txt
++
++// Library home page: http://www.boost.org/libs/filesystem
++
++#ifndef BOOST_FILESYSTEM_STRING_FILE_HPP
++#define BOOST_FILESYSTEM_STRING_FILE_HPP
++
++#include <boost/filesystem/config.hpp>
++
++#include <cstddef>
++#include <limits>
++#include <string>
++#include <ios>
++#include <stdexcept>
++#include <boost/cstdint.hpp>
++#include <boost/filesystem/path.hpp>
++#include <boost/filesystem/fstream.hpp>
++#include <boost/filesystem/operations.hpp>
++
++#include <boost/filesystem/detail/header.hpp> // must be the last #include
++
++namespace boost {
++namespace filesystem {
++
++inline void save_string_file(path const& p, std::string const& str)
++{
++ filesystem::ofstream file;
++ file.exceptions(std::ios_base::failbit | std::ios_base::badbit);
++ file.open(p, std::ios_base::binary);
++ const std::size_t sz = str.size();
++ if (BOOST_UNLIKELY(sz > static_cast< boost::uintmax_t >((std::numeric_limits< std::streamsize >::max)())))
++ BOOST_FILESYSTEM_THROW(std::length_error("String size exceeds max write size"));
++ file.write(str.c_str(), static_cast< std::streamsize >(sz));
++}
++
++inline void load_string_file(path const& p, std::string& str)
++{
++ filesystem::ifstream file;
++ file.exceptions(std::ios_base::failbit | std::ios_base::badbit);
++ file.open(p, std::ios_base::binary);
++ const boost::uintmax_t sz = filesystem::file_size(p);
++ if (BOOST_UNLIKELY(sz > static_cast< boost::uintmax_t >((std::numeric_limits< std::streamsize >::max)())))
++ BOOST_FILESYSTEM_THROW(std::length_error("File size exceeds max read size"));
++ str.resize(static_cast< std::size_t >(sz), '\0');
++ if (sz > 0u)
++ file.read(&str[0], static_cast< std::streamsize >(sz));
++}
++
++} // namespace filesystem
++} // namespace boost
++
++#include <boost/filesystem/detail/footer.hpp>
++
++#endif // BOOST_FILESYSTEM_STRING_FILE_HPP
+diff --git a/lang/LangSource/PyrLexer.cpp b/lang/LangSource/PyrLexer.cpp
+index 7ebe3d726..06c1454ca 100644
+--- a/lang/LangSource/PyrLexer.cpp
++++ b/lang/LangSource/PyrLexer.cpp
+@@ -38,7 +38,7 @@
+
+ #include <boost/filesystem/path.hpp>
+ #include <boost/filesystem/operations.hpp>
+-#include <boost/filesystem/string_file.hpp>
++#include "boost_string_file.hpp"
+
+ #include "PyrParseNode.h"
+ #include "Bison/lang11d_tab.h"
+diff --git a/server/scsynth/SC_GraphDef.cpp b/server/scsynth/SC_GraphDef.cpp
+index 957aca193..5f8f15741 100644
+--- a/server/scsynth/SC_GraphDef.cpp
++++ b/server/scsynth/SC_GraphDef.cpp
+@@ -46,7 +46,7 @@
+ #include <string>
+
+ #include <boost/filesystem/operations.hpp> // recursive_directory_iterator
+-#include <boost/filesystem/string_file.hpp> // load_string_file
++#include "boost_string_file.hpp" // load_string_file
+
+ namespace bfs = boost::filesystem;
+
+--
+2.43.0
+
diff --git a/media-sound/supercollider/supercollider-3.13.0.ebuild b/media-sound/supercollider/supercollider-3.13.0.ebuild
index 3bba39d52c6d..3db84144c434 100644
--- a/media-sound/supercollider/supercollider-3.13.0.ebuild
+++ b/media-sound/supercollider/supercollider-3.13.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2023 Gentoo Authors
+# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
@@ -8,6 +8,7 @@ inherit cmake flag-o-matic xdg
DESCRIPTION="Environment and programming language for real time audio synthesis"
HOMEPAGE="https://supercollider.github.io/"
SRC_URI="https://github.com/supercollider/supercollider/releases/download/Version-${PV}/SuperCollider-${PV}-Source.tar.bz2"
+S="${WORKDIR}/SuperCollider-${PV}-Source"
LICENSE="GPL-2 gpl3? ( GPL-3 )"
SLOT="0"
@@ -60,7 +61,7 @@ DEPEND="${RDEPEND}
vim? ( app-editors/vim )
"
-S="${WORKDIR}/SuperCollider-${PV}-Source"
+PATCHES=( "${FILESDIR}/${P}-boost-1.84.patch" ) # bug 921595
src_configure() {
local mycmakeargs=(