#! /bin/sh /usr/share/dpatch/dpatch-run
## 03_live-0.2.0-fix-INCLUDES.dpatch by Thomas Günther <tom@toms-cafe.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fixes compilation with VDR >= 1.7.13.

@DPATCH@
--- live-0.2.0/Makefile
+++ live-0.2.0/Makefile
@@ -38,6 +38,7 @@
 ### Allow user defined options to overwrite defaults:
 
 -include $(VDRDIR)/Make.config
+EXTRA_INCLUDES = $(INCLUDES)
 
 ### The version number of VDR's plugin API (taken from VDR's "config.h"):
 
@@ -139,10 +140,10 @@
 subdirs: $(SUBDIRS)
 
 $(SUBDIRS):
-	$(MAKE) -C $@ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" $(MAKECMDGOALS)
+	$(MAKE) -C $@ CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" EXTRA_INCLUDES="$(EXTRA_INCLUDES)" $(MAKECMDGOALS)
 
 PAGES:
-	$(MAKE) -C pages CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" .dependencies
+	$(MAKE) -C pages CXX="$(CXX)" CXXFLAGS="$(CXXFLAGS)" EXTRA_INCLUDES="$(EXTRA_INCLUDES)" .dependencies
 
 $(VERSIONSUFFIX): FORCE
 	./buildutil/version-util $(VERSIONSUFFIX) || ./buildutil/version-util -F $(VERSIONSUFFIX)
--- live-0.2.0/css/Makefile
+++ live-0.2.0/css/Makefile
@@ -7,6 +7,7 @@
 CXXFLAGS += `tntnet-config --cxxflags`
 LDFLAGS  += `tntnet-config --libs`
 
+INCLUDES += $(EXTRA_INCLUDES)
 INCLUDES += -I..
 
 ### The directory environment:
--- live-0.2.0/httpd/Makefile
+++ live-0.2.0/httpd/Makefile
@@ -7,6 +7,7 @@
 
 ### Includes and Defines (add further entries here):
 
+INCLUDES += $(EXTRA_INCLUDES)
 INCLUDES += -I.
 
 ### The object files (add further files here):
--- live-0.2.0/javascript/Makefile
+++ live-0.2.0/javascript/Makefile
@@ -7,6 +7,7 @@
 CXXFLAGS += `tntnet-config --cxxflags`
 LDFLAGS  += `tntnet-config --libs`
 
+INCLUDES += $(EXTRA_INCLUDES)
 INCLUDES += -I.. -I$(VDRDIR)/include
 
 ### The directory environment:
--- live-0.2.0/pages/Makefile
+++ live-0.2.0/pages/Makefile
@@ -2,6 +2,7 @@
 AR       ?= ar
 ECPPC    ?= ecppc
 
+INCLUDES += $(EXTRA_INCLUDES)
 INCLUDES += -I.. -I$(VDRDIR)/include
 
 ### The directory environment:
