[Bug 258362] audio/libsndfile: Unnecessary uses of CMake

From: <bugzilla-noreply_at_freebsd.org>
Date: Wed, 08 Sep 2021 12:16:26 +0000
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=258362

--- Comment #3 from WHR <msl0000023508_at_gmail.com> ---
Comment on attachment 227757
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=227757
audio.libsndfile-without-cmake.diff

>diff --git a/audio/libsndfile/Makefile b/audio/libsndfile/Makefile
>index 95cf2fe40b87..09eceb94b9d4 100644
>--- a/audio/libsndfile/Makefile
>+++ b/audio/libsndfile/Makefile
>_at__at_ -11,7 +11,7 _at__at_ COMMENT=	Reading and writing files containing sampled sound (like WAV or AIFF)
> LICENSE=	LGPL21+
> LICENSE_FILE=	${WRKSRC}/COPYING
> 
>-USES=		cmake cpe localbase pkgconfig python:build,test shebangfix \
>+USES=		cpe localbase pkgconfig python:build,test shebangfix \
> 		tar:bz2
> SHEBANG_FILES=	programs/test-sndfile-metadata-set.py \
> 		src/binheader_writef_check.py \
>_at__at_ -21,33 +21,27 _at__at_ CPE_VENDOR=	${CPE_PRODUCT}_project
> 
> USE_LDCONFIG=	yes
> 
>-CMAKE_ARGS=	-DCMAKE_DISABLE_FIND_PACKAGE_ALSA:BOOL=True \
>-		-DCMAKE_DISABLE_FIND_PACKAGE_Sndio:BOOL=True \
>-		-DCMAKE_DISABLE_FIND_PACKAGE_Speex:BOOL=True \
>-		-DCMAKE_DISABLE_FIND_PACKAGE_SQLite3:BOOL=True
>+GNU_CONFIGURE=	yes
>+CONFIGURE_ARGS=	--disable-sqlite
> 
>-OPTIONS_DEFINE=	DOCS EXTERNAL MANPAGES STATIC TEST
>+OPTIONS_DEFINE=	DOCS EXTERNAL MANPAGES STATIC ALSA
> OPTIONS_SUB=	yes
>-OPTIONS_DEFAULT=	EXTERNAL
>+OPTIONS_DEFAULT=	EXTERNAL ALSA
> EXTERNAL_DESC=	Enable FLAC, Ogg Vorbis, Opus support
>-TEST_DESC=	Build tests (forces static library only)
>-TEST_IMPLIES=	STATIC
>+ALSA_DESC=	Enable ALSA support for sndfile-play
> 
> EXTERNAL_LIB_DEPENDS=	libFLAC.so:audio/flac \
> 			libogg.so:audio/libogg \
> 			libopus.so:audio/opus \
> 			libvorbis.so:audio/libvorbis
>-
>-MANPAGES_CMAKE_BOOL=	INSTALL_MANPAGES
>-STATIC_CMAKE_OFF=	-DBUILD_SHARED_LIBS:BOOL=ON
>-TEST_CMAKE_BOOL=	BUILD_TESTING
>+ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
>+EXTERNAL_CONFIGURE_OFF=	--disable-external-libs
>+STATIC_CONFIGURE_ON=	--disable-shared --enable-static
>+ALSA_CONFIGURE_ON=	--enable-alsa
>+ALSA_CONFIGURE_OFF=	--disable-alsa
> 
> .include <bsd.port.options.mk>
> 
>-.if ! ${PORT_OPTIONS:MEXTERNAL}
>-EXTRA_PATCHES=	${FILESDIR}/extrapatch-cmake_SndFileChecks.cmake-disableexternallibs
>-.endif
>-
> do-test:
> 	(cd ${TEST_WRKSRC} && CTEST_OUTPUT_ON_FAILURE=1 ctest -V)
> 
>diff --git a/audio/libsndfile/files/extrapatch-cmake_SndFileChecks.cmake-disableexternallibs b/audio/libsndfile/files/extrapatch-cmake_SndFileChecks.cmake-disableexternallibs
>deleted file mode 100644
>index b54e202af521..000000000000
>--- a/audio/libsndfile/files/extrapatch-cmake_SndFileChecks.cmake-disableexternallibs
>+++ /dev/null
>_at__at_ -1,32 +0,0 _at__at_
>---- cmake/SndFileChecks.cmake.orig	2020-07-23 13:42:53 UTC
>-+++ cmake/SndFileChecks.cmake
>-_at__at_ -31,28 +31,7 _at__at_ if (VCPKG_TOOLCHAIN AND (NOT CMAKE_VERSION VERSION_LES
>- 	set (CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
>- endif ()
>- 
>--if (CMAKE_FIND_PACKAGE_PREFER_CONFIG)
>--	find_package (Ogg 1.3 CONFIG)
>--	find_package (Vorbis CONFIG COMPONENTS Enc)
>--	find_package (FLAC CONFIG)
>--	find_package (Opus CONFIG)
>--
>--	include (FindPackageHandleStandardArgs)
>--	find_package_handle_standard_args (Ogg CONFIG_MODE)
>--	find_package_handle_standard_args (Vorbis CONFIG_MODE)
>--	find_package_handle_standard_args (FLAC CONFIG_MODE)
>--	find_package_handle_standard_args (Opus CONFIG_MODE)
>--else ()
>--	find_package (Ogg 1.3)
>--	find_package (Vorbis COMPONENTS Enc)
>--	find_package (FLAC)
>--	find_package (Opus)
>--endif ()
>--if (Vorbis_FOUND AND FLAC_FOUND AND Opus_FOUND)
>--	set (HAVE_EXTERNAL_XIPH_LIBS 1)
>--else ()
>--	set (HAVE_EXTERNAL_XIPH_LIBS 0)
>--endif ()
>-+set (HAVE_EXTERNAL_XIPH_LIBS 0)
>- 
>- find_package (Speex)
>- find_package (SQLite3)
>diff --git a/audio/libsndfile/pkg-plist b/audio/libsndfile/pkg-plist
>index bbe7b16354cd..c29eeb7d94aa 100644
>--- a/audio/libsndfile/pkg-plist
>+++ b/audio/libsndfile/pkg-plist
>_at__at_ -10,10 +10,6 _at__at_ bin/sndfile-play
> bin/sndfile-salvage
> include/sndfile.h
> include/sndfile.hh
>-lib/cmake/SndFile/SndFileConfig.cmake
>-lib/cmake/SndFile/SndFileConfigVersion.cmake
>-lib/cmake/SndFile/SndFileTargets-%%CMAKE_BUILD_TYPE%%.cmake
>-lib/cmake/SndFile/SndFileTargets.cmake
> %%STATIC%%lib/libsndfile.a
> %%NO_STATIC%%lib/libsndfile.so
> %%NO_STATIC%%lib/libsndfile.so.1

-- 
You are receiving this mail because:
You are the assignee for the bug.
Received on Wed Sep 08 2021 - 12:16:26 UTC

Original text of this message