minidlna: update to 1.2.1.20180601

This version is from a git snapshot after the 1.2.1 release. Notable
changes are kqueue support for automatically detecting file changes.
This commit is contained in:
jmcneill 2018-06-02 12:53:10 +00:00
parent 80b75a70c7
commit 579b721cc6
7 changed files with 121 additions and 10 deletions

View file

@ -1,9 +1,11 @@
# $NetBSD: Makefile,v 1.30 2018/04/14 07:34:33 adam Exp $
# $NetBSD: Makefile,v 1.31 2018/06/02 12:53:10 jmcneill Exp $
DISTNAME= minidlna-1.1.5
PKGREVISION= 12
PKGNAME= minidlna-1.2.1.20180601
DISTNAME= minidlna-git-799e6cf505ec470b2bf0ae4118143380aa16b837
CATEGORIES= multimedia
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=minidlna/}
#MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=minidlna/}
MASTER_SITES= https://sourceforge.net/code-snapshots/git/m/mi/minidlna/git.git/
EXTRACT_SUFX= .zip
MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= http://minidlna.sourceforge.net/
@ -12,7 +14,7 @@ LICENSE= gnu-gpl-v2
GNU_CONFIGURE= yes
EGDIR= ${PREFIX}/share/examples/minidlna
USE_TOOLS+= msgfmt
USE_TOOLS+= msgfmt autoreconf autoconf automake
CONF_FILES= ${EGDIR}/minidlna.conf \
${PKG_SYSCONFDIR}/minidlna.conf
@ -20,11 +22,17 @@ RCD_SCRIPTS= minidlna
INSTALLATION_DIRS= share/examples/minidlna ${PKGMANDIR}/man5 ${PKGMANDIR}/man8
pre-configure:
cd ${WRKSRC} && autoreconf -vif
pre-install:
${INSTALL_DATA} ${WRKSRC}/minidlna.conf ${DESTDIR}${EGDIR}
${INSTALL_DATA} ${WRKSRC}/minidlna.conf.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
${INSTALL_DATA} ${WRKSRC}/minidlnad.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
BUILD_DEPENDS+= gettext-tools-[0-9]*:../../devel/gettext-tools
.include "../../multimedia/ffmpeg3/buildlink3.mk"
.include "../../audio/flac/buildlink3.mk"
.include "../../audio/libvorbis/buildlink3.mk"

View file

@ -1,7 +1,12 @@
$NetBSD: distinfo,v 1.8 2016/07/07 08:31:20 wiz Exp $
$NetBSD: distinfo,v 1.9 2018/06/02 12:53:10 jmcneill Exp $
SHA1 (minidlna-1.1.5.tar.gz) = 8185337621f5f9111118d8a4bca1e8cfcdd19505
RMD160 (minidlna-1.1.5.tar.gz) = 6a86c63ca1186105ef4cdc5e98d06e95d536d1b8
SHA512 (minidlna-1.1.5.tar.gz) = 2a8eaa42fcda6f98648f1726af5cdba6d2358c386440dd0de933364cfbd1ced2fee5f883033e1a5a692b760749beb2c12798020a3591ddcea22663102d4f3dfa
Size (minidlna-1.1.5.tar.gz) = 488191 bytes
SHA1 (minidlna-git-799e6cf505ec470b2bf0ae4118143380aa16b837.zip) = 20e445226350a138f85554a00ffae2ecb5cff50a
RMD160 (minidlna-git-799e6cf505ec470b2bf0ae4118143380aa16b837.zip) = ecd8872943fe8d95f21670d9ef706bb13d4f2a97
SHA512 (minidlna-git-799e6cf505ec470b2bf0ae4118143380aa16b837.zip) = 9e9643ea67f305134172bd98789a6bc0ce7a8e6c0022484d04daf9f8031a1718373c9c21a9ec55f396fe5e23c8a05255fea897949a319811aeef5ecee7bab830
Size (minidlna-git-799e6cf505ec470b2bf0ae4118143380aa16b837.zip) = 388259 bytes
SHA1 (patch-configure.ac) = 514c50b89599f0dfdc5b5f75e0fd67848980da19
SHA1 (patch-icons.c) = 953a0fa460c674c0cacba133c640028ef282fd8f
SHA1 (patch-kqueue.c) = fb698c407bf21046625ae73b0051fa75eef71ff6
SHA1 (patch-monitor.c) = 82df49892a8967d9af28f8fe1ef1cdb01698400b
SHA1 (patch-monitor__kqueue.c) = f55df2390c7364aa3fc4945cab2cab66bd79d95a
SHA1 (patch-utils.h) = 3748c6eabade231d01adabfd08594965d242e128

View file

@ -0,0 +1,14 @@
$NetBSD: patch-configure.ac,v 1.1 2018/06/02 12:53:10 jmcneill Exp $
--- configure.ac.orig 2018-05-04 23:11:25.000000000 +0000
+++ configure.ac
@@ -638,6 +638,9 @@ case "$target_os" in
;;
linux*)
;;
+ netbsd*)
+ OS_URL=http://www.NetBSD.org/
+ ;;
openbsd*)
OS_URL=http://www.openbsd.org/
;;

View file

@ -0,0 +1,12 @@
$NetBSD: patch-kqueue.c,v 1.1 2018/06/02 12:53:10 jmcneill Exp $
--- kqueue.c.orig 2018-05-04 23:11:25.000000000 +0000
+++ kqueue.c
@@ -28,6 +28,7 @@
#include <sys/types.h>
#include <sys/event.h>
+#include <sys/time.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>

View file

@ -0,0 +1,13 @@
$NetBSD: patch-monitor.c,v 1.1 2018/06/02 12:53:10 jmcneill Exp $
--- monitor.c.orig 2018-05-04 23:11:25.000000000 +0000
+++ monitor.c
@@ -442,7 +442,7 @@ monitor_insert_file(const char *name, co
}
depth++;
strcpy(last_dir, parent_buf);
- parent_buf = dirname(parent_buf);
+ parent_buf = dirname(last_dir);
}
while( strcmp(parent_buf, "/") != 0 );

View file

@ -0,0 +1,44 @@
$NetBSD: patch-monitor__kqueue.c,v 1.1 2018/06/02 12:53:10 jmcneill Exp $
--- monitor_kqueue.c.orig 2018-05-04 23:11:25.000000000 +0000
+++ monitor_kqueue.c
@@ -181,14 +181,35 @@ dir_vnode_process(struct event *ev, u_in
break;
}
if (!found_flag ) {
+ struct timespec ts;
struct stat st;
+ bool error_flag = false;
- if (stat(tmp_path, &st) != 0) {
- DPRINTF(E_ERROR, L_INOTIFY,
- "stat(%s): %s\n", tmp_path,
- strerror(errno));
+ for (;;) {
+ if (stat(tmp_path, &st) != 0) {
+ DPRINTF(E_ERROR, L_INOTIFY,
+ "stat(%s): %s\n", tmp_path,
+ strerror(errno));
+ error_flag = true;
+ break;
+ }
+ if (clock_gettime(CLOCK_REALTIME, &ts) != 0) {
+ DPRINTF(E_ERROR, L_INOTIFY,
+ "clock_gettime(CLOCK_REALTIME): %s\n",
+ strerror(errno));
+ break;
+ }
+ ts.tv_sec -= 5;
+ if (timespeccmp(&st.st_mtimespec, &ts, <)) {
+ break;
+ }
+ sleep(1);
+ }
+
+ if (error_flag) {
continue;
}
+
esc_name = strdup(entry->d_name);
if (esc_name == NULL) {
DPRINTF(E_ERROR, L_INOTIFY,

View file

@ -0,0 +1,15 @@
$NetBSD: patch-utils.h,v 1.1 2018/06/02 12:53:10 jmcneill Exp $
--- utils.h.orig 2018-05-04 23:11:25.000000000 +0000
+++ utils.h
@@ -109,4 +109,10 @@ void timevalsub(struct timeval *t1, cons
((tvp)->tv_usec cmp (uvp)->tv_usec) : \
((tvp)->tv_sec cmp (uvp)->tv_sec))
+/* Timespec manipulations */
+#define timespeccmp(tvp, uvp, cmp) \
+ (((tvp)->tv_sec == (uvp)->tv_sec) ? \
+ ((tvp)->tv_nsec cmp (uvp)->tv_nsec) : \
+ ((tvp)->tv_sec cmp (uvp)->tv_sec))
+
#endif