From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/supercollider/files/, media-sound/supercollider/
Date: Wed, 31 Jan 2024 11:16:32 +0000 (UTC) [thread overview]
Message-ID: <1706699724.274c82d3e1d6c131a2b50b20472eb5c1d32064a2.asturm@gentoo> (raw)
commit: 274c82d3e1d6c131a2b50b20472eb5c1d32064a2
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 30 23:02:39 2024 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Wed Jan 31 11:15:24 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=274c82d3
media-sound/supercollider: Fix build with >=dev-libs/boost-1.84
Closes: https://bugs.gentoo.org/921595
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../files/supercollider-3.13.0-boost-1.84.patch | 110 +++++++++++++++++++++
.../supercollider/supercollider-3.13.0.ebuild | 5 +-
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=(
next reply other threads:[~2024-01-31 11:16 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 11:16 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-01-22 23:16 [gentoo-commits] repo/gentoo:master commit in: media-sound/supercollider/files/, media-sound/supercollider/ Andreas Sturmlechner
2024-01-31 11:16 Andreas Sturmlechner
2024-01-31 11:16 Andreas Sturmlechner
2021-01-23 17:55 Andreas Sturmlechner
2021-01-23 17:55 Andreas Sturmlechner
2019-07-16 15:57 Andreas Sturmlechner
2019-06-28 1:17 Andreas Sturmlechner
2018-01-06 2:14 Andreas Sturmlechner
2018-01-06 2:14 Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1706699724.274c82d3e1d6c131a2b50b20472eb5c1d32064a2.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox