summaryrefslogtreecommitdiff
path: root/media-libs
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs')
-rw-r--r--media-libs/Manifest.gzbin68061 -> 68058 bytes
-rw-r--r--media-libs/openh264/Manifest3
-rw-r--r--media-libs/openh264/files/openh264-2.3.1-pr3630.patch159
-rw-r--r--media-libs/openh264/openh264-2.3.1-r1.ebuild20
4 files changed, 177 insertions, 5 deletions
diff --git a/media-libs/Manifest.gz b/media-libs/Manifest.gz
index dac0b0ecb242..5e0d024604d0 100644
--- a/media-libs/Manifest.gz
+++ b/media-libs/Manifest.gz
Binary files differ
diff --git a/media-libs/openh264/Manifest b/media-libs/openh264/Manifest
index e3b060847a0b..1b4f192f2154 100644
--- a/media-libs/openh264/Manifest
+++ b/media-libs/openh264/Manifest
@@ -1,5 +1,6 @@
AUX openh264-2.3.0-pkgconfig-pathfix.patch 2023 BLAKE2B 9d380302efe14b45959123f69591aed9f552a954dd9f2f079ba1dc95edfc59869db9ece0ea65d52e58201829e0e4bb791f0380b36b35d288b40769c1c144005e SHA512 24fb7e1bf54d5c1512dab9f5b6cbd61863022d99a1a5d07d5a69037ad3b3857f2ac01fdfae4a1477f1b200c8a4b107247fb9f46af1219e71220e55167f1620ec
+AUX openh264-2.3.1-pr3630.patch 5566 BLAKE2B 06e6ff75ccbcb287413752283d3b192ccd9ff6172bf2245f28eb219b3c8384f900a54e0d0992589b234e14080dfcdc3c026635ba6070597197f93e8514a77fd8 SHA512 7acc909c8d78e8b9cb366d822b970d4e164d40e0224fe3a07d7750b3b7c3a30ac40afc1bbaac4844d6fbdb6c144830004b12dc3bd64d2574338cebea952648a0
DIST gmp-api-Firefox39-3a01c086d1b0394238ff1b5ad22e76022830625a.tar.gz 10464 BLAKE2B db6990a55b4128c267ee5ffa4e38edd2551c862e549776b4092d5683818001366665830c6304642cdd9c2c0afe06035edebafde769693082ae7a5236cdc463e8 SHA512 a6383834391d98754177b54df31d006144b5cad952df60115fd12fb6f0c87e571a10f9ce7276b817e4137efd97ffa7bca5092e289b0eb7cde2a3ad923319e874
DIST openh264-2.3.1.tar.gz 60290897 BLAKE2B b4480150cfe7c44b89c7b294698db06f93d96f5f9f3ef4345108c4e360e99bc6133407cead54e720e6e74aa17ab9f2e4342287a42f19463a54eb44c9d3141c80 SHA512 fd59c767794cdfb934d692d5929e4500d78606cbf1e403bc7c7dce048cc07e40daa0794357adb856d29479427a53460c76338e156b6bbeaa36139afcd603c8e1
-EBUILD openh264-2.3.1-r1.ebuild 3623 BLAKE2B 24cd5a158dcb25d0ed87b54fe62b3fa552ea8b89f5f007fb96d8274923dce770a65627c4f39c49680a7d26c953f1ff8a7c857cb23d6e71adc48d10a8303038f9 SHA512 4f37e69ba640d24999623d1c0492547d3912694c633be34412b130593e527dd712d8bf6de1f047584f9a1230281078d2239a4c171f6d96d7150fb1e906bc1f5d
+EBUILD openh264-2.3.1-r1.ebuild 3919 BLAKE2B 323b0d077810242541f73dd22a02d87ce3c56fdedac5e5bf49958524bbb66a8deb94470ae645c33938b8ac0f07e6b9913830b1c27986e1abec0aab1f740c93a9 SHA512 88bc1b4a9dc06e153ddc706cc3d99147d465bd88cfcc3e0e50345a3a1891ececa05bfa6bab78982d176572d22ff8e453ab1d0ea60f456e60d2ea45c19c0ae649
MISC metadata.xml 569 BLAKE2B 14a021fba978f0156bab46178d05a6b9f8f67fdeba784d587759207fe60ea1d74a383eec3fc40662c39d33fcecb71d8cafe7eb6354383c253e0a3f7f1e94feae SHA512 ceb77117c6a50f16640b329368c86db26127b8e501475dbaca4c53ba41315b0fc7161f6d9268cb86d1f6dbf2cf867e2bb0e6b5f45240ab3227b99b734c344efd
diff --git a/media-libs/openh264/files/openh264-2.3.1-pr3630.patch b/media-libs/openh264/files/openh264-2.3.1-pr3630.patch
new file mode 100644
index 000000000000..c9d0c3f2a98b
--- /dev/null
+++ b/media-libs/openh264/files/openh264-2.3.1-pr3630.patch
@@ -0,0 +1,159 @@
+https://bugs.gentoo.org/show_bug.cgi?id=896138
+https://github.com/cisco/openh264/pull/3630
+
+From f60e7d9bdc39e51b644db7624256116202cac992 Mon Sep 17 00:00:00 2001
+From: matoro <matoro@users.noreply.github.com>
+Date: Thu, 2 Mar 2023 17:39:45 -0500
+Subject: [PATCH] Use environment for mips feature detection
+
+The -march= option is perfectly happy to emit code to run on a processor
+different than the one on which it is being compiled. This results in
+misdetection of mips features because the test compiles specify that a
+given extension should be emitted, but this does not check whether or
+not this corresponds to the subarchitecture targeted in CFLAGS by the
+rest of the build.
+
+$ echo "void main(void){ __asm__ volatile(\"punpcklhw \$f0, \$f0, \$f0\"); }" > test.c
+$ CFLAGS="-march=loongson3a" make test
+cc -march=loongson3a test.c -o test
+$ ./test
+Illegal instruction
+$ CFLAGS="-march=native" make -B test
+cc -march=native test.c -o test
+/tmp/ccLbeyM1.s: Assembler messages:
+/tmp/ccLbeyM1.s:25: Error: opcode not supported on this processor: octeon2 (mips64r2) `punpcklhw $f0,$f0,$f0'
+make: *** [<builtin>: test] Error 1
+
+This leads to -march=loongson3a getting appended to CFLAGS, which may
+conflict with previously specified -march= levels for the build, or
+other options. Calling make in the test will use whatever CC/CFLAGS are
+specified in the environment to determine whether the actual compile
+command line to be used in the build supports these features.
+
+Fixes: 8b942ee ("Adjust the mmi/msa detection mode for mips platform.")
+---
+ build/arch.mk | 8 ++++----
+ build/loongarch-simd-check.sh | 17 +++++++----------
+ build/mips-simd-check.sh | 17 +++++++----------
+ 3 files changed, 18 insertions(+), 24 deletions(-)
+
+diff --git a/build/arch.mk b/build/arch.mk
+index 4e1538c45c..80983686f7 100644
+--- a/build/arch.mk
++++ b/build/arch.mk
+@@ -39,14 +39,14 @@ ASM_ARCH = mips
+ ASMFLAGS += -I$(SRC_PATH)codec/common/mips/
+ #mmi
+ ifeq ($(ENABLE_MMI), Yes)
+-ENABLE_MMI = $(shell $(SRC_PATH)build/mips-simd-check.sh $(CC) mmi)
++ENABLE_MMI = $(shell CC="$(CC)" CFLAGS="$(CFLAGS)" $(SRC_PATH)build/mips-simd-check.sh mmi)
+ ifeq ($(ENABLE_MMI), Yes)
+ CFLAGS += -DHAVE_MMI -march=loongson3a
+ endif
+ endif
+ #msa
+ ifeq ($(ENABLE_MSA), Yes)
+-ENABLE_MSA = $(shell $(SRC_PATH)build/mips-simd-check.sh $(CC) msa)
++ENABLE_MSA = $(shell CC="$(CC)" CFLAGS="$(CFLAGS)" $(SRC_PATH)build/mips-simd-check.sh msa)
+ ifeq ($(ENABLE_MSA), Yes)
+ CFLAGS += -DHAVE_MSA -mmsa
+ endif
+@@ -63,14 +63,14 @@ ASM_ARCH = loongarch
+ ASMFLAGS += -I$(SRC_PATH)codec/common/loongarch/
+ #lsx
+ ifeq ($(ENABLE_LSX), Yes)
+-ENABLE_LSX = $(shell $(SRC_PATH)build/loongarch-simd-check.sh $(CC) lsx)
++ENABLE_LSX = $(shell CC="$(CC)" CFLAGS="$(CFLAGS)" $(SRC_PATH)build/loongarch-simd-check.sh lsx)
+ ifeq ($(ENABLE_LSX), Yes)
+ CFLAGS += -DHAVE_LSX -mlsx
+ endif
+ endif
+ #lasx
+ ifeq ($(ENABLE_LASX), Yes)
+-ENABLE_LASX = $(shell $(SRC_PATH)build/loongarch-simd-check.sh $(CC) lasx)
++ENABLE_LASX = $(shell CC="$(CC)" CFLAGS="$(CFLAGS)" $(SRC_PATH)build/loongarch-simd-check.sh lasx)
+ ifeq ($(ENABLE_LASX), Yes)
+ CFLAGS += -DHAVE_LASX -mlasx
+ endif
+diff --git a/build/loongarch-simd-check.sh b/build/loongarch-simd-check.sh
+index 597ddcdc22..2e609443b9 100755
+--- a/build/loongarch-simd-check.sh
++++ b/build/loongarch-simd-check.sh
+@@ -8,29 +8,26 @@
+ # lsx, lasx (maybe more in the future).
+ #
+ # --usage:
+-# ./loongarch-simd-check.sh $(CC) lsx
+-# or ./loongarch-simd-check.sh $(CC) lasx
++# ./loongarch-simd-check.sh lsx
++# or ./loongarch-simd-check.sh lasx
+ #
+ # date: 11/23/2021 Created
+ #***************************************************************************************
+
+ TMPC=$(mktemp tmp.XXXXXX.c)
+-TMPO=$(mktemp tmp.XXXXXX.o)
+-if [ $2 == "lsx" ]
++if [ $1 == "lsx" ]
+ then
+ echo "void main(void){ __asm__ volatile(\"vadd.b \$vr0, \$vr1, \$vr1\"); }" > $TMPC
+- $1 -mlsx $TMPC -o $TMPO &> /dev/null
+- if test -s $TMPO
++ if make -f /dev/null "${TMPC/.c/.o}"
+ then
+ echo "Yes"
+ fi
+-elif [ $2 == "lasx" ]
++elif [ $1 == "lasx" ]
+ then
+ echo "void main(void){ __asm__ volatile(\"xvadd.b \$xr0, \$xr1, \$xr1\"); }" > $TMPC
+- $1 -mlasx $TMPC -o $TMPO &> /dev/null
+- if test -s $TMPO
++ if make -f /dev/null "${TMPC/.c/.o}"
+ then
+ echo "Yes"
+ fi
+ fi
+-rm -f $TMPC $TMPO
++rm -f $TMPC
+diff --git a/build/mips-simd-check.sh b/build/mips-simd-check.sh
+index d0d72f9edd..5ff1eb432c 100755
+--- a/build/mips-simd-check.sh
++++ b/build/mips-simd-check.sh
+@@ -4,29 +4,26 @@
+ # mmi, msa (maybe more in the future).
+ #
+ # --usage:
+-# ./mips-simd-check.sh $(CC) mmi
+-# or ./mips-simd-check.sh $(CC) msa
++# ./mips-simd-check.sh mmi
++# or ./mips-simd-check.sh msa
+ #
+ # date: 10/17/2019 Created
+ #**********************************************************************************
+
+ TMPC=$(mktemp tmp.XXXXXX.c)
+-TMPO=$(mktemp tmp.XXXXXX.o)
+-if [ $2 == "mmi" ]
++if [ $1 == "mmi" ]
+ then
+ echo "void main(void){ __asm__ volatile(\"punpcklhw \$f0, \$f0, \$f0\"); }" > $TMPC
+- $1 -march=loongson3a $TMPC -o $TMPO &> /dev/null
+- if test -s $TMPO
++ if make -f /dev/null "${TMPC/.c/.o}" &> /dev/null
+ then
+ echo "Yes"
+ fi
+-elif [ $2 == "msa" ]
++elif [ $1 == "msa" ]
+ then
+ echo "void main(void){ __asm__ volatile(\"addvi.b \$w0, \$w1, 1\"); }" > $TMPC
+- $1 -mmsa $TMPC -o $TMPO &> /dev/null
+- if test -s $TMPO
++ if make -f /dev/null "${TMPC/.c/.o}" &> /dev/null
+ then
+ echo "Yes"
+ fi
+ fi
+-rm -f $TMPC $TMPO
++rm -f $TMPC
diff --git a/media-libs/openh264/openh264-2.3.1-r1.ebuild b/media-libs/openh264/openh264-2.3.1-r1.ebuild
index 0bb5fa26460b..bd16d2a68ecf 100644
--- a/media-libs/openh264/openh264-2.3.1-r1.ebuild
+++ b/media-libs/openh264/openh264-2.3.1-r1.ebuild
@@ -19,21 +19,28 @@ LICENSE="BSD"
# https://github.com/cisco/openh264/issues/3459 )
SLOT="0/7"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ppc ppc64 ~riscv sparc x86"
-IUSE="cpu_flags_arm_neon cpu_flags_x86_avx2 +plugin utils"
+IUSE="cpu_flags_arm_neon cpu_flags_x86_avx2 +plugin test utils"
-RESTRICT="bindist test"
+RESTRICT="bindist !test? ( test )"
BDEPEND="
abi_x86_32? ( dev-lang/nasm )
- abi_x86_64? ( dev-lang/nasm )"
+ abi_x86_64? ( dev-lang/nasm )
+ test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
DOCS=( LICENSE CONTRIBUTORS README.md )
-PATCHES=( "${FILESDIR}"/openh264-2.3.0-pkgconfig-pathfix.patch )
+PATCHES=(
+ "${FILESDIR}"/openh264-2.3.0-pkgconfig-pathfix.patch
+ "${FILESDIR}"/${PN}-2.3.1-pr3630.patch
+)
src_prepare() {
default
+ ln -svf "/dev/null" "build/gtest-targets.mk" || die
+ sed -i -e 's/$(LIBPREFIX)gtest.$(LIBSUFFIX)//g' Makefile || die
+
sed -i -e 's/ | generate-version//g' Makefile || die
sed -e 's|$FULL_VERSION|""|g' codec/common/inc/version_gen.h.template > \
codec/common/inc/version_gen.h
@@ -53,6 +60,7 @@ emakecmd() {
SHAREDLIB_DIR="${EPREFIX}/usr/$(get_libdir)" \
INCLUDES_DIR="${EPREFIX}/usr/include/${PN}" \
HAVE_AVX2=$(usex cpu_flags_x86_avx2 Yes No) \
+ HAVE_GTEST=$(usex test Yes No) \
ARCH="$(tc-arch)" \
$@
}
@@ -71,6 +79,10 @@ multilib_src_compile() {
use plugin && emakecmd ${myopts} plugin
}
+multilib_src_test() {
+ emakecmd test
+}
+
multilib_src_install() {
emakecmd DESTDIR="${D}" install-shared