diff options
author | Denis Pronin <dannftk@yandex.ru> | 2023-08-04 14:23:58 +0300 |
---|---|---|
committer | Daniel Pielmeier <billie@gentoo.org> | 2023-08-12 15:13:18 +0200 |
commit | 85deb61cae13a121ad252bf49247b3314cb28787 (patch) | |
tree | c8e15b3cfebbae68cb6172929b7c6d04f87fc680 /media-video | |
parent | dev-php/php-redmine-api: treeclean (diff) | |
download | gentoo-85deb61cae13a121ad252bf49247b3314cb28787.tar.gz gentoo-85deb61cae13a121ad252bf49247b3314cb28787.tar.bz2 gentoo-85deb61cae13a121ad252bf49247b3314cb28787.zip |
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@yandex.ru>
Closes: https://github.com/gentoo/gentoo/pull/32171
Signed-off-by: Daniel Pielmeier <billie@gentoo.org>
Diffstat (limited to 'media-video')
3 files changed, 40 insertions, 0 deletions
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 } |