Adding isort

This commit is contained in:
Gerardo J. Puerta
2020-09-15 10:56:07 +02:00
parent 20d0f8b41c
commit 73dd5b7bae
66 changed files with 6453 additions and 1 deletions

View File

@ -0,0 +1,7 @@
DIST harfbuzz-2.5.3.tar.xz 5685712 BLAKE2B a9d8a46b6a0667c598ea011f020b09d8fd795105483a8b307ee2a9399de2b84bf3b29659f9a3f7500250879bbb412003ee6f68aaba01b68824bd489615f737e6 SHA512 a2e6cedbe0e505fa31b540e0d0bc6c0b07080bd39879c27e04d351103e21201d75a809dd2fad559bf994b82b311f67ad85778cbbfb670d7e2580beafa09e93ff
DIST harfbuzz-2.6.4.tar.xz 5967468 BLAKE2B 24d215324a408a724f47a901c4a56605144d15373518bd52643ece83705d0c63582a80635ecef6a6d8d2f5f39c750076d553fb39aaa8c0dd41702ee910c32f24 SHA512 d8664bb64fda11ff7646693070637e3827f8b3d1de50e11ecf108ce4d19c878b26b2ba4cff278da6e6cc0cb431e1630d9eaa7c32a9bebb9655a7aa8dabf7114f
DIST harfbuzz-2.6.8.tar.xz 8976516 BLAKE2B 46401ae06ec70172621d2aa354901f03173a273abdb0db909332946643e82b4286be690ac717a29304e9db121dd7f693b4ce19522de772f5d140986d6333e7ce SHA512 651b23d7d4fab6fef472ee57db39bbaebc31c2f40ea3a482c1499ad1a7b549b86a2bccbe9da191c8e9ecdf464191dd3c9a7485546b51695ad8ab3c0329732d9d
EBUILD harfbuzz-2.5.3-r1.ebuild 3033 BLAKE2B fe45f37cd4e9b419188d38603aa8b83c2af8c67175ec350cc6e34f6f8e7f7b18b6aff0c0c6adbfb67661f18432687ee09386ca4e5bb6b4c63579c6b74826a6cf SHA512 29832f1637d6f3c09786831601ada4fe763538201d1143fdea9ad97a36362ad1a1c30eddd23ec220d15e15bf88996fb6764c6fcf8eecef8f3bb3bf832686b038
EBUILD harfbuzz-2.6.4.ebuild 2261 BLAKE2B 7781e96662022e898341482977d14125c87b2ea379e6913b4c34a2be12ff7155f7fa7098221af659f80eac7a3dbbb1d3852c189fad93bc1015c68c611ec65cab SHA512 10e977d1273df060436361b89d8f9daee3c9bb23637409b070f49c2af5fbc35bf91e2b6985173bd2d797ebd5530271972a0491f1ce515bd03d4b8ab5e5af6e19
EBUILD harfbuzz-2.6.8.ebuild 3172 BLAKE2B 232619df1e95eb0caa3cb4c04697ed49b30f4a7703d71f42f23eea057537eac686217e64ec91db04b1cfa24bab37ea265d40523ddb41adf7e9da3f099073a042 SHA512 1142604a0975cd202231b58261d689bba20f4c38f13c50e81ce3d7c22f717530c8dece6c8e10824cf9c446d02096042d6caac071945115b36272aec9b2779540
MISC metadata.xml 645 BLAKE2B aadcef9412392874d361b5c09e7450bf88db64fa704558553861cf16ffd1a5b5715291fefc0624e3ad0d86a537cdbd2b810fa093b289428e68a19c82049188ef SHA512 645e451768a5dba2e16d18b51ece20fa28172450bf22e29fe73ed29748f712187f997ce2f6f0a24c725f0cb10434b4a65c6de9a5fd1aa7d820e00b7dca8b8b63

View File

@ -0,0 +1,110 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_7 )
inherit flag-o-matic libtool multilib-minimal python-any-r1 xdg-utils
DESCRIPTION="An OpenType text shaping engine"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/HarfBuzz"
if [[ ${PV} = 9999 ]] ; then
EGIT_REPO_URI="https://anongit.freedesktop.org/git/harfbuzz.git"
inherit git-r3 autotools
else
SRC_URI="https://www.freedesktop.org/software/${PN}/release/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
LICENSE="Old-MIT ISC icu"
SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
IUSE="+cairo debug +glib +graphite icu +introspection static-libs test +truetype"
REQUIRED_USE="introspection? ( glib )"
RDEPEND="
cairo? ( x11-libs/cairo:= )
glib? ( >=dev-libs/glib-2.38:2[${MULTILIB_USEDEP}] )
graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] )
icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
introspection? ( >=dev-libs/gobject-introspection-1.34:= )
truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}
test? ( ${PYTHON_DEPS} )
"
BDEPEND="
dev-util/gtk-doc-am
virtual/pkgconfig
"
# eautoreconf requires gobject-introspection-common
# ragel needed if regenerating *.hh files from *.rl
if [[ ${PV} = 9999 ]] ; then
DEPEND+="
>=dev-libs/gobject-introspection-common-1.34
dev-util/ragel
"
fi
pkg_setup() {
use test && python-any-r1_pkg_setup
if ! use debug ; then
append-cppflags -DHB_NDEBUG
fi
}
src_prepare() {
default
xdg_environment_reset
if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
# on Darwin/Solaris we need to link with g++, like automake defaults
# to, but overridden by upstream because on Linux this is not
# necessary, bug #449126
sed -i \
-e 's/\<LINK\>/CXXLINK/' \
src/Makefile.am || die
sed -i \
-e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
src/Makefile.in || die
sed -i \
-e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
test/api/Makefile.in || die
fi
[[ ${PV} == 9999 ]] && eautoreconf
elibtoolize # for Solaris
# bug 618772
append-cxxflags -std=c++14
}
multilib_src_configure() {
# harfbuzz-gobject only used for instrospection, bug #535852
local myeconfargs=(
--without-coretext
--without-fontconfig #609300
--without-uniscribe
$(use_enable static-libs static)
$(multilib_native_use_with cairo)
$(use_with glib)
$(use_with introspection gobject)
$(use_with graphite graphite2)
$(use_with icu)
$(multilib_native_use_enable introspection)
$(use_with truetype freetype)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
if multilib_is_native_abi; then
ln -s "${S}"/docs/html docs/html || die
fi
}
multilib_src_install_all() {
einstalldocs
find "${ED}" -name "*.la" -delete || die
}

View File

@ -0,0 +1,95 @@
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{7,8} )
inherit flag-o-matic libtool python-any-r1 xdg-utils
DESCRIPTION="An OpenType text shaping engine"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/HarfBuzz"
SRC_URI="https://www.freedesktop.org/software/${PN}/release/${P}.tar.xz"
KEYWORDS="*"
LICENSE="Old-MIT ISC icu"
SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
IUSE="+cairo debug +glib +graphite icu +introspection static-libs test +truetype"
REQUIRED_USE="introspection? ( glib )"
RDEPEND="
cairo? ( >=x11-libs/cairo-1.8.0:= )
glib? ( >=dev-libs/glib-2.38:2 )
graphite? ( >=media-gfx/graphite2-1.2.0:= )
icu? ( >=dev-libs/icu-51.2-r1:= )
introspection? ( >=dev-libs/gobject-introspection-1.34:= )
truetype? ( >=media-libs/freetype-2.4.2:2= )
"
DEPEND="${RDEPEND}
test? ( ${PYTHON_DEPS} )
"
BDEPEND="
dev-util/gtk-doc-am
virtual/pkgconfig
"
pkg_setup() {
use test && python-any-r1_pkg_setup
if ! use debug ; then
append-cppflags -DHB_NDEBUG
fi
}
src_prepare() {
default
xdg_environment_reset
if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
# on Darwin/Solaris we need to link with g++, like automake defaults
# to, but overridden by upstream because on Linux this is not
# necessary, bug #449126
sed -i \
-e 's/\<LINK\>/CXXLINK/' \
src/Makefile.am || die
sed -i \
-e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
src/Makefile.in || die
sed -i \
-e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
test/api/Makefile.in || die
fi
[[ ${PV} == 9999 ]] && eautoreconf
elibtoolize # for Solaris
# bug 618772
append-cxxflags -std=c++14
}
src_configure() {
# harfbuzz-gobject only used for instrospection, bug #535852
local myeconfargs=(
--without-coretext
--without-fontconfig #609300
--without-uniscribe
$(use_enable static-libs static)
$(use_with cairo)
$(use_with glib)
$(use_with introspection gobject)
$(use_with graphite graphite2)
$(use_with icu)
$(use_enable introspection)
$(use_with truetype freetype)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
ln -s "${S}"/docs/html docs/html
}
src_install() {
default
einstalldocs
find "${ED}" -name "*.la" -delete || die
}

View File

@ -0,0 +1,116 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
PYTHON_COMPAT=( python3_{6,7,8} )
inherit autotools flag-o-matic libtool multilib-minimal python-any-r1 xdg-utils
DESCRIPTION="An OpenType text shaping engine"
HOMEPAGE="https://www.freedesktop.org/wiki/Software/HarfBuzz"
if [[ ${PV} = 9999 ]] ; then
EGIT_REPO_URI="https://github.com/harfbuzz/harfbuzz.git"
inherit git-r3
else
SRC_URI="https://github.com/${PN}/${PN}/releases/download/${PV}/${P}.tar.xz"
KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
fi
LICENSE="Old-MIT ISC icu"
SLOT="0/0.9.18" # 0.9.18 introduced the harfbuzz-icu split; bug #472416
IUSE="+cairo debug +glib +graphite icu +introspection static-libs test +truetype"
RESTRICT="!test? ( test )"
REQUIRED_USE="introspection? ( glib )"
RDEPEND="
cairo? ( x11-libs/cairo:= )
glib? ( >=dev-libs/glib-2.38:2[${MULTILIB_USEDEP}] )
graphite? ( >=media-gfx/graphite2-1.2.1:=[${MULTILIB_USEDEP}] )
icu? ( >=dev-libs/icu-51.2-r1:=[${MULTILIB_USEDEP}] )
introspection? ( >=dev-libs/gobject-introspection-1.34:= )
truetype? ( >=media-libs/freetype-2.5.0.1:2=[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}
test? ( ${PYTHON_DEPS} )
"
BDEPEND="
dev-util/gtk-doc-am
virtual/pkgconfig
"
# eautoreconf requires gobject-introspection-common
# ragel needed if regenerating *.hh files from *.rl
if [[ ${PV} = 9999 ]] ; then
DEPEND+="
>=dev-libs/gobject-introspection-common-1.34
dev-util/ragel
"
fi
pkg_setup() {
use test && python-any-r1_pkg_setup
if ! use debug ; then
append-cppflags -DHB_NDEBUG
fi
}
src_prepare() {
default
xdg_environment_reset
if [[ ${CHOST} == *-darwin* || ${CHOST} == *-solaris* ]] ; then
# on Darwin/Solaris we need to link with g++, like automake defaults
# to, but overridden by upstream because on Linux this is not
# necessary, bug #449126
sed -i \
-e 's/\<LINK\>/CXXLINK/' \
src/Makefile.am || die
sed -i \
-e '/libharfbuzz_la_LINK = /s/\<LINK\>/CXXLINK/' \
src/Makefile.in || die
sed -i \
-e '/AM_V_CCLD/s/\<LINK\>/CXXLINK/' \
test/api/Makefile.in || die
fi
sed -i \
-e 's:tests/macos.tests::' \
test/shaping/data/in-house/Makefile.sources \
test/shaping/data/in-house/Makefile.in || die # bug 726120
eautoreconf
elibtoolize # for Solaris
# bug 618772
append-cxxflags -std=c++14
}
multilib_src_configure() {
# harfbuzz-gobject only used for instrospection, bug #535852
local myeconfargs=(
--without-coretext
--without-fontconfig #609300
--without-uniscribe
$(use_enable static-libs static)
$(multilib_native_use_with cairo)
$(use_with glib)
$(use_with introspection gobject)
$(use_with graphite graphite2)
$(use_with icu)
$(multilib_native_use_enable introspection)
$(use_with truetype freetype)
)
ECONF_SOURCE="${S}" econf "${myeconfargs[@]}"
if multilib_is_native_abi; then
ln -s "${S}"/docs/html docs/html || die
fi
}
multilib_src_install_all() {
einstalldocs
find "${ED}" -type f -name "*.la" -delete || die
}

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
<pkgmetadata>
<maintainer type="person">
<email>polynomial-c@gentoo.org</email>
<name>Lars Wendler</name>
</maintainer>
<maintainer type="project">
<email>office@gentoo.org</email>
<name>Gentoo Office project</name>
</maintainer>
<maintainer type="project">
<email>gnome@gentoo.org</email>
<name>Gentoo GNOME Desktop</name>
</maintainer>
<use>
<flag name="glib">Compile with GLib Unicode support</flag>
<flag name="graphite">Use graphite to render complex non-Roman writing systems</flag>
</use>
</pkgmetadata>

View File

@ -1,2 +1,10 @@
AUX libvpx-1.3.0-sparc-configure.patch 406 BLAKE2B 02b1f0484a9659fdc90eb567db517a8b63f679521ae9ab510bfaa88b9fd5e1430d0eceeb8e4a138b00cb43ac4a1db6451dd29a808367973dc885fe5b9eacd665 SHA512 159ba5577fc0eee3e958740d8607a7570f374a8f64a36f1e7832a126482ec0bb96ba2be451eefdf50d84a412a2be73ae75da3d69da78ec13dfe0e24a14685035
AUX libvpx-1.7.0-CVE-2019-9232_9325_9371_9433.patch 8035 BLAKE2B 785a8769741e5af10ce0f18f6ef9f091d1335ca1c8515c9b653d3a177a620a8b3360b7df03f058b63e42259d6e4ccb6863e0ec9acd69886627a222ea3b8beb2d SHA512 b5af677b7f8fc6c61ea1c99c094103549cbe1a0163da70f51d4c34eec40b507a7bf8f84f97ee141a15c33bfaf2a6cb36c572a08465407fb17eb9b6a1364a3819
DIST libvpx-1.7.0.tar.gz 2679797 BLAKE2B de7992adb517e375c5be2a9facf2b4a73174adcaef11185ed6d3102c2f6b73f378b0d415c5e3a4d915b3a6889bd8b31ba3e8c007a87a433a345ef7696a1dd899 SHA512 8b3b766b550f8d86907628d7ed88035f9a2612aac21542e0fd5ad35b905eb82cbe1be02a1a24afce7a3bcc4766f62611971f72724761996b392136c40a1e7ff0
DIST libvpx-1.8.2.tar.gz 5312988 BLAKE2B 4d27eb457c20e70f5b68b589962692d4938cf69e889009cd6aa74cbefb3afd53ba2733420e5a8feb1388558969d95d5a26e1fc60b9b8ef6a0be8dade7d54ee0b SHA512 da2ab0775a28ddd78654bbe46886e833d4ef7ba91867fc1427dceced735b6177eff06b24f204c075c50c3a5cadc5be6a1fb213c44df189218a543b52554f3a38
DIST libvpx-1.9.0.tar.gz 5326239 BLAKE2B 6403a5d8326235a8d27ca3727f45398556cbe72cd125ae358c22f729cc01d6a81917cca8a6e97ad0ed01e7fc04ca4212baf21f371323b93ccc8830c4a11acf91 SHA512 8d544552b35000ea5712aec220b78bb5f7dc210704b2f609365214cb95a4f5a0e343b362723d829cb4a9ac203b10d5443700ba84b28fd6b2fefbabb40663e298
DIST libvpx-testdata-1.8.2.tar.xz 422945340 BLAKE2B 117c26e77b9cda30ca083382981fd88139905fec756e362c6c8497adee26796cd9adab752b197b1eedb9f5e26970100c08fd0e3bd42184fd3e12afe927acad3e SHA512 a1616d1c199983d47157c2e99b409e781df86804048f9a7345f2e682ffc2c6d79ab95f5cf3ccb01c0db498e79686086d9c7aa2c2c07e53cb7f642afd1e38ea35
DIST libvpx-testdata-1.9.0.tar.xz 450868860 BLAKE2B aaed7f2ef4f70ff352e39be2630e3a5cd803e8d2408c4fd5c3e06e040a75d2f593a10bc267a497aa91eaceb64286e81f69e86ca0940160e4f34b62c08e91df7b SHA512 bcc89062a436d652d15d5852a842cb4985c4783855b943ab11667c022b5082887129fd9579b8da3af209a3031f95ff8dc625c380f79559db160501cd676736ea
EBUILD libvpx-1.7.0.ebuild 4063 BLAKE2B 4712537cf3ebaa5bffb0af30fa5100e3b5f20c016f8a4d9f68cb2c43317b393a00af19028f4fde48f38e1f66248da5713d653a5c27a87e1f52f29f935c951e9c SHA512 5bdce3f25d09c925de12e986294684a03209def39d630732efb12eda411f3e13a5c64c54d5f9fe51b8cad695dd43c5474eb4bd06a4c59d4dc284b5eb3be5d7d4
EBUILD libvpx-1.8.2.ebuild 3436 BLAKE2B 5c78fa513348cad6d6a1560a72fc4d0c15c746ea6f52843182f3b30d8d71e1f76ee245c95291ba9356a147de1f73f65f5a7a147aa1cd6d861fdaf5831ec7fe62 SHA512 2fc98db752426b5530a3c42b9a4a03a4e38e79d2746d42be3d5ffce155c9aa5e49f6d17a28c2535bb5fbdae8bea31fd90e0e15fa74ee51dface9b90a2357ae1a
EBUILD libvpx-1.9.0.ebuild 3464 BLAKE2B 0c9d235a33c0b764ebf7c5dac44cf78083d81d622ea6c939c897360850ec34fd0e46b24994d1a68e5daf7c1f89edcfb8fa31d3cd9d48d373bbab7900baf04595 SHA512 60595a1d6b225caa1e29ee4a22fd8064cf1e537b3610e1a016052c9fd4c1da2a603b7acb183ccf83ff23ef716ad052b8f88a2a9cc7aa11feca7eddf9070936c5

12
media-libs/libvpx/app.log Normal file
View File

@ -0,0 +1,12 @@
2020-09-07 19:21:43,046 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:21:44,648 [ ERROR]: No Samsung TV found in the network.
2020-09-07 19:21:46,489 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:21:48,091 [ ERROR]: No Samsung TV found in the network.
2020-09-07 19:21:49,638 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:21:51,240 [ ERROR]: No Samsung TV found in the network.
2020-09-07 19:21:51,940 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:21:53,542 [ ERROR]: No Samsung TV found in the network.
2020-09-07 19:21:54,019 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:21:55,621 [ ERROR]: No Samsung TV found in the network.
2020-09-07 19:21:59,630 [ DEBUG]: Program started with: ['/home/gerardo/Dev/gerardo/samsung_remote/samsung_remote.py', '-p']
2020-09-07 19:22:01,232 [ ERROR]: No Samsung TV found in the network.

View File

@ -0,0 +1,10 @@
--- a/configure
+++ b/configure
@@ -109,6 +109,7 @@
all_platforms="${all_platforms} ppc64-darwin9-gcc"
all_platforms="${all_platforms} ppc64-linux-gcc"
all_platforms="${all_platforms} sparc-solaris-gcc"
+all_platforms="${all_platforms} sparc-linux-gcc"
all_platforms="${all_platforms} x86-android-gcc"
all_platforms="${all_platforms} x86-darwin8-gcc"
all_platforms="${all_platforms} x86-darwin8-icc"

View File

@ -0,0 +1,211 @@
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;
}
}

View File

@ -0,0 +1,118 @@
# Copyright 1999-2020 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.xz libvpx-testdata
LIBVPX_TESTDATA_VER=1.8.2
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 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="doc +highbitdepth postproc static-libs svc test +threads"
REQUIRED_USE="test? ( threads )"
# Disable test phase when USE="-test"
RESTRICT="!test? ( test )"
BDEPEND="abi_x86_32? ( dev-lang/yasm )
abi_x86_64? ( dev-lang/yasm )
abi_x86_x32? ( dev-lang/yasm )
x86-fbsd? ( dev-lang/yasm )
amd64-fbsd? ( 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
--extra-cflags="${CFLAGS}"
$(use_enable postproc)
$(use_enable svc experimental)
$(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
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
}

View File

@ -0,0 +1,119 @@
# Copyright 1999-2020 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.9.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 ~s390 ~sparc ~x86 ~amd64-linux ~x86-linux"
IUSE="doc +highbitdepth postproc static-libs svc test +threads"
REQUIRED_USE="test? ( threads )"
# Disable test phase when USE="-test"
RESTRICT="!test? ( test )"
BDEPEND="abi_x86_32? ( dev-lang/yasm )
abi_x86_64? ( dev-lang/yasm )
abi_x86_x32? ( dev-lang/yasm )
x86-fbsd? ( dev-lang/yasm )
amd64-fbsd? ( 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
--extra-cflags="${CFLAGS}"
$(use_enable postproc)
$(use_enable svc experimental)
$(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
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
}

View File

@ -1 +1,4 @@
DIST libwebp-1.0.1.tar.gz 4030276 SHA512 44e0c278b4569c03c39a1e047bccd7b4270bda12feae0dadc54f8a61fd6a66be011229f1e7e853f64749bcd9ea9e8146989e2b632459b67a4aaea4a8033a1361
DIST libwebp-1.0.1.tar.gz 4030276 BLAKE2B 4ea3b31bac14c61fbedad14ed675adb4cc0deaed83f8c58f8d589ab2453a8cff33d7832acba39c673aa31cbb3d5c6b487151173d162f92a3698115833b03b694 SHA512 44e0c278b4569c03c39a1e047bccd7b4270bda12feae0dadc54f8a61fd6a66be011229f1e7e853f64749bcd9ea9e8146989e2b632459b67a4aaea4a8033a1361
DIST libwebp-1.1.0.tar.gz 4033877 BLAKE2B ac6c2267f43ba42079975938c8fecb75237a494ab8a4ca71b68a49c3d219afa92079fd94431ccbcc363a1e6aef890642a658f429b8d75cd90dd5d735fa37dcef SHA512 c8440059a985587d4876a5e7fc2d07523bc7f582a04ee5dab0ef07df32b9635b907224de2cc15246c831dd5d9215569770196626badccc3171fe2832d7cb4549
EBUILD libwebp-1.0.1.ebuild 1780 BLAKE2B afaa8d09c4ea4ae4e7c6c9a9f58620518e46b2b9946dbb148291c507c7daa568831063db2ce1dd0e7ae4539114ee3e82ce0a0f4ad1f07a739d8e6409e39c22b7 SHA512 b258c8ab17c12ccf7c5daf68edfb6bbde1fcb32f65949ecdb6ca8df8c48fd437971e4bf4ef6890b4fe4ee5438c7ad96e772fb4f20925f4012b7a6b87d80b5115
EBUILD libwebp-1.1.0.ebuild 1852 BLAKE2B a79fb48b5a141d098e38652d4da6f6b195e167faeecc78b7c14b1ff7b448fd8891de4fc10381d8a6ed3f39a6821a9aae35c77b92fa33a67b43a20d8c6f9d980d SHA512 2fbccf21e2ca844f1399a5fd0ef51f726291113708612a9639d4dcfd1f078c70cac5885f0f0c2f01cfbfd592fdfe0ef331272595fd34f4fc499841330d6477b5

View File

@ -0,0 +1,70 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=7
inherit autotools libtool multilib-minimal
MY_P="${P/_/-}"
DESCRIPTION="A lossy image compression format"
HOMEPAGE="https://developers.google.com/speed/webp/download"
SRC_URI="http://downloads.webmproject.org/releases/webp/${MY_P}.tar.gz"
LICENSE="BSD"
SLOT="0/7" # subslot = libwebp soname version
[[ "${PV}" = *_rc* ]] || \
KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~mips ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos ~m68k-mint ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris"
IUSE="cpu_flags_arm_neon cpu_flags_x86_sse2 cpu_flags_x86_sse4_1 gif +jpeg opengl +png static-libs swap-16bit-csp tiff"
# TODO: dev-lang/swig bindings in swig/ subdirectory
RDEPEND="gif? ( media-libs/giflib:= )
jpeg? ( virtual/jpeg:0= )
opengl? (
media-libs/freeglut
virtual/opengl
)
png? ( media-libs/libpng:0= )
tiff? ( media-libs/tiff:0= )"
DEPEND="${RDEPEND}"
S="${WORKDIR}/${MY_P}"
src_prepare() {
default
# Fix libtool relinking, bug 499270.
#elibtoolize
eautoreconf
}
multilib_src_configure() {
local args=(
--enable-libwebpmux
--enable-libwebpdemux
--enable-libwebpdecoder
$(use_enable static-libs static)
$(use_enable swap-16bit-csp)
$(use_enable jpeg)
$(use_enable png)
$(use_enable opengl gl)
$(use_enable tiff)
$(use_enable cpu_flags_x86_sse2 sse2)
$(use_enable cpu_flags_x86_sse4_1 sse4.1)
$(use_enable cpu_flags_arm_neon neon)
# Only used for gif2webp binary wrt #486646
$(multilib_native_use_enable gif)
)
ECONF_SOURCE="${S}" econf "${args[@]}"
}
multilib_src_install() {
emake DESTDIR="${D}" install
}
multilib_src_install_all() {
find "${ED}" -type f -name "*.la" -delete || die
dodoc AUTHORS ChangeLog doc/*.txt NEWS README{,.mux}
}