mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
aur/omxplayer-git
This commit is contained in:
parent
740daf7c8f
commit
1d4747a771
5 changed files with 181 additions and 0 deletions
78
aur/omxplayer-git/Makefile.arch
Normal file
78
aur/omxplayer-git/Makefile.arch
Normal file
|
@ -0,0 +1,78 @@
|
|||
include Makefile.include
|
||||
|
||||
CFLAGS+=-std=c++0x -DSTANDALONE -D__STDC_CONSTANT_MACROS \
|
||||
-D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC \
|
||||
-D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
|
||||
-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_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
|
||||
|
||||
SRC=linux/XMemUtils.cpp \
|
||||
utils/log.cpp \
|
||||
DynamicDll.cpp \
|
||||
utils/PCMRemap.cpp \
|
||||
utils/RegExp.cpp \
|
||||
OMXSubtitleTagSami.cpp \
|
||||
OMXOverlayCodecText.cpp \
|
||||
BitstreamConverter.cpp \
|
||||
linux/RBP.cpp \
|
||||
OMXThread.cpp \
|
||||
OMXReader.cpp \
|
||||
OMXStreamInfo.cpp \
|
||||
OMXAudioCodecOMX.cpp \
|
||||
OMXCore.cpp \
|
||||
OMXVideo.cpp \
|
||||
OMXAudio.cpp \
|
||||
OMXClock.cpp \
|
||||
File.cpp \
|
||||
OMXPlayerVideo.cpp \
|
||||
OMXPlayerAudio.cpp \
|
||||
OMXPlayerSubtitles.cpp \
|
||||
Srt.cpp \
|
||||
SubtitleRenderer.cpp \
|
||||
Unicode.cpp \
|
||||
omxplayer.cpp \
|
||||
|
||||
OBJS+=$(filter %.o,$(SRC:.cpp=.o))
|
||||
|
||||
all: omxplayer.bin
|
||||
|
||||
%.o: %.cpp
|
||||
@rm -f $@
|
||||
$(CXX) $(CFLAGS) $(INCLUDES) -c $< -o $@ -Wno-deprecated-declarations
|
||||
|
||||
list_test:
|
||||
$(CXX) -O3 -o list_test list_test.cpp
|
||||
|
||||
omxplayer.bin: $(OBJS)
|
||||
$(CXX) $(LDFLAGS) -o omxplayer.bin $(OBJS) -lvchiq_arm -lvcos \
|
||||
-lrt -lpthread -rdynamic -lavutil -lavcodec -lavformat \
|
||||
-lswscale -lswresample -lpcre -lm -lc
|
||||
|
||||
clean:
|
||||
for i in $(OBJS); do (if test -e "$$i"; then ( rm $$i ); fi ); done
|
||||
@rm -f omxplayer.old.log omxplayer.log
|
||||
@rm -f omxplayer.bin
|
||||
@rm -rf omxplayer-dist
|
||||
@rm -f omxplayer-dist.tar.gz
|
||||
|
||||
install:
|
||||
install -d $(DESTDIR)/usr/bin
|
||||
install -d $(DESTDIR)/usr/share/doc/omxplayer
|
||||
install omxplayer $(DESTDIR)/usr/bin/
|
||||
install omxplayer.dist.sh $(DESTDIR)/usr/bin/
|
||||
install omxplayer.bin $(DESTDIR)/usr/bin/
|
||||
install README.md COPYING $(DESTDIR)/usr/share/doc/omxplayer/
|
||||
|
||||
|
29
aur/omxplayer-git/Makefile.include.arch
Normal file
29
aur/omxplayer-git/Makefile.include.arch
Normal file
|
@ -0,0 +1,29 @@
|
|||
USE_BUILDROOT=0
|
||||
|
||||
JOBS=1
|
||||
|
||||
CFLAGS :=
|
||||
CXXFLAGS := $(CFLAGS)
|
||||
CPPFLAGS := $(CFLAGS)
|
||||
LDFLAGS :=
|
||||
LD := ld
|
||||
CC := gcc
|
||||
CXX := g++
|
||||
OBJDUMP := objdump
|
||||
RANLIB := ranlib
|
||||
STRIP := strip
|
||||
AR := ar
|
||||
CXXCP := $(CXX) -E
|
||||
|
||||
CFLAGS += -pipe -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux \
|
||||
-mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -mno-apcs-stack-check \
|
||||
-O3 -mstructure-size-boundary=32 -mno-sched-prolog
|
||||
|
||||
LDFLAGS += -L/opt/vc/lib/ -Wl,-rpath /opt/vc/lib/ \
|
||||
-L/usr/lib/ffmpeg-compat -Wl,-rpath /usr/lib/ffmpeg-compat
|
||||
|
||||
INCLUDES += -I/opt/vc/include -I/opt/vc/include/interface/vcos/ \
|
||||
-I/opt/vc/include/interface/vcos/pthreads \
|
||||
-I /usr/include/ffmpeg-compat/ -I /usr/include/freetype2/ \
|
||||
-I /opt/vc/include/interface/vmcs_host/linux
|
||||
|
50
aur/omxplayer-git/PKGBUILD
Normal file
50
aur/omxplayer-git/PKGBUILD
Normal file
|
@ -0,0 +1,50 @@
|
|||
# Maintainer: Jonathan Hudson <jh+arch@daria.co.uk>
|
||||
|
||||
pkgname=omxplayer-git
|
||||
pkgver=20130202
|
||||
pkgrel=1
|
||||
pkgdesc="omxplayer is a command line media player for the RaspberryPi"
|
||||
arch=('arm' 'armv6h')
|
||||
url="https://github.com/huceke/omxplayer.git"
|
||||
license=(GPL2)
|
||||
depends=(ffmpeg pcre rtmpdump fbset ffmpeg-compat freetype2)
|
||||
makedepends=(git boost)
|
||||
optdepends=(ttf-freefont)
|
||||
provides=(omxplayer)
|
||||
conflicts=(omxplayer omxplayer-bin)
|
||||
source=(omxplayer.arch Makefile.arch Makefile.include.arch omxfont.patch)
|
||||
md5sums=('305f8fedbc4638434475c4a83ee78578'
|
||||
'5a15874072dec90013b8bec7383f1459'
|
||||
'3af60fb0782a32471bba9913c25ce322'
|
||||
'86d94208a0c78fe62354012dcb21e257'
|
||||
)
|
||||
_gitroot="https://github.com/huceke/omxplayer.git"
|
||||
_gitname="omxplayer"
|
||||
|
||||
build() {
|
||||
cd "$srcdir"
|
||||
msg "Connecting to GIT server...."
|
||||
if [ -d $_gitname ] ; then
|
||||
( cd $_gitname && git pull ) || warning "Git pull failed!"
|
||||
else
|
||||
git clone --depth=1 $_gitroot
|
||||
fi
|
||||
msg "GIT checkout done or server timeout"
|
||||
|
||||
cd $_gitname
|
||||
msg "Applying font path patch"
|
||||
patch -Np1 -i ../omxfont.patch
|
||||
msg "Starting make..."
|
||||
cp omxplayer omxplayer.dist.sh
|
||||
cp Makefile Makefile.dist
|
||||
cp Makefile.include Makefile.include.dist
|
||||
cp ../Makefile.arch Makefile
|
||||
cp ../Makefile.include.arch Makefile.include
|
||||
cp ../omxplayer.arch omxplayer
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$srcdir/$_gitname"
|
||||
make DESTDIR="$pkgdir" install
|
||||
}
|
11
aur/omxplayer-git/omxfont.patch
Normal file
11
aur/omxplayer-git/omxfont.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- omxplayer/omxplayer.cpp.orig 2013-02-02 09:31:33.347600923 +0000
|
||||
+++ omxplayer/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;
|
13
aur/omxplayer-git/omxplayer.arch
Executable file
13
aur/omxplayer-git/omxplayer.arch
Executable file
|
@ -0,0 +1,13 @@
|
|||
#!/bin/bash
|
||||
|
||||
[ -e /usr/bin/omxplayer.bin ] && OMXPLAYER="/usr/bin/omxplayer.bin" || exit 255
|
||||
|
||||
FNTOPT=
|
||||
#OMXFONT=${OMXFONT:-/usr/share/fonts/TTF/FreeSans.ttf}
|
||||
|
||||
[ -n "$OMXFONT" -a -e "$OMXFONT" ] && FNTOPT="--font $OMXFONT"
|
||||
|
||||
[ $# = 0 ] && exec $OMXPLAYER --help || \
|
||||
[ "$1" = '-h' -o "$1" = '--help' ] && exec $OMXPLAYER --help || \
|
||||
clear ; exec $OMXPLAYER $FNTOPT "$@" >/dev/null 2>&1
|
||||
|
Loading…
Reference in a new issue