diff options
| author | root <root@elwms02.(none)> | 2010-04-06 16:13:08 +0200 |
|---|---|---|
| committer | root <root@elwms02.(none)> | 2010-04-06 16:13:08 +0200 |
| commit | 0e7005fcc7483c01aa102fbea358c5ac65a48d62 (patch) | |
| tree | 11517ce0d3d2977c6732b3aa583b0008083e0bd3 /plugins/mlcd | |
| download | x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.gz x-vdr-0e7005fcc7483c01aa102fbea358c5ac65a48d62.tar.bz2 | |
hello world
Diffstat (limited to 'plugins/mlcd')
| -rw-r--r-- | plugins/mlcd/patches/mlcd-0.0.4a.diff | 132 | ||||
| -rw-r--r-- | plugins/mlcd/plugin.sh | 52 |
2 files changed, 184 insertions, 0 deletions
diff --git a/plugins/mlcd/patches/mlcd-0.0.4a.diff b/plugins/mlcd/patches/mlcd-0.0.4a.diff new file mode 100644 index 0000000..c1c5ff7 --- /dev/null +++ b/plugins/mlcd/patches/mlcd-0.0.4a.diff @@ -0,0 +1,132 @@ +diff -Nur mlcd-0.0.4a/Makefile mlcd-0.0.4a-n/Makefile +--- mlcd-0.0.4a/Makefile 2004-04-25 12:49:19.000000000 +0200 ++++ mlcd-0.0.4a-n/Makefile 2006-11-21 05:10:22.000000000 +0100 +@@ -21,9 +21,13 @@ + LIBDIR = ../../lib + TMPDIR = /tmp + ++### Allow user defined options to overwrite defaults: ++ ++-include $(VDRDIR)/Make.config ++ + ### The version number of VDR (taken from VDR's "config.h"): + +-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') ++APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g') + + ### The name of the distribution archive: + +@@ -43,7 +47,7 @@ + ### The C++ compiler and options: + + CXX = g++ +-CXXFLAGS = -O2 -Wall -Woverloaded-virtual ++CXXFLAGS = -fPIC -O2 -Wall -Woverloaded-virtual + + ### Implicit rules: + +@@ -65,7 +69,7 @@ + + libvdr-$(PLUGIN).so: $(OBJS) + $(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@ +- @cp $@ $(LIBDIR)/$@.$(VDRVERSION) ++ @cp $@ $(LIBDIR)/$@.$(APIVERSION) + + dist: clean + @-rm -rf $(TMPDIR)/$(ARCHIVE) +diff -Nur mlcd-0.0.4a/mlcd.c mlcd-0.0.4a-n/mlcd.c +--- mlcd-0.0.4a/mlcd.c 2005-01-09 16:08:55.000000000 +0100 ++++ mlcd-0.0.4a-n/mlcd.c 2006-11-21 04:57:40.000000000 +0100 +@@ -22,8 +22,13 @@ + virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber); + virtual void SetVolume(int Volume, bool Absolute); + // virtual void OsdProgramme(time_t PresentTime, const char *PresentTitle, const char *PresentSubtitle, time_t FollowingTime, const char *FollowingTitle, const char *FollowingSubtitle); ++#if VDRVERSNUM >= 10338 ++ virtual void Recording(const cDevice *Device, const char *Name, const char *FileName, bool On); ++ virtual void Replaying(const cControl *Control, const char *Name, const char *FileName, bool On); ++#else + virtual void Recording(const cDevice *Device, const char *Name); + virtual void Replaying(const cControl *Control, const char *Name); ++#endif + }; + + void clcdStatus::ChannelSwitch(const cDevice *Device, int ChannelNumber) +@@ -58,6 +63,17 @@ + } + */ + ++#if VDRVERSNUM >= 10338 ++void clcdStatus::Recording(const cDevice *Device, const char *Name, const char *FileName, bool On) ++{ ++ LCD->SetRecordingState(Device->CardIndex(), On ? Name ? Name : "" : NULL); ++} ++ ++void clcdStatus::Replaying(const cControl *Control, const char *Name, const char *FileName, bool On) ++{ ++ LCD->ReplayControl((cControl *) Control, On ? Name ? Name : "" : NULL); ++} ++#else + void clcdStatus::Recording(const cDevice *Device, const char *Name) + { + LCD->SetRecordingState(Device->CardIndex(), Name); +@@ -68,6 +84,7 @@ + + LCD->ReplayControl((cControl *) Control,Name); + } ++#endif + + class cPluginMlcd : public cPlugin { + private: +diff -Nur mlcd-0.0.4a/multilcd.c mlcd-0.0.4a-n/multilcd.c +--- mlcd-0.0.4a/multilcd.c 2005-01-09 16:07:51.000000000 +0100 ++++ mlcd-0.0.4a-n/multilcd.c 2006-11-21 04:57:40.000000000 +0100 +@@ -10,6 +10,7 @@ + #include "multilcd.h" + #include <vdr/tools.h> + #include <vdr/config.h> ++#include <vdr/plugin.h> + // #define M_DEBUG + + +@@ -154,16 +155,18 @@ + //Initialisierung des Arrays + int i; + int j; ++ char* path; ++ asprintf(&path, "%s/%s", cPlugin::ConfigDirectory("mlcd"), FONTFILE); ++ + #ifdef M_DEBUG +- dsyslog(LOG_INFO,"Reading Font description from %s",FONTFILE); ++ dsyslog(LOG_INFO,"Reading Font description from %s", path); + #endif + for (i=0;i<256;i++) + { + for(j=0;j<6;j++) font[i][j] = 0; + } + //Oeffnen der Fontdatei +- const char *name; +- FILE *f=fopen(name=FONTFILE,"r"); ++ FILE *f=fopen(path, "r"); + if(f){ + int n, i; + char buffer[128]; +@@ -181,6 +184,7 @@ + fclose(f); + } + ++ free(path); + return 0; + } + +diff -Nur mlcd-0.0.4a/multilcd.h mlcd-0.0.4a-n/multilcd.h +--- mlcd-0.0.4a/multilcd.h 2004-05-22 10:02:17.000000000 +0200 ++++ mlcd-0.0.4a-n/multilcd.h 2006-11-21 04:57:40.000000000 +0100 +@@ -13,7 +13,7 @@ + #define TEXT 0xb3 + #define GRAPH 0xb4 + +-#define FONTFILE "/etc/char.dat" ++#define FONTFILE "char.dat" + + class mLCD : public cThread { + private: diff --git a/plugins/mlcd/plugin.sh b/plugins/mlcd/plugin.sh new file mode 100644 index 0000000..6af6021 --- /dev/null +++ b/plugins/mlcd/plugin.sh @@ -0,0 +1,52 @@ +#!/bin/sh + +# x-vdr (Installations-Skript fuer einen VDR mit Debian als Basis) +# von Marc Wernecke - www.zulu-entertainment.de +# 05.05.2008 +# +# vdr-mlcd + +# defaults +source ./../../x-vdr.conf +source ./../../setup.conf +source ./../../functions + +WEB="http://vdr-wiki.de/vdr/vdr-mlcd/vdr-mlcd-0.0.4a.tgz" +VERSION="mlcd-0.0.4a" +LINK="mlcd" + +VAR=`basename $WEB` +DIR=`pwd` + +# plugin entfernen +function clean_plugin() { + cd $SOURCEDIR/VDR/PLUGINS/src + rm -rf $LINK* + rm -f $VDRLIBDIR/libvdr-$LINK* + log "cleaning $LINK" +} + +# plugin installieren +function install_plugin() { + download_plugin + extract_plugin + cd $SOURCEDIR/VDR/PLUGINS/src + rm -f $LINK + ln -vfs $VERSION $LINK + patch_plugin + + ## plugin specials - start ## + + ## plugin specials - ende ## +} + +# plugin commands +if [ $# \> 0 ]; then + cmd=$1 + cmd_plugin +else + install_plugin + log "install-plugin fuer $VERSION ist fertig" +fi + +exit 0 |
