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 /media-libs/openh264/openh264-1.5.0.ebuild
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
Diffstat (limited to 'media-libs/openh264/openh264-1.5.0.ebuild')
-rw-r--r--media-libs/openh264/openh264-1.5.0.ebuild93
1 files changed, 93 insertions, 0 deletions
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
+}