diff -ruN skinenigmang-0.0.6-orig/Makefile skinenigmang-0.0.6-darwin/Makefile
--- skinenigmang-0.0.6-orig/Makefile	2008-10-12 21:48:46.000000000 +0300
+++ skinenigmang-0.0.6-darwin/Makefile	2008-10-12 22:03:29.000000000 +0300
@@ -3,6 +3,8 @@
 #
 # $Id: Makefile,v 1.24 2008/03/09 08:31:30 amair Exp $
 
+APPLE_DARWIN = $(shell gcc -dumpmachine | grep -q 'apple-darwin' && echo "1" || echo "0")
+
 # This turns usage of logos in the main menu complete. This might also
 # improve the performance of the menus. EXPERIMENTAL!!!
 #SKINENIGMA_NO_MENULOGO = 1
@@ -12,7 +14,7 @@
 
 # If you have installed ImageMagick and want to use
 # images in event's and recording's details.
-#HAVE_IMAGEMAGICK = 1
+HAVE_IMAGEMAGICK = 1
 
 # If you are using the epgsearch plugin and want to see the number of
 # timer conflicts in the main menu's info area.
@@ -37,11 +39,15 @@
 #SKINENIGMA_FONTS = "\"Test Font\", \"Test2 Font\""
 
 # If you have installed FreeType2 and want to use TrueTypeFonts.
-#HAVE_FREETYPE = 1
+HAVE_FREETYPE = 1
 
 # Strip debug symbols?  Set eg. to /bin/true if not
 #STRIP = strip
+ifeq ($(APPLE_DARWIN), 1)
+STRIP = /usr/bin/true
+else
 STRIP = /bin/true
+endif
 
 # The official name of this plugin.
 # This name will be used in the '-P...' option of VDR to load the plugin.
@@ -56,7 +62,11 @@
 ### The C++ compiler and options:
 
 CXX      ?= g++
+ifeq ($(APPLE_DARWIN), 1)
+CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual -Wno-parentheses -fno-common -bundle -flat_namespace -undefined suppress
+else
 CXXFLAGS ?= -fPIC -g -O2 -Wall -Woverloaded-virtual
+endif
 
 ### The directory environment:
 
@@ -64,6 +74,10 @@
 LIBDIR = ../../lib
 TMPDIR = /tmp
 
+ifeq ($(APPLE_DARWIN), 1)
+LIBDIRS += -L/sw/lib -L/opt/local/lib
+endif
+
 ### Allow user defined options to overwrite defaults:
 #TODO
 CLEAR_BUG_WORKAROUND = 1
@@ -86,6 +100,10 @@
 
 INCLUDES += -I$(VDRDIR)/include
 
+ifeq ($(APPLE_DARWIN), 1)
+INCLUDES += -I/sw/include/ImageMagick -I/opt/local/include/ImageMagick
+endif
+
 DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
 
 ifdef SKINENIGMA_USE_PLUGIN_EPGSEARCH 
@@ -221,11 +239,20 @@
 ### Targets:
 
 libvdr-$(PLUGIN).so: $(OBJS)
+ifeq ($(APPLE_DARWIN), 1)
+	$(CXX) $(CXXFLAGS) -dynamic $(OBJS) $(LIBS) $(LIBDIRS) -o $@
+else
 	$(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@
+endif
+
 ifndef SKINENIGMA_DEBUG
 	@$(STRIP) $@
 endif
+ifeq ($(APPLE_DARWIN), 1)
+	@cp $@ $(LIBDIR)/$@.$(APIVERSION)
+else
 	@cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
+endif
 
 dist: clean i18n.c
 	@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff -ruN skinenigmang-0.0.6-orig/enigma.c skinenigmang-0.0.6-darwin/enigma.c
--- skinenigmang-0.0.6-orig/enigma.c	2008-10-12 21:48:46.000000000 +0300
+++ skinenigmang-0.0.6-darwin/enigma.c	2008-10-12 21:48:11.000000000 +0300
@@ -41,6 +41,8 @@
 
 #include "tools.h"
 
+#include "vdr/darwinutils.h"
+
 #define MAX_AUDIO_BITMAPS      3
 #define MAX_SPEED_BITMAPS      10
 #define MAX_TRICKSPEED_BITMAPS 4
@@ -1801,9 +1803,15 @@
   if (!s)
     return false;
 
+#ifdef __APPLE__
+  const char *b = strchrnul_darwin(s, '\t');
+  while (*b && Tab-- > 0) {
+    b = strchrnul_darwin(b + 1, '\t');
+#else
   const char *b = strchrnul(s, '\t');
   while (*b && Tab-- > 0) {
     b = strchrnul(b + 1, '\t');
+#endif
   }
   if (!*b)
     return (Tab <= 0) ? true : false;

