commit:     5e1dbb3f8a38fb9a91420a0f8da75efd2172a07d
Author:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
AuthorDate: Tue Mar  8 21:08:32 2016 +0000
Commit:     Miroslav Šulc <fordfrog <AT> gentoo <DOT> org>
CommitDate: Tue Mar  8 21:09:38 2016 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=5e1dbb3f

media-video/omxplayer: adjusted and improved ebuild from bug #421683

Package-Manager: portage-2.2.27

 media-video/omxplayer/Manifest                     |  1 +
 media-video/omxplayer/files/fonts-path.patch       | 15 +++++++
 .../omxplayer/files/omxplayer-9999-Makefile.patch  | 26 +++++++++++
 media-video/omxplayer/metadata.xml                 |  8 ++++
 media-video/omxplayer/omxplayer-0_p20160217.ebuild | 50 ++++++++++++++++++++++
 media-video/omxplayer/omxplayer-9999.ebuild        | 47 ++++++++++++++++++++
 6 files changed, 147 insertions(+)

diff --git a/media-video/omxplayer/Manifest b/media-video/omxplayer/Manifest
new file mode 100644
index 0000000..a616934
--- /dev/null
+++ b/media-video/omxplayer/Manifest
@@ -0,0 +1 @@
+DIST omxplayer-0_p20160217.tar.gz 1204486 SHA256 
eba2c6ea0843db8105fe4fe9c1f345db38952e4b96bf83ba15b1a3fd0e05effa SHA512 
5137ba534ce3b0698c6ace8f570594c97ef978aaa97e6cc902f7895412c5d0282c7c4fa1f7b03f043d5281f0a282caf494602e45aae6a12d6d35bc26aaa4000f
 WHIRLPOOL 
377b53ab0f4308ff600c8cf7af5939e79a942cca22d458b00fb38cebac8cb8760a3be22ad6ad0719890b61f7aa131e623067c96d1846b4aff8e38210e39770b6

diff --git a/media-video/omxplayer/files/fonts-path.patch 
b/media-video/omxplayer/files/fonts-path.patch
new file mode 100644
index 0000000..6683145
--- /dev/null
+++ b/media-video/omxplayer/files/fonts-path.patch
@@ -0,0 +1,15 @@
+diff --git a/omxplayer.cpp b/omxplayer.cpp
+index 0626e2e..8450bf2 100644
+--- a/omxplayer.cpp
++++ b/omxplayer.cpp
+@@ -83,8 +83,8 @@ bool              m_osd                 = true;
+ bool              m_no_keys             = false;
+ std::string       m_external_subtitles_path;
+ bool              m_has_external_subtitles = false;
+-std::string       m_font_path           = 
"/usr/share/fonts/truetype/freefont/FreeSans.ttf";
+-std::string       m_italic_font_path    = 
"/usr/share/fonts/truetype/freefont/FreeSansOblique.ttf";
++std::string       m_font_path           = 
"/usr/share/fonts/freefont/FreeSans.ttf";
++std::string       m_italic_font_path    = 
"/usr/share/fonts/freefont/FreeSansOblique.ttf";
+ std::string       m_dbus_name           = "org.mpris.MediaPlayer2.omxplayer";
+ bool              m_asked_for_font      = false;
+ bool              m_asked_for_italic_font = false;

diff --git a/media-video/omxplayer/files/omxplayer-9999-Makefile.patch 
b/media-video/omxplayer/files/omxplayer-9999-Makefile.patch
new file mode 100644
index 0000000..c6f9452
--- /dev/null
+++ b/media-video/omxplayer/files/omxplayer-9999-Makefile.patch
@@ -0,0 +1,26 @@
+--- omxplayer-9999/Makefile
++++ omxplayer-9999/Makefile
+@@ -2,9 +2,11 @@
+ 
+ CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS 
-DTARGET_POSIX -DTARGET_LINUX -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE 
-D_FILE_OFFSET_BITS=64 -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE 
-Wall -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG  -DHAVE_LIBAVCODEC_AVCODEC_H 
-DHAVE_LIBAVUTIL_OPT_H -DHAVE_LIBAVUTIL_MEM_H -DHAVE_LIBAVUTIL_AVUTIL_H 
-DHAVE_LIBAVFORMAT_AVFORMAT_H -DHAVE_LIBAVFILTER_AVFILTER_H 
-DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX -DOMX_SKIP64BIT -ftree-vectorize 
-DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
+ 
+-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL 
-lbcm_host -lopenmaxil -lfreetype -lz
++PKGS=freetype2 dbus-1 libavcodec libavutil libavformat libswresample 
libswscale libpcre
++
++LIBS+=-lrt -lpthread $(shell pkg-config --libs $(PKGS)) -L/opt/vc/lib
+ 
+-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I 
/usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include
++INCLUDES+=$(shell pkg-config --cflags $(PKGS)) -I/opt/vc/include -I. -Ilinux
+ 
+ DIST ?= omxplayer-dist
+ 
+@@ -51,8 +47,7 @@
+       bash gen_version.sh > version.h 
+ 
+ omxplayer.bin: version $(OBJS)
+-      $(CXX) $(LDFLAGS) -o omxplayer.bin $(OBJS) -lvchiq_arm -lvcos -ldbus-1 
-lrt -lpthread -lavutil -lavcodec -lavformat -lswscale -lswresample -lpcre
+-      $(STRIP) omxplayer.bin
++      $(CXX) $(LDFLAGS) -o omxplayer.bin $(OBJS) $(LIBS)
+ 
+ help.h: README.md Makefile
+       awk '/SYNOPSIS/{p=1;print;next} p&&/KEY BINDINGS/{p=0};p' $< \

diff --git a/media-video/omxplayer/metadata.xml 
b/media-video/omxplayer/metadata.xml
new file mode 100644
index 0000000..412fe67
--- /dev/null
+++ b/media-video/omxplayer/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+<maintainer type="person">
+       <email>[email protected]</email>
+</maintainer>
+<longdescription>Command line media player for the Raspberry 
Pi</longdescription>
+</pkgmetadata>

diff --git a/media-video/omxplayer/omxplayer-0_p20160217.ebuild 
b/media-video/omxplayer/omxplayer-0_p20160217.ebuild
new file mode 100644
index 0000000..3f775d8
--- /dev/null
+++ b/media-video/omxplayer/omxplayer-0_p20160217.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils toolchain-funcs flag-o-matic
+
+GIT_COMMIT="15a490b"
+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=""
+
+RDEPEND="dev-libs/libpcre
+       media-fonts/freefont
+       || ( media-libs/raspberrypi-userland 
media-libs/raspberrypi-userland-bin )
+       sys-apps/dbus
+       sys-apps/fbset
+       virtual/ffmpeg
+       x11-apps/xrefresh
+       x11-apps/xset"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+S="${WORKDIR}/popcornmix-${PN}-${GIT_COMMIT}"
+
+src_prepare() {
+       epatch "${FILESDIR}"/${PN}-9999-Makefile.patch \
+               "${FILESDIR}"/fonts-path.patch
+
+       cat > Makefile.include << EOF
+LIBS=-lvchiq_arm -lvcos -lbcm_host -lEGL -lGLESv2 -lopenmaxil -lrt -lpthread
+EOF
+
+       tc-export CXX
+}
+
+src_compile() {
+       emake ${PN}.bin
+}
+
+src_install() {
+       dobin ${PN} ${PN}.bin
+       dodoc README.md
+}

diff --git a/media-video/omxplayer/omxplayer-9999.ebuild 
b/media-video/omxplayer/omxplayer-9999.ebuild
new file mode 100644
index 0000000..88ac4d3
--- /dev/null
+++ b/media-video/omxplayer/omxplayer-9999.ebuild
@@ -0,0 +1,47 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit eutils git-r3 toolchain-funcs flag-o-matic
+
+DESCRIPTION="Command line media player for the Raspberry Pi"
+HOMEPAGE="https://github.com/popcornmix/omxplayer";
+EGIT_REPO_URI="https://github.com/popcornmix/omxplayer.git";
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS=""
+IUSE=""
+
+RDEPEND="dev-libs/libpcre
+       media-fonts/freefont
+       || ( media-libs/raspberrypi-userland 
media-libs/raspberrypi-userland-bin )
+       sys-apps/dbus
+       sys-apps/fbset
+       virtual/ffmpeg
+       x11-apps/xrefresh
+       x11-apps/xset"
+DEPEND="${RDEPEND}
+       virtual/pkgconfig"
+
+src_prepare() {
+       epatch "${FILESDIR}"/${PN}-9999-Makefile.patch \
+               "${FILESDIR}"/fonts-path.patch
+
+       cat > Makefile.include << EOF
+LIBS=-lvchiq_arm -lvcos -lbcm_host -lEGL -lGLESv2 -lopenmaxil -lrt -lpthread
+EOF
+
+       tc-export CXX
+}
+
+src_compile() {
+       emake ${PN}.bin
+}
+
+src_install() {
+       dobin ${PN} ${PN}.bin
+       dodoc README.md
+}

Reply via email to