From ab467d1197200210d0eadee05b820bf2afb29453 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Mon, 15 Jul 2013 06:34:30 +0200 Subject: [PATCH] omxplayer: use popcornmix github repo and build it against ffmpeg-1.2.x. --- srcpkgs/omxplayer/files/Makefile | 7 +++--- srcpkgs/omxplayer/patches/omxfont.patch | 11 --------- srcpkgs/omxplayer/template | 32 +++++++++++++------------ 3 files changed, 20 insertions(+), 30 deletions(-) delete mode 100644 srcpkgs/omxplayer/patches/omxfont.patch diff --git a/srcpkgs/omxplayer/files/Makefile b/srcpkgs/omxplayer/files/Makefile index abf0490961a..ccd542901d8 100644 --- a/srcpkgs/omxplayer/files/Makefile +++ b/srcpkgs/omxplayer/files/Makefile @@ -6,15 +6,13 @@ CFLAGS+=-std=c++0x -DSTANDALONE -D__STDC_CONSTANT_MACROS \ -DHAVE_CMAKE_CONFIG -D__VIDEOCORE4__ -U_FORTIFY_SOURCE -Wall \ -mfpu=vfp -mno-apcs-stack-check -DHAVE_OMXLIB -DUSE_EXTERNAL_FFMPEG \ -DHAVE_LIBAVCODEC_AVCODEC_H -DHAVE_LIBAVUTIL_MEM_H \ + -DHAVE_LIBAVUTIL_OPT_H \ -DHAVE_LIBAVUTIL_AVUTIL_H -DHAVE_LIBAVFORMAT_AVFORMAT_H \ -DHAVE_LIBAVFILTER_AVFILTER_H -DHAVE_LIBSWRESAMPLE_SWRESAMPLE_H -DOMX \ -DOMX_SKIP64BIT -ftree-vectorize -pipe -DUSE_EXTERNAL_OMX \ -DTARGET_RASPBERRY_PI -DHAVE_PLATFORM_RASPBERRY_PI \ -DUSE_EXTERNAL_LIBBCM_HOST -Wno-psabi -#### Ugly ffmpeg-compat hack. Feel free to fix properly -CFLAGS +=-DAV_CODEC_ID_SSA=0x3a2d7c7c -DAV_CODEC_ID_SUBRIP=0x3a2d7c7c - LDFLAGS+=-L./ -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz INCLUDES+=-I./ -Ilinux @@ -42,7 +40,8 @@ SRC=linux/XMemUtils.cpp \ Srt.cpp \ SubtitleRenderer.cpp \ Unicode.cpp \ - omxplayer.cpp \ + KeyConfig.cpp \ + omxplayer.cpp OBJS+=$(filter %.o,$(SRC:.cpp=.o)) diff --git a/srcpkgs/omxplayer/patches/omxfont.patch b/srcpkgs/omxplayer/patches/omxfont.patch deleted file mode 100644 index 3557a777ba2..00000000000 --- a/srcpkgs/omxplayer/patches/omxfont.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- omxplayer.cpp.orig 2013-02-02 09:31:33.347600923 +0000 -+++ omxplayer.cpp 2013-02-02 09:32:03.477096232 +0000 -@@ -71,7 +71,7 @@ - int m_use_hw_audio = 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_font_path = "/usr/share/fonts/TTF/FreeSans.ttf"; - bool m_has_font = false; - float m_font_size = 0.055f; - bool m_centered = false; diff --git a/srcpkgs/omxplayer/template b/srcpkgs/omxplayer/template index 4e115079a86..3f9d91d8f74 100644 --- a/srcpkgs/omxplayer/template +++ b/srcpkgs/omxplayer/template @@ -1,7 +1,7 @@ # Template file for 'omxplayer' pkgname=omxplayer -version=20130324 -revision=2 +version=20130715 +revision=1 short_desc="Commandline OMX player for the Raspberry Pi" maintainer="Juan RP " license="GPL-2" @@ -13,32 +13,34 @@ noextract=yes # XXX only rpi only_for_archs="armv6l" hostmakedepends="pkg-config" -makedepends="rpi-firmware pcre-devel boost-devel freetype-devel ffmpeg-0.10x-compat-devel" +makedepends="rpi-firmware pcre-devel boost-devel freetype-devel ffmpeg-devel" do_fetch() { - local url="git://github.com/huceke/omxplayer.git" + local url="git://github.com/popcornmix/omxplayer.git" git clone $url ${pkgname}-${version} } -do_build() { +pre_build() { cp -f ${FILESDIR}/Makefile* . - - _ffmpeg_inc="/usr/include/ffmpeg-0.10x-compat" - _ffmpeg_lib="/usr/lib/ffmpeg-0.10x-compat" + ./gen_version.sh > version.h + sed -e 's,\\n,,g' -i version.h + sed -e 's,/usr/share/fonts/truetype/freefont,/usr/share/fonts/TTF,g' -i omxplayer.cpp +} - if [ "$CROSS_BUILD" ]; then - INCLUDES="-I$XBPS_CROSS_BASE/include \ - -I$XBPS_CROSS_BASE/include/freetype2 \ - -I$XBPS_CROSS_BASE/${_ffmpeg_inc}" +do_build() { + mkdir -p /opt/vc/lib - LDFLAGS="-L$XBPS_CROSS_BASE/lib -L$XBPS_CROSS_BASE/${_ffmpeg_lib}" + if [ "$CROSS_BUILD" ]; then + + INCLUDES="-I$XBPS_CROSS_BASE/include \ + -I$XBPS_CROSS_BASE/include/freetype2" + + LDFLAGS="-L$XBPS_CROSS_BASE/lib" sed -e "s|@INCLUDES@|${INCLUDES}|g" -i Makefile.include sed -e "s|@LDFLAGS@|${LDFLAGS}|g" -i Makefile.include sed -e "s|@OPTBASE@|${XBPS_CROSS_BASE}/opt|g" -i Makefile.include else - sed -e "s|@INCLUDES@|-I${_ffmpeg_inc}|g" -i Makefile.include - sed -e "s|@LDFLAGS@|-L${_ffmpeg_lib} -Wl,-rpath ${_ffmpeg_lib}|g" -i Makefile.include sed -e "s|@OPTBASE@|/opt|g" -i Makefile.include fi