Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 10 Feb 2021 17:07:44 +0000 (UTC)
From:      "Tobias C. Berner" <tcberner@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r564879 - in head/audio/libsamplerate: . files
Message-ID:  <202102101707.11AH7iIC044649@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: tcberner
Date: Wed Feb 10 17:07:44 2021
New Revision: 564879
URL: https://svnweb.freebsd.org/changeset/ports/564879

Log:
  audio/libsamplerate: Update to 0.2.1
  
  - The build system has been switched to cmake
  
  Release Notes:
          https://github.com/libsndfile/libsamplerate/releases/tag/0.2.1
  
  PR:		253057
  Submitted by:	daniel.engberg.lists@pyret.net

Added:
  head/audio/libsamplerate/files/patch-cmake_FindSndFile.cmake   (contents, props changed)
  head/audio/libsamplerate/files/patch-examples_CMakeLists.txt   (contents, props changed)
Deleted:
  head/audio/libsamplerate/files/patch-examples_audio__out.c
  head/audio/libsamplerate/files/patch-src_samplerate.h
Modified:
  head/audio/libsamplerate/Makefile
  head/audio/libsamplerate/distinfo
  head/audio/libsamplerate/pkg-plist

Modified: head/audio/libsamplerate/Makefile
==============================================================================
--- head/audio/libsamplerate/Makefile	Wed Feb 10 17:04:17 2021	(r564878)
+++ head/audio/libsamplerate/Makefile	Wed Feb 10 17:07:44 2021	(r564879)
@@ -2,10 +2,9 @@
 # $FreeBSD$
 
 PORTNAME=	libsamplerate
-PORTVERSION=	0.1.9
-PORTREVISION=	1
+DISTVERSION=	0.2.1
 CATEGORIES=	audio
-MASTER_SITES=	http://www.mega-nerd.com/SRC/
+MASTER_SITES=	https://github.com/libsndfile/${PORTNAME}/releases/download/${DISTVERSION}/
 
 MAINTAINER=	multimedia@FreeBSD.org
 COMMENT=	Secret Rabbit Code: a Sample Rate Converter for audio
@@ -13,38 +12,27 @@ COMMENT=	Secret Rabbit Code: a Sample Rate Converter f
 LICENSE=	BSD2CLAUSE
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-USES=		cpe libtool pathfix pkgconfig
-USE_LDCONFIG=	yes
+USES=		cmake cpe pkgconfig tar:bz2
+
 CPE_VENDOR=	${CPE_PRODUCT}_project
-GNU_CONFIGURE=	yes
-INSTALL_TARGET=	install-strip
-TEST_TARGET=	check
 
-OPTIONS_DEFINE=	CPU_CLIP DOCS EXAMPLES
-CPU_CLIP_DESC=	Allow machine-dependent clipping
+USE_LDCONFIG=	yes
 
-.include <bsd.port.options.mk>
+TEST_TARGET=	test
 
-MAKE_ARGS+=	htmldocdir=${PREFIX}/share/doc/libsamplerate
+CMAKE_ON=	BUILD_SHARED_LIBS LIBSAMPLERATE_INSTALL
 
-.if ${PORT_OPTIONS:MCPU_CLIP}
-MANUAL_PACKAGE_BUILD=	CPU_CLIP may customize the package for the build machine
-.else
-CONFIGURE_ARGS+=	--disable-cpu-clip
-.endif
+OPTIONS_DEFINE=	DOCS EXAMPLES TEST
 
-.if defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
-BUILD_DEPENDS +=	${LOCALBASE}/lib/libfftw3.so:math/fftw3
-.else
-CONFIGURE_ARGS+=	--disable-fftw
-.endif
+EXAMPLES_LIB_DEPENDS=		libsndfile.so:audio/libsndfile
+EXAMPLES_CMAKE_BOOL=		LIBSAMPLERATE_EXAMPLES
 
-.if ${PORT_OPTIONS:MEXAMPLES}
-LIB_DEPENDS+=	libsndfile.so:audio/libsndfile
-.elif defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING)
-BUILD_DEPENDS +=	libsndfile>=0:audio/libsndfile
-.else
-CONFIGURE_ARGS+=	--disable-sndfile
-.endif
+TEST_LIB_DEPENDS=		libfftw3.so:math/fftw3 \
+				libsndfile.so:audio/libsndfile
+TEST_CMAKE_BOOL=		BUILD_TESTING
+
+do-install-EXAMPLES-on:
+	${INSTALL_PROGRAM} ${WRKDIR}/.build/examples/timewarp-file ${STAGEDIR}${PREFIX}/bin/
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/timewarp-file
 
 .include <bsd.port.mk>

Modified: head/audio/libsamplerate/distinfo
==============================================================================
--- head/audio/libsamplerate/distinfo	Wed Feb 10 17:04:17 2021	(r564878)
+++ head/audio/libsamplerate/distinfo	Wed Feb 10 17:07:44 2021	(r564879)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1478374868
-SHA256 (libsamplerate-0.1.9.tar.gz) = 0a7eb168e2f21353fb6d84da152e4512126f7dc48ccb0be80578c565413444c1
-SIZE (libsamplerate-0.1.9.tar.gz) = 4336641
+TIMESTAMP = 1611794308
+SHA256 (libsamplerate-0.2.1.tar.bz2) = f6323b5e234753579d70a0af27796dde4ebeddf58aae4be598e39b3cee00c90a
+SIZE (libsamplerate-0.2.1.tar.bz2) = 3747188

Added: head/audio/libsamplerate/files/patch-cmake_FindSndFile.cmake
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/libsamplerate/files/patch-cmake_FindSndFile.cmake	Wed Feb 10 17:07:44 2021	(r564879)
@@ -0,0 +1,32 @@
+--- cmake/FindSndFile.cmake.orig	2021-01-28 01:50:45 UTC
++++ cmake/FindSndFile.cmake
+@@ -16,10 +16,6 @@ pkg_check_modules(PC_SndFile QUIET sndfile)
+ 
+ set(SndFile_VERSION ${PC_SndFile_VERSION})
+ 
+-find_package(Vorbis COMPONENTS Enc QUIET)
+-find_package(FLAC QUIET)
+-find_package(Opus QUIET)
+-
+ find_path(SndFile_INCLUDE_DIR sndfile.h
+   HINTS
+     ${PC_SndFile_INCLUDEDIR}
+@@ -42,15 +38,14 @@ find_package_handle_standard_args(SndFile
+ 
+ if(SndFile_FOUND)
+ 
+-  set(SndFile_LIBRARIES ${SndFile_LIBRARY} ${Vorbis_Enc_LIBRARIES} ${FLAC_LIBRARIES} ${OPUS_LIBRARIES})
+-  set(SndFile_INCLUDE_DIRS ${SndFile_INCLUDE_DIR} ${Vorbis_Enc_INCLUDE_DIRS} ${FLAC_INCLUDE_DIRS} ${OPUS_INCLUDE_DIRS})
++  set(SndFile_LIBRARIES ${SndFile_LIBRARY})
++  set(SndFile_INCLUDE_DIRS ${SndFile_INCLUDE_DIR})
+   
+   if(NOT TARGET SndFile::sndfile)
+     add_library(SndFile::sndfile UNKNOWN IMPORTED)
+     set_target_properties(SndFile::sndfile PROPERTIES
+       INTERFACE_INCLUDE_DIRECTORIES "${SndFile_INCLUDE_DIR}"
+-      IMPORTED_LOCATION "${SndFile_LIBRARY}"
+-      INTERFACE_LINK_LIBRARIES "Vorbis::vorbisenc;Opus::opus;FLAC::FLAC")
++      IMPORTED_LOCATION "${SndFile_LIBRARY}")
+   endif()
+ endif()
+ 

Added: head/audio/libsamplerate/files/patch-examples_CMakeLists.txt
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/audio/libsamplerate/files/patch-examples_CMakeLists.txt	Wed Feb 10 17:07:44 2021	(r564879)
@@ -0,0 +1,34 @@
+--- examples/CMakeLists.txt.orig	2021-01-28 01:57:53 UTC
++++ examples/CMakeLists.txt
+@@ -1,31 +1,5 @@
+-find_package(ALSA)
+-set(HAVE_ALSA ${ALSA_FOUND} PARENT_SCOPE)
+-# ALSA::ALSA target is exported since CMake >= 3.12, create it for
+-# old CMake versions
+-if(ALSA_FOUND)
+-  if(NOT TARGET ALSA::ALSA)
+-    add_library(ALSA::ALSA UNKNOWN IMPORTED)
+-    set_target_properties(ALSA::ALSA PROPERTIES
+-    INTERFACE_INCLUDE_DIRECTORIES "${ALSA_INCLUDE_DIRS}"
+-    IMPORTED_LOCATION "${ALSA_LIBRARIES}")
+-  endif()
+-endif()
+-
+ add_executable(timewarp-file timewarp-file.c)
+ target_link_libraries(timewarp-file
+   PRIVATE
+     samplerate
+     $<$<BOOL:${SndFile_FOUND}>:SndFile::sndfile>)
+-
+-add_executable(varispeed-play varispeed-play.c audio_out.c audio_out.h)
+-target_link_libraries(varispeed-play
+-  PRIVATE
+-    samplerate
+-    $<$<BOOL:${SndFile_FOUND}>:SndFile::sndfile>)
+-if(WIN32)
+-  target_link_libraries(varispeed-play PRIVATE winmm)
+-elseif(APPLE)
+-  target_link_libraries(varispeed-play PRIVATE "-framework CoreAudio")
+-elseif(ALSA_FOUND)
+-  target_link_libraries(varispeed-play PRIVATE ALSA::ALSA)
+-endif()

Modified: head/audio/libsamplerate/pkg-plist
==============================================================================
--- head/audio/libsamplerate/pkg-plist	Wed Feb 10 17:04:17 2021	(r564878)
+++ head/audio/libsamplerate/pkg-plist	Wed Feb 10 17:07:44 2021	(r564879)
@@ -1,22 +1,25 @@
-%%PORTEXAMPLES%%bin/sndfile-resample
+%%PORTEXAMPLES%%bin/timewarp-file
 include/samplerate.h
-lib/libsamplerate.a
+lib/cmake/SampleRate/SampleRateConfig.cmake
+lib/cmake/SampleRate/SampleRateConfigVersion.cmake
+lib/cmake/SampleRate/SampleRateTargets-%%CMAKE_BUILD_TYPE%%.cmake
+lib/cmake/SampleRate/SampleRateTargets.cmake
 lib/libsamplerate.so
 lib/libsamplerate.so.0
-lib/libsamplerate.so.0.1.8
+lib/libsamplerate.so.0.2.1
 libdata/pkgconfig/samplerate.pc
-%%PORTDOCS%%%%DOCSDIR%%/SRC.css
 %%PORTDOCS%%%%DOCSDIR%%/SRC.png
-%%PORTDOCS%%%%DOCSDIR%%/api.html
-%%PORTDOCS%%%%DOCSDIR%%/api_callback.html
-%%PORTDOCS%%%%DOCSDIR%%/api_full.html
-%%PORTDOCS%%%%DOCSDIR%%/api_misc.html
-%%PORTDOCS%%%%DOCSDIR%%/api_simple.html
-%%PORTDOCS%%%%DOCSDIR%%/download.html
-%%PORTDOCS%%%%DOCSDIR%%/faq.html
-%%PORTDOCS%%%%DOCSDIR%%/history.html
-%%PORTDOCS%%%%DOCSDIR%%/index.html
-%%PORTDOCS%%%%DOCSDIR%%/license.html
-%%PORTDOCS%%%%DOCSDIR%%/lists.html
-%%PORTDOCS%%%%DOCSDIR%%/quality.html
-%%PORTDOCS%%%%DOCSDIR%%/win32.html
+%%PORTDOCS%%%%DOCSDIR%%/api.md
+%%PORTDOCS%%%%DOCSDIR%%/api_callback.md
+%%PORTDOCS%%%%DOCSDIR%%/api_full.md
+%%PORTDOCS%%%%DOCSDIR%%/api_misc.md
+%%PORTDOCS%%%%DOCSDIR%%/api_simple.md
+%%PORTDOCS%%%%DOCSDIR%%/bugs.md
+%%PORTDOCS%%%%DOCSDIR%%/download.md
+%%PORTDOCS%%%%DOCSDIR%%/faq.md
+%%PORTDOCS%%%%DOCSDIR%%/history.md
+%%PORTDOCS%%%%DOCSDIR%%/index.md
+%%PORTDOCS%%%%DOCSDIR%%/license.md
+%%PORTDOCS%%%%DOCSDIR%%/lists.md
+%%PORTDOCS%%%%DOCSDIR%%/quality.md
+%%PORTDOCS%%%%DOCSDIR%%/win32.md



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102101707.11AH7iIC044649>