commit:     2b82508e7082a8ba0117a9ebe71903006b140ca8
Author:     Gerhard Bräunlich <wippbox <AT> gmx <DOT> net>
AuthorDate: Sun Sep  4 10:15:42 2016 +0000
Commit:     Patrice Clement <monsieurp <AT> gentoo <DOT> org>
CommitDate: Thu Sep  8 09:04:30 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2b82508e

media-video/raspberrypi-omxplayer: improvements.

* Add cross-compilation support.
* EAPI 6 bump.

Gentoo-Bug: https://bugs.gentoo.org/590744

Package-Manager: portage-2.2.28
Closes: https://github.com/gentoo/gentoo/pull/2217

Acked-By: Miroslav Šulc <fordfrog <AT> gentoo.org>
Signed-off-by: Patrice Clement <monsieurp <AT> gentoo.org>

 .../files/cross-0_p20160528.patch                  | 15 ++++++
 .../raspberrypi-omxplayer-0_p20160528-r1.ebuild    | 60 ++++++++++++++++++++++
 2 files changed, 75 insertions(+)

diff --git a/media-video/raspberrypi-omxplayer/files/cross-0_p20160528.patch 
b/media-video/raspberrypi-omxplayer/files/cross-0_p20160528.patch
new file mode 100644
index 00000000..bd35d62
--- /dev/null
+++ b/media-video/raspberrypi-omxplayer/files/cross-0_p20160528.patch
@@ -0,0 +1,15 @@
+--- a/Makefile
++++ b/Makefile
+@@ -4,9 +4,11 @@
+ 
+ PKGS=freetype2 dbus-1 libavcodec libavutil libavformat libswresample 
libswscale libpcre
+ 
+-LIBS+=-lrt -lpthread $(shell pkg-config --libs $(PKGS)) -L/opt/vc/lib
++PKG_CONFIG ?= pkg-config
+ 
+-INCLUDES+=$(shell pkg-config --cflags $(PKGS)) -I/opt/vc/include -I. -Ilinux
++LIBS+=-lrt -lpthread $(shell $(PKG_CONFIG) --libs $(PKGS)) 
-L${SYSROOT}/opt/vc/lib
++
++INCLUDES+=$(shell $(PKG_CONFIG) --cflags $(PKGS)) -I${SYSROOT}/opt/vc/include 
-I. -Ilinux
+ 
+ DIST ?= omxplayer-dist

diff --git 
a/media-video/raspberrypi-omxplayer/raspberrypi-omxplayer-0_p20160528-r1.ebuild 
b/media-video/raspberrypi-omxplayer/raspberrypi-omxplayer-0_p20160528-r1.ebuild
new file mode 100644
index 00000000..acd6329
--- /dev/null
+++ 
b/media-video/raspberrypi-omxplayer/raspberrypi-omxplayer-0_p20160528-r1.ebuild
@@ -0,0 +1,60 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+
+inherit flag-o-matic toolchain-funcs
+
+GIT_COMMIT="791d7df"
+DESCRIPTION="Command line media player for the Raspberry Pi"
+HOMEPAGE="https://github.com/popcornmix/omxplayer";
+SRC_URI="https://github.com/popcornmix/omxplayer/tarball/${GIT_COMMIT} -> 
${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~arm"
+IUSE="X"
+
+RDEPEND="dev-libs/libpcre
+       media-fonts/freefont
+       || ( media-libs/raspberrypi-userland 
media-libs/raspberrypi-userland-bin )
+       sys-apps/dbus
+       sys-apps/fbset
+       virtual/ffmpeg
+       dev-libs/boost
+       media-libs/freetype:2
+       X? (
+               x11-apps/xrefresh
+               x11-apps/xset
+       )"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+PATCHES=(
+       "${FILESDIR}"/Makefile-0_p20160528.patch
+       "${FILESDIR}"/fonts-path.patch
+       "${FILESDIR}"/cross-0_p20160528.patch
+)
+
+DOCS=( README.md )
+
+S="${WORKDIR}/popcornmix-omxplayer-${GIT_COMMIT}"
+
+src_prepare() {
+       default
+       cat > Makefile.include << EOF
+LIBS=-lvchostif -lvchiq_arm -lvcos -lbcm_host -lEGL -lGLESv2 -lopenmaxil -lrt 
-lpthread
+EOF
+
+       tc-export CXX PKG_CONFIG
+}
+
+src_compile() {
+       emake omxplayer.bin
+}
+
+src_install() {
+       dobin omxplayer omxplayer.bin
+       einstalldocs
+}

Reply via email to