summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorViolet Purcell <vimproved@inventati.org>2023-09-21 20:24:12 -0400
committerSam James <sam@gentoo.org>2023-09-22 16:42:47 +0100
commit8fc4a928bfd3c81a153c7094a52a5180d76521de (patch)
tree4ba4ded43ffd83b763a66d4cb09dd652590e695d /media-plugins
parentmedia-plugins/calf: Fix build with LLD (diff)
downloadgentoo-8fc4a928bfd3c81a153c7094a52a5180d76521de.tar.gz
gentoo-8fc4a928bfd3c81a153c7094a52a5180d76521de.tar.bz2
gentoo-8fc4a928bfd3c81a153c7094a52a5180d76521de.zip
media-plugins/calf: Remove usage of std::bind2nd
Fixes build with C++17+. Upstream-PR: https://github.com/calf-studio-gear/calf/pull/331 Closes: https://bugs.gentoo.org/914506 Signed-off-by: Violet Purcell <vimproved@inventati.org> Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'media-plugins')
-rw-r--r--media-plugins/calf/calf-0.90.3-r2.ebuild1
-rw-r--r--media-plugins/calf/calf-9999.ebuild1
-rw-r--r--media-plugins/calf/files/calf-0.90.3-replace-std-bind2nd.patch32
3 files changed, 34 insertions, 0 deletions
diff --git a/media-plugins/calf/calf-0.90.3-r2.ebuild b/media-plugins/calf/calf-0.90.3-r2.ebuild
index 0d4c5797eb81..45506cd79a76 100644
--- a/media-plugins/calf/calf-0.90.3-r2.ebuild
+++ b/media-plugins/calf/calf-0.90.3-r2.ebuild
@@ -47,6 +47,7 @@ PATCHES=(
"${FILESDIR}/${PN}-0.90.1-htmldir.patch"
"${FILESDIR}/${PN}-0.90.1-desktop.patch"
"${FILESDIR}/${PN}-0.90.3-fix-build-with-lld.patch"
+ "${FILESDIR}/${PN}-0.90.3-replace-std-bind2nd.patch"
)
src_prepare() {
diff --git a/media-plugins/calf/calf-9999.ebuild b/media-plugins/calf/calf-9999.ebuild
index 26b234a8a03a..f232db75e494 100644
--- a/media-plugins/calf/calf-9999.ebuild
+++ b/media-plugins/calf/calf-9999.ebuild
@@ -47,6 +47,7 @@ PATCHES=(
"${FILESDIR}/${PN}-0.90.1-htmldir.patch"
"${FILESDIR}/${PN}-0.90.1-desktop.patch"
"${FILESDIR}/${PN}-9999-fix-build-with-lld.patch"
+ "${FILESDIR}/${PN}-0.90.3-replace-std-bind2nd.patch"
)
src_prepare() {
diff --git a/media-plugins/calf/files/calf-0.90.3-replace-std-bind2nd.patch b/media-plugins/calf/files/calf-0.90.3-replace-std-bind2nd.patch
new file mode 100644
index 000000000000..5ba16efcfb1b
--- /dev/null
+++ b/media-plugins/calf/files/calf-0.90.3-replace-std-bind2nd.patch
@@ -0,0 +1,32 @@
+From https://github.com/calf-studio-gear/calf/pull/331/commits/849a0b589fb86cb4b9869738b270fd24859bd23b Mon Sep 17 00:00:00 2001
+From: Violet Purcell <vimproved@inventati.org>
+Date: Thu, 21 Sep 2023 18:16:35 -0400
+Subject: [PATCH] Replace use of std::bind2nd with std::bind
+
+std::bind2nd was deprecated in C++11 and removed in C++17. Remove usage
+of it and replace with std::bind.
+
+Signed-off-by: Violet Purcell <vimproved@inventati.org>
+--- a/src/calf/orfanidis_eq.h
++++ b/src/calf/orfanidis_eq.h
+@@ -748,7 +748,7 @@ private:
+ std::vector<eq_double_t> v = landen(k, tol);
+
+ std::transform(v.begin(), v.end(), v.begin(),
+- bind2nd(std::plus<eq_double_t>(), 1.0));
++ bind(std::plus<eq_double_t>(), 1.0, std::placeholders::_1));
+
+ K = std::accumulate(v.begin(), v.end(),
+ 1, std::multiplies<eq_double_t>()) * M_PI/2.0;
+@@ -764,7 +764,7 @@ private:
+ std::vector<eq_double_t> vp = landen(kp, tol);
+
+ std::transform(vp.begin(), vp.end(), vp.begin(),
+- bind2nd(std::plus<eq_double_t>(), 1.0));
++ bind(std::plus<eq_double_t>(), 1.0, std::placeholders::_1));
+
+ Kprime = std::accumulate(vp.begin(), vp.end(),
+ 1.0, std::multiplies<eq_double_t>()) * M_PI/2.0;
+--
+2.42.0
+