git: 1cb6e7b81748 - main - audio/libopenmpt: Update to 0.6.7

From: Emanuel Haupt <ehaupt_at_FreeBSD.org>
Date: Tue, 10 Jan 2023 17:01:39 UTC
The branch main has been updated by ehaupt:

URL: https://cgit.FreeBSD.org/ports/commit/?id=1cb6e7b817485144f81cc5ca985b8b06465f71a1

commit 1cb6e7b817485144f81cc5ca985b8b06465f71a1
Author:     Daniel Engberg <diizzy@FreeBSD.org>
AuthorDate: 2023-01-10 16:59:50 +0000
Commit:     Emanuel Haupt <ehaupt@FreeBSD.org>
CommitDate: 2023-01-10 16:59:50 +0000

    audio/libopenmpt: Update to 0.6.7
    
    - Make openmpt123 optional
    - Reduce options to simplify port and reduce dependency options
    - Drop "+release.autotools" from version name and .pc file
    - Enable "make test"
---
 audio/libopenmpt/Makefile  | 46 ++++++++++++++++++++++++++++------------------
 audio/libopenmpt/distinfo  |  6 +++---
 audio/libopenmpt/pkg-plist |  4 ++--
 3 files changed, 33 insertions(+), 23 deletions(-)

diff --git a/audio/libopenmpt/Makefile b/audio/libopenmpt/Makefile
index 71ca769c9b7a..5f4905d38c92 100644
--- a/audio/libopenmpt/Makefile
+++ b/audio/libopenmpt/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	libopenmpt
-PORTVERSION=	0.6.6
+DISTVERSION=	0.6.7
 DISTVERSIONSUFFIX=	+release.autotools
 CATEGORIES=	audio
 MASTER_SITES=	https://lib.openmpt.org/files/libopenmpt/src/ \
@@ -12,32 +12,42 @@ WWW=		https://lib.openmpt.org/
 LICENSE=	BSD3CLAUSE
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-USES=		compiler:c++11-lang cpe gmake libtool pkgconfig
+LIB_DEPENDS=	libmpg123.so:audio/mpg123 \
+		libvorbis.so:audio/libvorbis
+
+USES=		compiler:c++17-lang cpe gmake libtool pathfix pkgconfig
 CPE_VENDOR=	openmpt
 USE_LDCONFIG=	yes
 
 GNU_CONFIGURE=	yes
+CONFIGURE_ARGS=	--disable-doxygen-doc \
+		--with-mpg123 \
+		--with-vorbis \
+		--with-vorbisfile \
+		--without-portaudiocpp
+
+TEST_TARGET=	check
 
-CONFIGURE_ARGS+=	--without-portaudiocpp
+OPTIONS_DEFINE=		DOCS EXAMPLES OPENMPT123 PULSEAUDIO
+OPTIONS_DEFAULT=	OPENMPT123
+OPTIONS_SUB=		yes
 
-OPTIONS_DEFINE=		DOCS EXAMPLES FLAC MPG123 OGG PORTAUDIO PULSEAUDIO \
-			SNDFILE VORBIS
-OPTIONS_DEFAULT=	FLAC MPG123 OGG PORTAUDIO SNDFILE VORBIS
+OPENMPT123_DESC=	Enable command line player
+PULSEAUDIO_DESC=	Enable PulseAudio support for openmpt123
 
-FLAC_LIB_DEPENDS=		libFLAC.so:audio/flac
-FLAC_CONFIGURE_WITH=		flac
-MPG123_LIB_DEPENDS=		libmpg123.so:audio/mpg123
-MPG123_CONFIGURE_WITH=		mpg123
-OGG_LIB_DEPENDS=		libogg.so:audio/libogg
-OGG_CONFIGURE_WITH=		ogg
-PORTAUDIO_LIB_DEPENDS=		libportaudio.so:audio/portaudio
-PORTAUDIO_CONFIGURE_WITH=	portaudio
+OPENMPT123_LIB_DEPENDS=		libFLAC.so:audio/flac \
+				libportaudio.so:audio/portaudio \
+				libsndfile.so:audio/libsndfile
+OPENMPT123_CONFIGURE_OFF=	--disable-openmpt123
+OPENMPT123_CONFIGURE_WITH=	flac portaudio sndfile
+
+PULSEAUDIO_IMPLIES=		OPENMPT123
 PULSEAUDIO_LIB_DEPENDS=		libpulse.so:audio/pulseaudio
 PULSEAUDIO_CONFIGURE_WITH=	pulseaudio
-SNDFILE_LIB_DEPENDS=		libsndfile.so:audio/libsndfile
-SNDFILE_CONFIGURE_WITH=		sndfile
-VORBIS_LIB_DEPENDS=		libvorbis.so:audio/libvorbis
-VORBIS_CONFIGURE_WITH=		vorbis vorbisfile
+
+pre-configure:
+	@${REINPLACE_CMD} -e 's/+release.autotools//' \
+		${PATCH_WRKSRC}/configure
 
 post-install:
 	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libopenmpt.so.*
diff --git a/audio/libopenmpt/distinfo b/audio/libopenmpt/distinfo
index bf9398b2b411..080e90487c9c 100644
--- a/audio/libopenmpt/distinfo
+++ b/audio/libopenmpt/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1664212817
-SHA256 (libopenmpt-0.6.6+release.autotools.tar.gz) = 6ddb9e26a430620944891796fefb1bbb38bd9148f6cfc558810c0d3f269876c7
-SIZE (libopenmpt-0.6.6+release.autotools.tar.gz) = 1554516
+TIMESTAMP = 1673247806
+SHA256 (libopenmpt-0.6.7+release.autotools.tar.gz) = 2174ac0f5a148ba684db768a47edf783eff9084fbca5fef6c997501643100163
+SIZE (libopenmpt-0.6.7+release.autotools.tar.gz) = 1556248
diff --git a/audio/libopenmpt/pkg-plist b/audio/libopenmpt/pkg-plist
index 474c10f16980..c12dc983e813 100644
--- a/audio/libopenmpt/pkg-plist
+++ b/audio/libopenmpt/pkg-plist
@@ -1,4 +1,4 @@
-bin/openmpt123
+%%OPENMPT123%%bin/openmpt123
 include/libopenmpt/libopenmpt.h
 include/libopenmpt/libopenmpt.hpp
 include/libopenmpt/libopenmpt_config.h
@@ -13,7 +13,7 @@ lib/libopenmpt.so
 lib/libopenmpt.so.0
 lib/libopenmpt.so.0.3.3
 libdata/pkgconfig/libopenmpt.pc
-man/man1/openmpt123.1.gz
+%%OPENMPT123%%man/man1/openmpt123.1.gz
 %%PORTDOCS%%%%DOCSDIR%%/README.md
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/libopenmpt_example_c.c
 %%PORTEXAMPLES%%%%EXAMPLESDIR%%/libopenmpt_example_c_mem.c