diff options
author | Alexander Puck Neuwirth <alexander@neuwirth-informatik.de> | 2024-04-12 15:34:09 +0200 |
---|---|---|
committer | Andrew Ammerlaan <andrewammerlaan@gentoo.org> | 2024-04-12 19:00:11 +0200 |
commit | c54a4d7bcec32240a5b3b6724a839ed89c7b8758 (patch) | |
tree | 3ee49bc68b8c4f06594871615f2661e26db228d3 /sci-physics | |
parent | sci-physics/hepmc: drop 3.2.5 (diff) | |
download | gentoo-c54a4d7bcec32240a5b3b6724a839ed89c7b8758.tar.gz gentoo-c54a4d7bcec32240a5b3b6724a839ed89c7b8758.tar.bz2 gentoo-c54a4d7bcec32240a5b3b6724a839ed89c7b8758.zip |
sci-physics/rivet: Add ref cin patch
Closes: https://bugs.gentoo.org/927450
Signed-off-by: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'sci-physics')
-rw-r--r-- | sci-physics/rivet/files/rivet-3.1.10-ref_cin.patch | 28 | ||||
-rw-r--r-- | sci-physics/rivet/rivet-3.1.10.ebuild | 1 | ||||
-rw-r--r-- | sci-physics/rivet/rivet-3.1.9.ebuild | 1 |
3 files changed, 30 insertions, 0 deletions
diff --git a/sci-physics/rivet/files/rivet-3.1.10-ref_cin.patch b/sci-physics/rivet/files/rivet-3.1.10-ref_cin.patch new file mode 100644 index 000000000000..1c93e92d48b4 --- /dev/null +++ b/sci-physics/rivet/files/rivet-3.1.10-ref_cin.patch @@ -0,0 +1,28 @@ +From 668d391c6b26da4684534bafe1fec3bff29a58ff Mon Sep 17 00:00:00 2001 +From: Alexander Puck Neuwirth <alexander@neuwirth-informatik.de> +Date: Fri, 12 Apr 2024 14:25:06 +0200 +Subject: [PATCH] Wrap std::cin in std::ref + +--- + src/Core/Run.cc | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/Core/Run.cc b/src/Core/Run.cc +index 83c5d719b6..4d643fac92 100644 +--- a/src/Core/Run.cc ++++ b/src/Core/Run.cc +@@ -82,9 +82,9 @@ namespace Rivet { + // Turn off the buffering to make IO faster and make ungetc work on cin + std::basic_ios<char>::sync_with_stdio(false); + #ifdef HAVE_LIBZ +- _istr = make_shared<zstr::istream>(std::cin); ++ _istr = make_shared<zstr::istream>(std::ref(std::cin)); + #else +- _istr = make_shared<std::istream>(std::cin); ++ _istr = make_shared<std::istream>(std::ref(std::cin)); + #endif + // Use standard HepMC3 deduction on stream. For HepMC3 < 3.2.0 the function is implemented in Rivet + _hepmcReader = RivetHepMC::deduce_reader(*_istr); +-- +GitLab + diff --git a/sci-physics/rivet/rivet-3.1.10.ebuild b/sci-physics/rivet/rivet-3.1.10.ebuild index 6d95335c815a..085d80fb47d5 100644 --- a/sci-physics/rivet/rivet-3.1.10.ebuild +++ b/sci-physics/rivet/rivet-3.1.10.ebuild @@ -66,6 +66,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-3.1.6-binreloc.patch "${FILESDIR}"/${PN}-3.1.9-pythontests.patch + "${FILESDIR}"/${PN}-3.1.10-ref_cin.patch # https://gitlab.com/hepcedar/rivet/-/merge_requests/844 ) pkg_setup() { diff --git a/sci-physics/rivet/rivet-3.1.9.ebuild b/sci-physics/rivet/rivet-3.1.9.ebuild index 207734faa1c8..23eb58b65043 100644 --- a/sci-physics/rivet/rivet-3.1.9.ebuild +++ b/sci-physics/rivet/rivet-3.1.9.ebuild @@ -67,6 +67,7 @@ BDEPEND=" PATCHES=( "${FILESDIR}"/${PN}-3.1.6-binreloc.patch "${FILESDIR}"/${PN}-3.1.9-pythontests.patch + "${FILESDIR}"/${PN}-3.1.10-ref_cin.patch # https://gitlab.com/hepcedar/rivet/-/merge_requests/844 ) pkg_setup() { |