summaryrefslogtreecommitdiff
path: root/media-libs/libvpx
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libvpx')
-rw-r--r--media-libs/libvpx/Manifest2
-rw-r--r--media-libs/libvpx/files/libvpx-1.13.1-allow-fortify-source.patch17
-rw-r--r--media-libs/libvpx/libvpx-1.13.1-r1.ebuild142
3 files changed, 161 insertions, 0 deletions
diff --git a/media-libs/libvpx/Manifest b/media-libs/libvpx/Manifest
index 4f537bf2291e..e488153c62fe 100644
--- a/media-libs/libvpx/Manifest
+++ b/media-libs/libvpx/Manifest
@@ -1,6 +1,7 @@
AUX libvpx-1.12.0-configure-clang16.patch 1466 BLAKE2B e13ec892716dcd9c3940fe955a9e0feddca7ab2af5fbdfd1be6443f2d87b341e626de036244793a403e6ff18080413d2c728e5af88cdb44fb2deab95a422c70b SHA512 86180645d90be302253ac3285bb32764c783a42794f45294ece8647d77f677385afce7b633bad3b5d92c095fe607b8b566fbba960391cf3ed8157884bd5ef1c7
AUX libvpx-1.13.0-VP8-disallow-thread-count-changes.patch 1888 BLAKE2B fde61e53d8e10a3868504177d2d501ed677ceb5a3d5dd8d8c3a0a3a1b3f3f2edb1b4c31feffa6ae10b28d87f30ff0970bec75d6526743913a930651ed158ac71 SHA512 82d5119cff69896bdf8179c35cef767f83b12f9912f7032ae8f1762ef35c92a318e37e70ad9f78a4e1566b473245fe6c93ac9fe0695ef451a3910fd28e9c81fb
AUX libvpx-1.13.0-encode_api_test-add-ConfigResizeChangeThreadCount.patch 3352 BLAKE2B e20a9075c41da85f8dcdf94d3970198266ae8467c5f2742ed71d3c7b37660420cb7f37b9b4c28dc45fd5348de4ef7d1fd9ce826b6971c048f993cd8dd126a39e SHA512 bad341f03950142049645d7b0e27520edd11cf5dc944397df87049c2b55d0c708bbe42fd56c5f1a086a7fb4398663fc632730c77a1e0544d577453089c603758
+AUX libvpx-1.13.1-allow-fortify-source.patch 787 BLAKE2B d2e9d0eb8058632ddbc3261593ae5f035566115b7f2f049b7850447673e0ac56631e7a3c091975383c0b4d68efa8a85b862550e0508246a45409f683e742eaa8 SHA512 cb95a16c6de15081f3236fd45acd7ea17d68721b20a02d01ea6f905300ef7429d23b723bc0c5669fef00b13adaf7d09ccf4b68e45ff31e66df64e0c2db9289d3
AUX libvpx-1.3.0-sparc-configure.patch 406 BLAKE2B 02b1f0484a9659fdc90eb567db517a8b63f679521ae9ab510bfaa88b9fd5e1430d0eceeb8e4a138b00cb43ac4a1db6451dd29a808367973dc885fe5b9eacd665 SHA512 159ba5577fc0eee3e958740d8607a7570f374a8f64a36f1e7832a126482ec0bb96ba2be451eefdf50d84a412a2be73ae75da3d69da78ec13dfe0e24a14685035
DIST libvpx-1.12.0.tar.gz 5465627 BLAKE2B 92e61ef91ef3bb7e09f359acdef6469843921345b1008a7a24042587fbcfc72c4671fc9eb4e1bf8c1e9de0fa5506ed751dcd6934a9164a6e0fe528cfe8c23154 SHA512 dc059bc3102b75524ae29989372334b3e0f2acf1520e5a4daa4073831bb55949d82897c498fb9d2d38b59f1a66bb0ad24407d0d086b1e3a8394a4933f04f2ed0
DIST libvpx-1.13.0.tar.gz 5515327 BLAKE2B 410be36bf10011171bf15f1219066cf559c8b11e66493f9f722af7217896a467b63934a7e6819144ff697ae90e3ebbac3e5fe93e961d6a68310881c646582f11 SHA512 686cb526b46d5a054d35263b24f54e977149a244e97c95bcdd9aba2d75e045b2d51be2b7f9754302826b4c5450ee2f177f440b41c04c83b8b1661f1c14301c60
@@ -11,5 +12,6 @@ DIST libvpx-testdata-1.13.1.tar.xz 495765552 BLAKE2B 4aba008653b645c1adbfc0f4e20
EBUILD libvpx-1.12.0-r1.ebuild 4298 BLAKE2B cf4d4610f3ded71551126030e2b46a0e79aa2d0409621f4f7501f1b6f69facec0173c7d9b5b0f5391ac80cb4e797765225cd5326bb00ef52dc1dfb26e1e2ae2d SHA512 7773a3927a9355b855aa9ab43cb162f32b1661d670b36077e685d5bbbf2e0a8b7a2ced7ead593ceb4133261f2fa50ad345f74b939e7625384f57bedbeb7a568b
EBUILD libvpx-1.13.0-r1.ebuild 4371 BLAKE2B 263c9114dd8b067490ce0c36b949030cd5fc1da55dc025cfc1a52e4a3568681bec471f38aa5a023990bf952cc8fb61caa44c1578761844ca0e22f0d954f469bd SHA512 64509610ab3112638b9b4f8c1eae06a6b69f75706c9480e3d189ae2b685dd575d39afba1c805494de0258c1bdc51012a721dc1937a3a54558782b5ddaf1dfe7a
EBUILD libvpx-1.13.0.ebuild 4220 BLAKE2B 090cfb41d4efa2475a636aee90d12c8636d84ff02aaf4589ab19248dcc4ac4ac920d2640e89dc35e342dd6754878a67721ca637f650d9149a7640c72ff51da16 SHA512 8d781d69c1c82e582b4f57f2441d503b4b9c148584344ee791a76b0eba8ccf0cf159a00826adca2402f1aac76a75d4764348710f13421c8f8eed6b0807036d36
+EBUILD libvpx-1.13.1-r1.ebuild 4280 BLAKE2B 647ce943505528d4093cb0915f65f50b745b243756452f1a4a878a3fde5eada015e237ff8ae128c0c2627c7a6211b8f5f1a19cb588ec5f2fdb09baa4ab33cb0a SHA512 6e2a9f88341ca6537d0105a2d0379e9ea5f522c811f03db2bd4faf1224926979009de53f06cf95f208465346ed1b2fc954daa40f95f4c84f33b3e2ef30ed7702
EBUILD libvpx-1.13.1.ebuild 4220 BLAKE2B 00e6912d99e551a16141d9edc09ba2631189e40371c2523e5791b6262ba037857be05ab82d98fd7d300285b31d97e904f340d740e7040ee86a6bc20b76497cd3 SHA512 7b66edfec367033ef1ac4b254c7989b3ded86d1b5b0cb4d9841e3d029b331aa414c0c8554815c22185b0bb9c871b480b0020b797e6c6e420c2db8c3cef8151e6
MISC metadata.xml 655 BLAKE2B 00bcc63009898b794c7e142cd83096f779758e0d5ce274d10f97cc08f4b98f929719c01898d64137aa125c7628bb991fb128d07a490e7e7b029be6f1041e28ac SHA512 0d2dd46ed564109ca5cd841b41ccc30ddb45e5c0e416624b7e8c0895d67217cfcc71cba0d13ab96af2a898add5f1cf8feb44b6a015ff8487668055c0f288e9fc
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
+}