commit: 85deb61cae13a121ad252bf49247b3314cb28787 Author: Denis Pronin <dannftk <AT> yandex <DOT> ru> AuthorDate: Fri Aug 4 11:23:58 2023 +0000 Commit: Daniel Pielmeier <billie <AT> gentoo <DOT> org> CommitDate: Sat Aug 12 13:13:18 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85deb61c
media-video/mjpegtools: fix compiling at least with c++17 standard add two patches those are: - fixing usage of 'register' specifier since, since c++17 standard, it's been removed - fixing usage pf 'auto_ptr' since, since c++17 standard, it's been removed Closes: https://bugs.gentoo.org/896416 Signed-off-by: Denis Pronin <dannftk <AT> yandex.ru> Closes: https://github.com/gentoo/gentoo/pull/32171 Signed-off-by: Daniel Pielmeier <billie <AT> gentoo.org> .../mjpegtools-2.2.1-c++17-no-auto_ptr-fix.patch | 20 ++++++++++++++++++++ .../files/mjpegtools-2.2.1-c++17-register-fix.patch | 17 +++++++++++++++++ media-video/mjpegtools/mjpegtools-2.2.1.ebuild | 3 +++ 3 files changed, 40 insertions(+) diff --git a/media-video/mjpegtools/files/mjpegtools-2.2.1-c++17-no-auto_ptr-fix.patch b/media-video/mjpegtools/files/mjpegtools-2.2.1-c++17-no-auto_ptr-fix.patch new file mode 100644 index 000000000000..cc68c95c2493 --- /dev/null +++ b/media-video/mjpegtools/files/mjpegtools-2.2.1-c++17-no-auto_ptr-fix.patch @@ -0,0 +1,20 @@ +--- a/mplex/main.cpp ++++ b/mplex/main.cpp +@@ -50,7 +50,7 @@ + #include "multiplexor.hpp" + + +-using std::auto_ptr; ++using std::unique_ptr; + + + /************************************************************************* +@@ -138,7 +138,7 @@ + void + FileOutputStream::NextSegment( ) + { +- auto_ptr<char> prev_filename_buf( new char[strlen(cur_filename)+1] ); ++ unique_ptr<char[]> prev_filename_buf( new char[strlen(cur_filename)+1] ); + char *prev_filename = prev_filename_buf.get(); + fclose(strm); + ++segment_num; diff --git a/media-video/mjpegtools/files/mjpegtools-2.2.1-c++17-register-fix.patch b/media-video/mjpegtools/files/mjpegtools-2.2.1-c++17-register-fix.patch new file mode 100644 index 000000000000..b32cef5129a1 --- /dev/null +++ b/media-video/mjpegtools/files/mjpegtools-2.2.1-c++17-register-fix.patch @@ -0,0 +1,17 @@ +--- a/utils/fastintfns.h ++++ b/utils/fastintfns.h +@@ -2,12 +2,12 @@ + * + * WARNING: Assumes 2's complement arithmetic. + */ +-static inline int intmax( register int x, register int y ) ++static inline int intmax( int x, int y ) + { + return x < y ? y : x; + } + +-static inline int intmin( register int x, register int y ) ++static inline int intmin( int x, int y ) + { + return x < y ? x : y; + } diff --git a/media-video/mjpegtools/mjpegtools-2.2.1.ebuild b/media-video/mjpegtools/mjpegtools-2.2.1.ebuild index c87164eacd60..3f24c272b0d4 100644 --- a/media-video/mjpegtools/mjpegtools-2.2.1.ebuild +++ b/media-video/mjpegtools/mjpegtools-2.2.1.ebuild @@ -40,6 +40,9 @@ DEPEND=" src_prepare() { default + eapply "${FILESDIR}/${P}-c++17-register-fix.patch" + eapply "${FILESDIR}/${P}-c++17-no-auto_ptr-fix.patch" + eautoreconf sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure }