Files
haikuports/net-misc/minidlna/patches/minidlna-1.3.3.patchset
OscarL ba1ee3d5ba minidlna: fix build, clean up dependencies, enable recipe. (#11060)
Built and smoke tested on 32 bits.

Haven't yet tested playing media from other devices, but the server
already communicates with clients such as routers and TVs on the same
LAN.
2024-09-05 13:59:35 +02:00

189 lines
5.1 KiB
Plaintext

From 219687845a45096dd7f23aef74cd00b95f157886 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 29 Apr 2018 17:23:23 +0200
Subject: Haiku doesn't have setpriority nor d_type
diff --git a/monitor.c b/monitor.c
index b5757d9..22d8c7c 100644
--- a/monitor.c
+++ b/monitor.c
@@ -341,6 +341,7 @@ monitor_insert_directory(int fd, char *name, const char * path)
continue;
esc_name = escape_tag(e->d_name, 1);
snprintf(path_buf, sizeof(path_buf), "%s/%s", path, e->d_name);
+ #ifndef __HAIKU__
switch( e->d_type )
{
case DT_DIR:
@@ -351,6 +352,9 @@ monitor_insert_directory(int fd, char *name, const char * path)
default:
break;
}
+ #else
+ type = resolve_unknown_type(path_buf, dir_types);
+ #endif
if( type == TYPE_DIR )
{
monitor_insert_directory(fd, esc_name, path_buf);
diff --git a/scanner.c b/scanner.c
index f240a2f..4000ac7 100644
--- a/scanner.c
+++ b/scanner.c
@@ -897,7 +897,9 @@ start_scanner(void)
struct media_dir_s *media_path;
char path[MAXPATHLEN];
+ #ifndef __HAIKU__
if (setpriority(PRIO_PROCESS, 0, 15) == -1)
+ #endif
DPRINTF(E_WARN, L_INOTIFY, "Failed to reduce scanner thread priority\n");
setlocale(LC_COLLATE, "");
diff --git a/upnphttp.c b/upnphttp.c
index 477ebef..94bf567 100644
--- a/upnphttp.c
+++ b/upnphttp.c
@@ -1821,10 +1821,12 @@ SendResp_resizedimg(struct upnphttp * h, char * object)
INIT_STR(str, header);
+#ifndef __HAIKU__
#if USE_FORK
if( (h->reqflags & FLAG_XFERBACKGROUND) && (setpriority(PRIO_PROCESS, 0, 19) == 0) )
tmode = "Background";
else
+#endif
#endif
tmode = "Interactive";
start_dlna_header(&str, 200, tmode, "image/jpeg");
@@ -2041,10 +2043,12 @@ SendResp_dlnafile(struct upnphttp *h, char *object)
INIT_STR(str, header);
+#ifndef __HAIKU__
#if USE_FORK
if( (h->reqflags & FLAG_XFERBACKGROUND) && (setpriority(PRIO_PROCESS, 0, 19) == 0) )
tmode = "Background";
else
+#endif
#endif
if( strncmp(last_file.mime, "image", 5) == 0 )
tmode = "Interactive";
--
2.45.2
From 84a7fe82dacb95666e4d4fe95889bfe50369fe63 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Sun, 24 Jun 2018 07:06:37 +0200
Subject: set correct path for the conf file
diff --git a/minidlna.c b/minidlna.c
index 999adee..277029c 100644
--- a/minidlna.c
+++ b/minidlna.c
@@ -548,7 +548,7 @@ init(int argc, char **argv)
int options_flag = 0;
struct sigaction sa;
const char * presurl = NULL;
- const char * optionsfile = "/etc/minidlna.conf";
+ const char * optionsfile = "/system/settings/minidlna.conf";
char mac_str[13];
char *string, *word;
char *path;
--
2.45.2
From 300ff2ff23a3b4bb1c53e1808112d92d64e43e16 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Wed, 16 Nov 2022 08:04:10 +0100
Subject: libav-fix patch (from Alpine Linux)
diff --git a/Makefile.am b/Makefile.am
index 1e33833..dcfc625 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -70,7 +70,6 @@ testupnpdescgen_LDADD = \
@LIBID3TAG_LIBS@ \
@LIBSQLITE3_LIBS@ \
@LIBAVFORMAT_LIBS@ \
- @LIBAVUTIL_LIBS@ \
@LIBEXIF_LIBS@ \
-lFLAC $(flacogglibs) $(vorbislibs) $(avahilibs)
--
2.45.2
From 46dd547b77db3ba73f8e4a9e4a876276dbba0877 Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Thu, 5 Sep 2024 02:49:50 -0300
Subject: Disable kqueue for now (no EVENT_VNODE).
diff --git a/Makefile.am b/Makefile.am
index dcfc625..f5ed252 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -30,11 +30,12 @@ minidlnad_SOURCES = minidlna.c upnphttp.c upnpdescgen.c upnpsoap.c \
playlist.c image_utils.c albumart.c log.c \
containers.c avahi.c tagutils/tagutils.c
-if HAVE_KQUEUE
-minidlnad_SOURCES += kqueue.c monitor_kqueue.c
-else
+# Disabled on Haiku for now (no EVENT_VNODE support)
+#if HAVE_KQUEUE
+#minidlnad_SOURCES += kqueue.c monitor_kqueue.c
+#else
minidlnad_SOURCES += select.c
-endif
+#endif
if HAVE_INOTIFY
minidlnad_SOURCES += monitor_inotify.c
diff --git a/configure.ac b/configure.ac
index b632bcb..545e9cf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -524,7 +524,8 @@ AC_CHECK_FUNCS(inotify_init,
])
])
-AC_CHECK_FUNCS(kqueue, AM_CONDITIONAL(HAVE_KQUEUE, true), AM_CONDITIONAL(HAVE_KQUEUE, false))
+# Disabled on Haiku for now (no EVENT_VNODE support)
+# AC_CHECK_FUNCS(kqueue, AM_CONDITIONAL(HAVE_KQUEUE, true), AM_CONDITIONAL(HAVE_KQUEUE, false))
################################################################################################################
### Build Options
--
2.45.2
From 6622bae28f23538f1096a86c54981b4d0770f23d Mon Sep 17 00:00:00 2001
From: Oscar Lesta <oscar.lesta@gmail.com>
Date: Thu, 5 Sep 2024 03:24:51 -0300
Subject: Use /boot/home instead of /opt for the default settings.
diff --git a/minidlna.conf b/minidlna.conf
index 82db5f1..a21b8ca 100644
--- a/minidlna.conf
+++ b/minidlna.conf
@@ -15,7 +15,7 @@ port=8200
# + "V" for video (eg. media_dir=V,/home/jmaggard/Videos)
# + "P" for images (eg. media_dir=P,/home/jmaggard/Pictures)
# + "PV" for pictures and video (eg. media_dir=PV,/home/jmaggard/digital_camera)
-media_dir=/opt
+media_dir=/boot/home
# set this to merge all media_dir base contents into the root container
# note: the default is no
--
2.45.2