summaryrefslogtreecommitdiff
path: root/media-video/mjpegtools
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
committerV3n3RiX <venerix@koprulu.sector>2024-08-07 12:37:21 +0100
commitb8c7370a682e4e29cda623222d17a790c01c3642 (patch)
treef6caa14689bd00a5760eadaa381ff41e50ef3c1b /media-video/mjpegtools
parent8a4997a7e2d1e36c089d4d76935b5a902d98d3d0 (diff)
gentoo auto-resync : 07:08:2024 - 12:37:20
Diffstat (limited to 'media-video/mjpegtools')
-rw-r--r--media-video/mjpegtools/Manifest5
-rw-r--r--media-video/mjpegtools/files/mjpegtools-2.2.1-gcc15-template.patch349
-rw-r--r--media-video/mjpegtools/files/mjpegtools-2.2.1-lto.patch24
-rw-r--r--media-video/mjpegtools/files/mjpegtools-2.2.1-puts-c99-configure.patch13
-rw-r--r--media-video/mjpegtools/mjpegtools-2.2.1-r2.ebuild (renamed from media-video/mjpegtools/mjpegtools-2.2.1-r1.ebuild)5
5 files changed, 394 insertions, 2 deletions
diff --git a/media-video/mjpegtools/Manifest b/media-video/mjpegtools/Manifest
index 5276971e379a..7d0206c1a41b 100644
--- a/media-video/mjpegtools/Manifest
+++ b/media-video/mjpegtools/Manifest
@@ -1,5 +1,8 @@
AUX mjpegtools-2.2.1-c++17-no-auto_ptr-fix.patch 521 BLAKE2B 6afa67ce2c4ce924e90a71261216fc3bf225692b9ef3c4c6daceabedfb655069d9916245153d718b3096f28e0c95adee7c1ce3403d92c1842c144b2eeba2389e SHA512 114dc0b9a61af40ea0866320554e7aa048610a0698f79b419b36722f5130f521d18a5abe55d6a8b8ce74623510f7ff63b49fff8bded0f60b9ad31d6ff2d45458
AUX mjpegtools-2.2.1-c++17-register-fix.patch 391 BLAKE2B ec51922fadc66a1500ac3352de0b507d3a2210c36562ba8b72e41a90cf5fc007d3cf5579e8b6813506371989e827833b1b71da0b0444dc8a3481e03884d501e8 SHA512 bc3a6c708af357f67f5d5cd2eb11c931c44d14e698f1d2a30e066c66a7e06cbcc5238b7b7bce775127f56d3c978b44f2986801359eef9836a23ec0ffd25bceca
+AUX mjpegtools-2.2.1-gcc15-template.patch 10735 BLAKE2B e9e171909a435c8e5926f4b0e7d828f834d29556644d7f6774191425c424a2c10c03c5b29ad08d925461906c953f1a26df122fa4e88f3d0d6f2c9c8c73bd45e8 SHA512 04d2331316fb1c61b9fb47f53ca2a61e12e2d327cc9eeb557d00fd7a2f5f1fa3aaf04503e29b94fa49fb3b89d7d95c18623128c14086acaa1b8bc1502d63527b
+AUX mjpegtools-2.2.1-lto.patch 731 BLAKE2B 9bee6eddad066794ec2404d4ca3df363fb66a458d4a296d0878bf4d21a3e242d6f660a5d9d7b2996e5742140d1a5e50b75144386821f78d254f9e5f2b8a81b86 SHA512 68cc4c1e70ac7753fdc7ba036b5407dcb9839fa05ef61c5d3567e9f1efb26a8ce71ee6f1c259fcc1277f90d0d2beb041119a627ff5e8e63bce49c3f542077c8b
+AUX mjpegtools-2.2.1-puts-c99-configure.patch 682 BLAKE2B 36d38e5ad56496647030150728cd86e043a2b3913d28d6aaa964bf51a3ae143e8ed200ae66424ef863ad2588222159d999a9caf7e2976b431880639b44fdc121 SHA512 de3e85d0d96d4ce12c423b4110f31d13082ac2c69ebc146516b03202521696aa4170b12cfc51c9a7959f028317957ed98edcdb33e5e0261133d4c2791843044e
DIST mjpegtools-2.2.1.tar.gz 2326425 BLAKE2B a6f2698dda6b7c92a1a786f39bfb1989587b2c35a1f94e435247f04a01f405808d464470fddf1eddaee73df75daaef460bd62e901b89b2b2e0b095332492b20b SHA512 4d7f4dcf56a0e6079025bf0221ee632d91c4cc635a8c7eb9ddf3f7b86ad7250415c6dc4fd4113081920bc9c8fdc2552b8a3aaf896bf5a778acfacb15c7ded830
-EBUILD mjpegtools-2.2.1-r1.ebuild 2756 BLAKE2B 5ca9a6cc89710c7b7ca156b9770043639672ca7e8263ed6d5c0c48ab182c5420d2daa4a19fc80c01e8d75533f20d773534958748d56200fba7976b177ea18de3 SHA512 4c4d4c4401175849b645268ba878a296c6a7d6111cc686e7025ee48bcd198744307d1c707009ca2d71276808c3e01d305a661b0a4fdc06d15f6d9879f0ce89ef
+EBUILD mjpegtools-2.2.1-r2.ebuild 2893 BLAKE2B 1405896365b69df71533f5588d933ce118f624d28482469bda88c7194c4d6d17088587b393403488ebfc4d39fa5f38e5877d908c7f1ed7ff506ff5e935234cca SHA512 e56e9a8cceaeacfbc82e1c76f6ca80921bb82161da8e639f972054775e8394a81686611fad444ea9298d585d6772b0214b4c2fb2e42ebccef1047e8cb97f3849
MISC metadata.xml 538 BLAKE2B 420dc5b1516f83aed28539d6c9cb3964135bd67d9a8c334eb5ad72bc95156fe3795ca8098cebc46e7a263e3a84cdb8bfe1a393b7f9a9f47eeaf24527748723a9 SHA512 c53c44b7a0bdea16c3c56d11edde87edea9849ffb37b2eba21701ad5791f1348d61d7216457efa0964c1503d89e2d86c4616d1fda240129f98ab2b68ec5e6926
diff --git a/media-video/mjpegtools/files/mjpegtools-2.2.1-gcc15-template.patch b/media-video/mjpegtools/files/mjpegtools-2.2.1-gcc15-template.patch
new file mode 100644
index 000000000000..66d017233233
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-2.2.1-gcc15-template.patch
@@ -0,0 +1,349 @@
+https://bugs.gentoo.org/936562
+https://sourceforge.net/p/mjpeg/patches/63/
+--- a/y4mdenoise/Region2D.hh
++++ b/y4mdenoise/Region2D.hh
+@@ -97,35 +97,11 @@
+ // Add the given horizontal extent to the region. Note that
+ // a_tnXEnd is technically one past the end of the extent.
+
+- template <class REGION, class REGION_TEMP>
+- void UnionDebug (Status_t &a_reStatus, INDEX a_tnY,
+- INDEX a_tnXStart, INDEX a_tnXEnd, REGION_TEMP &a_rTemp);
+- // Add the given horizontal extent to the region. Note that
+- // a_tnXEnd is technically one past the end of the extent.
+- // Exhaustively (i.e. slowly) verifies the results, using a
+- // much simpler algorithm.
+- // Requires the use of a temporary region, usually of the
+- // final subclass' type, in order to work. (Since that can't
+- // be known at this level, a template parameter is included for
+- // it.)
+-
+ template <class REGION>
+ void Union (Status_t &a_reStatus, const REGION &a_rOther);
+ // Make the current region represent the union between itself
+ // and the other given region.
+
+- template <class REGION, class REGION_O, class REGION_TEMP>
+- void UnionDebug (Status_t &a_reStatus,
+- REGION_O &a_rOther, REGION_TEMP &a_rTemp);
+- // Make the current region represent the union between itself
+- // and the other given region.
+- // Exhaustively (i.e. slowly) verifies the results, using a
+- // much simpler algorithm.
+- // Requires the use of a temporary region, usually of the
+- // final subclass' type, in order to work. (Since that can't
+- // be known at this level, a template parameter is included for
+- // it.)
+-
+ //void Merge (Status_t &a_reStatus, INDEX a_tnY, INDEX a_tnXStart,
+ // INDEX a_tnXEnd);
+ // Merge this extent into the current region.
+@@ -166,36 +142,11 @@
+ // Subtract the given horizontal extent from the region. Note
+ // that a_tnXEnd is technically one past the end of the extent.
+
+- template <class REGION_TEMP>
+- void SubtractDebug (Status_t &a_reStatus, INDEX a_tnY,
+- INDEX a_tnXStart, INDEX a_tnXEnd, REGION_TEMP &a_rTemp);
+- // Subtract the given horizontal extent from the region. Note
+- // that a_tnXEnd is technically one past the end of the extent.
+- // Exhaustively (i.e. slowly) verifies the results, using a
+- // much simpler algorithm.
+- // Requires the use of a temporary region, usually of the
+- // final subclass' type, in order to work. (Since that can't
+- // be known at this level, a template parameter is included for
+- // it.)
+-
+ template <class REGION>
+ void Subtract (Status_t &a_reStatus, const REGION &a_rOther);
+ // Subtract the other region from the current region, i.e.
+ // remove from the current region any extents that exist in the
+ // other region.
+-
+- template <class REGION, class REGION_O, class REGION_TEMP>
+- void SubtractDebug (Status_t &a_reStatus, REGION_O &a_rOther,
+- REGION_TEMP &a_rTemp);
+- // Subtract the other region from the current region, i.e.
+- // remove from the current region any extents that exist in the
+- // other region.
+- // Exhaustively (i.e. slowly) verifies the results, using a
+- // much simpler algorithm.
+- // Requires the use of a temporary region, usually of the
+- // final subclass' type, in order to work. (Since that can't
+- // be known at this level, a template parameter is included for
+- // it.)
+
+ //typedef ... ConstIterator;
+ //ConstIterator Begin (void) const { return m_setExtents.Begin(); }
+@@ -404,85 +355,6 @@
+
+
+
+-// Add the given horizontal extent to the region.
+-template <class INDEX, class SIZE>
+-template <class REGION, class REGION_TEMP>
+-void
+-Region2D<INDEX,SIZE>::UnionDebug (Status_t &a_reStatus, INDEX a_tnY,
+- INDEX a_tnXStart, INDEX a_tnXEnd, REGION_TEMP &a_rTemp)
+-{
+- typename REGION::ConstIterator itHere;
+- typename REGION_TEMP::ConstIterator itHereO;
+- INDEX tnX;
+- // Used to loop through points.
+-
+- // Make sure they didn't start us off with an error.
+- assert (a_reStatus == g_kNoError);
+-
+- // Calculate the union.
+- a_rTemp.Assign (a_reStatus, *this);
+- if (a_reStatus != g_kNoError)
+- return;
+- a_rTemp.Union (a_reStatus, a_tnY, a_tnXStart, a_tnXEnd);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // Loop through every point in the result, make sure it's in
+- // one of the two input regions.
+- for (itHereO = a_rTemp.Begin(); itHereO != a_rTemp.End(); ++itHereO)
+- {
+- const Extent &rHere = *itHereO;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!((rHere.m_tnY == a_tnY
+- && (tnX >= a_tnXStart && tnX < a_tnXEnd))
+- || this->DoesContainPoint (rHere.m_tnY, tnX)))
+- goto error;
+- }
+- }
+-
+- // Loop through every point in the original region, make sure
+- // it's in the result.
+- for (itHere = this->Begin(); itHere != this->End(); ++itHere)
+- {
+- const Extent &rHere = *itHere;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+-
+- // Loop through every point in the added extent, make sure it's in
+- // the result.
+- for (tnX = a_tnXStart; tnX < a_tnXEnd; ++tnX)
+- {
+- if (!a_rTemp.DoesContainPoint (a_tnY, tnX))
+- goto error;
+- }
+-
+- // The operation succeeded. Commit it.
+- Assign (a_reStatus, a_rTemp);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // All done.
+- return;
+-
+-error:
+- // Handle deviations.
+- fprintf (stderr, "Region2D::Union() failed\n");
+- fprintf (stderr, "Input region:\n");
+- PrintRegion (*this);
+- fprintf (stderr, "Input extent: [%d,%d-%d]\n",
+- int (a_tnY), int (a_tnXStart), int (a_tnXEnd));
+- fprintf (stderr, "Result:\n");
+- PrintRegion (a_rTemp);
+- assert (false);
+-}
+-
+-
+-
+ // Make the current region represent the union between itself
+ // and the other given region.
+ template <class INDEX, class SIZE>
+@@ -511,184 +383,6 @@
+ }
+ }
+
+-
+-
+-// Make the current region represent the union between itself
+-// and the other given region.
+-template <class INDEX, class SIZE>
+-template <class REGION, class REGION_O, class REGION_TEMP>
+-void
+-Region2D<INDEX,SIZE>::UnionDebug (Status_t &a_reStatus,
+- REGION_O &a_rOther, REGION_TEMP &a_rTemp)
+-{
+- typename REGION::ConstIterator itHere;
+- typename REGION_O::ConstIterator itHereO;
+- typename REGION_TEMP::ConstIterator itHereT;
+- INDEX tnX;
+- // Used to loop through points.
+-
+- // Make sure they didn't start us off with an error.
+- assert (a_reStatus == g_kNoError);
+-
+- // Calculate the union.
+- a_rTemp.Assign (a_reStatus, *this);
+- if (a_reStatus != g_kNoError)
+- return;
+- a_rTemp.Union (a_reStatus, a_rOther);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // Loop through every point in the result, make sure it's in
+- // one of the two input regions.
+- for (itHereT = a_rTemp.Begin(); itHereT != a_rTemp.End(); ++itHereT)
+- {
+- const Extent &rHere = *itHereT;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!a_rOther.DoesContainPoint (rHere.m_tnY, tnX)
+- && !this->DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+-
+- // Loop through every point in the first input region, make sure
+- // it's in the result.
+- for (itHere = this->Begin(); itHere != this->End(); ++itHere)
+- {
+- const Extent &rHere = *itHere;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+-
+- // Loop through every point in the second input region, make sure
+- // it's in the result.
+- for (itHereO = a_rOther.Begin();
+- itHereO != a_rOther.End();
+- ++itHereO)
+- {
+- const Extent &rHere = *itHereO;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+-
+- // The operation succeeded. Commit it.
+- Assign (a_reStatus, a_rTemp);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // All done.
+- return;
+-
+-error:
+- // Handle deviations.
+- fprintf (stderr, "Region2D::Union() failed\n");
+- fprintf (stderr, "First input region:\n");
+- PrintRegion (*this);
+- fprintf (stderr, "Second input region:\n");
+- PrintRegion (a_rOther);
+- fprintf (stderr, "Result:\n");
+- PrintRegion (a_rTemp);
+- assert (false);
+-}
+-
+-
+-
+-// Subtract the other region from the current region, i.e.
+-// remove from the current region any areas that exist in the
+-// other region.
+-template <class INDEX, class SIZE>
+-template <class REGION, class REGION_O, class REGION_TEMP>
+-void
+-Region2D<INDEX,SIZE>::SubtractDebug (Status_t &a_reStatus,
+- REGION_O &a_rOther, REGION_TEMP &a_rTemp)
+-{
+- typename REGION::ConstIterator itHere;
+- typename REGION_O::ConstIterator itHereO;
+- typename REGION_TEMP::ConstIterator itHereT;
+- INDEX tnX;
+- // Used to loop through points.
+-
+- // Make sure they didn't start us off with an error.
+- assert (a_reStatus == g_kNoError);
+-
+- // Calculate the difference.
+- a_rTemp.Assign (a_reStatus, *this);
+- if (a_reStatus != g_kNoError)
+- return;
+- a_rTemp.Subtract (a_reStatus, a_rOther);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // Loop through every point in the result, make sure it's in
+- // the first input region but not the second.
+- for (itHereT = a_rTemp.Begin(); itHereT != a_rTemp.End(); ++itHereT)
+- {
+- const Extent &rHere = *itHereT;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!(this->DoesContainPoint (rHere.m_tnY, tnX)
+- && !a_rOther.DoesContainPoint (rHere.m_tnY, tnX)))
+- goto error;
+- }
+- }
+-
+- // Loop through every point in the first input region, and if it's
+- // not in the second input region, make sure it's in the result.
+- for (itHere = this->Begin(); itHere != this->End(); ++itHere)
+- {
+- const Extent &rHere = *itHere;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (!a_rOther.DoesContainPoint (rHere.m_tnY, tnX))
+- {
+- if (!a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+- }
+-
+- // Loop through every point in the second input region, make sure
+- // it's not in the result.
+- for (itHereO = a_rOther.Begin();
+- itHereO != a_rOther.End();
+- ++itHereO)
+- {
+- const Extent &rHere = *itHere;
+- for (tnX = rHere.m_tnXStart; tnX < rHere.m_tnXEnd; ++tnX)
+- {
+- if (a_rTemp.DoesContainPoint (rHere.m_tnY, tnX))
+- goto error;
+- }
+- }
+-
+- // The operation succeeded. Commit it.
+- Assign (a_reStatus, a_rTemp);
+- if (a_reStatus != g_kNoError)
+- return;
+-
+- // All done.
+- return;
+-
+-error:
+- // Handle deviations.
+- fprintf (stderr, "Region2D::Subtract() failed\n");
+- fprintf (stderr, "First input region:\n");
+- PrintRegion (*this);
+- fprintf (stderr, "Second input region:\n");
+- PrintRegion (a_rOther);
+- fprintf (stderr, "Result:\n");
+- PrintRegion (a_rTemp);
+- assert (false);
+-}
+-
+-
+-
+ // Flood-fill the current region.
+ template <class INDEX, class SIZE>
+ template <class CONTROL>
+
diff --git a/media-video/mjpegtools/files/mjpegtools-2.2.1-lto.patch b/media-video/mjpegtools/files/mjpegtools-2.2.1-lto.patch
new file mode 100644
index 000000000000..b4cf1e14275f
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-2.2.1-lto.patch
@@ -0,0 +1,24 @@
+https://sourceforge.net/p/mjpeg/bugs/143/
+https://bugs.gentoo.org/927103
+--- a/mpeg2enc/quantize_x86.c
++++ b/mpeg2enc/quantize_x86.c
+@@ -41,7 +41,7 @@
+ #include "quantize_precomp.h"
+ #include "quantize_ref.h"
+
+-int quant_weight_coeff_sum_mmx (int16_t *blk, uint16_t *i_quant_mat );
++int32_t quant_weight_coeff_sum_mmx(int16_t *src, int16_t *i_quant_mat);
+
+ void iquantize_non_intra_m1_mmx(int16_t *src, int16_t *dst, uint16_t *qmat);
+ void iquantize_non_intra_m2_mmx(int16_t *src, int16_t *dst, uint16_t *qmat);
+--- a/lavtools/lav_io.c
++++ b/lavtools/lav_io.c
+@@ -34,7 +34,7 @@
+ #include <libdv/dv.h>
+ #endif
+
+-extern int AVI_errno;
++extern long int AVI_errno;
+
+ static char video_format=' ';
+ static int internal_error=0;
diff --git a/media-video/mjpegtools/files/mjpegtools-2.2.1-puts-c99-configure.patch b/media-video/mjpegtools/files/mjpegtools-2.2.1-puts-c99-configure.patch
new file mode 100644
index 000000000000..6cbc92ee28ff
--- /dev/null
+++ b/media-video/mjpegtools/files/mjpegtools-2.2.1-puts-c99-configure.patch
@@ -0,0 +1,13 @@
+https://sourceforge.net/p/mjpeg/bugs/144/
+https://bugs.gentoo.org/899868
+--- a/configure.ac
++++ b/configure.ac
+@@ -236,7 +236,7 @@ dnl Check to see if __progname is provided by the system
+ dnl ********************************************************************
+ AC_CACHE_CHECK([for __progname],
+ [mjt_cv_extern___progname],
+- [AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
++ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+ [[extern char *__progname;
+ puts(__progname);]])],
+ [mjt_cv_extern___progname=yes],
diff --git a/media-video/mjpegtools/mjpegtools-2.2.1-r1.ebuild b/media-video/mjpegtools/mjpegtools-2.2.1-r2.ebuild
index 501d8c0b77b0..b6700e97964f 100644
--- a/media-video/mjpegtools/mjpegtools-2.2.1-r1.ebuild
+++ b/media-video/mjpegtools/mjpegtools-2.2.1-r2.ebuild
@@ -1,7 +1,7 @@
# Copyright 1999-2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=7
+EAPI=8
inherit autotools multilib-minimal
@@ -42,6 +42,9 @@ src_prepare() {
eapply "${FILESDIR}/${P}-c++17-register-fix.patch"
eapply "${FILESDIR}/${P}-c++17-no-auto_ptr-fix.patch"
+ eapply "${FILESDIR}/${P}-gcc15-template.patch"
+ eapply "${FILESDIR}/${P}-lto.patch"
+ eapply "${FILESDIR}/${P}-puts-c99-configure.patch"
eautoreconf
sed -i -e '/ARCHFLAGS=/s:=.*:=:' configure