Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Sep 2015 19:49:17 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r397755 - in head: . net/mediatomb net/mediatomb/files
Message-ID:  <201509241949.t8OJnHbU007061@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Thu Sep 24 19:49:17 2015
New Revision: 397755
URL: https://svnweb.freebsd.org/changeset/ports/397755

Log:
  net/mediatomb: remove BROKEN, fix build
  
  - now uses UIDs/GIDs
  - fix build in certain cases
  
  PR:		198436, 202467
  Submitted by:	Pavel Nedoshivkin <nedoshivkin@gmail.com>, dim
  Approved by:	maintainer (timeout)

Added:
  head/net/mediatomb/files/patch-timer.cc   (contents, props changed)
Modified:
  head/GIDs
  head/UIDs
  head/net/mediatomb/Makefile
  head/net/mediatomb/files/config.xml.dist.in
  head/net/mediatomb/files/mediatomb.in
  head/net/mediatomb/files/pkg-install.in
  head/net/mediatomb/pkg-plist

Modified: head/GIDs
==============================================================================
--- head/GIDs	Thu Sep 24 19:43:48 2015	(r397754)
+++ head/GIDs	Thu Sep 24 19:49:17 2015	(r397755)
@@ -280,6 +280,7 @@ teamspeak:*:942:
 dnetfold:*:943:
 bbs:*:944:
 dbxml:*:945:
+mediatomb:*:946:
 gnokii:*:947:
 dnrd:*:948:
 _lldpd:*:949:

Modified: head/UIDs
==============================================================================
--- head/UIDs	Thu Sep 24 19:43:48 2015	(r397754)
+++ head/UIDs	Thu Sep 24 19:49:17 2015	(r397755)
@@ -284,6 +284,7 @@ teamspeak:*:942:942::0:0:TeamSpeak user:
 dnetfold:*:943:943::0:0:& user:/nonexistent:/usr/sbin/nologin
 bbs:*:944:944::0:0:& user:/nonexistent:/usr/sbin/nologin
 dbxml:*:945:945::0:0:& user:/nonexistent:/usr/sbin/nologin
+mediatomb:*:946:946::0:0:Mediatomb UPnP AV MediaServer:/nonexistent:/usr/sbin/nologin
 mapred:*:947:955::0:0:Hadoop MapReduce user:/nonexistent:/usr/sbin/nologin
 dnrd:*:948:948::0:0:& user:/nonexistent:/usr/sbin/nologin
 _lldpd:*:949:949::0:0:lldpd user:/nonexistent:/usr/sbin/nologin

Modified: head/net/mediatomb/Makefile
==============================================================================
--- head/net/mediatomb/Makefile	Thu Sep 24 19:43:48 2015	(r397754)
+++ head/net/mediatomb/Makefile	Thu Sep 24 19:49:17 2015	(r397755)
@@ -10,39 +10,30 @@ MASTER_SITES=	SF/${PORTNAME}/MediaTomb/$
 MAINTAINER=	leo@mediatomb.cc
 COMMENT=	UPnP AV MediaServer
 
-BROKEN=		Fails to configure, does not use USERS/GROUPS
+LICENSE=	GPLv2
+LICENSE_FILE=	${WRKSRC}/COPYING
 
 LIB_DEPENDS=	libexpat.so:${PORTSDIR}/textproc/expat2
 
 GNU_CONFIGURE=	yes
 CPPFLAGS+=	-I${LOCALBASE}/include
-LDFLAGS+=	-lpthread
+LDFLAGS+=	-lpthread -L${LOCALBASE}/lib ${ICONV_LIB}
 CONFIGURE_ARGS=	--with-search="${LOCALBASE}" \
 		--disable-inotify
 CONFIGURE_ENV=	PTHREAD_LIBS="-lpthread"
-USES=		iconv
+USES=		compiler:gcc-c++11-lib iconv
 USE_RC_SUBR=	mediatomb
 
-# --- configurable variables ---
-MEDIATOMB_USER?=	mediatomb
-MEDIATOMB_GROUP?=	mediatomb
-MEDIATOMB_DIR?=		/var/mediatomb
-MEDIATOMB_MASK?=	750
-# ---
+USERS=		mediatomb
+GROUPS=		${USERS}
 
 SUB_FILES=	config.xml.dist \
 		pkg-install \
 		pkg-deinstall
 
-SUB_LIST=	MEDIATOMB_USER=${MEDIATOMB_USER} \
-		MEDIATOMB_GROUP=${MEDIATOMB_GROUP} \
-		MEDIATOMB_DIR=${MEDIATOMB_DIR} \
-		MEDIATOMB_MASK=${MEDIATOMB_MASK}
-
-PLIST_SUB=	MEDIATOMB_USER=${MEDIATOMB_USER} \
-		MEDIATOMB_GROUP=${MEDIATOMB_GROUP} \
-		MEDIATOMB_DIR=${MEDIATOMB_DIR} \
-		MEDIATOMB_MASK=${MEDIATOMB_MASK} \
+SUB_LIST=	MEDIATOMB_USER=${USERS} \
+		MEDIATOMB_GROUP=${GROUPS} \
+		MEDIATOMB_DIR=${DESTDIR}/var/db/mediatomb
 
 OPTIONS_DEFINE=	JS LIBEXIF FFMPEGTHUMBNAILER \
 		EXTERNAL_TRANSCODING CURL DEBUG
@@ -164,11 +155,10 @@ CONFIGURE_ARGS+=	--enable-tombdebug
 CONFIGURE_ARGS+=	--disable-tombdebug
 .endif
 
-pre-install:
-		PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
-
 post-install:
-	@${MKDIR} -m ${MEDIATOMB_MASK} -p ${STAGEDIR}${PREFIX}/etc/mediatomb
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/mediatomb
+	${MKDIR} ${STAGEDIR}/var/log/mediatomb
+	${MKDIR} ${STAGEDIR}/var/db/mediatomb
 	@${INSTALL} ${COPY} ${WRKDIR}/config.xml.dist ${STAGEDIR}${PREFIX}/etc/mediatomb/config.xml.dist
 
 .include <bsd.port.post.mk>

Modified: head/net/mediatomb/files/config.xml.dist.in
==============================================================================
--- head/net/mediatomb/files/config.xml.dist.in	Thu Sep 24 19:43:48 2015	(r397754)
+++ head/net/mediatomb/files/config.xml.dist.in	Thu Sep 24 19:49:17 2015	(r397755)
@@ -29,7 +29,6 @@
     <custom-http-headers>
       <add header="X-User-Agent: redsonic"/>
     </custom-http-headers>
-
     <manufacturerURL>redsonic.com</manufacturerURL>
     <modelNumber>105</modelNumber>
     -->
@@ -37,8 +36,17 @@
     <!--
        <upnp-string-limit>101</upnp-string-limit>
     -->
+    <!--
+     <custom-http-headers>
+      <add header="transferMode.dlna.org: Streaming"/>
+      <add header="contentFeatures.dlna.org: DLNA.ORG_OP=01;DLNA.ORG_CI=0;DLNA.ORG_FLAGS=01700000000000000000000000000000"/>
+    </custom-http-headers>
+    -->
   </server>
   <import hidden-files="no">
+  <filesystem-charset>UTF-8</filesystem-charset>
+  <metadata-charset>UTF-8</metadata-charset>
+  <playlist-charset>UTF-8</playlist-charset>
     <scripting script-charset="UTF-8">
       <common-script>%%DATADIR%%/js/common.js</common-script>
       <playlist-script>%%DATADIR%%/js/playlists.js</playlist-script>
@@ -67,6 +75,8 @@
         <map from="m3u" to="audio/x-mpegurl"/>
         <map from="pls" to="audio/x-scpls"/>
         <map from="flv" to="video/x-flv"/>
+	<map from="mkv" to="video/x-mkv"/>
+        <map from="avi" to="video/x-msvideo"/>
         <!-- Uncomment the line below for PS3 divx support -->
         <!-- <map from="avi" to="video/divx"/> -->
         <!-- Uncomment the line below for D-Link DSM / ZyXEL DMA-1000 -->

Modified: head/net/mediatomb/files/mediatomb.in
==============================================================================
--- head/net/mediatomb/files/mediatomb.in	Thu Sep 24 19:43:48 2015	(r397754)
+++ head/net/mediatomb/files/mediatomb.in	Thu Sep 24 19:49:17 2015	(r397755)
@@ -18,11 +18,11 @@
 mediatomb_enable=${mediatomb_enable-"NO"}
 # mediatomb_flags="<set as needed>"
 # mediatomb_interface="<set as needed>"
-mediatomb_mtuser=${mediatomb_mtuser-"%%MEDIATOMB_USER%%"}
-mediatomb_mtgroup=${mediatomb_mtgroup-"%%MEDIATOMB_GROUP%%"}
+mediatomb_mtuser=${mediatomb_mtuser-"mediatomb"}
+mediatomb_mtgroup=${mediatomb_mtgroup-"mediatomb"}
 mediatomb_config=${mediatomb_config-"%%PREFIX%%/etc/mediatomb/config.xml"}
-mediatomb_logfile=${mediatomb_logfile-"%%MEDIATOMB_DIR%%/mediatomb.log"}
-mediatomb_pidfile=${mediatomb_pidfile-"%%MEDIATOMB_DIR%%/mediatomb.pid"}
+mediatomb_logfile=${mediatomb_logfile-"/var/log/mediatomb/mediatomb.log"}
+mediatomb_pidfile=${mediatomb_pidfile-"/var/run/mediatomb.pid"}
 
 name="mediatomb"
 rcvar=mediatomb_enable

Added: head/net/mediatomb/files/patch-timer.cc
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/mediatomb/files/patch-timer.cc	Thu Sep 24 19:49:17 2015	(r397755)
@@ -0,0 +1,20 @@
+--- src/timer.cc.orig	2010-03-25 15:58:11.000000000 +0100
++++ src/timer.cc	2015-03-08 22:18:05.760740000 +0100
+@@ -33,12 +33,15 @@
+     #include "autoconfig.h"
+ #endif
+ 
++#include "singleton.h"
++
++class Timer;
++SINGLETON_MUTEX(Timer, true);
++
+ #include "timer.h"
+ 
+ using namespace zmm;
+ 
+-SINGLETON_MUTEX(Timer, true);
+-
+ template <>
+ Ref<Array<Timer::TimerSubscriberElement<TimerSubscriberSingleton<Object> > > > Timer::getAppropriateSubscribers<TimerSubscriberSingleton<Object> >()
+ {

Modified: head/net/mediatomb/files/pkg-install.in
==============================================================================
--- head/net/mediatomb/files/pkg-install.in	Thu Sep 24 19:43:48 2015	(r397754)
+++ head/net/mediatomb/files/pkg-install.in	Thu Sep 24 19:49:17 2015	(r397755)
@@ -6,35 +6,34 @@ if [ "$2" != "PRE-INSTALL" ]; then
     exit 0
 fi
 
-PREFIX=${PKG_PREFIX:-%%PREFIX%%}
+#PREFIX=${PKG_PREFIX:-%%PREFIX%%}
 
-USER=%%MEDIATOMB_USER%%
-GROUP=%%MEDIATOMB_GROUP%%
+#USER=%%MEDIATOMB_USER%%
+#GROUP=%%MEDIATOMB_GROUP%%
 
-PW="pw"
-INSTALL=%%INSTALL%%
-DIR=%%MEDIATOMB_DIR%%
-MASK=%%MEDIATOMB_MASK%%
-
-if ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then
-    if ${PW} groupadd ${GROUP}; then
-        echo "Added group \"${GROUP}\"."
-    else
-        echo "Adding group \"${GROUP}\" failed..."
-        exit 1
-    fi
-fi
-
-if ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then
-    if ${PW} useradd ${USER} -g ${GROUP} -h - \
-        -s "/sbin/nologin" -d "/nonexistent" \
-        -c "MediaTomb"; \
-    then
-        echo "Added user \"${USER}\"."
-    else
-        echo "Adding user \"${USER}\" failed..."
-        exit 1
-    fi
-fi
+#INSTALL=%%INSTALL%%
+#DIR=%%MEDIATOMB_DIR%%
+#MASK=%%MEDIATOMB_MASK%%
+
+#if ! ${PW} groupshow "${GROUP}" 2>/dev/null 1>&2; then
+#    if ${PW} groupadd ${GROUP}; then
+#        echo "Added group \"${GROUP}\"."
+#    else
+#        echo "Adding group \"${GROUP}\" failed..."
+#        exit 1
+#    fi
+#fi
+
+#if ! ${PW} usershow "${USER}" 2>/dev/null 1>&2; then
+#    if ${PW} useradd ${USER} -g ${GROUP} -h - \
+#        -s "/sbin/nologin" -d "/nonexistent" \
+#        -c "MediaTomb"; \
+#    then
+#        echo "Added user \"${USER}\"."
+#    else
+#        echo "Adding user \"${USER}\" failed..."
+#        exit 1
+#    fi
+#fi
 
 exit 0

Modified: head/net/mediatomb/pkg-plist
==============================================================================
--- head/net/mediatomb/pkg-plist	Thu Sep 24 19:43:48 2015	(r397754)
+++ head/net/mediatomb/pkg-plist	Thu Sep 24 19:49:17 2015	(r397755)
@@ -1,7 +1,4 @@
 bin/mediatomb
-@exec chgrp %%MEDIATOMB_GROUP%% %D/bin/mediatomb
-@exec chmod a-x %D/bin/mediatomb
-@exec chmod g+x %D/bin/mediatomb
 man/man1/mediatomb.1.gz
 %%DATADIR%%/js/import.js
 %%DATADIR%%/js/playlists.js
@@ -90,23 +87,15 @@ man/man1/mediatomb.1.gz
 %%DATADIR%%/web/top.html
 %%DATADIR%%/web/topleft.html
 %%DATADIR%%/web/topright.html
-@owner %%MEDIATOMB_USER%%
-@group %%MEDIATOMB_GROUP%%
-@unexec if cmp -s %D/etc/mediatomb/config.xml.dist %D/etc/mediatomb/config.xml; then rm -f %D/etc/mediatomb/config.xml; fi
-@dirrmtry etc/mediatomb
+@unexec if cmp -s %D/etc/mediatomb/config.xml.dist %D/%%DATADIR%%/etc/mediatomb/config.xml; then rm -f %D/etc/mediatomb/config.xml; fi
+@dir(mediatomb,mediatomb,750) etc/mediatomb
 etc/mediatomb/config.xml.dist
-@exec mkdir -m %%MEDIATOMB_MASK%% -p %D/etc/mediatomb
-@exec chown %%MEDIATOMB_USER%%:%%MEDIATOMB_GROUP%% %D/etc/mediatomb
-@exec chown %%MEDIATOMB_USER%%:%%MEDIATOMB_GROUP%% %D/etc/mediatomb/config.xml.dist
-@exec chmod 640 %D/etc/mediatomb/config.xml.dist
-@exec [ -f %B/config.xml ] || cp -p %B/%f %B/config.xml
-@unexec rmdir %%MEDIATOMB_DIR%% 2>/dev/null 1>&2 || true
-@exec mkdir -m %%MEDIATOMB_MASK%% -p %%MEDIATOMB_DIR%%
-@exec chown %%MEDIATOMB_USER%%:%%MEDIATOMB_GROUP%% %%MEDIATOMB_DIR%%
-@dirrm %%DATADIR%%/js
-@dirrm %%DATADIR%%/web/icons/nanotree/images
-@dirrm %%DATADIR%%/web/icons/nanotree
-@dirrm %%DATADIR%%/web/icons
-@dirrm %%DATADIR%%/web/js
-@dirrm %%DATADIR%%/web
-@dirrm %%DATADIR%%
+@dir %%DATADIR%%/js
+@dir %%DATADIR%%/web/icons/nanotree/images
+@dir %%DATADIR%%/web/icons/nanotree
+@dir %%DATADIR%%/web/icons
+@dir %%DATADIR%%/web/js
+@dir %%DATADIR%%/web
+@dir %%DATADIR%%
+@dir(mediatomb,mediatomb,750) /var/log/mediatomb
+@dir(mediatomb,mediatomb,750) /var/db/mediatomb



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