summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrei Gherzan <andrei@gherzan.ro>2012-08-27 16:51:26 +0300
committerAndrei Gherzan <andrei@gherzan.ro>2012-08-29 00:05:21 +0300
commit6647bb651f1f33f4ab761c4aa129928fe3ae5f87 (patch)
tree5dd4d22f1e07db1564efc38e8125074250fbfc06
parentcc199637a7f82f3b0fab9db563071b7c0790b62a (diff)
downloadmeta-raspberrypi-6647bb651f1f33f4ab761c4aa129928fe3ae5f87.tar.gz
omxplayer: Integrate git revision 231c08b42005e3de565013bc1cee18bd5a349c1f
Add four patches: 1. don-t-strip-while-installing.patch Don't strip binaries because buildsystem will strip them after all. 2. libraries-are-installed-in-usr-lib.patch Libraries are installed in /usr/lib not in /usr/local/lib 3, remove-hardcoded-directory-omxplayer-dist.patch We want files to be installed in ${D}. Add a variable in Makefile to let users install omxplayer in a specific location. 4. remove-makefile-include.patch Remove Makefile.include as it includes hardcoded paths. Rely on variables provided by build system. [GITHUB #34] Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
-rw-r--r--recipes-multimedia/omxplayer/omxplayer/don-t-strip-while-installing.patch28
-rw-r--r--recipes-multimedia/omxplayer/omxplayer/libraries-are-installed-in-usr-lib.patch37
-rw-r--r--recipes-multimedia/omxplayer/omxplayer/remove-hardcoded-directory-omxplayer-dist.patch32
-rw-r--r--recipes-multimedia/omxplayer/omxplayer/remove-makefile-include.patch69
-rw-r--r--recipes-multimedia/omxplayer/omxplayer_git.bb62
5 files changed, 228 insertions, 0 deletions
diff --git a/recipes-multimedia/omxplayer/omxplayer/don-t-strip-while-installing.patch b/recipes-multimedia/omxplayer/omxplayer/don-t-strip-while-installing.patch
new file mode 100644
index 0000000..4f12cc0
--- /dev/null
+++ b/recipes-multimedia/omxplayer/omxplayer/don-t-strip-while-installing.patch
@@ -0,0 +1,28 @@
1Build system will strip binaries so remove strip step in Makefile.
2Avoid warnings/errors like:
3WARNING: File '/usr/lib/omxplayer/libavutil.so.51.56.100' from
4omxplayer was already stripped, this will prevent future debugging!
5
6Upstream-Status: Inappropriate [embedded specific]
7Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
8
9Index: git/Makefile.ffmpeg
10===================================================================
11--- git.orig/Makefile.ffmpeg 2012-08-26 15:38:45.099379852 +0300
12+++ git/Makefile.ffmpeg 2012-08-26 15:46:51.913055176 +0300
13@@ -52,7 +52,8 @@
14 --enable-hardcoded-tables \
15 --disable-runtime-cpudetect \
16 --disable-debug \
17- --cross-prefix=$(HOST)-
18+ --cross-prefix=$(HOST)- \
19+ --disable-stripping
20
21 clean:
22 @rm -rf ffmpeg
23@@ -63,5 +64,4 @@
24
25 install:
26 cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install
27- $(HOST)-strip ffmpeg_compiled/usr/lib/*.so
28
diff --git a/recipes-multimedia/omxplayer/omxplayer/libraries-are-installed-in-usr-lib.patch b/recipes-multimedia/omxplayer/omxplayer/libraries-are-installed-in-usr-lib.patch
new file mode 100644
index 0000000..1126bfb
--- /dev/null
+++ b/recipes-multimedia/omxplayer/omxplayer/libraries-are-installed-in-usr-lib.patch
@@ -0,0 +1,37 @@
1Libraries and headers from ffmpeg are installed in usr/lib.
2
3Upstream-Status: Pending
4Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
5
6Index: git/Makefile.ffmpeg
7===================================================================
8--- git.orig/Makefile.ffmpeg 2012-08-26 02:46:40.380518313 +0300
9+++ git/Makefile.ffmpeg 2012-08-26 02:46:40.512511177 +0300
10@@ -63,5 +63,5 @@
11
12 install:
13 cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install
14- $(HOST)-strip ffmpeg_compiled/usr/local/lib/*.so
15+ $(HOST)-strip ffmpeg_compiled/usr/lib/*.so
16
17Index: git/Makefile
18===================================================================
19--- git.orig/Makefile 2012-08-26 02:52:11.578611542 +0300
20+++ git/Makefile 2012-08-26 02:52:53.952320465 +0300
21@@ -1,7 +1,7 @@
22 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 -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 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
23
24-LDFLAGS+=-L./ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -Lffmpeg_compiled/usr/local/lib/
25-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/
26+LDFLAGS+=-L./ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -Lffmpeg_compiled/usr/lib/
27+INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/include/
28
29 SRC=linux/XMemUtils.cpp \
30 utils/log.cpp \
31@@ -63,5 +63,5 @@
32 cp omxplayer omxplayer.bin omxplayer-dist/usr/usr/bin
33 cp COPYING omxplayer-dist/usr/share/doc/
34 cp README.md omxplayer-dist/usr/share/doc/README
35- cp -a ffmpeg_compiled/usr/local/lib/*.so* omxplayer-dist/usr/lib/omxplayer/
36+ cp -a ffmpeg_compiled/usr/lib/*.so* omxplayer-dist/usr/lib/omxplayer/
37 tar -czf omxplayer-dist.tar.gz omxplayer-dist
diff --git a/recipes-multimedia/omxplayer/omxplayer/remove-hardcoded-directory-omxplayer-dist.patch b/recipes-multimedia/omxplayer/omxplayer/remove-hardcoded-directory-omxplayer-dist.patch
new file mode 100644
index 0000000..99fbbf8
--- /dev/null
+++ b/recipes-multimedia/omxplayer/omxplayer/remove-hardcoded-directory-omxplayer-dist.patch
@@ -0,0 +1,32 @@
1Modify install rule to use /usr/bin path and not /usr/usr/bin for
2installing omxplayer binary and script.
3As well, add a variable to let the user specify where to install
4the files.
5
6Upstream-Status: Pending
7Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
8
9Index: git/Makefile
10===================================================================
11--- git.orig/Makefile 2012-08-26 05:03:31.710678243 +0300
12+++ git/Makefile 2012-08-26 05:03:11.000000000 +0300
13@@ -59,11 +57,11 @@
14 make -f Makefile.ffmpeg install
15
16 dist: omxplayer.bin
17- mkdir -p omxplayer-dist/usr/lib/omxplayer
18- mkdir -p omxplayer-dist/usr/usr/bin
19- mkdir -p omxplayer-dist/usr/share/doc
20- cp omxplayer omxplayer.bin omxplayer-dist/usr/usr/bin
21- cp COPYING omxplayer-dist/usr/share/doc/
22- cp README.md omxplayer-dist/usr/share/doc/README
23- cp -a ffmpeg_compiled/usr/lib/*.so* omxplayer-dist/usr/lib/omxplayer/
24- tar -czf omxplayer-dist.tar.gz omxplayer-dist
25+ mkdir -p $(DEST)/usr/lib/omxplayer
26+ mkdir -p $(DEST)/usr/bin
27+ mkdir -p $(DEST)/usr/share/doc
28+ cp omxplayer omxplayer.bin $(DEST)/usr/bin
29+ cp COPYING $(DEST)/usr/share/doc/
30+ cp README.md $(DEST)/usr/share/doc/README
31+ cp -a ffmpeg_compiled/usr/lib/*.so* $(DEST)/usr/lib/omxplayer/
32+ tar -czf omxplayer-dist.tar.gz $(DEST)
diff --git a/recipes-multimedia/omxplayer/omxplayer/remove-makefile-include.patch b/recipes-multimedia/omxplayer/omxplayer/remove-makefile-include.patch
new file mode 100644
index 0000000..b4f3cd6
--- /dev/null
+++ b/recipes-multimedia/omxplayer/omxplayer/remove-makefile-include.patch
@@ -0,0 +1,69 @@
1Remove Makefile.include which includes hardcoded paths and rely on
2variables provided by build system.
3
4Upstream-Status: Inappropriate [embedded specific]
5Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
6
7Index: git/Makefile.ffmpeg
8===================================================================
9--- git.orig/Makefile.ffmpeg 2012-08-26 01:04:27.208235775 +0300
10+++ git/Makefile.ffmpeg 2012-08-26 01:05:03.958245731 +0300
11@@ -1,5 +1,3 @@
12-include Makefile.include
13-
14 CFLAGS=-D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX -D_LINUX -fPIC -DPIC -D_REENTRANT -D_HAVE_SBRK -D_LARGEFILE64_SOURCE -DHAVE_CMAKE_CONFIG -DHAVE_VMCS_CONFIG -D_REENTRANT -DUSE_VCHIQ_ARM -DVCHI_BULK_ALIGN=1 -DVCHI_BULK_GRANULARITY=1 -DEGL_SERVER_DISPMANX -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D__VIDEOCORE4__ -DGRAPHICS_X_VG=1 -U_FORTIFY_SOURCE -Wall -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 -DOMX -DOMX_SKIP64BIT
15
16 WORK=$(PWD)
17Index: git/Makefile
18===================================================================
19--- git.orig/Makefile 2012-08-25 21:46:44.771745783 +0300
20+++ git/Makefile 2012-08-25 21:48:59.220406089 +0300
21@@ -1,5 +1,3 @@
22-include Makefile.include
23-
24 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 -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 -DOMX -DOMX_SKIP64BIT -ftree-vectorize -DUSE_EXTERNAL_OMX -DTARGET_RASPBERRY_PI -DUSE_EXTERNAL_LIBBCM_HOST
25
26 LDFLAGS+=-L./ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz -Lffmpeg_compiled/usr/local/lib/
27Index: git/Makefile.include
28===================================================================
29--- git.orig/Makefile.include 2012-08-25 21:46:44.771745783 +0300
30+++ /dev/null 1970-01-01 00:00:00.000000000 +0000
31@@ -1,38 +0,0 @@
32-USE_BUILDROOT=1
33-FLOAT=hard
34-
35-ifeq ($(USE_BUILDROOT), 1)
36-BUILDROOT :=/opt/xbmc-bcm/buildroot
37-SDKSTAGE :=$(BUILDROOT)/output/staging
38-TARGETFS :=$(BUILDROOT)/output/target
39-TOOLCHAIN :=$(BUILDROOT)/output/host/usr/
40-HOST :=arm-unknown-linux-gnueabi
41-SYSROOT :=$(BUILDROOT)/output/host/usr/arm-unknown-linux-gnueabi/sysroot
42-else
43-BUILDROOT :=/opt/bcm-rootfs
44-SDKSTAGE :=/opt/bcm-rootfs
45-TARGETFS :=/opt/bcm-rootfs
46-TOOLCHAIN :=/usr/local/bcm-gcc
47-HOST :=bcm2708
48-SYSROOT :=$(TOOLCHAIN)/arm-bcm2708-linux-gnueabi/sys-root
49-endif
50-
51-JOBS=7
52-
53-CFLAGS := -isystem$(PREFIX)/include
54-CXXFLAGS := $(CFLAGS)
55-CPPFLAGS := $(CFLAGS)
56-LDFLAGS := -L$(BUILDROOT)/lib
57-LD := $(TOOLCHAIN)/bin/$(HOST)-ld --sysroot=$(SYSROOT)
58-CC := $(TOOLCHAIN)/bin/$(HOST)-gcc --sysroot=$(SYSROOT)
59-CXX := $(TOOLCHAIN)/bin/$(HOST)-g++ --sysroot=$(SYSROOT)
60-OBJDUMP := $(TOOLCHAIN)/bin/$(HOST)-objdump
61-RANLIB := $(TOOLCHAIN)/bin/$(HOST)-ranlib
62-STRIP := $(TOOLCHAIN)/bin/$(HOST)-strip
63-AR := $(TOOLCHAIN)/bin/$(HOST)-ar
64-CXXCP := $(CXX) -E
65-PATH := $(PREFIX)/bin:$(BUILDROOT)/output/host/usr/bin:$(PATH)
66-
67-CFLAGS += -pipe -mfloat-abi=$(FLOAT) -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
68-LDFLAGS += -L$(SDKSTAGE)/lib -L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/
69-INCLUDES += -isystem$(SDKSTAGE)/usr/include -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -isystem$(SDKSTAGE)/usr/include/freetype2
diff --git a/recipes-multimedia/omxplayer/omxplayer_git.bb b/recipes-multimedia/omxplayer/omxplayer_git.bb
new file mode 100644
index 0000000..b637ba6
--- /dev/null
+++ b/recipes-multimedia/omxplayer/omxplayer_git.bb
@@ -0,0 +1,62 @@
1DESCRIPTION = "OMXPlayer is a commandline OMX player for the Raspberry Pi"
2HOMEPAGE = "https://github.com/huceke/omxplayer"
3SECTION = "console/utils"
4LICENSE = "GPLv2"
5
6LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
7
8DEPENDS = "libpcre libav virtual/egl boost freetype"
9
10PR = "r0"
11
12SRCREV = "231c08b42005e3de565013bc1cee18bd5a349c1f"
13SRC_URI = "git://github.com/huceke/omxplayer.git;protocol=git;branch=master \
14 file://remove-makefile-include.patch \
15 file://libraries-are-installed-in-usr-lib.patch \
16 file://remove-hardcoded-directory-omxplayer-dist.patch \
17 file://don-t-strip-while-installing.patch \
18 "
19S = "${WORKDIR}/git"
20
21COMPATIBLE_MACHINE = "raspberrypi"
22
23inherit autotools
24
25# Variable added in Makefile to INCLUDE
26export ADD_INCDIR = "-I${STAGING_INCDIR}/interface/vcos/pthreads -I${STAGING_INCDIR}/freetype2"
27
28# Needed in configure from Makefile.ffmpeg
29export HOST = "${HOST_SYS}"
30export WORK = "${S}"
31export TEMPDIR = "${S}/tmp"
32export FLOAT = "softfp"
33
34export LDFLAGS = "-L${S}/ffmpeg_compiled/usr/lib \
35 -L${STAGING_DIR_HOST}/lib \
36 -L${STAGING_DIR_HOST}/usr/lib \
37 "
38
39export INCLUDES = "-isystem${STAGING_DIR_HOST}/usr/include \
40 -isystem${STAGING_DIR_HOST}/usr/include/interface/vcos/pthreads \
41 -isystem${STAGING_DIR_HOST}/usr/include/freetype2 \
42 "
43
44# Install in ${D}
45export DEST = "${D}"
46
47do_compile() {
48 # Needed for compiler test in ffmpeg's configure
49 mkdir -p tmp
50
51 oe_runmake ffmpeg
52 oe_runmake
53}
54
55do_install() {
56 oe_runmake dist
57}
58
59FILES_${PN} = "${bindir}/omxplayer* \
60 ${libdir}/omxplayer/lib*${SOLIBS}"
61
62FILES_${PN}-dev += "${libdir}/omxplayer/*.so"