From ba1ee3d5baf6bf1500d404f0a7684a045e418a72 Mon Sep 17 00:00:00 2001 From: OscarL Date: Thu, 5 Sep 2024 08:59:35 -0300 Subject: [PATCH] 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. --- net-misc/minidlna/minidlna-1.3.3.recipe | 30 +++---- .../minidlna/patches/minidlna-1.3.3.patchset | 80 +++++++++++++++++-- 2 files changed, 89 insertions(+), 21 deletions(-) diff --git a/net-misc/minidlna/minidlna-1.3.3.recipe b/net-misc/minidlna/minidlna-1.3.3.recipe index cf3e18216..0eff0d894 100644 --- a/net-misc/minidlna/minidlna-1.3.3.recipe +++ b/net-misc/minidlna/minidlna-1.3.3.recipe @@ -11,8 +11,8 @@ SOURCE_URI="https://downloads.sourceforge.net/minidlna/minidlna-$portVersion.tar CHECKSUM_SHA256="39026c6d4a139b9180192d1c37225aa3376fdf4f1a74d7debbdbb693d996afa4" PATCHES="minidlna-$portVersion.patchset" -ARCHITECTURES="?all !x86_gcc2" -SECONDARY_ARCHITECTURES="?x86" +ARCHITECTURES="all !x86_gcc2" +SECONDARY_ARCHITECTURES="x86" commandSuffix=$secondaryArchSuffix commandBinDir=$binDir @@ -31,49 +31,44 @@ PROVIDES=" " REQUIRES=" haiku$secondaryArchSuffix + lib:libavcodec$secondaryArchSuffix lib:libavformat$secondaryArchSuffix lib:libavutil$secondaryArchSuffix - lib:libcurl$secondaryArchSuffix - lib:libcrypto$secondaryArchSuffix lib:libexif$secondaryArchSuffix - lib:libflac$secondaryArchSuffix + lib:libFLAC$secondaryArchSuffix lib:libiconv$secondaryArchSuffix lib:libid3tag$secondaryArchSuffix lib:libintl$secondaryArchSuffix lib:libjpeg$secondaryArchSuffix lib:libogg$secondaryArchSuffix lib:libsqlite3$secondaryArchSuffix - lib:libssl$secondaryArchSuffix lib:libvorbis$secondaryArchSuffix - lib:libvorbisfile$secondaryArchSuffix lib:libz$secondaryArchSuffix " +# gettext by package name instead of cmd:gettext, because those commands have "compat > 0". BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel + gettext$secondaryArchSuffix >= 0.22 # Should be >= 0.20, but apparently pkgman gettext-0.22.5 doesn't matches that? + devel:libavcodec$secondaryArchSuffix devel:libavformat$secondaryArchSuffix devel:libavutil$secondaryArchSuffix - devel:libcurl$secondaryArchSuffix - devel:libcrypto$secondaryArchSuffix + devel:libcurl$secondaryArchSuffix # without this the ./configure fails to find libid3tag, WAT? devel:libexif$secondaryArchSuffix - devel:libflac$secondaryArchSuffix + devel:libFLAC$secondaryArchSuffix devel:libiconv$secondaryArchSuffix devel:libid3tag$secondaryArchSuffix devel:libintl$secondaryArchSuffix devel:libjpeg$secondaryArchSuffix devel:libogg$secondaryArchSuffix - devel:libssl$secondaryArchSuffix devel:libsqlite3$secondaryArchSuffix devel:libvorbis$secondaryArchSuffix - devel:libvorbisfile$secondaryArchSuffix " BUILD_PREREQUIRES=" cmd:aclocal - cmd:autopoint cmd:autoreconf cmd:awk cmd:gcc$secondaryArchSuffix - cmd:libtoolize$secondaryArchSuffix cmd:make cmd:pkg_config$secondaryArchSuffix " @@ -84,7 +79,12 @@ BUILD() export LDFLAGS="-lnetwork -lbsd" autoreconf -vfi - runConfigure --omit-dirs sbinDir ./configure --sbindir="$commandBinDir" + + runConfigure --omit-dirs sbinDir \ ./configure \ + --sbindir="$commandBinDir" \ + --disable-dependency-tracking \ + --disable-rpath + make $jobArgs } diff --git a/net-misc/minidlna/patches/minidlna-1.3.3.patchset b/net-misc/minidlna/patches/minidlna-1.3.3.patchset index 63db567e4..3df5430fb 100644 --- a/net-misc/minidlna/patches/minidlna-1.3.3.patchset +++ b/net-misc/minidlna/patches/minidlna-1.3.3.patchset @@ -1,4 +1,4 @@ -From 2fc8d6c646edf0c723eb0143fbda3d56bdee88a8 Mon Sep 17 00:00:00 2001 +From 219687845a45096dd7f23aef74cd00b95f157886 Mon Sep 17 00:00:00 2001 From: begasus Date: Sun, 29 Apr 2018 17:23:23 +0200 Subject: Haiku doesn't have setpriority nor d_type @@ -71,10 +71,10 @@ index 477ebef..94bf567 100644 if( strncmp(last_file.mime, "image", 5) == 0 ) tmode = "Interactive"; -- -2.42.1 +2.45.2 -From 5cbb5cfb5ce8e895a2fad3d773cacaad8c045882 Mon Sep 17 00:00:00 2001 +From 84a7fe82dacb95666e4d4fe95889bfe50369fe63 Mon Sep 17 00:00:00 2001 From: begasus Date: Sun, 24 Jun 2018 07:06:37 +0200 Subject: set correct path for the conf file @@ -94,10 +94,10 @@ index 999adee..277029c 100644 char *string, *word; char *path; -- -2.42.1 +2.45.2 -From 8f0caba66c3c204bbfbe0b13c87dd31f67fdc1a0 Mon Sep 17 00:00:00 2001 +From 300ff2ff23a3b4bb1c53e1808112d92d64e43e16 Mon Sep 17 00:00:00 2001 From: begasus Date: Wed, 16 Nov 2022 08:04:10 +0100 Subject: libav-fix patch (from Alpine Linux) @@ -116,5 +116,73 @@ index 1e33833..dcfc625 100644 -lFLAC $(flacogglibs) $(vorbislibs) $(avahilibs) -- -2.42.1 +2.45.2 + + +From 46dd547b77db3ba73f8e4a9e4a876276dbba0877 Mon Sep 17 00:00:00 2001 +From: Oscar Lesta +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 +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