* [gentoo-commits] repo/gentoo:master commit in: media-libs/libvpx/files/, media-libs/libvpx/
@ 2016-09-23 16:27 Mike Gilbert
0 siblings, 0 replies; 5+ messages in thread
From: Mike Gilbert @ 2016-09-23 16:27 UTC (permalink / raw
To: gentoo-commits
commit: acbdb2218f946d8114130f209aecdeb7c627e942
Author: Mike Gilbert <floppym <AT> gentoo <DOT> org>
AuthorDate: Fri Sep 23 16:25:51 2016 +0000
Commit: Mike Gilbert <floppym <AT> gentoo <DOT> org>
CommitDate: Fri Sep 23 16:26:55 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=acbdb221
media-libs/libvpx: port to EAPI 6
Package-Manager: portage-2.3.0_p43
.../files/libvpx-1.3.0-sparc-configure.patch | 4 +-
media-libs/libvpx/libvpx-1.6.0-r1.ebuild | 49 +++++++++-------------
2 files changed, 22 insertions(+), 31 deletions(-)
diff --git a/media-libs/libvpx/files/libvpx-1.3.0-sparc-configure.patch b/media-libs/libvpx/files/libvpx-1.3.0-sparc-configure.patch
index dc3f6c9..2ddea4d 100644
--- a/media-libs/libvpx/files/libvpx-1.3.0-sparc-configure.patch
+++ b/media-libs/libvpx/files/libvpx-1.3.0-sparc-configure.patch
@@ -1,5 +1,5 @@
---- configure~ 2014-01-10 21:12:42.000000000 +0100
-+++ configure 2014-04-05 12:51:51.794638686 +0200
+--- a/configure
++++ b/configure
@@ -109,6 +109,7 @@
all_platforms="${all_platforms} ppc64-darwin9-gcc"
all_platforms="${all_platforms} ppc64-linux-gcc"
diff --git a/media-libs/libvpx/libvpx-1.6.0-r1.ebuild b/media-libs/libvpx/libvpx-1.6.0-r1.ebuild
index 659cbb7..7986feb 100644
--- a/media-libs/libvpx/libvpx-1.6.0-r1.ebuild
+++ b/media-libs/libvpx/libvpx-1.6.0-r1.ebuild
@@ -2,31 +2,19 @@
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI=5
-inherit eutils multilib toolchain-funcs multilib-minimal
+EAPI=6
+inherit toolchain-funcs multilib-minimal
LIBVPX_TESTDATA_VER=1.6.0
-if [[ ${PV} == *9999* ]]; then
- inherit git-2
- EGIT_REPO_URI="https://chromium.googlesource.com/webm/${PN}.git"
-elif [[ ${PV} == *pre* ]]; then
- SRC_URI="mirror://gentoo/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-else
- SRC_URI="http://storage.googleapis.com/downloads.webmproject.org/releases/webm/${P}.tar.bz2"
- KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
-fi
-# generated by: make LIBVPX_TEST_DATA_PATH=libvpx-testdata testdata + tar'ing
-# it.
-SRC_URI="${SRC_URI}
- test? ( mirror://gentoo/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.bz2 )"
-
DESCRIPTION="WebM VP8 and VP9 Codec SDK"
HOMEPAGE="http://www.webmproject.org"
+SRC_URI="http://storage.googleapis.com/downloads.webmproject.org/releases/webm/${P}.tar.bz2
+ test? ( mirror://gentoo/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.bz2 )"
LICENSE="BSD"
SLOT="0/4"
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux"
IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 +highbitdepth static-libs svc test +threads"
RDEPEND="abi_x86_32? ( !app-emulation/emul-linux-x86-medialibs[-abi_x86_32(-)] )"
@@ -46,8 +34,19 @@ REQUIRED_USE="
cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 )
"
-src_prepare() {
- epatch "${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010
+PATCHES=(
+ "${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010
+)
+
+src_configure() {
+ # https://bugs.gentoo.org/show_bug.cgi?id=384585
+ # https://bugs.gentoo.org/show_bug.cgi?id=465988
+ # copied from php-pear-r1.eclass
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/
+ addpredict /var/lib/net-snmp/mib_indexes
+ addpredict /session_mm_cli0.sem
+ multilib-minimal_src_configure
}
multilib_src_configure() {
@@ -61,21 +60,13 @@ multilib_src_configure() {
x86_64*) export AS=yasm;;
esac
- # https://bugs.gentoo.org/show_bug.cgi?id=384585
- # https://bugs.gentoo.org/show_bug.cgi?id=465988
- # copied from php-pear-r1.eclass
- addpredict /usr/share/snmp/mibs/.index
- addpredict /var/lib/net-snmp/
- addpredict /var/lib/net-snmp/mib_indexes
- addpredict /session_mm_cli0.sem
-
# Build with correct toolchain.
tc-export CC CXX AR NM
# Link with gcc by default, the build system should override this if needed.
export LD="${CC}"
local myconf
- if [ "${ABI}" = "${DEFAULT_ABI}" ] ; then
+ if multilib_is_native_abi; then
myconf+=" $(use_enable doc install-docs) $(use_enable doc docs)"
else
# not needed for multilib and will be overwritten anyway.
@@ -121,5 +112,5 @@ multilib_src_test() {
multilib_src_install() {
emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install
- [ "${ABI}" = "${DEFAULT_ABI}" ] && use doc && dohtml docs/html/*
+ multilib_is_native_abi && use doc && dodoc -r docs/html
}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/libvpx/files/, media-libs/libvpx/
@ 2019-08-07 18:49 Georgy Yakovlev
0 siblings, 0 replies; 5+ messages in thread
From: Georgy Yakovlev @ 2019-08-07 18:49 UTC (permalink / raw
To: gentoo-commits
commit: 73388d195c967accd3e9e7330a546bd9a81401da
Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 7 18:44:36 2019 +0000
Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
CommitDate: Wed Aug 7 18:49:03 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=73388d19
media-libs/libvpx: add ppc64le patch for 1.8.0
Closes: https://bugs.gentoo.org/688138
Acked-by: Mike Gilbert <floppym <AT> gentoo.org>
Package-Manager: Portage-2.3.69, Repoman-2.3.16
Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
.../files/libvpx-1.8.0-ppc64le-disable-vsx.patch | 28 ++++++++++++++++++++++
media-libs/libvpx/libvpx-1.8.0-r1.ebuild | 1 +
media-libs/libvpx/libvpx-1.8.0.ebuild | 1 +
3 files changed, 30 insertions(+)
diff --git a/media-libs/libvpx/files/libvpx-1.8.0-ppc64le-disable-vsx.patch b/media-libs/libvpx/files/libvpx-1.8.0-ppc64le-disable-vsx.patch
new file mode 100644
index 00000000000..5c6a36ca867
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.8.0-ppc64le-disable-vsx.patch
@@ -0,0 +1,28 @@
+From 7bf48f92e884fc01c28a4652ea0883b28744519d Mon Sep 17 00:00:00 2001
+From: Johann <johannkoenig@google.com>
+Date: Mon, 10 Jun 2019 14:35:03 -0700
+Subject: [PATCH] ppc: disable vsx optimizations with hbd
+
+vsx optimizations do not support 32 bit tran_low_t values.
+
+BUG=webm:1563
+
+Change-Id: I9e6348078f6e4855acfd381133eb840a435b7f81
+---
+
+diff --git a/build/make/configure.sh b/build/make/configure.sh
+index e950353..4a874f1 100644
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -1239,7 +1239,10 @@
+ ppc64le*)
+ link_with_cc=gcc
+ setup_gnu_toolchain
+- check_gcc_machine_option "vsx"
++ # Only enable vsx optimizations when vp9_highbitdepth is not enabled.
++ # https://bugs.chromium.org/p/webm/issues/detail?id=1538
++ enabled vp9_highbitdepth || check_gcc_machine_option "vsx"
++ enabled vsx || RTCD_OPTIONS="${RTCD_OPTIONS}--disable-vsx "
+ if [ -n "${tune_cpu}" ]; then
+ case ${tune_cpu} in
+ power?)
diff --git a/media-libs/libvpx/libvpx-1.8.0-r1.ebuild b/media-libs/libvpx/libvpx-1.8.0-r1.ebuild
index b75c00c5ca4..c45449b70d2 100644
--- a/media-libs/libvpx/libvpx-1.8.0-r1.ebuild
+++ b/media-libs/libvpx/libvpx-1.8.0-r1.ebuild
@@ -42,6 +42,7 @@ DEPEND="abi_x86_32? ( dev-lang/yasm )
PATCHES=(
"${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010
+ "${FILESDIR}/libvpx-1.8.0-ppc64le-disable-vsx.patch" #688138
)
src_configure() {
diff --git a/media-libs/libvpx/libvpx-1.8.0.ebuild b/media-libs/libvpx/libvpx-1.8.0.ebuild
index 73214ce5133..cc1164e1ea8 100644
--- a/media-libs/libvpx/libvpx-1.8.0.ebuild
+++ b/media-libs/libvpx/libvpx-1.8.0.ebuild
@@ -46,6 +46,7 @@ DEPEND="abi_x86_32? ( dev-lang/yasm )
PATCHES=(
"${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010
+ "${FILESDIR}/libvpx-1.8.0-ppc64le-disable-vsx.patch" #688138
)
src_configure() {
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/libvpx/files/, media-libs/libvpx/
@ 2022-04-17 19:24 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2022-04-17 19:24 UTC (permalink / raw
To: gentoo-commits
commit: 339c27e5232302f2b7219741fc4b3920e4332322
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sun Apr 17 19:23:42 2022 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Apr 17 19:23:42 2022 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=339c27e5
media-libs/libvpx: drop 1.7.0-r1, 1.10.0
Signed-off-by: Sam James <sam <AT> gentoo.org>
media-libs/libvpx/Manifest | 4 -
...libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch | 211 ---------------------
media-libs/libvpx/libvpx-1.10.0.ebuild | 119 ------------
media-libs/libvpx/libvpx-1.7.0-r1.ebuild | 129 -------------
4 files changed, 463 deletions(-)
diff --git a/media-libs/libvpx/Manifest b/media-libs/libvpx/Manifest
index cb0494a1bad1..09a825a81ef6 100644
--- a/media-libs/libvpx/Manifest
+++ b/media-libs/libvpx/Manifest
@@ -1,8 +1,4 @@
-DIST libvpx-1.10.0.tar.gz 5340421 BLAKE2B 25ef346b9dce92d37cc4f4612ed351d0f93a60c9021ed5f9145a9128efa8b0af7cf30b6279c40481ab043b9922b93f6b502cdffc3feedaf4bca310fdaf8b1502 SHA512 f88c588145b5164e98531b75215e119056cd806a9dbe6599bb9dab35c0af0ecd4b3daabee7d795e412a58aeb543d5c7dc0107457c4bd8f4d434e966e8e22a32d
DIST libvpx-1.11.0.tar.gz 5347256 BLAKE2B 2c350e14fc3b8a3c10a71e230e893fbb9a68e6eeb6a413cc359bdbfddda21cc5c15d0de4b6110889845f88f8a946ef1266980c0a1b26aaf55b52330fe038e261 SHA512 7aa5d30afa956dccda60917fd82f6f9992944ca893437c8cd53a04d1b7a94e0210431954aa136594dc400340123cc166dcc855753e493c8d929667f4c42b65a5
-DIST libvpx-1.7.0.tar.gz 2679797 BLAKE2B de7992adb517e375c5be2a9facf2b4a73174adcaef11185ed6d3102c2f6b73f378b0d415c5e3a4d915b3a6889bd8b31ba3e8c007a87a433a345ef7696a1dd899 SHA512 8b3b766b550f8d86907628d7ed88035f9a2612aac21542e0fd5ad35b905eb82cbe1be02a1a24afce7a3bcc4766f62611971f72724761996b392136c40a1e7ff0
DIST libvpx-1.9.0.tar.gz 5326239 BLAKE2B 6403a5d8326235a8d27ca3727f45398556cbe72cd125ae358c22f729cc01d6a81917cca8a6e97ad0ed01e7fc04ca4212baf21f371323b93ccc8830c4a11acf91 SHA512 8d544552b35000ea5712aec220b78bb5f7dc210704b2f609365214cb95a4f5a0e343b362723d829cb4a9ac203b10d5443700ba84b28fd6b2fefbabb40663e298
-DIST libvpx-testdata-1.10.0.tar.xz 448090752 BLAKE2B 88391427d35c538d114df188a899f8de7247dcd861d8438a32530909430feceef48c2c35a53c5a57268dccd85bcd40ec92bb053cfc2b4588bde6447747e10803 SHA512 6d4f0d08f32b34e95c1a75a4340e0340c83b26008852fac4293f1f3c4b9e9ce0f8e2290de678e2f2c9e1309f6995857add4e98796e1a3f474ce1402c9cc862f4
DIST libvpx-testdata-1.11.0.tar.xz 444614504 BLAKE2B ab6de4c46a771dc1c0dfb19326e580a492768c629eebbfb276db7da02e13256b2a66fdaadf76e5856879e871c7a17fcff657139582b1a3a84ad39c6018b912be SHA512 772e9d69dc9fc8e5a9411e1a532d908e86d90b03019e958349115a74697dcb35972ce71325312193d3a84030c3ff1d9bdbd09ed58918fffcba39c120ce4be868
-DIST libvpx-testdata-1.7.0.tar.xz 238790100 BLAKE2B 1d14e794341d35402eaf54d398ebed56b0983908e397ae677737e0f313ea0bfc9c4a39be91765b02a07a8eb9b55529d5f998efcc87b1b493b0e326e02193d982 SHA512 1556345e41674f0846a7419828972ec27c3c37fe270fa1deb45e03665f60ec088d79134aee0d2e27003b130636eeed4a15ea3f701c9d7014f3ca2785467767a8
DIST libvpx-testdata-1.9.0.tar.xz 450868860 BLAKE2B aaed7f2ef4f70ff352e39be2630e3a5cd803e8d2408c4fd5c3e06e040a75d2f593a10bc267a497aa91eaceb64286e81f69e86ca0940160e4f34b62c08e91df7b SHA512 bcc89062a436d652d15d5852a842cb4985c4783855b943ab11667c022b5082887129fd9579b8da3af209a3031f95ff8dc625c380f79559db160501cd676736ea
diff --git a/media-libs/libvpx/files/libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch b/media-libs/libvpx/files/libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch
deleted file mode 100644
index 623eccda902d..000000000000
--- a/media-libs/libvpx/files/libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch
+++ /dev/null
@@ -1,211 +0,0 @@
-Backports of
-
-From 46e17f0cb4a80b36755c84b8bf15731d3386c08f Mon Sep 17 00:00:00 2001
-From: kyslov <kyslov@google.com>
-Date: Fri, 4 Jan 2019 17:04:09 -0800
-Subject: [PATCH] Fix OOB memory access on fuzzed data
-
-From 0681cff1ad36b3ef8ec242f59b5a6c4234ccfb88 Mon Sep 17 00:00:00 2001
-From: James Zern <jzern@google.com>
-Date: Tue, 24 Jul 2018 21:36:50 -0700
-Subject: [PATCH] vp9: fix OOB read in decoder_peek_si_internal
-
-From f00890eecdf8365ea125ac16769a83aa6b68792d Mon Sep 17 00:00:00 2001
-From: James Zern <jzern@google.com>
-Date: Tue, 11 Dec 2018 18:06:20 -0800
-Subject: [PATCH] update libwebm to libwebm-1.0.0.27-352-g6ab9fcf
-
-From 34d54b04e98dd0bac32e9aab0fbda0bf501bc742 Mon Sep 17 00:00:00 2001
-From: James Zern <jzern@google.com>
-Date: Tue, 9 Apr 2019 18:37:44 -0700
-Subject: [PATCH] update libwebm to libwebm-1.0.0.27-358-gdbf1d10
-
-From 52add5896661d186dec284ed646a4b33b607d2c7 Mon Sep 17 00:00:00 2001
-From: Jerome Jiang <jianj@google.com>
-Date: Wed, 23 May 2018 15:43:00 -0700
-Subject: [PATCH] VP8: Fix use-after-free in postproc.
-
-to address CVE-2019-9232 CVE-2019-9325 CVE-2019-9371 CVE-2019-9433
-
-
---- a/test/decode_api_test.cc
-+++ b/test/decode_api_test.cc
-@@ -138,8 +138,30 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
- }
-
--TEST(DecodeAPI, Vp9PeekSI) {
-+void TestPeekInfo(const uint8_t *const data, uint32_t data_sz,
-+ uint32_t peek_size) {
- const vpx_codec_iface_t *const codec = &vpx_codec_vp9_dx_algo;
-+ // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get
-+ // to decoder_peek_si_internal on frames of size < 8.
-+ if (data_sz >= 8) {
-+ vpx_codec_ctx_t dec;
-+ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
-+ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM
-+ : VPX_CODEC_CORRUPT_FRAME,
-+ vpx_codec_decode(&dec, data, data_sz, NULL, 0));
-+ vpx_codec_iter_t iter = NULL;
-+ EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
-+ EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
-+ }
-+
-+ // Verify behavior of vpx_codec_peek_stream_info.
-+ vpx_codec_stream_info_t si;
-+ si.sz = sizeof(si);
-+ EXPECT_EQ((data_sz < peek_size) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK,
-+ vpx_codec_peek_stream_info(codec, data, data_sz, &si));
-+}
-+
-+TEST(DecodeAPI, Vp9PeekStreamInfo) {
- // The first 9 bytes are valid and the rest of the bytes are made up. Until
- // size 10, this should return VPX_CODEC_UNSUP_BITSTREAM and after that it
- // should return VPX_CODEC_CORRUPT_FRAME.
-@@ -150,24 +172,18 @@ TEST(DecodeAPI, Vp9PeekSI) {
- };
-
- for (uint32_t data_sz = 1; data_sz <= 32; ++data_sz) {
-- // Verify behavior of vpx_codec_decode. vpx_codec_decode doesn't even get
-- // to decoder_peek_si_internal on frames of size < 8.
-- if (data_sz >= 8) {
-- vpx_codec_ctx_t dec;
-- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
-- EXPECT_EQ(
-- (data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_CORRUPT_FRAME,
-- vpx_codec_decode(&dec, data, data_sz, NULL, 0));
-- vpx_codec_iter_t iter = NULL;
-- EXPECT_EQ(NULL, vpx_codec_get_frame(&dec, &iter));
-- EXPECT_EQ(VPX_CODEC_OK, vpx_codec_destroy(&dec));
-- }
-+ TestPeekInfo(data, data_sz, 10);
-+ }
-+}
-+
-+TEST(DecodeAPI, Vp9PeekStreamInfoTruncated) {
-+ // This profile 1 header requires 10.25 bytes, ensure
-+ // vpx_codec_peek_stream_info doesn't over read.
-+ const uint8_t profile1_data[10] = { 0xa4, 0xe9, 0x30, 0x68, 0x53,
-+ 0xe9, 0x30, 0x68, 0x53, 0x04 };
-
-- // Verify behavior of vpx_codec_peek_stream_info.
-- vpx_codec_stream_info_t si;
-- si.sz = sizeof(si);
-- EXPECT_EQ((data_sz < 10) ? VPX_CODEC_UNSUP_BITSTREAM : VPX_CODEC_OK,
-- vpx_codec_peek_stream_info(codec, data, data_sz, &si));
-+ for (uint32_t data_sz = 1; data_sz <= 10; ++data_sz) {
-+ TestPeekInfo(profile1_data, data_sz, 11);
- }
- }
- #endif // CONFIG_VP9_DECODER
---- a/third_party/libwebm/mkvparser/mkvparser.cc
-+++ b/third_party/libwebm/mkvparser/mkvparser.cc
-@@ -5307,8 +5307,8 @@ long VideoTrack::Parse(Segment* pSegment, const Info& info,
-
- const long long stop = pos + s.size;
-
-- Colour* colour = NULL;
-- Projection* projection = NULL;
-+ std::unique_ptr<Colour> colour_ptr;
-+ std::unique_ptr<Projection> projection_ptr;
-
- while (pos < stop) {
- long long id, size;
-@@ -5357,11 +5357,19 @@ long VideoTrack::Parse(Segment* pSegment, const Info& info,
- if (rate <= 0)
- return E_FILE_FORMAT_INVALID;
- } else if (id == libwebm::kMkvColour) {
-- if (!Colour::Parse(pReader, pos, size, &colour))
-+ Colour* colour = NULL;
-+ if (!Colour::Parse(pReader, pos, size, &colour)) {
- return E_FILE_FORMAT_INVALID;
-+ } else {
-+ colour_ptr.reset(colour);
-+ }
- } else if (id == libwebm::kMkvProjection) {
-- if (!Projection::Parse(pReader, pos, size, &projection))
-+ Projection* projection = NULL;
-+ if (!Projection::Parse(pReader, pos, size, &projection)) {
- return E_FILE_FORMAT_INVALID;
-+ } else {
-+ projection_ptr.reset(projection);
-+ }
- }
-
- pos += size; // consume payload
-@@ -5392,8 +5400,8 @@ long VideoTrack::Parse(Segment* pSegment, const Info& info,
- pTrack->m_display_unit = display_unit;
- pTrack->m_stereo_mode = stereo_mode;
- pTrack->m_rate = rate;
-- pTrack->m_colour = colour;
-- pTrack->m_projection = projection;
-+ pTrack->m_colour = colour_ptr.release();
-+ pTrack->m_projection = projection_ptr.release();
-
- pResult = pTrack;
- return 0; // success
---- a/vp8/common/postproc.c
-+++ b/vp8/common/postproc.c
-@@ -65,7 +65,7 @@ void vp8_deblock(VP8_COMMON *cm, YV12_BUFFER_CONFIG *source,
- double level = 6.0e-05 * q * q * q - .0067 * q * q + .306 * q + .0065;
- int ppl = (int)(level + .5);
-
-- const MODE_INFO *mode_info_context = cm->show_frame_mi;
-+ const MODE_INFO *mode_info_context = cm->mi;
- int mbr, mbc;
-
- /* The pixel thresholds are adjusted according to if or not the macroblock
---- a/vp8/decoder/dboolhuff.h
-+++ b/vp8/decoder/dboolhuff.h
-@@ -76,7 +76,7 @@ static int vp8dx_decode_bool(BOOL_DECODER *br, int probability) {
- }
-
- {
-- register int shift = vp8_norm[range];
-+ const unsigned char shift = vp8_norm[(unsigned char)range];
- range <<= shift;
- value <<= shift;
- count -= shift;
---- a/vp9/vp9_dx_iface.c
-+++ b/vp9/vp9_dx_iface.c
-@@ -97,7 +97,7 @@ static vpx_codec_err_t decoder_peek_si_internal(
- const uint8_t *data, unsigned int data_sz, vpx_codec_stream_info_t *si,
- int *is_intra_only, vpx_decrypt_cb decrypt_cb, void *decrypt_state) {
- int intra_only_flag = 0;
-- uint8_t clear_buffer[10];
-+ uint8_t clear_buffer[11];
-
- if (data + data_sz <= data) return VPX_CODEC_INVALID_PARAM;
-
-@@ -158,6 +158,9 @@ static vpx_codec_err_t decoder_peek_si_internal(
- if (profile > PROFILE_0) {
- if (!parse_bitdepth_colorspace_sampling(profile, &rb))
- return VPX_CODEC_UNSUP_BITSTREAM;
-+ // The colorspace info may cause vp9_read_frame_size() to need 11
-+ // bytes.
-+ if (data_sz < 11) return VPX_CODEC_UNSUP_BITSTREAM;
- }
- rb.bit_offset += REF_FRAMES; // refresh_frame_flags
- vp9_read_frame_size(&rb, (int *)&si->w, (int *)&si->h);
---- a/vpx_dsp/bitreader.h
-+++ b/vpx_dsp/bitreader.h
-@@ -94,7 +94,7 @@ static INLINE int vpx_read(vpx_reader *r, int prob) {
- }
-
- {
-- register int shift = vpx_norm[range];
-+ const unsigned char shift = vpx_norm[(unsigned char)range];
- range <<= shift;
- value <<= shift;
- count -= shift;
---- a/vpx_dsp/bitreader_buffer.c
-+++ b/vpx_dsp/bitreader_buffer.c
-@@ -23,7 +23,7 @@ int vpx_rb_read_bit(struct vpx_read_bit_buffer *rb) {
- rb->bit_offset = off + 1;
- return bit;
- } else {
-- rb->error_handler(rb->error_handler_data);
-+ if (rb->error_handler != NULL) rb->error_handler(rb->error_handler_data);
- return 0;
- }
- }
diff --git a/media-libs/libvpx/libvpx-1.10.0.ebuild b/media-libs/libvpx/libvpx-1.10.0.ebuild
deleted file mode 100644
index 9cce08a6ecf0..000000000000
--- a/media-libs/libvpx/libvpx-1.10.0.ebuild
+++ /dev/null
@@ -1,119 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-inherit toolchain-funcs multilib-minimal
-
-# To create a new testdata tarball:
-# 1. Unpack source tarball or checkout git tag
-# 2. mkdir libvpx-testdata
-# 3. export LIBVPX_TEST_DATA_PATH=libvpx-testdata
-# 4. configure --enable-unit-tests --enable-vp9-highbitdepth
-# 5. make testdata
-# 6. tar -caf libvpx-testdata-${MY_PV}.tar.xz libvpx-testdata
-
-LIBVPX_TESTDATA_VER=1.10.0
-
-DESCRIPTION="WebM VP8 and VP9 Codec SDK"
-HOMEPAGE="https://www.webmproject.org"
-SRC_URI="https://github.com/webmproject/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
- test? ( https://dev.gentoo.org/~whissi/dist/libvpx/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.xz )"
-
-LICENSE="BSD"
-SLOT="0/6"
-KEYWORDS="amd64 ~arm arm64 ~ia64 ~ppc ~ppc64 ~riscv ~s390 ~sparc x86 ~amd64-linux ~x86-linux"
-IUSE="doc +highbitdepth postproc static-libs test +threads"
-
-REQUIRED_USE="test? ( threads )"
-
-# Disable test phase when USE="-test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="dev-lang/perl
- abi_x86_32? ( dev-lang/yasm )
- abi_x86_64? ( dev-lang/yasm )
- abi_x86_x32? ( dev-lang/yasm )
- doc? (
- app-doc/doxygen
- dev-lang/php
- )
-"
-
-PATCHES=(
- "${FILESDIR}/libvpx-1.3.0-sparc-configure.patch" # 501010
-)
-
-src_configure() {
- # https://bugs.gentoo.org/show_bug.cgi?id=384585
- # https://bugs.gentoo.org/show_bug.cgi?id=465988
- # copied from php-pear-r1.eclass
- addpredict /usr/share/snmp/mibs/.index #nowarn
- addpredict /var/lib/net-snmp/ #nowarn
- addpredict /var/lib/net-snmp/mib_indexes #nowarn
- addpredict /session_mm_cli0.sem #nowarn
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- unset CODECS #357487
-
- # #498364: sse doesn't work without sse2 enabled,
- local myconfargs=(
- --prefix="${EPREFIX}"/usr
- --libdir="${EPREFIX}"/usr/$(get_libdir)
- --enable-pic
- --enable-vp8
- --enable-vp9
- --enable-shared
- --disable-optimizations
- $(use_enable postproc)
- $(use_enable static-libs static)
- $(use_enable test unit-tests)
- $(use_enable threads multithread)
- $(use_enable highbitdepth vp9-highbitdepth)
- )
-
- # let the build system decide which AS to use (it honours $AS but
- # then feeds it with yasm flags without checking...) #345161
- tc-export AS
- case "${CHOST}" in
- i?86*) export AS=yasm;;
- x86_64*) export AS=yasm;;
- esac
-
- # powerpc toolchain is not recognized anymore, #694368
- [[ ${CHOST} == powerpc-* ]] && myconfargs+=( --force-target=generic-gnu )
-
- # Build with correct toolchain.
- tc-export CC CXX AR NM
- # Link with gcc by default, the build system should override this if needed.
- export LD="${CC}"
-
- if multilib_is_native_abi; then
- myconfargs+=( $(use_enable doc install-docs) $(use_enable doc docs) )
- else
- # not needed for multilib and will be overwritten anyway.
- myconfargs+=( --disable-examples --disable-install-docs --disable-docs )
- fi
-
- echo "${S}"/configure "${myconfargs[@]}" >&2
- "${S}"/configure "${myconfargs[@]}"
-}
-
-multilib_src_compile() {
- # build verbose by default and do not build examples that will not be installed
- # disable stripping of debug info, bug #752057
- # (only works as long as upstream does not use non-gnu strip)
- emake verbose=yes GEN_EXAMPLES= HAVE_GNU_STRIP=no
-}
-
-multilib_src_test() {
- local -x LD_LIBRARY_PATH="${BUILD_DIR}"
- local -x LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata"
- emake verbose=yes GEN_EXAMPLES= test
-}
-
-multilib_src_install() {
- emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install
- multilib_is_native_abi && use doc && dodoc -r docs/html
-}
diff --git a/media-libs/libvpx/libvpx-1.7.0-r1.ebuild b/media-libs/libvpx/libvpx-1.7.0-r1.ebuild
deleted file mode 100644
index d91f9a9f7b52..000000000000
--- a/media-libs/libvpx/libvpx-1.7.0-r1.ebuild
+++ /dev/null
@@ -1,129 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI="7"
-inherit toolchain-funcs multilib-minimal
-
-# To create a new testdata tarball:
-# 1. Unpack source tarbll or checkout git tag
-# 2. export LIBVPX_TEST_DATA_PATH=libvpx-testdata
-# 3. configure --enable-unit-tests --enable-vp9-highbitdepth
-# 4. make testdata
-# 5. tar -cjf libvpx-testdata-${MY_PV}.tar.bz2 libvpx-testdata
-
-LIBVPX_TESTDATA_VER=1.7.0
-
-DESCRIPTION="WebM VP8 and VP9 Codec SDK"
-HOMEPAGE="https://www.webmproject.org"
-SRC_URI="https://github.com/webmproject/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
- test? ( mirror://gentoo/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.xz )"
-
-LICENSE="BSD"
-SLOT="0/5"
-KEYWORDS="amd64 arm arm64 ~ia64 ppc ppc64 ~s390 sparc x86 ~amd64-linux ~x86-linux"
-IUSE="cpu_flags_x86_avx cpu_flags_x86_avx2 doc cpu_flags_x86_mmx postproc cpu_flags_x86_sse cpu_flags_x86_sse2 cpu_flags_x86_sse3 cpu_flags_x86_ssse3 cpu_flags_x86_sse4_1 +highbitdepth static-libs svc test +threads"
-
-REQUIRED_USE="
- cpu_flags_x86_sse2? ( cpu_flags_x86_mmx )
- cpu_flags_x86_ssse3? ( cpu_flags_x86_sse2 )
- test? ( threads )
-"
-
-# Disable test phase when USE="-test"
-RESTRICT="!test? ( test )"
-
-BDEPEND="dev-lang/perl
- abi_x86_32? ( dev-lang/yasm )
- abi_x86_64? ( dev-lang/yasm )
- abi_x86_x32? ( dev-lang/yasm )
- doc? (
- app-doc/doxygen
- dev-lang/php
- )
-"
-
-PATCHES=(
- "${FILESDIR}"/libvpx-1.3.0-sparc-configure.patch # 501010
- "${FILESDIR}"/${P}-CVE-2019-9232_9325_9371_9433.patch
-)
-
-src_configure() {
- # https://bugs.gentoo.org/show_bug.cgi?id=384585
- # https://bugs.gentoo.org/show_bug.cgi?id=465988
- # copied from php-pear-r1.eclass
- addpredict /usr/share/snmp/mibs/.index #nowarn
- addpredict /var/lib/net-snmp/ #nowarn
- addpredict /var/lib/net-snmp/mib_indexes #nowarn
- addpredict /session_mm_cli0.sem #nowarn
- multilib-minimal_src_configure
-}
-
-multilib_src_configure() {
- unset CODECS #357487
-
- # #498364: sse doesn't work without sse2 enabled,
- local myconfargs=(
- --prefix="${EPREFIX}"/usr
- --libdir="${EPREFIX}"/usr/$(get_libdir)
- --enable-pic
- --enable-vp8
- --enable-vp9
- --enable-shared
- --extra-cflags="${CFLAGS}"
- $(use_enable cpu_flags_x86_avx avx)
- $(use_enable cpu_flags_x86_avx2 avx2)
- $(use_enable cpu_flags_x86_mmx mmx)
- $(use_enable postproc)
- $(use cpu_flags_x86_sse2 && use_enable cpu_flags_x86_sse sse || echo --disable-sse)
- $(use_enable cpu_flags_x86_sse2 sse2)
- $(use_enable cpu_flags_x86_sse3 sse3)
- $(use_enable cpu_flags_x86_sse4_1 sse4_1)
- $(use_enable cpu_flags_x86_ssse3 ssse3)
- $(use_enable svc experimental) $(use_enable svc spatial-svc)
- $(use_enable static-libs static)
- $(use_enable test unit-tests)
- $(use_enable threads multithread)
- $(use_enable highbitdepth vp9-highbitdepth)
- )
-
- # let the build system decide which AS to use (it honours $AS but
- # then feeds it with yasm flags without checking...) #345161
- tc-export AS
- case "${CHOST}" in
- i?86*) export AS=yasm;;
- x86_64*) export AS=yasm;;
- esac
-
- # powerpc toolchain is not recognized anymore, #694368
- [[ ${CHOST} == powerpc-* ]] && myconfargs+=( --force-target=generic-gnu )
-
- # Build with correct toolchain.
- tc-export CC CXX AR NM
- # Link with gcc by default, the build system should override this if needed.
- export LD="${CC}"
-
- if multilib_is_native_abi; then
- myconfargs+=( $(use_enable doc install-docs) $(use_enable doc docs) )
- else
- # not needed for multilib and will be overwritten anyway.
- myconfargs+=( --disable-examples --disable-install-docs --disable-docs )
- fi
-
- "${S}"/configure "${myconfargs[@]}"
-}
-
-multilib_src_compile() {
- # build verbose by default and do not build examples that will not be installed
- emake verbose=yes GEN_EXAMPLES=
-}
-
-multilib_src_test() {
- local -x LD_LIBRARY_PATH="${BUILD_DIR}"
- local -x LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata"
- emake verbose=yes GEN_EXAMPLES= test
-}
-
-multilib_src_install() {
- emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install
- multilib_is_native_abi && use doc && dodoc -r docs/html
-}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/libvpx/files/, media-libs/libvpx/
@ 2023-09-28 5:11 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-09-28 5:11 UTC (permalink / raw
To: gentoo-commits
commit: 4e33ebf94469ab30c5878d789081e6e8e6fcc732
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Thu Sep 28 05:10:29 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Thu Sep 28 05:11:08 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4e33ebf9
media-libs/libvpx: backport CVE-2023-5217 fix
Bug: https://bugs.gentoo.org/914871
Bug: https://bugs.gentoo.org/914875
Closes: https://github.com/gentoo/gentoo/pull/33095
Signed-off-by: Sam James <sam <AT> gentoo.org>
...-1.13.0-VP8-disallow-thread-count-changes.patch | 53 ++++++++
...pi_test-add-ConfigResizeChangeThreadCount.patch | 94 +++++++++++++
media-libs/libvpx/libvpx-1.13.0-r1.ebuild | 145 +++++++++++++++++++++
3 files changed, 292 insertions(+)
diff --git a/media-libs/libvpx/files/libvpx-1.13.0-VP8-disallow-thread-count-changes.patch b/media-libs/libvpx/files/libvpx-1.13.0-VP8-disallow-thread-count-changes.patch
new file mode 100644
index 000000000000..bdaea724f817
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.13.0-VP8-disallow-thread-count-changes.patch
@@ -0,0 +1,53 @@
+https://bugs.gentoo.org/914875
+
+From 4e4bbfbd414d738b7114194c5d06b45b415486b8 Mon Sep 17 00:00:00 2001
+From: James Zern <jzern@google.com>
+Date: Mon, 25 Sep 2023 18:55:59 -0700
+Subject: [PATCH 2/2] VP8: disallow thread count changes
+
+Currently allocations are done at encoder creation time. Going from
+threaded to non-threaded would cause a crash.
+
+Bug: chromium:1486441
+Change-Id: Ie301c2a70847dff2f0daae408fbef1e4d42e73d4
+(cherry picked from commit 3fbd1dca6a4d2dad332a2110d646e4ffef36d590)
+(cherry picked from commit 7aaffe2df4c9426ab204a272ca5ca52286ca86d4)
+---
+ test/encode_api_test.cc | 4 ----
+ vp8/encoder/onyx_if.c | 5 +++++
+ 2 files changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/test/encode_api_test.cc b/test/encode_api_test.cc
+index 02aedc057..e0e793b15 100644
+--- a/test/encode_api_test.cc
++++ b/test/encode_api_test.cc
+@@ -366,10 +366,6 @@ TEST(EncodeAPI, ConfigResizeChangeThreadCount) {
+
+ for (const auto *iface : kCodecIfaces) {
+ SCOPED_TRACE(vpx_codec_iface_name(iface));
+- if (!IsVP9(iface)) {
+- GTEST_SKIP() << "TODO(https://crbug.com/1486441) remove this condition "
+- "after VP8 is fixed.";
+- }
+ for (int i = 0; i < (IsVP9(iface) ? 2 : 1); ++i) {
+ vpx_codec_enc_cfg_t cfg = {};
+ struct Encoder {
+diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
+index 4bbeadef0..148a16cc4 100644
+--- a/vp8/encoder/onyx_if.c
++++ b/vp8/encoder/onyx_if.c
+@@ -1443,6 +1443,11 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf) {
+ last_h = cpi->oxcf.Height;
+ prev_number_of_layers = cpi->oxcf.number_of_layers;
+
++ if (cpi->initial_width) {
++ // TODO(https://crbug.com/1486441): Allow changing thread counts; the
++ // allocation is done once in vp8_create_compressor().
++ oxcf->multi_threaded = cpi->oxcf.multi_threaded;
++ }
+ cpi->oxcf = *oxcf;
+
+ switch (cpi->oxcf.Mode) {
+--
+2.42.0
+
diff --git a/media-libs/libvpx/files/libvpx-1.13.0-encode_api_test-add-ConfigResizeChangeThreadCount.patch b/media-libs/libvpx/files/libvpx-1.13.0-encode_api_test-add-ConfigResizeChangeThreadCount.patch
new file mode 100644
index 000000000000..17aa33567cc3
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.13.0-encode_api_test-add-ConfigResizeChangeThreadCount.patch
@@ -0,0 +1,94 @@
+https://bugs.gentoo.org/914875
+
+From 2f6c3a33e89e504ab3bef0aa847dc053f3355093 Mon Sep 17 00:00:00 2001
+From: James Zern <jzern@google.com>
+Date: Mon, 25 Sep 2023 18:53:41 -0700
+Subject: [PATCH 1/2] encode_api_test: add ConfigResizeChangeThreadCount
+
+Update thread counts and resolution to ensure allocations are updated
+correctly. VP8 is disabled to avoid a crash.
+
+Bug: chromium:1486441
+Change-Id: Ie89776d9818d27dc351eff298a44c699e850761b
+(cherry picked from commit af6dedd715f4307669366944cca6e0417b290282)
+(cherry picked from commit 972691e9af302f0bc14998e78a6d54f7861c92e5)
+---
+ test/encode_api_test.cc | 50 ++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 49 insertions(+), 1 deletion(-)
+
+diff --git a/test/encode_api_test.cc b/test/encode_api_test.cc
+index ecdf92834..02aedc057 100644
+--- a/test/encode_api_test.cc
++++ b/test/encode_api_test.cc
+@@ -304,7 +304,6 @@ TEST(EncodeAPI, SetRoi) {
+
+ void InitCodec(const vpx_codec_iface_t &iface, int width, int height,
+ vpx_codec_ctx_t *enc, vpx_codec_enc_cfg_t *cfg) {
+- ASSERT_EQ(vpx_codec_enc_config_default(&iface, cfg, 0), VPX_CODEC_OK);
+ cfg->g_w = width;
+ cfg->g_h = height;
+ cfg->g_lag_in_frames = 0;
+@@ -342,6 +341,7 @@ TEST(EncodeAPI, ConfigChangeThreadCount) {
+ vpx_codec_ctx_t ctx = {};
+ } enc;
+
++ ASSERT_EQ(vpx_codec_enc_config_default(iface, &cfg, 0), VPX_CODEC_OK);
+ EXPECT_NO_FATAL_FAILURE(
+ InitCodec(*iface, kWidth, kHeight, &enc.ctx, &cfg));
+ if (IsVP9(iface)) {
+@@ -360,4 +360,52 @@ TEST(EncodeAPI, ConfigChangeThreadCount) {
+ }
+ }
+
++TEST(EncodeAPI, ConfigResizeChangeThreadCount) {
++ constexpr int kInitWidth = 1024;
++ constexpr int kInitHeight = 1024;
++
++ for (const auto *iface : kCodecIfaces) {
++ SCOPED_TRACE(vpx_codec_iface_name(iface));
++ if (!IsVP9(iface)) {
++ GTEST_SKIP() << "TODO(https://crbug.com/1486441) remove this condition "
++ "after VP8 is fixed.";
++ }
++ for (int i = 0; i < (IsVP9(iface) ? 2 : 1); ++i) {
++ vpx_codec_enc_cfg_t cfg = {};
++ struct Encoder {
++ ~Encoder() { EXPECT_EQ(vpx_codec_destroy(&ctx), VPX_CODEC_OK); }
++ vpx_codec_ctx_t ctx = {};
++ } enc;
++
++ ASSERT_EQ(vpx_codec_enc_config_default(iface, &cfg, 0), VPX_CODEC_OK);
++ // Start in threaded mode to ensure resolution and thread related
++ // allocations are updated correctly across changes in resolution and
++ // thread counts. See https://crbug.com/1486441.
++ cfg.g_threads = 4;
++ EXPECT_NO_FATAL_FAILURE(
++ InitCodec(*iface, kInitWidth, kInitHeight, &enc.ctx, &cfg));
++ if (IsVP9(iface)) {
++ EXPECT_EQ(vpx_codec_control_(&enc.ctx, VP9E_SET_TILE_COLUMNS, 6),
++ VPX_CODEC_OK);
++ EXPECT_EQ(vpx_codec_control_(&enc.ctx, VP9E_SET_ROW_MT, i),
++ VPX_CODEC_OK);
++ }
++
++ cfg.g_w = 1000;
++ cfg.g_h = 608;
++ EXPECT_EQ(vpx_codec_enc_config_set(&enc.ctx, &cfg), VPX_CODEC_OK)
++ << vpx_codec_error_detail(&enc.ctx);
++
++ cfg.g_w = 16;
++ cfg.g_h = 720;
++
++ for (const auto threads : { 1, 4, 8, 6, 2, 1 }) {
++ cfg.g_threads = threads;
++ EXPECT_NO_FATAL_FAILURE(EncodeWithConfig(cfg, &enc.ctx))
++ << "iteration: " << i << " threads: " << threads;
++ }
++ }
++ }
++}
++
+ } // namespace
+--
+2.42.0
+
diff --git a/media-libs/libvpx/libvpx-1.13.0-r1.ebuild b/media-libs/libvpx/libvpx-1.13.0-r1.ebuild
new file mode 100644
index 000000000000..0fc96f933ed0
--- /dev/null
+++ b/media-libs/libvpx/libvpx-1.13.0-r1.ebuild
@@ -0,0 +1,145 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs multilib-minimal
+
+# To create a new testdata tarball:
+# 1. Unpack source tarball or checkout git tag
+# 2. mkdir libvpx-testdata
+# 3. export LIBVPX_TEST_DATA_PATH=libvpx-testdata
+# 4. ./configure --enable-unit-tests --enable-vp9-highbitdepth
+# 5. make testdata
+# 6. tar -caf libvpx-testdata-${MY_PV}.tar.xz libvpx-testdata
+
+LIBVPX_TESTDATA_VER=1.13.0
+
+DESCRIPTION="WebM VP8 and VP9 Codec SDK"
+HOMEPAGE="https://www.webmproject.org"
+SRC_URI="
+ https://github.com/webmproject/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.xz )
+"
+
+LICENSE="BSD"
+SLOT="0/8"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="cpu_flags_ppc_vsx3 doc +highbitdepth postproc static-libs test +threads"
+REQUIRED_USE="test? ( threads )"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ dev-lang/perl
+ abi_x86_32? ( dev-lang/yasm )
+ abi_x86_64? ( dev-lang/yasm )
+ abi_x86_x32? ( dev-lang/yasm )
+ doc? (
+ app-doc/doxygen
+ dev-lang/php
+ )
+"
+
+PATCHES=(
+ # bug #501010
+ "${FILESDIR}/${PN}-1.3.0-sparc-configure.patch"
+
+ # bug #914871
+ "${FILESDIR}/${P}-encode_api_test-add-ConfigResizeChangeThreadCount.patch"
+ "${FILESDIR}/${P}-VP8-disallow-thread-count-changes.patch"
+)
+
+src_configure() {
+ # bug #384585, bug #465988
+ # copied from php-pear-r1.eclass
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/
+ addpredict /var/lib/net-snmp/mib_indexes
+ addpredict /session_mm_cli0.sem
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # bug #357487
+ unset CODECS
+ # bug #905986
+ unset DIST_DIR
+
+ # bug #498364: sse doesn't work without sse2 enabled,
+ local myconfargs=(
+ --prefix="${EPREFIX}"/usr
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
+ --enable-pic
+ --enable-vp8
+ --enable-vp9
+ --enable-shared
+ --disable-optimizations
+ $(use_enable postproc)
+ $(use_enable static-libs static)
+ $(use_enable test unit-tests)
+ $(use_enable threads multithread)
+ $(use_enable highbitdepth vp9-highbitdepth)
+ )
+
+ # let the build system decide which AS to use (it honours $AS but
+ # then feeds it with yasm flags without checking...), bug #345161
+ tc-export AS
+ case "${CHOST}" in
+ i?86*) export AS=yasm;;
+ x86_64*) export AS=yasm;;
+ esac
+
+ # libvpx is fragile: both for tests at runtime.
+ # We force using the generic target unless we know things work to
+ # avoid runtime breakage on exotic arches.
+ if [[ ${ABI} == amd64 ]] ; then
+ myconfargs+=( --force-target=x86_64-linux-gcc )
+ elif [[ ${ABI} == x86 ]] ; then
+ myconfargs+=( --force-target=x86-linux-gcc )
+ elif [[ ${ABI} == arm64 ]] ; then
+ myconfargs+=( --force-target=arm64-linux-gcc )
+ elif [[ ${ABI} == arm ]] && [[ ${CHOST} == *armv7* ]] ; then
+ myconfargs+=( --force-target=armv7-linux-gcc )
+ elif [[ ${ABI} == ppc64 ]] && [[ $(tc-endian) != big ]] && use cpu_flags_ppc_vsx3; then
+ # only enable this target for at least power9 CPU running little-endian
+ myconfargs+=( --force-target=ppc64le-linux-gcc )
+ else
+ myconfargs+=( --force-target=generic-gnu )
+ fi
+
+ # powerpc toolchain is not recognized anymore, bug #694368
+ #[[ ${CHOST} == powerpc-* ]] && myconfargs+=( --force-target=generic-gnu )
+
+ # Build with correct toolchain.
+ tc-export CC CXX AR NM
+ # Link with gcc by default, the build system should override this if needed.
+ export LD="${CC}"
+
+ if multilib_is_native_abi; then
+ myconfargs+=( $(use_enable doc install-docs) $(use_enable doc docs) )
+ else
+ # Not needed for multilib and will be overwritten anyway.
+ myconfargs+=( --disable-examples --disable-install-docs --disable-docs )
+ fi
+
+ edo "${S}"/configure "${myconfargs[@]}"
+}
+
+multilib_src_compile() {
+ # Build verbose by default and do not build examples that will not be installed
+ # Disable stripping of debug info, bug #752057
+ # (only works as long as upstream does not use non-gnu strip)
+ emake verbose=yes GEN_EXAMPLES= HAVE_GNU_STRIP=no
+}
+
+multilib_src_test() {
+ local -x LD_LIBRARY_PATH="${BUILD_DIR}"
+ local -x LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata"
+ emake verbose=yes GEN_EXAMPLES= test
+}
+
+multilib_src_install() {
+ emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install
+
+ multilib_is_native_abi && use doc && dodoc -r docs/html
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: media-libs/libvpx/files/, media-libs/libvpx/
@ 2023-10-04 12:10 Sam James
0 siblings, 0 replies; 5+ messages in thread
From: Sam James @ 2023-10-04 12:10 UTC (permalink / raw
To: gentoo-commits
commit: 8a9088a028b5c95c944c75d55797852c4d92c722
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Wed Oct 4 12:08:15 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Wed Oct 4 12:09:55 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a9088a0
media-libs/libvpx: allow _FORTIFY_SOURCE
Upstream have been disabling this for years, since 2011(!), for a (IMO)
misguided attempt to preserve ABI which isn't really possible w/ glibc
and its use of symbol versioning anyway in a backwards direction.
Fedora have also been patching this out for a while: https://src.fedoraproject.org/rpms/libvpx/blob/rawhide/f/libvpx-1.7.0-leave-fortify-source-on.patch
This feels especially important given libvpx had an RCE vulnerability only
last week.
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../files/libvpx-1.13.1-allow-fortify-source.patch | 17 +++
media-libs/libvpx/libvpx-1.13.1-r1.ebuild | 142 +++++++++++++++++++++
2 files changed, 159 insertions(+)
diff --git a/media-libs/libvpx/files/libvpx-1.13.1-allow-fortify-source.patch b/media-libs/libvpx/files/libvpx-1.13.1-allow-fortify-source.patch
new file mode 100644
index 000000000000..5928c4e46723
--- /dev/null
+++ b/media-libs/libvpx/files/libvpx-1.13.1-allow-fortify-source.patch
@@ -0,0 +1,17 @@
+This was originally added for ABI reasons in a case which barely works / doesn't
+work at all for glibc anyway, see https://github.com/webmproject/libvpx/commit/b73a3693e581583e9ec676f4396d0c3d173e2462.
+
+We want fortification and we definitely don't want it explicitly turned off.
+--- a/build/make/configure.sh
++++ b/build/make/configure.sh
+@@ -1495,10 +1495,6 @@ EOF
+ # shared objects
+ enabled gcc && enabled pic && check_add_cflags -fPIC
+
+- # Work around longjmp interception on glibc >= 2.11, to improve binary
+- # compatibility. See http://code.google.com/p/webm/issues/detail?id=166
+- enabled linux && check_add_cflags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0
+-
+ # Check for strip utility variant
+ ${STRIP} -V 2>/dev/null | grep GNU >/dev/null && enable_feature gnu_strip
+
diff --git a/media-libs/libvpx/libvpx-1.13.1-r1.ebuild b/media-libs/libvpx/libvpx-1.13.1-r1.ebuild
new file mode 100644
index 000000000000..3ac3d45d048a
--- /dev/null
+++ b/media-libs/libvpx/libvpx-1.13.1-r1.ebuild
@@ -0,0 +1,142 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit edo toolchain-funcs multilib-minimal
+
+# To create a new testdata tarball:
+# 1. Unpack source tarball or checkout git tag
+# 2. mkdir libvpx-testdata
+# 3. export LIBVPX_TEST_DATA_PATH=libvpx-testdata
+# 4. ./configure --enable-unit-tests --enable-vp9-highbitdepth
+# 5. make testdata
+# 6. tar -caf libvpx-testdata-${MY_PV}.tar.xz libvpx-testdata
+
+LIBVPX_TESTDATA_VER=1.13.1
+
+DESCRIPTION="WebM VP8 and VP9 Codec SDK"
+HOMEPAGE="https://www.webmproject.org"
+SRC_URI="
+ https://github.com/webmproject/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ test? ( https://dev.gentoo.org/~sam/distfiles/${CATEGORY}/${PN}/${PN}-testdata-${LIBVPX_TESTDATA_VER}.tar.xz )
+"
+
+LICENSE="BSD"
+SLOT="0/8"
+KEYWORDS="~amd64 ~arm ~arm64 ~ia64 ~loong ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
+IUSE="cpu_flags_ppc_vsx3 doc +highbitdepth postproc static-libs test +threads"
+REQUIRED_USE="test? ( threads )"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+ dev-lang/perl
+ abi_x86_32? ( dev-lang/yasm )
+ abi_x86_64? ( dev-lang/yasm )
+ abi_x86_x32? ( dev-lang/yasm )
+ doc? (
+ app-doc/doxygen
+ dev-lang/php
+ )
+"
+
+PATCHES=(
+ # bug #501010
+ "${FILESDIR}/${PN}-1.3.0-sparc-configure.patch"
+ "${FILESDIR}/${PN}-1.13.1-allow-fortify-source.patch"
+)
+
+src_configure() {
+ # bug #384585, bug #465988
+ # copied from php-pear-r1.eclass
+ addpredict /usr/share/snmp/mibs/.index
+ addpredict /var/lib/net-snmp/
+ addpredict /var/lib/net-snmp/mib_indexes
+ addpredict /session_mm_cli0.sem
+ multilib-minimal_src_configure
+}
+
+multilib_src_configure() {
+ # bug #357487
+ unset CODECS
+ # bug #905986
+ unset DIST_DIR
+
+ # bug #498364: sse doesn't work without sse2 enabled,
+ local myconfargs=(
+ --prefix="${EPREFIX}"/usr
+ --libdir="${EPREFIX}"/usr/$(get_libdir)
+ --enable-pic
+ --enable-vp8
+ --enable-vp9
+ --enable-shared
+ --disable-optimizations
+ $(use_enable postproc)
+ $(use_enable static-libs static)
+ $(use_enable test unit-tests)
+ $(use_enable threads multithread)
+ $(use_enable highbitdepth vp9-highbitdepth)
+ )
+
+ # let the build system decide which AS to use (it honours $AS but
+ # then feeds it with yasm flags without checking...), bug #345161
+ tc-export AS
+ case "${CHOST}" in
+ i?86*) export AS=yasm;;
+ x86_64*) export AS=yasm;;
+ esac
+
+ # libvpx is fragile: both for tests at runtime.
+ # We force using the generic target unless we know things work to
+ # avoid runtime breakage on exotic arches.
+ if [[ ${ABI} == amd64 ]] ; then
+ myconfargs+=( --force-target=x86_64-linux-gcc )
+ elif [[ ${ABI} == x86 ]] ; then
+ myconfargs+=( --force-target=x86-linux-gcc )
+ elif [[ ${ABI} == arm64 ]] ; then
+ myconfargs+=( --force-target=arm64-linux-gcc )
+ elif [[ ${ABI} == arm ]] && [[ ${CHOST} == *armv7* ]] ; then
+ myconfargs+=( --force-target=armv7-linux-gcc )
+ elif [[ ${ABI} == ppc64 ]] && [[ $(tc-endian) != big ]] && use cpu_flags_ppc_vsx3; then
+ # only enable this target for at least power9 CPU running little-endian
+ myconfargs+=( --force-target=ppc64le-linux-gcc )
+ else
+ myconfargs+=( --force-target=generic-gnu )
+ fi
+
+ # powerpc toolchain is not recognized anymore, bug #694368
+ #[[ ${CHOST} == powerpc-* ]] && myconfargs+=( --force-target=generic-gnu )
+
+ # Build with correct toolchain.
+ tc-export CC CXX AR NM
+ # Link with gcc by default, the build system should override this if needed.
+ export LD="${CC}"
+
+ if multilib_is_native_abi; then
+ myconfargs+=( $(use_enable doc install-docs) $(use_enable doc docs) )
+ else
+ # Not needed for multilib and will be overwritten anyway.
+ myconfargs+=( --disable-examples --disable-install-docs --disable-docs )
+ fi
+
+ edo "${S}"/configure "${myconfargs[@]}"
+}
+
+multilib_src_compile() {
+ # Build verbose by default and do not build examples that will not be installed
+ # Disable stripping of debug info, bug #752057
+ # (only works as long as upstream does not use non-gnu strip)
+ emake verbose=yes GEN_EXAMPLES= HAVE_GNU_STRIP=no
+}
+
+multilib_src_test() {
+ local -x LD_LIBRARY_PATH="${BUILD_DIR}"
+ local -x LIBVPX_TEST_DATA_PATH="${WORKDIR}/${PN}-testdata"
+ emake verbose=yes GEN_EXAMPLES= test
+}
+
+multilib_src_install() {
+ emake verbose=yes GEN_EXAMPLES= DESTDIR="${D}" install
+
+ multilib_is_native_abi && use doc && dodoc -r docs/html
+}
^ permalink raw reply related [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-10-04 12:10 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-04 12:10 [gentoo-commits] repo/gentoo:master commit in: media-libs/libvpx/files/, media-libs/libvpx/ Sam James
-- strict thread matches above, loose matches on Subject: below --
2023-09-28 5:11 Sam James
2022-04-17 19:24 Sam James
2019-08-07 18:49 Georgy Yakovlev
2016-09-23 16:27 Mike Gilbert
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox