public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Daniel Pielmeier" <billie@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: media-video/mjpegtools/, media-video/mjpegtools/files/
Date: Sat, 12 Aug 2023 13:15:09 +0000 (UTC)	[thread overview]
Message-ID: <1691845998.85deb61cae13a121ad252bf49247b3314cb28787.billie@gentoo> (raw)

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
 }


             reply	other threads:[~2023-08-12 13:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-12 13:15 Daniel Pielmeier [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-05-20 19:10 [gentoo-commits] repo/gentoo:master commit in: media-video/mjpegtools/, media-video/mjpegtools/files/ Andreas Sturmlechner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1691845998.85deb61cae13a121ad252bf49247b3314cb28787.billie@gentoo \
    --to=billie@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox