From 214c275778984faddbff27ca960d51380b64acc8 Mon Sep 17 00:00:00 2001
From: Daniel Engberg <diizzy@FreeBSD.org>
Date: Tue, 3 Jan 2023 11:33:34 +0100
Subject: audio/lame: Remove libsndfile support and modernize port

Remove libsndfile support as this will cause circular dependency
with upcoming release of libsndfile 1.2.0. While it's possible to
disable usage of specific external libraries to some extent we want
to follow upstream as closely as possible instead of having to work
around such issues. If better input support is needed ffmpeg provides
support for LAME (by default), much better input format support and
very little overhead. While at it, do some minor changes to Makefile.

PR:		268566
Reviewed by:	netchild (maintainer via private e-mail)
---
 audio/lame/Makefile | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/audio/lame/Makefile b/audio/lame/Makefile
index ecde36845ca4..8d1c6542feb4 100644
--- a/audio/lame/Makefile
+++ b/audio/lame/Makefile
@@ -1,37 +1,31 @@
 PORTNAME=	lame
-PORTVERSION=	3.100
+DISTVERSION=	3.100
 PORTREVISION=	4
 CATEGORIES=	audio
-MASTER_SITES=	SF/${PORTNAME:tl}/${PORTNAME:tl}/3.100
+MASTER_SITES=	SF/${PORTNAME:tl}/${PORTNAME:tl}/${DISTVERSION}
 
 MAINTAINER=	netchild@FreeBSD.org
 COMMENT=	Fast MP3 encoder kit
 WWW=		http://lame.sourceforge.net/
 
-LICENSE=		LGPL20+
+LICENSE=	LGPL20+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
+BUILD_DEPENDS=	${BUILD_DEPENDS_${ARCH}}
+BUILD_DEPENDS_i386=	nasm:devel/nasm
+
 USES=		cpe gmake iconv libtool
 USE_LDCONFIG=	yes
+CPE_VENDOR=	lame_project
 GNU_CONFIGURE=	yes
+
 CONFIGURE_ARGS=	--enable-nasm --enable-mp3rtp --disable-gtktest
-CPE_VENDOR=	lame_project
 
 DOC_FILES=	API LICENSE README TODO USAGE
 
-OPTIONS_DEFINE=	DOCS SNDFILE
+OPTIONS_DEFINE=	DOCS
 OPTIONS_DEFAULT=DOCS
 
-SNDFILE_CONFIGURE_ON=	--with-fileio=sndfile
-SNDFILE_CONFIGURE_OFF=	--with-fileio=lame
-SNDFILE_LIB_DEPENDS=	libsndfile.so:audio/libsndfile
-
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "i386"
-BUILD_DEPENDS+=	nasm:devel/nasm
-.endif
-
 post-patch:
 # Fix parallel builds
 	@${REINPLACE_CMD} -e 's,test -d \.libs || mkdir,mkdir -p,' \
@@ -46,4 +40,4 @@ post-install-DOCS-on:
 	${INSTALL_DATA} ${WRKSRC}/${file} ${STAGEDIR}${DOCSDIR}
 .endfor
 
-.include <bsd.port.post.mk>
+.include <bsd.port.mk>
-- 
cgit v1.2.3