Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 Feb 2013 16:29:04 +0000 (UTC)
From:      Juergen Lock <nox@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r312373 - in head/multimedia/vdr-plugin-markad: . files
Message-ID:  <201302161629.r1GGT4ia052551@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: nox
Date: Sat Feb 16 16:29:03 2013
New Revision: 312373
URL: http://svnweb.freebsd.org/changeset/ports/312373

Log:
  - Update to 0.1.4 .
  - Add patches to work with vdr set to "Show channel names with source".
  - Convert Makefile header.

Modified:
  head/multimedia/vdr-plugin-markad/Makefile
  head/multimedia/vdr-plugin-markad/distinfo   (contents, props changed)
  head/multimedia/vdr-plugin-markad/files/patch-command-Makefile   (contents, props changed)
  head/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp   (contents, props changed)
  head/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile   (contents, props changed)
  head/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp   (contents, props changed)

Modified: head/multimedia/vdr-plugin-markad/Makefile
==============================================================================
--- head/multimedia/vdr-plugin-markad/Makefile	Sat Feb 16 16:22:44 2013	(r312372)
+++ head/multimedia/vdr-plugin-markad/Makefile	Sat Feb 16 16:29:03 2013	(r312373)
@@ -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/
 DEFINES+=	-DDATADIR=\\\"${DATADIR}\\\" -DPREFIX=\\\"${PREFIX}\\\"
 MAKE_ARGS+=	DATADIR=${DATADIR} FREEBSD=1
 MAKE_ENV+=	DEFINES="${DEFINES}"
+MANCOMPRESSED=	yes
+MAN1=		markad.1
 
 RESTRICTED=	installs station logos
 

Modified: head/multimedia/vdr-plugin-markad/distinfo
==============================================================================
--- head/multimedia/vdr-plugin-markad/distinfo	Sat Feb 16 16:22:44 2013	(r312372)
+++ head/multimedia/vdr-plugin-markad/distinfo	Sat Feb 16 16:29:03 2013	(r312373)
@@ -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

Modified: head/multimedia/vdr-plugin-markad/files/patch-command-Makefile
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-command-Makefile	Sat Feb 16 16:22:44 2013	(r312372)
+++ head/multimedia/vdr-plugin-markad/files/patch-command-Makefile	Sat Feb 16 16:29:03 2013	(r312373)
@@ -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
  

Modified: head/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp	Sat Feb 16 16:22:44 2013	(r312372)
+++ head/multimedia/vdr-plugin-markad/files/patch-command-markad-standalone.cpp	Sat Feb 16 16:29:03 2013	(r312373)
@@ -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

Modified: head/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile	Sat Feb 16 16:22:44 2013	(r312372)
+++ head/multimedia/vdr-plugin-markad/files/patch-plugin-Makefile	Sat Feb 16 16:29:03 2013	(r312373)
@@ -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:

Modified: head/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp
==============================================================================
--- head/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp	Sat Feb 16 16:22:44 2013	(r312372)
+++ head/multimedia/vdr-plugin-markad/files/patch-plugin-status.cpp	Sat Feb 16 16:29:03 2013	(r312373)
@@ -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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201302161629.r1GGT4ia052551>