소스 검색

minidlna: fix build with newer ffmpeg from SF ticket #204

Waldemar Brodkorb 3 주 전
부모
커밋
fa876eb496
4개의 변경된 파일46개의 추가작업 그리고 35개의 파일을 삭제
  1. 3 2
      package/minidlna/Makefile
  2. 28 0
      package/minidlna/patches/patch-libav_h
  3. 4 33
      package/minidlna/patches/patch-log_c
  4. 11 0
      package/minidlna/patches/patch-minidlna_c

+ 3 - 2
package/minidlna/Makefile

@@ -11,9 +11,10 @@ PKG_DESCR:=		DLNA/UPnP-AV compliant media server
 PKG_SECTION:=		mm/video
 PKG_DEPENDS:=		libffmpeg libjpeg-turbo libexif libid3tag libogg libflac libvorbis libsqlite
 PKG_BUILDDEP:=		ffmpeg libjpeg-turbo libexif libid3tag libogg flac libvorbis sqlite
-PKG_URL:=		http://sourceforge.net/projects/minidlna/
 PKG_NEEDS:=		iconv
-PKG_SITES:=		$(MASTER_SITE_SOURCEFORGE:=minidlna/)
+PKG_URL:=		http://sourceforge.net/projects/minidlna/
+PKG_SITES:=		https://sourceforge.net/projects/minidlna/files/minidlna/$(PKG_VERSION)/
+
 DISTFILES:=		$(PKG_NAME)-$(PKG_VERSION).tar.gz
 
 include $(ADK_TOPDIR)/mk/package.mk

+ 28 - 0
package/minidlna/patches/patch-libav_h

@@ -0,0 +1,28 @@
+--- minidlna-1.3.3.orig/libav.h	2023-05-31 10:25:59.000000000 +0200
++++ minidlna-1.3.3/libav.h	2026-05-17 09:40:25.305027461 +0200
+@@ -174,7 +174,12 @@ lav_get_interlaced(AVStream *s)
+ #define lav_codec_tag(s) s->codecpar->codec_tag
+ #define lav_sample_rate(s) s->codecpar->sample_rate
+ #define lav_bit_rate(s) s->codecpar->bit_rate
++#if LIBAVCODEC_VERSION_MAJOR > 52 || \
++    (LIBAVCODEC_VERSION_MAJOR >= 52 && LIBAVCODEC_VERSION_MINOR >= 113)
++#define lav_channels(s) s->codecpar->ch_layout.nb_channels
++#else
+ #define lav_channels(s) s->codecpar->channels
++#endif
+ #define lav_width(s) s->codecpar->width
+ #define lav_height(s) s->codecpar->height
+ #define lav_profile(s) s->codecpar->profile
+@@ -186,7 +191,12 @@ lav_get_interlaced(AVStream *s)
+ #define lav_codec_tag(s) s->codec->codec_tag
+ #define lav_sample_rate(s) s->codec->sample_rate
+ #define lav_bit_rate(s) s->codec->bit_rate
++#if LIBAVCODEC_VERSION_MAJOR > 52 || \
++    (LIBAVCODEC_VERSION_MAJOR >= 52 && LIBAVCODEC_VERSION_MINOR >= 113)
++#define lav_channels(s) s->codec->ch_layout.nb_channels
++#else
+ #define lav_channels(s) s->codec->channels
++#endif
+ #define lav_width(s) s->codec->width
+ #define lav_height(s) s->codec->height
+ #define lav_profile(s) s->codec->profile

+ 4 - 33
package/minidlna/patches/0001-log-Try-syslog-if-no-log-path-was-given.patch → package/minidlna/patches/patch-log_c

@@ -1,18 +1,5 @@
-From 989841a0c4e83b0ac1b9d276be3797bcfa83bcb1 Mon Sep 17 00:00:00 2001
-From: Phil Sutter <phil@nwl.cc>
-Date: Sun, 27 Nov 2022 23:45:41 +0100
-Subject: [PATCH] log: Try syslog if no log path was given
-
-Signed-off-by: Phil Sutter <phil@nwl.cc>
----
- log.c      | 44 ++++++++++++++++++++++++++++++++++++++++++--
- minidlna.c |  2 --
- 2 files changed, 42 insertions(+), 4 deletions(-)
-
-diff --git a/log.c b/log.c
-index a989904a24d93..840a8c02e678b 100644
---- a/log.c
-+++ b/log.c
+--- minidlna-1.3.3.orig/log.c	2023-05-31 10:25:59.000000000 +0200
++++ minidlna-1.3.3/log.c	2026-05-17 09:32:57.423533699 +0200
 @@ -23,6 +23,7 @@
  #include <stdio.h>
  #include <stdarg.h>
@@ -62,7 +49,7 @@ index a989904a24d93..840a8c02e678b 100644
  void
  log_err(int level, enum _log_facility facility, char *fname, int lineno, char *fmt, ...)
  {
-@@ -155,8 +190,14 @@ log_err(int level, enum _log_facility facility, char *fname, int lineno, char *f
+@@ -155,8 +190,14 @@ log_err(int level, enum _log_facility fa
  	if (level && level>log_level[facility] && level>E_FATAL)
  		return;
  
@@ -78,7 +65,7 @@ index a989904a24d93..840a8c02e678b 100644
  
  	// timestamp
  	if (!GETFLAG(SYSTEMD_MASK))
-@@ -176,7 +217,6 @@ log_err(int level, enum _log_facility facility, char *fname, int lineno, char *f
+@@ -176,7 +217,6 @@ log_err(int level, enum _log_facility fa
  		fprintf(log_fp, "%s:%d: ", fname, lineno);
  
  	// user log
@@ -86,19 +73,3 @@ index a989904a24d93..840a8c02e678b 100644
  	if (vfprintf(log_fp, fmt, ap) == -1)
  	{
  		va_end(ap);
-diff --git a/minidlna.c b/minidlna.c
-index 999adee977353..db29d603d1e28 100644
---- a/minidlna.c
-+++ b/minidlna.c
-@@ -817,8 +817,6 @@ init(int argc, char **argv)
- 				optionsfile);
- 		}
- 	}
--	if (!log_path[0])
--		strncpyt(log_path, DEFAULT_LOG_PATH, sizeof(log_path));
- 	if (!db_path[0])
- 		strncpyt(db_path, DEFAULT_DB_PATH, sizeof(db_path));
- 
--- 
-2.38.1
-

+ 11 - 0
package/minidlna/patches/patch-minidlna_c

@@ -0,0 +1,11 @@
+--- minidlna-1.3.3.orig/minidlna.c	2023-05-31 10:25:59.000000000 +0200
++++ minidlna-1.3.3/minidlna.c	2026-05-17 09:32:57.423533699 +0200
+@@ -817,8 +817,6 @@ init(int argc, char **argv)
+ 				optionsfile);
+ 		}
+ 	}
+-	if (!log_path[0])
+-		strncpyt(log_path, DEFAULT_LOG_PATH, sizeof(log_path));
+ 	if (!db_path[0])
+ 		strncpyt(db_path, DEFAULT_DB_PATH, sizeof(db_path));
+