diff options
author | Joonas Niilola <juippis@gentoo.org> | 2022-01-07 19:44:56 +0200 |
---|---|---|
committer | Joonas Niilola <juippis@gentoo.org> | 2022-01-07 19:44:56 +0200 |
commit | a8c788824e7b44ef0a406efe0a0e9471fd92c89e (patch) | |
tree | 380718465c652e7fe9951defc0d6b2a3da903318 /media-libs | |
parent | games-engines/love: sync live ebuild with 11.4 (diff) | |
download | gentoo-a8c788824e7b44ef0a406efe0a0e9471fd92c89e.tar.gz gentoo-a8c788824e7b44ef0a406efe0a0e9471fd92c89e.tar.bz2 gentoo-a8c788824e7b44ef0a406efe0a0e9471fd92c89e.zip |
media-libs/openh264: snapshot openh264 & gmp-api
Closes: https://bugs.gentoo.org/829782
Signed-off-by: Joonas Niilola <juippis@gentoo.org>
Diffstat (limited to 'media-libs')
-rw-r--r-- | media-libs/openh264/Manifest | 2 | ||||
-rw-r--r-- | media-libs/openh264/openh264-2.1.1_p20211226.ebuild | 119 |
2 files changed, 121 insertions, 0 deletions
diff --git a/media-libs/openh264/Manifest b/media-libs/openh264/Manifest index 58b333d9f9ea..708d707d78bc 100644 --- a/media-libs/openh264/Manifest +++ b/media-libs/openh264/Manifest @@ -1,3 +1,5 @@ +DIST gmp-api-Firefox39-3a01c086d1b0394238ff1b5ad22e76022830625a.tar.gz 10464 BLAKE2B db6990a55b4128c267ee5ffa4e38edd2551c862e549776b4092d5683818001366665830c6304642cdd9c2c0afe06035edebafde769693082ae7a5236cdc463e8 SHA512 a6383834391d98754177b54df31d006144b5cad952df60115fd12fb6f0c87e571a10f9ce7276b817e4137efd97ffa7bca5092e289b0eb7cde2a3ad923319e874 DIST gmp-api-Firefox39-e3935759360861812d33cbd3b713e25f1de1ecb5.tar.gz 10440 BLAKE2B 92379258f2664778baee50b99573dbeae50e723a3f7605c62a4ca3aedd9129fbd1991d7b3ead1b8a3689e71f783ded0b15dca5e6d910345c95a6f28898bbdda3 SHA512 85e4b58cc66072fad2b6dbaa65a955a8931f73eb3664f05ddca65157ac5c2547225910c36b4507d88179a95cfb35a5aff6edadd3c0fa5418529c80ae6d736f44 DIST gmp-api-Firefox39.tar.gz 16363 BLAKE2B dd92d851c4f09476f1e394fd42c5e40ea707ac6dcabc3ceee62400eb998f1c98c781fbde581253ddd8f45b7447a0c7fdc61e74ef60b6fc3397cd4bf8995154ab SHA512 da6f05c5f0540be8d4f48d25b947b21214d34a6eed365ee5fa4a38c69f77325add4be902e0dcd9d06be43914a3518ded7e4f2289dab034a24325f0bff201692a +DIST openh264-2.1.1-a8094d85f5dd5ef112fbcfec2974e18fd0387c0b.tar.gz 60276001 BLAKE2B 8774646eb7ab801cfac4b3409638d33110a7504264477d42790456d9f3d4bce55b98ce23c999b4e7d78e6730f705d4f216d4e8f48cb400613edafe729c27a835 SHA512 a29071d8dda61b346c9483a5585a640f93580896bfabae3c141c65209e4efeab0261e2cf46793aada91ac3af2386f190c96b7208ba8aff4d78957aa6c08d0154 DIST openh264-2.1.1.tar.gz 60239654 BLAKE2B d541fa686b1eb8352dbb4088fc4ef508f947660815c86b2bb7db841c927b7b9f763d7fe793f0fa1511620dbdc506c20cd5ad52740140337aa12b8c31b857a8e6 SHA512 f9c2925fa902c6278da40f68b967d25e62db7ce3541e8f5e7a0ee174204b6ecc7026b5853885c361f48ca01d71bacd585fb5b91f01f0c054ece80943f1afcf79 diff --git a/media-libs/openh264/openh264-2.1.1_p20211226.ebuild b/media-libs/openh264/openh264-2.1.1_p20211226.ebuild new file mode 100644 index 000000000000..d90f788b8ef8 --- /dev/null +++ b/media-libs/openh264/openh264-2.1.1_p20211226.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit toolchain-funcs multilib-minimal + +MOZVER=39 +MY_OPENH264_COMMIT="a8094d85f5dd5ef112fbcfec2974e18fd0387c0b" +MY_GMPAPI_COMMIT="3a01c086d1b0394238ff1b5ad22e76022830625a" +DESCRIPTION="Cisco OpenH264 library and Gecko Media Plugin for Mozilla packages" +HOMEPAGE="https://www.openh264.org/" +SRC_URI="https://github.com/cisco/openh264/archive/${MY_OPENH264_COMMIT}.tar.gz -> ${P/_p*/}-${MY_OPENH264_COMMIT}.tar.gz + https://github.com/mozilla/gmp-api/archive/${MY_GMPAPI_COMMIT}.tar.gz -> gmp-api-Firefox${MOZVER}-${MY_GMPAPI_COMMIT}.tar.gz" +LICENSE="BSD" +SLOT="0/6" # subslot = openh264 soname version +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~riscv ~sparc ~x86" +IUSE="cpu_flags_arm_neon cpu_flags_x86_avx2 +plugin utils" + +RESTRICT="bindist test" + +BDEPEND=" + abi_x86_32? ( dev-lang/nasm ) + abi_x86_64? ( dev-lang/nasm )" + +DOCS=( LICENSE CONTRIBUTORS README.md ) + +PATCHES=( "${FILESDIR}/${PN}-2.1.0-pkgconfig-pathfix.patch" ) + +S="${WORKDIR}/${PN}-${MY_OPENH264_COMMIT}" + +src_prepare() { + default + + 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_GMPAPI_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) \ + ARCH="$(tc-arch)" \ + $@ +} + +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_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 +} |