From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 64A72158042 for ; Mon, 4 Nov 2024 19:28:16 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9E8AFE0769; Mon, 4 Nov 2024 19:28:15 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 80EEBE0769 for ; Mon, 4 Nov 2024 19:28:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C297C342FB6 for ; Mon, 4 Nov 2024 19:28:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3E2E4159D for ; Mon, 4 Nov 2024 19:28:13 +0000 (UTC) From: "Miroslav Šulc" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Miroslav Šulc" Message-ID: <1730748490.76367ed3e2d0c4915db59bfa604f67c60d740001.fordfrog@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: media-sound/ardour/files/, media-sound/ardour/ X-VCS-Repository: repo/gentoo X-VCS-Files: media-sound/ardour/ardour-8.10-r1.ebuild media-sound/ardour/ardour-8.10-r2.ebuild media-sound/ardour/files/ardour-9.0.0-fix-clang-crash.patch X-VCS-Directories: media-sound/ardour/ media-sound/ardour/files/ X-VCS-Committer: fordfrog X-VCS-Committer-Name: Miroslav Šulc X-VCS-Revision: 76367ed3e2d0c4915db59bfa604f67c60d740001 X-VCS-Branch: master Date: Mon, 4 Nov 2024 19:28:13 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: aeeac5f2-9e04-4a0f-8858-471affa811ae X-Archives-Hash: f74776211fe34ce2141eaec52e0d2584 commit: 76367ed3e2d0c4915db59bfa604f67c60d740001 Author: Miroslav Šulc gentoo org> AuthorDate: Mon Nov 4 19:27:59 2024 +0000 Commit: Miroslav Šulc gentoo org> CommitDate: Mon Nov 4 19:28:10 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=76367ed3 media-sound/ardour: applied patch to 8.10-r2 to prevent crash on startup when compiled with clang + dropped old c++11 flag Signed-off-by: Miroslav Šulc gentoo.org> ...ardour-8.10-r1.ebuild => ardour-8.10-r2.ebuild} | 8 +- .../files/ardour-9.0.0-fix-clang-crash.patch | 123 +++++++++++++++++++++ 2 files changed, 124 insertions(+), 7 deletions(-) diff --git a/media-sound/ardour/ardour-8.10-r1.ebuild b/media-sound/ardour/ardour-8.10-r2.ebuild similarity index 97% rename from media-sound/ardour/ardour-8.10-r1.ebuild rename to media-sound/ardour/ardour-8.10-r2.ebuild index 0f3b1f15c091..bb6ece851b94 100644 --- a/media-sound/ardour/ardour-8.10-r1.ebuild +++ b/media-sound/ardour/ardour-8.10-r2.ebuild @@ -71,6 +71,7 @@ DEPEND="${RDEPEND} PATCHES=( "${FILESDIR}/${PN}-6.8-metadata.patch" + "${FILESDIR}/${PN}-9.0.0-fix-clang-crash.patch" ) pkg_pretend() { @@ -78,13 +79,6 @@ pkg_pretend() { ewarn "Linking with gold linker might produce broken executable, see bug #733972" } -pkg_setup() { - if has_version \>=dev-libs/libsigc++-2.6 ; then - append-cxxflags -std=c++11 - fi - python-any-r1_pkg_setup -} - src_prepare() { default diff --git a/media-sound/ardour/files/ardour-9.0.0-fix-clang-crash.patch b/media-sound/ardour/files/ardour-9.0.0-fix-clang-crash.patch new file mode 100644 index 000000000000..6162782d91f5 --- /dev/null +++ b/media-sound/ardour/files/ardour-9.0.0-fix-clang-crash.patch @@ -0,0 +1,123 @@ +From f17a6562174ccf658eb35ba7a425d3ac340c1607 Mon Sep 17 00:00:00 2001 +From: Robin Gareus +Date: Mon, 4 Nov 2024 18:46:21 +0100 +Subject: [PATCH] use modern C++ for snprintf (#9841) + +This replaces vector::operator[] (which now +a constexpr since C++20). We could use &vector::data(), +but a unique_ptr seems more appropriate for the case at hand. +--- a/libs/ardour/broadcast_info.cc ++++ b/libs/ardour/broadcast_info.cc +@@ -39,15 +39,15 @@ namespace ARDOUR + static void + snprintf_bounded_null_filled (char* target, size_t target_size, char const * fmt, ...) + { +- std::vector buf(target_size+1); ++ std::unique_ptr buf (new char [target_size + 1]); + va_list ap; + + va_start (ap, fmt); +- vsnprintf (&buf[0], target_size+1, fmt, ap); ++ vsnprintf (buf.get (), target_size+1, fmt, ap); + va_end (ap); + + memset (target, 0, target_size); +- memcpy (target, &buf[0], target_size); ++ memcpy (target, buf.get (), target_size); + + } + +--- a/libs/ardour/export_graph_builder.cc ++++ b/libs/ardour/export_graph_builder.cc +@@ -796,9 +796,9 @@ ExportGraphBuilder::Intermediate::Intermediate (ExportGraphBuilder & parent, Fil + int format = ExportFormatBase::F_RAW | ExportFormatBase::SF_Float; + + if (parent._realtime) { +- tmp_file.reset (new TmpFileRt (&tmpfile_path_buf[0], format, channels, config.format->sample_rate())); ++ tmp_file.reset (new TmpFileRt (tmpfile_path_buf.data (), format, channels, config.format->sample_rate())); + } else { +- tmp_file.reset (new TmpFileSync (&tmpfile_path_buf[0], format, channels, config.format->sample_rate())); ++ tmp_file.reset (new TmpFileSync (tmpfile_path_buf.data (), format, channels, config.format->sample_rate())); + } + + tmp_file->FileWritten.connect_same_thread (post_processing_connection, +--- a/libs/ardour/io.cc ++++ b/libs/ardour/io.cc +@@ -1338,7 +1338,6 @@ IO::bundle_changed (Bundle::Change /*c*/) + string + IO::build_legal_port_name (std::shared_ptr ports, DataType type) + { +- const int name_size = AudioEngine::instance()->port_name_size(); + int limit; + string suffix; + +@@ -1372,21 +1371,24 @@ IO::build_legal_port_name (std::shared_ptr ports, DataType type) + + // allow up to 4 digits for the output port number, plus the slash, suffix and extra space + ++ uint32_t name_size = AudioEngine::instance()->port_name_size(); + limit = name_size - AudioEngine::instance()->my_name().length() - (suffix.length() + 5); + +- std::vector buf1(name_size+1); +- std::vector buf2(name_size+1); ++ ++name_size; // allow for \0 ++ ++ std::unique_ptr buf1 (new char[name_size]); ++ std::unique_ptr buf2 (new char[name_size]); + + /* colons are illegal in port names, so fix that */ + + string nom = legalize_io_name (_name.val()); + +- snprintf (&buf1[0], name_size+1, ("%.*s/%s"), limit, nom.c_str(), suffix.c_str()); ++ std::snprintf (buf1.get(), name_size, ("%.*s/%s"), limit, nom.c_str(), suffix.c_str()); + +- int port_number = find_port_hole (ports, &buf1[0]); +- snprintf (&buf2[0], name_size+1, "%s %d", &buf1[0], port_number); ++ int port_number = find_port_hole (ports, buf1.get ()); ++ std::snprintf (buf2.get(), name_size, "%s %d", buf1.get (), port_number); + +- return string (&buf2[0]); ++ return string (buf2.get ()); + } + + int32_t +@@ -1400,17 +1402,17 @@ IO::find_port_hole (std::shared_ptr ports, const char* base) + return 1; + } + +- /* we only allow up to 4 characters for the port number +- */ ++ uint32_t const name_size = AudioEngine::instance()->port_name_size() + 1; + ++ /* we only allow up to 4 characters for the port number */ + for (n = 1; n < 9999; ++n) { +- std::vector buf (AudioEngine::instance()->port_name_size()); + PortSet::const_iterator i = ports->begin (); + +- snprintf (&buf[0], buf.size()+1, _("%s %u"), base, n); ++ std::unique_ptr buf (new char[name_size]); ++ std::snprintf (buf.get (), name_size, "%s %u", base, n); + + for ( ; i != ports->end (); ++i) { +- if (string (i->name()) == string (&buf[0])) { ++ if (string (i->name()) == string (buf.get ())) { + break; + } + } +@@ -1526,13 +1528,13 @@ IO::bundle_channel_name (uint32_t c, uint32_t n, DataType t) const + case 2: + return c == 0 ? _("L") : _("R"); + default: +- snprintf (buf, sizeof(buf), "%d", (c + 1)); ++ std::snprintf (buf, sizeof(buf), "%d", (c + 1)); + return buf; + } + + } else { + +- snprintf (buf, sizeof(buf), "%d", (c + 1)); ++ std::snprintf (buf, sizeof(buf), "%d", (c + 1)); + return buf; + + }