+++ /dev/null
-From 563dafc1129848419482b540d149d0b8687cac1e Mon Sep 17 00:00:00 2001
-From: "Yann E. MORIN" <yann.morin.1998@free.fr>
-Date: Sun, 10 Apr 2016 16:22:53 +0200
-Subject: [PATCH] Makefiles: clean up the cruft
-
-Most of the variables that Makefile.include tries (but fails) to set,
-are already available from Buildroot's variables:
- - AR, AS, CC, CXX, OBJDUMP...
- - CFLAGS, CXXFLAGS, CPPFLAGS...
-
-This leaves us with a few select variables that define include and
-library paths local to the omxplayer package, plus a few optimisations.
-
-Finally, also remove hard-coded, absolute paths pointing to the host
-system (won't work for cross-compilation, so our paranoid wrapper would
-catch those paths).
-
-Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
----
- Makefile | 2 +-
- Makefile.include | 20 ++------------------
- 2 files changed, 3 insertions(+), 19 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index bcfadfb..3dc1a03 100644
---- a/Makefile
-+++ b/Makefile
-@@ -4,7 +4,7 @@ CFLAGS+=-std=c++0x -D__STDC_CONSTANT_MACROS -D__STDC_LIMIT_MACROS -DTARGET_POSIX
-
- LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lWFC -lGLESv2 -lEGL -lbcm_host -lopenmaxil -lfreetype -lz
-
--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+=-I./ -Ilinux -Iffmpeg_compiled/usr/local/include/
-
- DIST ?= omxplayer-dist
-
-diff --git a/Makefile.include b/Makefile.include
-index 58e9560..79ca277 100644
---- a/Makefile.include
-+++ b/Makefile.include
-@@ -20,21 +20,5 @@ endif
-
- JOBS=7
-
--CFLAGS := -isystem$(PREFIX)/include
--CXXFLAGS := $(CFLAGS)
--CPPFLAGS := $(CFLAGS)
--LDFLAGS := -L$(BUILDROOT)/lib
--LD := $(TOOLCHAIN)/bin/$(HOST)-ld --sysroot=$(SYSROOT)
--CC := $(TOOLCHAIN)/bin/$(HOST)-gcc --sysroot=$(SYSROOT)
--CXX := $(TOOLCHAIN)/bin/$(HOST)-g++ --sysroot=$(SYSROOT)
--OBJDUMP := $(TOOLCHAIN)/bin/$(HOST)-objdump
--RANLIB := $(TOOLCHAIN)/bin/$(HOST)-ranlib
--STRIP := $(TOOLCHAIN)/bin/$(HOST)-strip
--AR := $(TOOLCHAIN)/bin/$(HOST)-ar
--CXXCP := $(CXX) -E
--PATH := $(PREFIX)/bin:$(BUILDROOT)/output/host/usr/bin:$(PATH)
--
--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 -g -mstructure-size-boundary=32 -mno-sched-prolog
--LDFLAGS += -L$(SDKSTAGE)/lib -L$(SDKSTAGE)/usr/lib -L$(SDKSTAGE)/opt/vc/lib/ -Lpcre/build
--#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
--INCLUDES += -isystem$(SDKSTAGE)/opt/vc/include -isystem$(SYSROOT)/usr/include -isystem$(SDKSTAGE)/opt/vc/include/interface/vcos/pthreads -Ipcre/build -Iboost-trunk -Ifreetype2/include
-+CFLAGS += -fomit-frame-pointer -Wno-psabi -mno-apcs-stack-check \
-+ -mstructure-size-boundary=32 -mno-sched-prolog
---
-1.9.1
-
--- /dev/null
+From 40bf9c0960becaf0e592cac901466af93f24e52b Mon Sep 17 00:00:00 2001
+From: Julius Kriukas <julius@kriukas.lt>
+Date: Fri, 1 Dec 2017 18:29:24 +0200
+Subject: [PATCH] Update Makefile to be compatible with buildroot
+
+- Append to existing CFLAGS instead of overwriting.
+- Remove cross-compilation specific options from CFLAGS, they will be
+ set by buildroot.
+- Remove local ffmpeg_compiled include, buildroot will build ffmpeg
+ separately.
+- Remove hard-coded dbus, freetype, rpi-firmware include paths, they
+ will be added by buildroot.
+
+Signed-off-by: Julius Kriukas <julius@kriukas.lt>
+---
+ Makefile | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 5f4e414..53fa1bc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1,10 +1,10 @@
+-CFLAGS=-pipe -mfloat-abi=hard -mcpu=arm1176jzf-s -fomit-frame-pointer -mabi=aapcs-linux -mtune=arm1176jzf-s -mfpu=vfp -Wno-psabi -mno-apcs-stack-check -g -mstructure-size-boundary=32 -mno-sched-prolog
++CFLAGS+=-fomit-frame-pointer -Wno-psabi -mno-apcs-stack-check -g -mstructure-size-boundary=32 -mno-sched-prolog
+ 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$(SDKSTAGE)/opt/vc/lib/
+-LDFLAGS+=-L./ -Lffmpeg_compiled/usr/local/lib/ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound
++LDFLAGS+=-L./ -lc -lbrcmGLESv2 -lbrcmEGL -lbcm_host -lopenmaxil -lfreetype -lz -lasound
+
+-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
++INCLUDES+=-I./ -Ilinux
+
+ DIST ?= omxplayer-dist
+ STRIP ?= strip
+--
+2.11.0
+
#
################################################################################
-OMXPLAYER_VERSION = 6c90c7503ba4658221774759edf7f2ae816711de
+OMXPLAYER_VERSION = 2ee17b22a6149a043a2e402580504f282c615373
OMXPLAYER_SITE = $(call github,popcornmix,omxplayer,$(OMXPLAYER_VERSION))
OMXPLAYER_LICENSE = GPL-2.0+
OMXPLAYER_LICENSE_FILES = COPYING
# procedure is, well, tainted. Fix this by forcing the real,
# correct values.
OMXPLAYER_MAKE_ENV = \
- USE_BUILDROOT=1 \
- BUILDROOT=$(TOP_DIR) \
SDKSTAGE=$(STAGING_DIR) \
- TARGETFS=$(TARGET_DIR) \
- TOOLCHAIN=$(HOST_DIR) \
- HOST=$(GNU_TARGET_NAME) \
- SYSROOT=$(STAGING_DIR) \
- JOBS=$(PARALLEL_JOBS) \
$(TARGET_CONFIGURE_OPTS) \
STRIP=true \
CFLAGS="$(TARGET_CFLAGS) $(OMXPLAYER_EXTRA_CFLAGS)"