aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuergen Lock <nox@FreeBSD.org>2013-02-16 16:29:03 +0000
committerJuergen Lock <nox@FreeBSD.org>2013-02-16 16:29:03 +0000
commit93af1da5f0834a06fc7b441232babd1e2733440e (patch)
treeddf46aa5efb6a3599b90eec28da8154aceeea8ae
parent2841ee31e42b9a8856f64041082fdc6fb9083fc5 (diff)
downloadports-93af1da5f0834a06fc7b441232babd1e2733440e.tar.gz
ports-93af1da5f0834a06fc7b441232babd1e2733440e.zip
- Update to 0.1.4 .
- Add patches to work with vdr set to "Show channel names with source". - Convert Makefile header.
Notes
Notes: svn path=/head/; revision=312373
-rw-r--r--multimedia/vdr-plugin-markad/Makefile13
-rw-r--r--multimedia/vdr-plugin-markad/distinfo4
-rw-r--r--multimedia/vdr-plugin-markad/files/patch-command-Makefile16
-rw-r--r--multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp53
-rw-r--r--multimedia/vdr-plugin-markad/files/patch-plugin-Makefile12
-rw-r--r--multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp34
6 files changed, 103 insertions, 29 deletions
diff --git a/multimedia/vdr-plugin-markad/Makefile b/multimedia/vdr-plugin-markad/Makefile
index 552ec405cfe5..4ba087970310 100644
--- a/multimedia/vdr-plugin-markad/Makefile
+++ b/multimedia/vdr-plugin-markad/Makefile
@@ -1,15 +1,10 @@
-# New ports collection makefile for: vdr-plugin-markad
-# Date created: Wed Mar 30 22:35:19 CEST 2011
-# Whom: Juergen Lock <nox@freebsd.org>
-#
+# Created by: Juergen Lock <nox@freebsd.org>
# $FreeBSD$
-#
PORTNAME= vdr-plugin-markad
-PORTVERSION= 0.1.2
-PORTREVISION= 14
+PORTVERSION= 0.1.4
CATEGORIES= multimedia
-MASTER_SITES= http://projects.vdr-developer.org/attachments/download/578/
+MASTER_SITES= http://projects.vdr-developer.org/attachments/download/1041/
DISTNAME= ${PORTNAME:S/-plugin-/-/}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
EXTRACT_SUFX= .tgz
@@ -29,6 +24,8 @@ VDR_PLUGIN_MAKEFILES= ${WRKSRC}/command/Makefile ${WRKSRC}/plugin/Makefile
DEFINES+= -DDATADIR=\\\"${DATADIR}\\\" -DPREFIX=\\\"${PREFIX}\\\"
MAKE_ARGS+= DATADIR=${DATADIR} FREEBSD=1
MAKE_ENV+= DEFINES="${DEFINES}"
+MANCOMPRESSED= yes
+MAN1= markad.1
RESTRICTED= installs station logos
diff --git a/multimedia/vdr-plugin-markad/distinfo b/multimedia/vdr-plugin-markad/distinfo
index e40bbd8c1539..b75e1e503b9c 100644
--- a/multimedia/vdr-plugin-markad/distinfo
+++ b/multimedia/vdr-plugin-markad/distinfo
@@ -1,2 +1,2 @@
-SHA256 (vdr/vdr-markad-0.1.2.tgz) = ca2b855435a11b8bd814e031cca3f37fdd8da866d8b7eec889d1a624c5861d6b
-SIZE (vdr/vdr-markad-0.1.2.tgz) = 100832
+SHA256 (vdr/vdr-markad-0.1.4.tgz) = f940765c5dd4a5d66e1ff2650fa0a2b7bda7138953782431230a6c7539334a85
+SIZE (vdr/vdr-markad-0.1.4.tgz) = 118728
diff --git a/multimedia/vdr-plugin-markad/files/patch-command-Makefile b/multimedia/vdr-plugin-markad/files/patch-command-Makefile
index 6a550cec1a62..0d9c33552bde 100644
--- a/multimedia/vdr-plugin-markad/files/patch-command-Makefile
+++ b/multimedia/vdr-plugin-markad/files/patch-command-Makefile
@@ -11,10 +11,20 @@
### Includes and Defines (add further entries here):
PKG-LIBS += libavcodec libavutil
-@@ -88,11 +100,19 @@ markad: $(OBJS)
+@@ -86,17 +90,29 @@ markad: $(OBJS)
$(CXX) $(CXXFLAGS) $(OBJS) $(LIBS) -o $@
- install: markad $(I18Nmsgs)
+
++ifdef FREEBSD
++MANDIR = $(PREFIX)/man
++else
+ MANDIR = $(DESTDIR)/usr/share/man
++endif
+ install-doc:
+ @mkdir -p $(MANDIR)/man1
+ @gzip -c markad.1 > $(MANDIR)/man1/markad.1.gz
+
+ install: install-doc markad $(I18Nmsgs)
+ifdef FREEBSD
+ @mkdir -p $(PREFIX)/bin
+ @cp -f markad $(PREFIX)/bin/markad
@@ -26,7 +36,7 @@
@cp --remove-destination markad $(DESTDIR)/usr/bin/markad
@$(STRIP) $(DESTDIR)/usr/bin/markad
@mkdir -p $(DESTDIR)/var/lib/markad
- @cp logos/* $(DESTDIR)/var/lib/markad
+ @cp -a logos/* $(DESTDIR)/var/lib/markad
+endif
@echo markad installed
diff --git a/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp b/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp
index d14e130e4e4f..6a2c72b5fb6c 100644
--- a/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp
+++ b/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp
@@ -14,7 +14,7 @@
#include <utime.h>
#include <math.h>
#include <limits.h>
-@@ -1389,6 +1395,7 @@ bool cMarkAdStandalone::SaveInfo()
+@@ -1428,6 +1434,7 @@ bool cMarkAdStandalone::SaveInfo()
time_t cMarkAdStandalone::GetBroadcastStart(time_t start, int fd)
{
// get broadcast start from atime of directory (if the volume is mounted with noatime)
@@ -22,7 +22,7 @@
struct mntent *ent;
struct stat statbuf;
FILE *mounts=setmntent(_PATH_MOUNTED,"r");
-@@ -1415,6 +1422,14 @@ time_t cMarkAdStandalone::GetBroadcastSt
+@@ -1454,6 +1461,14 @@ time_t cMarkAdStandalone::GetBroadcastSt
}
}
endmntent(mounts);
@@ -37,9 +37,26 @@
if ((useatime) && (stat(directory,&statbuf)!=-1))
{
-@@ -1900,10 +1915,14 @@ bool cMarkAdStandalone::CreatePidfile()
+@@ -1554,6 +1569,16 @@ bool cMarkAdStandalone::LoadInfo()
+ if (lf) *lf=0;
+ char *cr=strchr(macontext.Info.ChannelName,13);
+ if (cr) *cr=0;
++#if 1
++ int len = strlen(macontext.Info.ChannelName);
++ if (len > 5 &&
++ (!strcmp(macontext.Info.ChannelName + len - 4, " (A)") ||
++ !strcmp(macontext.Info.ChannelName + len - 4, " (C)") ||
++ !strcmp(macontext.Info.ChannelName + len - 4, " (S)") ||
++ !strcmp(macontext.Info.ChannelName + len - 4, " (T)") ||
++ !strcmp(macontext.Info.ChannelName + len - 4, " (I)")))
++ macontext.Info.ChannelName[len - 4] = '\0';
++#endif
+ for (int i=0; i<(int) strlen(macontext.Info.ChannelName); i++)
+ {
+ if (macontext.Info.ChannelName[i]==' ') macontext.Info.ChannelName[i]='_';
+@@ -1961,10 +1986,14 @@ bool cMarkAdStandalone::CreatePidfile()
int pid;
- if (fscanf(oldpid,"%i\n",&pid)==1)
+ if (fscanf(oldpid,"%10i\n",&pid)==1)
{
+#ifndef __FreeBSD__
char procname[256]="";
@@ -51,8 +68,24 @@
+#endif
{
// found another, running markad
- isyslog("another instance is running on this recording");
-@@ -2212,7 +2231,7 @@ cMarkAdStandalone::~cMarkAdStandalone()
+ fprintf(stderr,"another instance is running on %s",directory);
+@@ -2081,6 +2110,7 @@ cMarkAdStandalone::cMarkAdStandalone(con
+ }
+ }
+
++#ifndef __FreeBSD__
+ long lb;
+ errno=0;
+ lb=sysconf(_SC_LONG_BIT);
+@@ -2089,6 +2119,7 @@ cMarkAdStandalone::cMarkAdStandalone(con
+ isyslog("starting v%s (%libit)",VERSION,lb);
+ }
+ else
++#endif
+ {
+ isyslog("starting v%s",VERSION);
+ }
+@@ -2319,7 +2350,7 @@ cMarkAdStandalone::~cMarkAdStandalone()
RemovePidfile();
}
@@ -61,7 +94,7 @@
{
while (*s)
{
-@@ -2238,7 +2257,11 @@ int usage(int svdrpport)
+@@ -2345,7 +2376,11 @@ int usage(int svdrpport)
" ignores hints from info(.vdr) file\n"
" <info> 4 = ignore timer info\n"
"-l --logocachedir\n"
@@ -73,7 +106,7 @@
"-p --priority=<priority>\n"
" software priority of markad when running in background\n"
" <priority> from -20...19, default 19\n"
-@@ -2382,7 +2405,11 @@ int main(int argc, char *argv[])
+@@ -2489,7 +2524,11 @@ int main(int argc, char *argv[])
config.logoHeight=-1;
config.threads=-1;
strcpy(config.svdrphost,"127.0.0.1");
@@ -85,7 +118,7 @@
struct servent *serv=getservbyname("svdrp","tcp");
if (serv)
-@@ -2513,7 +2540,7 @@ int main(int argc, char *argv[])
+@@ -2620,7 +2659,7 @@ int main(int argc, char *argv[])
case 'p':
// --priority
@@ -94,7 +127,7 @@
niceLevel = atoi(optarg);
else
{
-@@ -2699,7 +2726,7 @@ int main(int argc, char *argv[])
+@@ -2806,7 +2845,7 @@ int main(int argc, char *argv[])
break;
case 9: // --svdrpport
diff --git a/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile b/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile
index 15ca635394a9..948b589939c7 100644
--- a/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile
+++ b/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile
@@ -1,17 +1,21 @@
--- a/plugin/Makefile
+++ b/plugin/Makefile
-@@ -100,10 +100,15 @@ i18n: $(I18Nmsgs) $(I18Npot)
+@@ -99,11 +99,19 @@ i18n: $(I18Nmsgs) $(I18Npot)
### Targets:
- install:
+ install: all
++ifdef FREEBSD
+ ${INSTALL_PROGRAM} $(LIBDIR)/libvdr-$(PLUGIN).so.$(APIVERSION) $(PREFIX)/lib/vdr/libvdr-$(PLUGIN).so.$(APIVERSION)
++else
+ cp --remove-destination libvdr-$(PLUGIN).so $(LIBDIR)/libvdr-$(PLUGIN).so.$(APIVERSION)
++endif
libvdr-$(PLUGIN).so: $(OBJS)
$(CXX) $(CXXFLAGS) -shared $(OBJS) $(LIBS) -o $@
+ifdef FREEBSD
-+ @cp -f $@ $(LIBDIR)/$@.$(APIVERSION)
++ cp -f libvdr-$(PLUGIN).so $(LIBDIR)/libvdr-$(PLUGIN).so.$(APIVERSION)
+else
- @cp --remove-destination $@ $(LIBDIR)/$@.$(APIVERSION)
+ cp --remove-destination libvdr-$(PLUGIN).so $(LIBDIR)/libvdr-$(PLUGIN).so.$(APIVERSION)
+endif
clean:
diff --git a/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp b/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp
index 5c7b6c22b13b..3d0d09b8d64c 100644
--- a/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp
+++ b/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp
@@ -13,7 +13,37 @@
#include "status.h"
-@@ -223,6 +229,7 @@ bool cStatusMarkAd::getStatus(int Positi
+@@ -135,7 +141,12 @@ bool cStatusMarkAd::LogoExists(const cha
+ cTimer *timer=NULL;
+ for (cTimer *Timer = Timers.First(); Timer; Timer=Timers.Next(Timer))
+ {
++#if 1
++ if (Timer->Recording() &&
++ (!strcmp(Timer->ToDescr(),Name) || !strcmp(Timer->File(),Name)))
++#else
+ if (Timer->Recording() && (!strcmp(Timer->ToDescr(),Name)))
++#endif
+ {
+ timer=Timer;
+ break;
+@@ -150,6 +161,16 @@ bool cStatusMarkAd::LogoExists(const cha
+ if (!chan) return false;
+ char *cname=strdup(chan->Name());
+ if (!cname) return false;
++#if 1
++ int len = strlen(cname);
++ if (len > 5 &&
++ (!strcmp(cname + len - 4, " (A)") ||
++ !strcmp(cname + len - 4, " (C)") ||
++ !strcmp(cname + len - 4, " (S)") ||
++ !strcmp(cname + len - 4, " (T)") ||
++ !strcmp(cname + len - 4, " (I)")))
++ cname[len - 4] = '\0';
++#endif
+ for (int i=0; i<(int) strlen(cname); i++)
+ {
+ if (cname[i]==' ') cname[i]='_';
+@@ -233,6 +254,7 @@ bool cStatusMarkAd::getStatus(int Positi
if (Position<0) return false;
if (!recs[Position].Pid) return false;
int ret=0;
@@ -21,7 +51,7 @@
char procname[256]="";
snprintf(procname,sizeof(procname),"/proc/%i/stat",recs[Position].Pid);
FILE *fstat=fopen(procname,"r");
-@@ -242,6 +249,59 @@ bool cStatusMarkAd::getStatus(int Positi
+@@ -252,6 +274,59 @@ bool cStatusMarkAd::getStatus(int Positi
}
}
return (ret==1);