diff options
author | V3n3RiX <venerix@koprulu.sector> | 2024-11-14 03:02:32 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2024-11-14 03:02:32 +0000 |
commit | d3c7d3e5f9607edef1a795ccc502ab3eb3121165 (patch) | |
tree | d36ccc4ef4aa53927a8cd66bc5d3ab06fe1bdd24 /media-libs/openh264 | |
parent | 4dc2f97ed84159736ecfb5dea5485e83b27810d1 (diff) |
gentoo auto-resync : 14:11:2024 - 03:02:32
Diffstat (limited to 'media-libs/openh264')
-rw-r--r-- | media-libs/openh264/Manifest | 2 | ||||
-rw-r--r-- | media-libs/openh264/openh264-2.5.0.ebuild | 134 |
2 files changed, 136 insertions, 0 deletions
diff --git a/media-libs/openh264/Manifest b/media-libs/openh264/Manifest index c8c0f16f03ad..09bed7ac96c2 100644 --- a/media-libs/openh264/Manifest +++ b/media-libs/openh264/Manifest @@ -3,6 +3,8 @@ AUX openh264-2.3.1-pr3630.patch 5566 BLAKE2B 06e6ff75ccbcb287413752283d3b192ccd9 DIST gmp-api-Firefox114_2-e7d30b921df736a1121a0c8e0cf3ab1ce5b8a4b7.tar.gz 10915 BLAKE2B aa4b82baebbd990d94f381be4516e8780f6bc3a2104c4b899f091a9e6ec91dff9788ee6ef548d3bc07c7bf50f56347c44d01e51805f96cf9b59494889a5f7b61 SHA512 f1c75007d4f1e1ef3a11b8eb9c703935408a5e4051c8eab408e4edc09f265a71f172025269442fdab9d4c2a8b108fa69397bfbd84af4ecda22881b50de804de9 DIST openh264-2.3.1.tar.gz 60290897 BLAKE2B b4480150cfe7c44b89c7b294698db06f93d96f5f9f3ef4345108c4e360e99bc6133407cead54e720e6e74aa17ab9f2e4342287a42f19463a54eb44c9d3141c80 SHA512 fd59c767794cdfb934d692d5929e4500d78606cbf1e403bc7c7dce048cc07e40daa0794357adb856d29479427a53460c76338e156b6bbeaa36139afcd603c8e1 DIST openh264-2.4.1.tar.gz 60297304 BLAKE2B c66dbe8003072c406641b3f1453df6d8e574b5526d6748d5f4efa4921ca6a438df2e491143dc07c8f9297d253e97cd4ee2dada450845e7d9323cb31dddc6fff4 SHA512 eb99144addd2e9c352bb95e752366e104ac6b0ddc84311dc7c87dafb803f8e7fe4d1e726833d49f8cc6d3914508e19c3a25ef82637a4993e8af3f504aa005baf +DIST openh264-2.5.0.tar.gz 60301431 BLAKE2B b999b7aa152c0ef2b95f6d2ef2c8b0483ee4ca3d3c21c3cfe19c121ef09a99bb7a68bd96ec39433e744a25f3c29e016e74b1b0521190bb1a5ef00e9ac8970206 SHA512 cb6d3ca8d5277325dd64dec399421c4c62bc1fd012fe1521d7195e95ce7f59527919cf698829044dca3d9b1d8288c49b49111d01c9d2896c819da806492af838 EBUILD openh264-2.3.1-r3.ebuild 3943 BLAKE2B 75b81f216c08436ebcacf2c75574769dcbc8b182beaf64560fe31ca0d0723e5ae995245408aa4d66f494db93b91dbc77315a70081527fbdc8c33ef1b156dfa54 SHA512 992f08503dbc59e545feb4b058c6a7da5d0819aa8eb1159f995dd86c89b6f2409be811bd823553c9ed72509ee27b1d5f786bee5236912c94e942fb93f547e187 EBUILD openh264-2.4.1.ebuild 3939 BLAKE2B 37af16690d38f8d962be6e4b527d3ef40d77f71168723d15628cf7fd21c9a344ea7053cdbfdb10e80f4bc366ed12c764db6b328ab2a4b55f5442235e8733b7c0 SHA512 334f56c840b20d77a34aba1a99ef9fc07ce537e849ba21d74efb4dfecfac268fa4e63d3f0b19e14fc7b3bcf30bdaadcbf8161bc878c7ec68448ed6b4bba9f559 +EBUILD openh264-2.5.0.ebuild 3944 BLAKE2B 1cec22da51e1c184b9556fdd47a844be20dc345421ab9a2946924094777da1b391c9ed6810e21202d28bdfe28708f8b67f2d590f34d07977e14c861509ee1625 SHA512 9e8dacefc0cecffc30cbaeddc46865a17592727ff36073bae20f82be94344023a1ac04437f84eacea93027d96df32f405d46db7deecb596f4cb602ea9ca2c574 MISC metadata.xml 627 BLAKE2B aa6bcd394a1b792f8d0fc89030f34df7f0366f049f52ee11a90af301ca901a07acfc1d34a0d6d237a7d713db53b707b3b9f08d3c86574d6067f6ff7e8cf99c3a SHA512 55a7a5ee5f716e9eb1e5711d45a93fe27f057b54240511de72ade7f88c53eeac72f1bf1b524d22278c0fafbea70e1b5892262ee1b97370d70a0258bad7220e30 diff --git a/media-libs/openh264/openh264-2.5.0.ebuild b/media-libs/openh264/openh264-2.5.0.ebuild new file mode 100644 index 000000000000..663d3f9ff272 --- /dev/null +++ b/media-libs/openh264/openh264-2.5.0.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs multilib-minimal + +MOZVER=114_2 +MY_GMP_COMMIT="e7d30b921df736a1121a0c8e0cf3ab1ce5b8a4b7" + +DESCRIPTION="Cisco OpenH264 library and Gecko Media Plugin for Mozilla packages" +HOMEPAGE="https://www.openh264.org/ https://github.com/cisco/openh264" +SRC_URI="https://github.com/cisco/openh264/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz + https://github.com/mozilla/gmp-api/archive/${MY_GMP_COMMIT}.tar.gz -> gmp-api-Firefox${MOZVER}-${MY_GMP_COMMIT}.tar.gz" +LICENSE="BSD" + +# openh264 soname version. +# (2.2.0 needed a minor bump due to undocumented but breaking ABI changes, just to be sure. +# https://github.com/cisco/openh264/issues/3459 ) +SLOT="0/7" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~loong ~mips ~ppc64 ~riscv ~sparc ~x86" +IUSE="cpu_flags_arm_neon cpu_flags_x86_avx2 +plugin test utils" + +RESTRICT="bindist !test? ( test )" + +BDEPEND=" + abi_x86_32? ( 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 + "${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 + + multilib_copy_sources +} + +multilib_src_configure() { + ln -s "${WORKDIR}"/gmp-api-${MY_GMP_COMMIT} gmp-api || die +} + +emakecmd() { + CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" AR="$(tc-getAR)" \ + emake V=Yes CFLAGS_M32="" CFLAGS_M64="" CFLAGS_OPT="" \ + PREFIX="${EPREFIX}/usr" \ + LIBDIR_NAME="$(get_libdir)" \ + 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)" \ + ENABLEPIC="Yes" \ + $@ +} + +multilib_src_compile() { + local myopts="ENABLE64BIT=No" + case "${ABI}" in + s390x|alpha|*64) myopts="ENABLE64BIT=Yes";; + esac + + if use arm; then + myopts+=" USE_ASM=$(usex cpu_flags_arm_neon Yes No)" + fi + + emakecmd ${myopts} + use plugin && emakecmd ${myopts} plugin +} + +multilib_src_test() { + emakecmd test +} + +multilib_src_install() { + emakecmd DESTDIR="${D}" install-shared + + if use utils; then + newbin h264enc openh264enc + newbin h264dec openh264dec + fi + + if use plugin; then + local plugpath="${ROOT}/usr/$(get_libdir)/nsbrowser/plugins/gmp-gmp${PN}/system-installed" + insinto "${plugpath}" + doins libgmpopenh264.so* gmpopenh264.info + echo "MOZ_GMP_PATH=\"${plugpath}\"" >"${T}"/98-moz-gmp-${PN} + doenvd "${T}"/98-moz-gmp-${PN} + + cat <<PREFEOF >"${T}"/${P}.js +pref("media.gmp-gmp${PN}.autoupdate", false); +pref("media.gmp-gmp${PN}.version", "system-installed"); +PREFEOF + + insinto /usr/$(get_libdir)/firefox/defaults/pref + newins "${T}"/${P}.js ${PN}-${PV/_p*/}.js + + insinto /usr/$(get_libdir)/seamonkey/defaults/pref + newins "${T}"/${P}.js ${PN}-${PV/_p*/}.js + fi +} + +pkg_postinst() { + if use plugin; then + if [[ -z ${REPLACING_VERSIONS} ]]; then + elog "Please restart your login session, in order for the session's environment" + elog "to include the new MOZ_GMP_PATH variable." + elog "" + fi + elog "This package attempts to override the Mozilla GMPInstaller auto-update process," + elog "however even if it is not successful in doing so the profile-installed plugin" + elog "will not be used unless this package is removed. This package will take precedence" + elog "over any gmp-gmpopenh264 that may be installed in a user's profile." + elog "" + fi + + if use utils; then + elog "Utilities h264enc and h264dec are installed as openh264enc and openh264dec" + elog "to avoid file collisions with media-video/h264enc" + elog "" + fi +} |