1From e46208c4a3e35da461e0e8f662970339eae47fca Mon Sep 17 00:00:00 2001
2From: Andrei Gherzan <andrei@gherzan.ro>
3Date: Sun, 24 Aug 2014 00:13:13 +0200
4Subject: [PATCH] Libraries and headers from ffmpeg are installed in /usr.
5
6Don't search for libraries and headers in /usr/local.
7
8Upstream-Status: Inappropriate [embedded specific]
9
10Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
11Signed-off-by: Jonathan Liu <net147@gmail.com>
12
13---
14 Makefile        | 6 +++---
15 Makefile.ffmpeg | 2 +-
16 2 files changed, 4 insertions(+), 4 deletions(-)
17
18--- a/Makefile
19+++ b/Makefile
20@@ -2,9 +2,9 @@ CFLAGS=-pipe -mfloat-abi=hard -mcpu=arm1
21 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
22
23 LDFLAGS=-L$(SDKSTAGE)/opt/vc/lib/
24-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound
25+LDFLAGS+=-L./ -Lffmpeg_compiled/usr/lib/ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound
26
27-INCLUDES+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/ -I /usr/include/dbus-1.0 -I /usr/lib/arm-linux-gnueabihf/dbus-1.0/include -I/usr/include/freetype2 -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads
28+INCLUDES+=-I./ -Ilinux -I./ffmpeg
29
30 DIST ?= omxplayer-dist
31 STRIP ?= strip
32@@ -91,7 +91,7 @@ dist: omxplayer.bin omxplayer.1
33 	cp COPYING $(DIST)/usr/share/doc/omxplayer
34 	cp README.md $(DIST)/usr/share/doc/omxplayer/README
35 	cp omxplayer.1 $(DIST)/usr/share/man/man1
36-	cp -P ffmpeg_compiled/usr/local/lib/*.so* $(DIST)/usr/lib/omxplayer/
37+	cp -P ffmpeg_compiled/usr/lib/*.so* $(DIST)/usr/lib/omxplayer/
38 	cd $(DIST); tar -czf ../$(DIST).tgz *
39
40 install:
41--- a/Makefile.ffmpeg
42+++ b/Makefile.ffmpeg
43@@ -238,7 +238,8 @@ configure:
44 			--disable-decoder=xbin \
45 			--disable-decoder=idf \
46 			--disable-decoder=hevc \
47-			--enable-decoder=opus
48+			--enable-decoder=opus \
49+			--disable-stripping
50
51 .PHONY : clean
52 clean:
53@@ -251,5 +252,5 @@ checkout:
54 .PHONY : install
55 install:
56 	cd ffmpeg; make -j9 DESTDIR="$(WORK)/ffmpeg_compiled" install
57-	$(HOST)-strip ffmpeg_compiled/usr/local/lib/*.so
58+	$(HOST)-strip ffmpeg_compiled/usr/lib/*.so
59
60