git: 5c9272aa20d4 - main - devel/libdlna: Move to FFmpeg 4

From: Daniel Engberg <diizzy_at_FreeBSD.org>
Date: Thu, 27 Apr 2023 12:03:55 UTC
The branch main has been updated by diizzy:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5c9272aa20d4925026ce321de3bd737f46fafee7

commit 5c9272aa20d4925026ce321de3bd737f46fafee7
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2023-04-27 09:35:10 +0000
Commit:     Daniel Engberg <diizzy@FreeBSD.org>
CommitDate: 2023-04-27 12:01:41 +0000

    devel/libdlna: Move to FFmpeg 4
    
    Fails to build with FFmpeg 6
    
    PR:             270199
    Approved by:    portmgr (blanket, build fix)
    Sponsored by:   Blinkinblox
---
 devel/libdlna/Makefile | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/devel/libdlna/Makefile b/devel/libdlna/Makefile
index 339e9a9ca7dd..af2d5f2e84e3 100644
--- a/devel/libdlna/Makefile
+++ b/devel/libdlna/Makefile
@@ -12,17 +12,19 @@ WWW=		https://libdlna.geexbox.org/
 LICENSE=	LGPL21+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-LIB_DEPENDS=	libavcodec.so:multimedia/ffmpeg
+LIB_DEPENDS=	libavcodec.so.58:multimedia/ffmpeg4
 
 HAS_CONFIGURE=	yes
-USES=		gmake localbase pathfix pkgconfig tar:bzip2
+USES=		gmake pathfix pkgconfig tar:bzip2
 PATHFIX_MAKEFILEIN=	Makefile
 USE_LDCONFIG=	yes
 MAKE_JOBS_UNSAFE=	yes
 
-CONFIGURE_ARGS=	--prefix="${PREFIX}" --disable-optimize \
-		--includedir="${PREFIX}/include" \
-		--libdir="${PREFIX}/lib"
+CFLAGS+=	-I${LOCALBASE}/ffmpeg4/include
+LDFLAGS+=	-L${LOCALBASE}/ffmpeg4/lib
+
+CONFIGURE_ARGS=	--with-ffmpeg-dir="${LOCALBASE}/ffmpeg4" \
+		--prefix="${PREFIX}" --disable-optimize
 
 post-extract:
 	${REINPLACE_CMD} -e 's|CODEC_ID|AV_CODEC_ID|g' \