summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Hartmann <stha09@googlemail.com>2020-05-17 11:40:35 +0200
committerThomas Deutschmann <whissi@gentoo.org>2020-05-18 15:00:11 +0200
commitce9e87fc4dbe55b1820daa056d8dab68a9474275 (patch)
tree37396cb6c982d863210fd0f0abe4115e81d9fa6b /media-libs/openh264
parentapp-i18n/nkf: ppc stable wrt bug #723400 (diff)
downloadgentoo-ce9e87fc4dbe55b1820daa056d8dab68a9474275.tar.gz
gentoo-ce9e87fc4dbe55b1820daa056d8dab68a9474275.tar.bz2
gentoo-ce9e87fc4dbe55b1820daa056d8dab68a9474275.zip
media-libs/openh264: version bump to 2.1.0, EAPI 7
Closes: https://bugs.gentoo.org/667858 Package-Manager: Portage-2.3.89, Repoman-2.3.20 Signed-off-by: Stephan Hartmann <stha09@googlemail.com> Closes: https://github.com/gentoo/gentoo/pull/15847 Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'media-libs/openh264')
-rw-r--r--media-libs/openh264/Manifest1
-rw-r--r--media-libs/openh264/files/openh264-2.1.0-pkgconfig-pathfix.patch43
-rw-r--r--media-libs/openh264/openh264-2.1.0.ebuild106
3 files changed, 150 insertions, 0 deletions
diff --git a/media-libs/openh264/Manifest b/media-libs/openh264/Manifest
index fb17dc5269e4..c726618ca168 100644
--- a/media-libs/openh264/Manifest
+++ b/media-libs/openh264/Manifest
@@ -1,2 +1,3 @@
DIST gmp-api-Firefox39.tar.gz 16363 BLAKE2B dd92d851c4f09476f1e394fd42c5e40ea707ac6dcabc3ceee62400eb998f1c98c781fbde581253ddd8f45b7447a0c7fdc61e74ef60b6fc3397cd4bf8995154ab SHA512 da6f05c5f0540be8d4f48d25b947b21214d34a6eed365ee5fa4a38c69f77325add4be902e0dcd9d06be43914a3518ded7e4f2289dab034a24325f0bff201692a
DIST openh264-1.7.0.tar.gz 38681895 BLAKE2B 2e0e88bd446fdbea29ea4e863eb391dce1cc271c289165233aa1375e10ce6e60f7be7307eeb7acedd459c3170b57fbc5c7a0e9b6bd0c355be6447fb036192f35 SHA512 3e30584d6adb69c162f5b044f49155c22d44ab8e399f6bf09194593df84475b49979406f3e461d25ef1e4422c2721b975c58bc64d40a143d8493d45380ad96aa
+DIST openh264-2.1.0.tar.gz 60239088 BLAKE2B 4941399476fb6184fc09b09d9bd496d9f3fa77a424199f6cb0d61d654d6cf88b49eecc32d748b656cec663c31844165b81b7962de163441f04e5a606a48879d5 SHA512 7a65f494e6a1b5a9d96115dcd15853ebb804f0ba259b20ddab01770afde31f370536d9e365b18a6f4168eae7f57351d9fc2d3d3a0c51bb21db7b4d5c48240848
diff --git a/media-libs/openh264/files/openh264-2.1.0-pkgconfig-pathfix.patch b/media-libs/openh264/files/openh264-2.1.0-pkgconfig-pathfix.patch
new file mode 100644
index 000000000000..275322a01906
--- /dev/null
+++ b/media-libs/openh264/files/openh264-2.1.0-pkgconfig-pathfix.patch
@@ -0,0 +1,43 @@
+diff --git a/Makefile b/Makefile
+index bf398d7..c72b024 100644
+--- a/Makefile
++++ b/Makefile
+@@ -27,6 +27,7 @@ OBJ=o
+ DESTDIR=
+ LIBDIR_NAME=lib
+ SHAREDLIB_DIR=$(PREFIX)/lib
++INCLUDES_DIR=$(PREFIX)/include
+ PROJECT_NAME=openh264
+ MODULE_NAME=gmpopenh264
+ GMP_API_BRANCH=Firefox39
+@@ -285,14 +286,14 @@ endif
+ endif
+
+ $(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
+- @sed -e 's;@prefix@;$(PREFIX);' -e 's;@libdir@;$(PREFIX)/lib;' -e 's;@VERSION@;$(FULL_VERSION);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $< > $@
++ @sed -e 's;@prefix@;$(PREFIX);' -e 's;@libdir@;$(SHAREDLIB_DIR);' -e 's;@includesdir@;$(INCLUDES_DIR);' -e 's;@VERSION@;$(FULL_VERSION);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $< > $@
+
+ $(PROJECT_NAME)-static.pc: $(PROJECT_NAME).pc.in
+- @sed -e 's;@prefix@;$(PREFIX);' -e 's;@libdir@;$(PREFIX)/lib;' -e 's;@VERSION@;$(FULL_VERSION);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $< > $@
++ @sed -e 's;@prefix@;$(PREFIX);' -e 's;@libdir@;$(SHAREDLIB_DIR);' -e 's;@includesdir@;$(INCLUDES_DIR);' -e 's;@VERSION@;$(FULL_VERSION);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $< > $@
+
+ install-headers:
+- mkdir -p $(DESTDIR)$(PREFIX)/include/wels
+- install -m 644 $(SRC_PATH)/codec/api/svc/codec*.h $(DESTDIR)$(PREFIX)/include/wels
++ mkdir -p $(DESTDIR)$(INCLUDES_DIR)/wels
++ install -m 644 $(SRC_PATH)/codec/api/svc/codec*.h $(DESTDIR)$(INCLUDES_DIR)/wels
+
+ install-static-lib: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) install-headers
+ mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)
+diff --git a/openh264.pc.in b/openh264.pc.in
+index f86225c..bee78bc 100644
+--- a/openh264.pc.in
++++ b/openh264.pc.in
+@@ -1,6 +1,6 @@
+ prefix=@prefix@
+ libdir=@libdir@
+-includedir=${prefix}/include
++includedir=@includesdir@
+
+ Name: OpenH264
+ Description: OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC.
diff --git a/media-libs/openh264/openh264-2.1.0.ebuild b/media-libs/openh264/openh264-2.1.0.ebuild
new file mode 100644
index 000000000000..adcec1df1fb6
--- /dev/null
+++ b/media-libs/openh264/openh264-2.1.0.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+inherit toolchain-funcs multilib-minimal
+
+MOZVER=39
+DESCRIPTION="Cisco OpenH264 library and Gecko Media Plugin for Mozilla packages"
+HOMEPAGE="https://www.openh264.org/"
+SRC_URI="https://github.com/cisco/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz
+ https://github.com/mozilla/gmp-api/archive/Firefox${MOZVER}.tar.gz -> gmp-api-Firefox${MOZVER}.tar.gz"
+LICENSE="BSD"
+SLOT="0/5" # subslot = openh264 soname version
+KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="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" )
+
+src_prepare() {
+ default
+
+ multilib_copy_sources
+}
+
+multilib_src_configure() {
+ ln -s "${WORKDIR}"/gmp-api-Firefox${MOZVER} gmp-api || die
+}
+
+emakecmd() {
+ CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" \
+ 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) \
+ $@
+}
+
+multilib_src_compile() {
+ local mybits="ENABLE64BIT=No"
+ case "${ABI}" in
+ s390x|alpha|*64) mybits="ENABLE64BIT=Yes";;
+ esac
+
+ emakecmd ${mybits}
+ use plugin && emakecmd ${mybits} 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="${EROOT}/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
+ doins "${T}"/${P}.js
+
+ insinto /usr/$(get_libdir)/seamonkey/defaults/pref
+ doins "${T}"/${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
+}