File vdr-1.6.0-ncurses.diff of Package vdr

--- PLUGINS/src/skincurses/Makefile
+++ PLUGINS/src/skincurses/Makefile	2008-04-11 14:02:30.065651441 +0200
@@ -41,9 +41,29 @@ PACKAGE = vdr-$(ARCHIVE)
 
 ### Includes and Defines (add further entries here):
 
+cxx-include = $(shell $(CXX) -include $(1) -S -o /dev/null -xc++ /dev/null > /dev/null 2>&1 && echo yes)
+cxx-library = $(shell echo 'int main () { return 0; }' |$(CXX) -l$(1:lib%=%) -o /dev/null -xc++ - > /dev/null 2>&1 && echo yes)
+cxx-testapi = $(if $(and $(call cxx-include,$(1)),$(call cxx-library,$(2))),yes)
+
 INCLUDES += -I$(VDRDIR)/include
 
 DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+ifeq ($(call cxx_testapi,ncursestw/ncurses.h,libncursestw),yes)
+  DEFINES += -DNCURSES_HEAD="<ncursestw/ncurses.h>" -DNCURSES_INTERNALS=1
+  LIBS    += -lncursestw -ldl
+else
+ifeq ($(call cxx-testapi,ncursesw/ncurses.h,libncursesw),yes)
+  DEFINES += -DNCURSES_HEAD="<ncursesw/ncurses.h>"
+  LIBS    += -lncursesw -ldl
+else
+ifeq ($(call cxx-testapi,ncurses.h,libncursesw),yes)
+  DEFINES += -DNCURSES_HEAD="<ncurses.h>"
+  LIBS    += -lncursesw -ldl
+else
+  $(error No libncursesw for wide character support found)
+endif
+endif
+endif
 
 ### The object files (add further files here):
 
@@ -95,7 +115,7 @@ i18n: $(I18Nmsgs) $(I18Npot)
 ### Targets:
 
 libvdr-$(PLUGIN).so: $(OBJS)
-	$(CXX) $(CXXFLAGS) -shared $(OBJS) -lncursesw -o $@
+	$(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@
 	@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
 
 dist: clean
--- PLUGINS/src/skincurses/skincurses.c
+++ PLUGINS/src/skincurses/skincurses.c	2008-04-10 17:40:05.480835000 +0200
@@ -6,7 +6,7 @@
  * $Id: skincurses.c 1.23 2008/03/14 12:57:14 kls Exp $
  */
 
-#include <ncurses.h>
+#include NCURSES_HEAD
 #include <vdr/osd.h>
 #include <vdr/plugin.h>
 #include <vdr/skins.h>