Skip to content

Commit

Permalink
extra/supercollider to 3.13.0-7
Browse files Browse the repository at this point in the history
  • Loading branch information
kmihelich authored and arenekosreal committed Sep 3, 2024
1 parent 05bca9d commit 2e6f9b3
Show file tree
Hide file tree
Showing 4 changed files with 1,468 additions and 4 deletions.
8 changes: 7 additions & 1 deletion extra/supercollider/.SRCINFO
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pkgbase = supercollider
pkgdesc = Platform for audio synthesis and algorithmic composition
pkgver = 3.13.0
pkgrel = 6
pkgrel = 7
url = https://supercollider.github.io
install = supercollider.install
arch = x86_64
Expand Down Expand Up @@ -37,11 +37,17 @@ pkgbase = supercollider
provides = scsynth=3.13.0
source = https://github.com/supercollider/supercollider/releases/download/Version-3.13.0/SuperCollider-3.13.0-Source.tar.bz2
source = https://github.com/supercollider/supercollider/releases/download/Version-3.13.0/SuperCollider-3.13.0-Source.tar.bz2.asc
source = boost-1.84.patch
source = boost-1.85.patch
validpgpkeys = 2E1C4FC2F6BB58FA157B21B8064B501EB7405F04
sha512sums = a60a128f7646f077f91adae666fa4014529aa9df78cf0dfe5d68c9bd6447f008af7da2970b8736f3f29d0adbaf67bce680a8201fcbe7e1aba29c3499a57f89cd
sha512sums = SKIP
sha512sums = 1b530d60570729a0b4dd13fbb9059b45288d4ff71391db6290b5e686985ad749267252c15eb63c81bf7bc01ca1141c163e3c7e30e6de1fc43c7b26ed66ab20cf
sha512sums = aabf9c44d5953adff7ee3f38d8d41b3b7dc2bdd4a498fb55df0aef66786f820ce5436accff44c7498743fe3ebbcc75549ec00769fe8269ea1f556419a93c16d9
b2sums = a5e57a17f93e40848b2044ee0791179f857d144eabb7f4d74580b2eebd49a31d6ec671a0526236c5b906aadeb455e5a7ad18cacb79ed214076d6bceca39ea2ae
b2sums = SKIP
b2sums = 3c333d4b0b63d2c67167be6abe954a843cdd4c73b3cc28a9d7e011162dbb3ddf475ad75f03a780abb7cbf8a54ee0b308e02a7a752532f5f1c110a1e3d8152753
b2sums = 42b76de099a42643e107f8152fd6ba050771d938d89885c5e46d4e07d3e94d03c57cb4eefa0cd38c52f7cbfbf96fefa0101532cd64cd1efce8e2e76604ab99f0

pkgname = supercollider
depends = gcc-libs
Expand Down
18 changes: 15 additions & 3 deletions extra/supercollider/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
_name=SuperCollider
pkgname=supercollider
pkgver=3.13.0
pkgrel=6
pkgrel=7
pkgdesc="Platform for audio synthesis and algorithmic composition"
arch=(x86_64)
url="https://supercollider.github.io"
Expand Down Expand Up @@ -51,14 +51,26 @@ optdepends=(
provides=(libscsynth.so "sclang=$pkgver" "scsynth=$pkgver")
source=(
https://github.com/$pkgname/$pkgname/releases/download/Version-$pkgver/$_name-$pkgver-Source.tar.bz2{,.asc}
boost-1.84.patch
boost-1.85.patch
)
install=$pkgname.install
sha512sums=('a60a128f7646f077f91adae666fa4014529aa9df78cf0dfe5d68c9bd6447f008af7da2970b8736f3f29d0adbaf67bce680a8201fcbe7e1aba29c3499a57f89cd'
'SKIP')
'SKIP'
'1b530d60570729a0b4dd13fbb9059b45288d4ff71391db6290b5e686985ad749267252c15eb63c81bf7bc01ca1141c163e3c7e30e6de1fc43c7b26ed66ab20cf'
'aabf9c44d5953adff7ee3f38d8d41b3b7dc2bdd4a498fb55df0aef66786f820ce5436accff44c7498743fe3ebbcc75549ec00769fe8269ea1f556419a93c16d9')
b2sums=('a5e57a17f93e40848b2044ee0791179f857d144eabb7f4d74580b2eebd49a31d6ec671a0526236c5b906aadeb455e5a7ad18cacb79ed214076d6bceca39ea2ae'
'SKIP')
'SKIP'
'3c333d4b0b63d2c67167be6abe954a843cdd4c73b3cc28a9d7e011162dbb3ddf475ad75f03a780abb7cbf8a54ee0b308e02a7a752532f5f1c110a1e3d8152753'
'42b76de099a42643e107f8152fd6ba050771d938d89885c5e46d4e07d3e94d03c57cb4eefa0cd38c52f7cbfbf96fefa0101532cd64cd1efce8e2e76604ab99f0')
validpgpkeys=('2E1C4FC2F6BB58FA157B21B8064B501EB7405F04') # Marcin Pączkowski (dyfer)

prepare() {
cd $_name-$pkgver-Source
# Patches from Gentoo
patch -p1 -i ../boost-1.84.patch
patch -p1 -i ../boost-1.85.patch
}

build() {
local cmake_options=(
Expand Down
110 changes: 110 additions & 0 deletions extra/supercollider/boost-1.84.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
From 6e4e12826fd144c874c93c2efb669fbb119b831a Mon Sep 17 00:00:00 2001
From: Andreas Sturmlechner <[email protected]>
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 <[email protected]>
---
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

Loading

0 comments on commit 2e6f9b3

Please sign in to comment.