From 408c68e5e3f5925925eb35d308387b373c7f7b5b Mon Sep 17 00:00:00 2001 From: Alexis Ballier Date: Fri, 16 Oct 2015 13:12:34 +0200 Subject: [PATCH] media-libs/openh264: Add patch to install pkgconfig files into proper libdir. Otherwise, multilib builds trying to use it do not find it. Package-Manager: portage-2.2.23 --- .../openh264/files/pkgconfig_install.patch | 15 +++ media-libs/openh264/openh264-1.4.0-r1.ebuild | 93 +++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 media-libs/openh264/files/pkgconfig_install.patch create mode 100644 media-libs/openh264/openh264-1.4.0-r1.ebuild diff --git a/media-libs/openh264/files/pkgconfig_install.patch b/media-libs/openh264/files/pkgconfig_install.patch new file mode 100644 index 000000000000..50d8715ce6f3 --- /dev/null +++ b/media-libs/openh264/files/pkgconfig_install.patch @@ -0,0 +1,15 @@ +Index: openh264-1.4.0/Makefile +=================================================================== +--- openh264-1.4.0.orig/Makefile ++++ openh264-1.4.0/Makefile +@@ -253,8 +253,8 @@ install-shared: $(LIBPREFIX)$(PROJECT_NA + if [ "$(SHAREDLIBSUFFIXVER)" != "$(SHAREDLIBSUFFIX)" ]; then \ + cp -a $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(DESTDIR)/$(SHAREDLIB_DIR); \ + fi +- mkdir -p $(DESTDIR)/$(PREFIX)/lib/pkgconfig +- install -m 644 $(PROJECT_NAME).pc $(DESTDIR)/$(PREFIX)/lib/pkgconfig ++ mkdir -p $(DESTDIR)/$(SHAREDLIB_DIR)/pkgconfig ++ install -m 644 $(PROJECT_NAME).pc $(DESTDIR)/$(SHAREDLIB_DIR)/pkgconfig + ifneq ($(EXTRA_LIBRARY),) + install -m 644 $(EXTRA_LIBRARY) $(DESTDIR)/$(PREFIX)/lib + endif diff --git a/media-libs/openh264/openh264-1.4.0-r1.ebuild b/media-libs/openh264/openh264-1.4.0-r1.ebuild new file mode 100644 index 000000000000..9e3c95d3dd32 --- /dev/null +++ b/media-libs/openh264/openh264-1.4.0-r1.ebuild @@ -0,0 +1,93 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit nsplugins multilib-minimal + +MOZVER=38 +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="!"${T}"/98-moz-gmp-${PN} + doenvd "${T}"/98-moz-gmp-${PN} + + cat <"${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 +} -- 2.26.2