Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 552158 - =media-libs/openh264-1.4.0 version bump
Summary: =media-libs/openh264-1.4.0 version bump
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Ian Stakenvicius (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD
Depends on:
Blocks:
 
Reported: 2015-06-15 04:43 UTC by Coacher
Modified: 2015-07-16 20:25 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
openh264-1.4.0.ebuild (openh264-1.4.0.ebuild,2.18 KB, text/plain)
2015-06-17 23:50 UTC, Coacher
Details
openh264-1.4.0.ebuild (openh264-1.4.0.ebuild,2.21 KB, text/plain)
2015-06-18 19:25 UTC, Coacher
Details
diff-v1.3.1-v1.4.0 (diff,3.37 KB, patch)
2015-06-18 19:30 UTC, Coacher
Details | Diff
metadata.xml (metadata.xml,482 bytes, text/plain)
2015-06-18 19:30 UTC, Coacher
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Coacher 2015-06-15 04:43:12 UTC
Hello.

openh264-1.4.0 was released recently, see [0]. Also it appears to support gmp-api used in Firefox-38. Please bump.

[0]: https://github.com/cisco/openh264/releases/tag/v1.4.0

Reproducible: Always
Comment 1 Coacher 2015-06-17 23:50:16 UTC
Created attachment 405302 [details]
openh264-1.4.0.ebuild

Okay, I've tried to copy ebuild for 1.3.1 with bumped MOZVER and it didn't work. It compiled, but did not install any actual libs, only broken symlinks. So I had to edit it and on the way I made a few changes that I think were necessary.

Here's the updated ebuild for 1.4.0. It compiles and installs fine on my amd64 machine (www-client/firefox-38.0.5 properly lists openh264 under "Plugins").

Diff output (see comments below):
--- a/media-libs/openh264/openh264-1.3.1.ebuild
+++ b/media-libs/openh264/openh264-1.4.0.ebuild
@@ -1,16 +1,19 @@
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/media-libs/openh264/openh264-1.3.1.ebuild,v 1.1 2015/02/26 21:18:49 axs Exp $
+# $Header: $
 
 EAPI=5
 
 inherit nsplugins
 
-MOZVER=36
-DESCRIPTION="Cisco OpenH264 library and Gecko Media Plugin for mozilla packages"
+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"
+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"
@@ -21,38 +24,40 @@ RESTRICT="bindist"
 RDEPEND="!<www-client/firefox-${MOZVER}"
 DEPEND="dev-lang/nasm"
 
-DOCS=( LICENSE CONTRIBUTORS README.md )
+DOCS=( README.md RELEASES )
 
 src_prepare() {
-	ln -s ../gmp-api-Firefox${MOZVER} gmp-api
+	ln -s "${WORKDIR}/gmp-api-Firefox${MOZVER}" gmp-api || die
 }
 
 src_compile() {
-	local mybits="ENABLE64BIT=No"
-	case "${ABI}" in
-		s390x|alpha|*64) mybits="ENABLE64BIT=Yes";;
-	esac
+	local mybits="ENABLE64BIT=Yes"
+	use x86 && mybits="ENABLE64BIT=No"
+
 	emake V=Yes ${mybits}
 	use plugin && emake V=Yes ${mybits} plugin
 }
 
 src_install() {
-	emake PREFIX="${ED}usr" LIBPREFIX="${ED}usr/$(get_libdir)/" \
-		install-headers
+	emake PREFIX="${ED}usr" LIBPREFIX="${ED}usr/$(get_libdir)/" install-headers
 
-	dolib libopenh264.so
+	dolib libopenh264.so libopenh264.so.0
 
 	if use plugin; then
 		local plugpath="usr/$(get_libdir)/${PLUGINS_DIR}/gmp-gmp${PN}/system-installed"
+
+		exeinto "/${plugpath}"
+		doexe libgmpopenh264.so
 		insinto "/${plugpath}"
-		doins libgmpopenh264.so gmpopenh264.info
-		echo "MOZ_GMP_PATH=\"${EROOT}${plugpath}\"" >"${T}"/98-moz-gmp-${PN}
+		doins gmpopenh264.info
+
+		echo "MOZ_GMP_PATH=\"${EROOT}${plugpath}\"" > "${T}"/98-moz-gmp-${PN} || die
 		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
+		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
@@ -69,9 +74,9 @@ pkg_postinst() {
 			elog "to include the new MOZ_GMP_PATH variable."
 			elog ""
 		fi
-		elog "This package attempts to override the mozilla GMPInstaller auto-update process,"
+		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 "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
Comment 2 Coacher 2015-06-18 00:04:33 UTC
Changelog:
 - bump MOZVER to 38
 - fix Mozilla's name to start with a capital 'M' in messages and description
 - cleanup DOCS
 - create symlink using an absolute path in src_prepare since we are stepping
   out of ${S}, add `die`
 - avoid pointless `case..esac` in src_compile
 - fix `dolib` call to actually install libopenh264.so binary in src_install
 - install libgmpopenh264.so using `doexe` in src_install since it is executable
 - add missing `die` after `echo` in src_install
 - make heredoc in src_install readable using `<<-` and leading tabs
 - remove extra whitespace in elog

These changes were necessary to make ebuild working and readable for me. Some of them may not be so appealing to you, that's fine. But please merge the necessary ones.
Comment 3 Coacher 2015-06-18 00:12:18 UTC
https://mozilla.github.io/webrtc-landing/pc_test_h264.html works with 'Require H.264 video' option ticked and the attached ebuild.
Comment 4 Coacher 2015-06-18 19:25:36 UTC
Created attachment 405338 [details]
openh264-1.4.0.ebuild

I went a bit further and added the 'utils' USE flag to install encoder and decoder command-line utilities.
Comment 5 Coacher 2015-06-18 19:30:21 UTC
Created attachment 405340 [details, diff]
diff-v1.3.1-v1.4.0

Here is the diff. I've also removed the explicit `V=Yes` emake argument since it is the default value and is not changed anywhere in sources.
Comment 6 Coacher 2015-06-18 19:30:46 UTC
Created attachment 405342 [details]
metadata.xml
Comment 7 Ian Stakenvicius (RETIRED) gentoo-dev 2015-07-16 20:25:27 UTC
  18 Jun 2015; Ian Stakenvicius (_AxS_) <axs@gentoo.org>
  +files/pkgconfig-pathfix.patch, +openh264-1.4.0.ebuild, metadata.xml:
  version bump, thanks to Coacher for his contributions