summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Stakenvicius <axs@gentoo.org>2016-02-17 12:43:12 -0500
committerIan Stakenvicius <axs@gentoo.org>2016-02-17 12:43:52 -0500
commit4d5c795719dd54884d02e1379b8a10eb6c830418 (patch)
treec7197c830a0f64030653399e63faaa01ebe1af63
parentmedia-libs/openh264: drop old (diff)
downloadgentoo-4d5c795719dd54884d02e1379b8a10eb6c830418.tar.gz
gentoo-4d5c795719dd54884d02e1379b8a10eb6c830418.tar.bz2
gentoo-4d5c795719dd54884d02e1379b8a10eb6c830418.zip
media-libs/openh264: version bump
Release Notes: https://github.com/cisco/openh264/releases/tag/v1.5.0 Package-Manager: portage-2.2.26
-rw-r--r--media-libs/openh264/Manifest2
-rw-r--r--media-libs/openh264/files/openh264-1.5.0-pkgconfig-pathfix.patch40
-rw-r--r--media-libs/openh264/openh264-1.5.0.ebuild93
3 files changed, 135 insertions, 0 deletions
diff --git a/media-libs/openh264/Manifest b/media-libs/openh264/Manifest
index 5096e9f15317..86032b874512 100644
--- a/media-libs/openh264/Manifest
+++ b/media-libs/openh264/Manifest
@@ -1,2 +1,4 @@
DIST gmp-api-Firefox38.tar.gz 16209 SHA256 6b156afe850c0d6faf0492ca5feeff4358e50ddc5ce3022ddcc6905a5bd21c80 SHA512 9aecbc84b1ba2fcfcb10c56680d92a72dd55f7ef7b8a68a3950dbce65fb7eb2c5e6a211149889f618bef2468ba1f3f8c01dc63e86e0a30d9295b019b75657eb8 WHIRLPOOL c12eb175ddf11f0ece400cc34bf9d5e690494fd4630c12667eed3765b66a625a1f9a3b41e20fc5a0c0f614eafbd75b6ddd5bd2a827077cfaac507a3f41990c42
+DIST gmp-api-Firefox39.tar.gz 16363 SHA256 ecb461af06f4d8f1c16330e78e73775f5656767ced77ac2b5e4bb9413ca86ec4 SHA512 da6f05c5f0540be8d4f48d25b947b21214d34a6eed365ee5fa4a38c69f77325add4be902e0dcd9d06be43914a3518ded7e4f2289dab034a24325f0bff201692a WHIRLPOOL fd661b7798970570053789577744bb12ab6354e3bcb70f64e2ac5aa73367f4a958feb3fcef343ef025aa15d6201af40d6f80a0f565e23340e1001f2259e073ce
DIST openh264-1.4.0.tar.gz 37681189 SHA256 a1b9a7a7f1ee204793c613789a505f0971bc2b03b3dbd8f05d9c4a3f3b900a22 SHA512 8192494698cb5557331be56ecbe2b7b143e0ed95739a69a88bdb34a58f66710ef1cd9234f1e98c9b16432a41a3243634e6ca63c58119315f2f9360cb2959e42b WHIRLPOOL 0d9f1f728fbceef35a5e22a6fe4c9dd42fbf84d41fe14e938194438542af182d3994694ffcd68f58798f14c8096b49b0aecad23f58ec6bdbc02de43b8d783532
+DIST openh264-1.5.0.tar.gz 37851166 SHA256 98077bd5d113c183ce02b678733b0cada2cf36750370579534c4d70f0b6c27b5 SHA512 30599fed5e928af7dfec079d101a22885e52874c1d7db91ff289b989a9a20548b6bbd5d25e4e546efedd4e5aba97cbc42b1e847970b93116d86efc7af394aeaf WHIRLPOOL 038ad081e0702f198ddc519bdaef7d91254179f8f4febdb2b453ab20c40e47cd759a7b5c881065ac0523d78fc95564aa132e9a4f4b565951613aeb2a46ce74ef
diff --git a/media-libs/openh264/files/openh264-1.5.0-pkgconfig-pathfix.patch b/media-libs/openh264/files/openh264-1.5.0-pkgconfig-pathfix.patch
new file mode 100644
index 000000000000..a39823aeee77
--- /dev/null
+++ b/media-libs/openh264/files/openh264-1.5.0-pkgconfig-pathfix.patch
@@ -0,0 +1,40 @@
+--- a/Makefile 2015-10-19 21:49:05.000000000 -0400
++++ b/Makefile 2016-02-17 12:16:06.102945631 -0500
+@@ -27,6 +27,7 @@
+ DESTDIR=
+ LIBDIR_NAME=lib
+ SHAREDLIB_DIR=$(PREFIX)/lib
++INCLUDES_DIR=$(PREFIX)/include
+ PROJECT_NAME=openh264
+ MODULE_NAME=gmpopenh264
+ GMP_API_BRANCH=Firefox39
+@@ -244,14 +245,14 @@
+ endif
+
+ $(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
+- @sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $< > $@
++ @sed -e 's;@prefix@;$(PREFIX);' -e 's;@sharedlibdir@;$(SHAREDLIB_DIR);' -e 's;@includesdir@;$(INCLUDES_DIR);' -e 's;@VERSION@;$(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;@VERSION@;$(VERSION);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $< > $@
++ @sed -e 's;@prefix@;$(PREFIX);' -e 's;@sharedlibdir@;$(SHAREDLIB_DIR);' -e 's;@includesdir@;$(INCLUDES_DIR);' -e 's;@VERSION@;$(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)
+--- a/openh264.pc.in 2015-10-19 21:49:05.000000000 -0400
++++ b/openh264.pc.in 2016-02-17 12:17:03.792768147 -0500
+@@ -1,6 +1,6 @@
+ prefix=@prefix@
+-libdir=${prefix}/lib
+-includedir=${prefix}/include
++libdir=@sharedlibdir@
++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-1.5.0.ebuild b/media-libs/openh264/openh264-1.5.0.ebuild
new file mode 100644
index 000000000000..335507477729
--- /dev/null
+++ b/media-libs/openh264/openh264-1.5.0.ebuild
@@ -0,0 +1,93 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit nsplugins multilib-minimal
+
+MOZVER=39
+DESCRIPTION="Cisco OpenH264 library and Gecko Media Plugin for Mozilla packages"
+HOMEPAGE="http://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"
+KEYWORDS="~amd64 ~x86"
+IUSE="+plugin utils"
+
+RESTRICT="bindist"
+
+RDEPEND="!<www-client/firefox-${MOZVER}"
+DEPEND="dev-lang/nasm"
+
+DOCS=( LICENSE CONTRIBUTORS README.md )
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-pkgconfig-pathfix.patch
+ 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}" \
+ $@
+}
+
+multilib_src_compile() {
+ local mybits="ENABLE64BIT=No"
+ case "${ABI}" in
+ s390x|alpha|*64) mybits="ENABLE64BIT=Yes";;
+ esac
+
+ emakecmd ${mybits} ${tgt}
+ use plugin && emakecmd ${mybits} plugin
+}
+
+multilib_src_install() {
+ emakecmd DESTDIR="${D}" install-shared
+
+ use utils && dobin h264{enc,dec}
+
+ if use plugin; then
+ local plugpath="usr/$(get_libdir)/${PLUGINS_DIR}/gmp-gmp${PN}/system-installed"
+ insinto "/${plugpath}"
+ doins libgmpopenh264.so* gmpopenh264.info
+ echo "MOZ_GMP_PATH=\"${EROOT}${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
+}