FreeBSD Bugzilla – Attachment 221978 Details for
Bug 253057
audio/libsamplerate: Update to 0.2.1 and convert to CMake
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for libsamplerate
0001-src021.patch (text/plain), 9.40 KB, created by
Daniel Engberg
on 2021-01-28 02:48:20 UTC
(
hide
)
Description:
Patch for libsamplerate
Filename:
MIME Type:
Creator:
Daniel Engberg
Created:
2021-01-28 02:48:20 UTC
Size:
9.40 KB
patch
obsolete
>From b3379d26fd17652662e35757248e926f7fe42985 Mon Sep 17 00:00:00 2001 >From: Daniel Engberg <daniel.engberg.lists@pyret.net> >Date: Thu, 28 Jan 2021 03:40:49 +0100 >Subject: [PATCH] src021 > >src021 > >Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net> >--- > audio/libsamplerate/Makefile | 58 ++++++++----------- > audio/libsamplerate/distinfo | 6 +- > .../files/patch-cmake_FindSndFile.cmake | 32 ++++++++++ > .../files/patch-examples_CMakeLists.txt | 34 +++++++++++ > .../files/patch-examples_audio__out.c | 14 ----- > .../files/patch-src_samplerate.h | 11 ---- > audio/libsamplerate/pkg-plist | 37 ++++++------ > 7 files changed, 112 insertions(+), 80 deletions(-) > create mode 100644 audio/libsamplerate/files/patch-cmake_FindSndFile.cmake > create mode 100644 audio/libsamplerate/files/patch-examples_CMakeLists.txt > delete mode 100644 audio/libsamplerate/files/patch-examples_audio__out.c > delete mode 100644 audio/libsamplerate/files/patch-src_samplerate.h > >diff --git a/audio/libsamplerate/Makefile b/audio/libsamplerate/Makefile >index efef5d9cf40e..06cd09c58854 100644 >--- a/audio/libsamplerate/Makefile >+++ b/audio/libsamplerate/Makefile >@@ -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 for audio > 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 >- >-.include <bsd.port.options.mk> >- >-MAKE_ARGS+= htmldocdir=${PREFIX}/share/doc/libsamplerate >- >-.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 >- >-.if defined(MAINTAINER_MODE) || defined(PACKAGE_BUILDING) >-BUILD_DEPENDS += ${LOCALBASE}/lib/libfftw3.so:math/fftw3 >-.else >-CONFIGURE_ARGS+= --disable-fftw >-.endif >- >-.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 >+ >+USE_LDCONFIG= yes >+ >+TEST_TARGET= test >+ >+CMAKE_ON= BUILD_SHARED_LIBS LIBSAMPLERATE_INSTALL >+ >+OPTIONS_DEFINE= DOCS EXAMPLES TEST >+ >+EXAMPLES_LIB_DEPENDS= libsndfile.so:audio/libsndfile >+EXAMPLES_CMAKE_BOOL= LIBSAMPLERATE_EXAMPLES >+ >+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> >diff --git a/audio/libsamplerate/distinfo b/audio/libsamplerate/distinfo >index 31b51564674e..26c4c0da662c 100644 >--- a/audio/libsamplerate/distinfo >+++ b/audio/libsamplerate/distinfo >@@ -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 >diff --git a/audio/libsamplerate/files/patch-cmake_FindSndFile.cmake b/audio/libsamplerate/files/patch-cmake_FindSndFile.cmake >new file mode 100644 >index 000000000000..2407e85fce46 >--- /dev/null >+++ b/audio/libsamplerate/files/patch-cmake_FindSndFile.cmake >@@ -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() >+ >diff --git a/audio/libsamplerate/files/patch-examples_CMakeLists.txt b/audio/libsamplerate/files/patch-examples_CMakeLists.txt >new file mode 100644 >index 000000000000..22e378ff8069 >--- /dev/null >+++ b/audio/libsamplerate/files/patch-examples_CMakeLists.txt >@@ -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() >diff --git a/audio/libsamplerate/files/patch-examples_audio__out.c b/audio/libsamplerate/files/patch-examples_audio__out.c >deleted file mode 100644 >index 769c218b654b..000000000000 >--- a/audio/libsamplerate/files/patch-examples_audio__out.c >+++ /dev/null >@@ -1,14 +0,0 @@ >---- examples/audio_out.c.orig 2016-09-13 10:20:20 UTC >-+++ examples/audio_out.c >-@@ -33,9 +33,9 @@ >- #define MAKE_MAGIC(a,b,c,d,e,f,g,h) \ >- ((a) + ((b) << 1) + ((c) << 2) + ((d) << 3) + ((e) << 4) + ((f) << 5) + ((g) << 6) + ((h) << 7)) >- >--typedef struct AUDIO_OUT_s >-+struct AUDIO_OUT_s >- { int magic ; >--} AUDIO_OUT ; >-+}; >- >- >- /*------------------------------------------------------------------------------ >diff --git a/audio/libsamplerate/files/patch-src_samplerate.h b/audio/libsamplerate/files/patch-src_samplerate.h >deleted file mode 100644 >index d28b15a618a3..000000000000 >--- a/audio/libsamplerate/files/patch-src_samplerate.h >+++ /dev/null >@@ -1,11 +0,0 @@ >---- src/samplerate.h.orig 2016-09-13 10:13:14 UTC >-+++ src/samplerate.h >-@@ -160,7 +160,7 @@ enum >- SRC_SINC_MEDIUM_QUALITY = 1, >- SRC_SINC_FASTEST = 2, >- SRC_ZERO_ORDER_HOLD = 3, >-- SRC_LINEAR = 4, >-+ SRC_LINEAR = 4 >- } ; >- >- /* >diff --git a/audio/libsamplerate/pkg-plist b/audio/libsamplerate/pkg-plist >index 4997404d0497..ad2b30fdc76d 100644 >--- a/audio/libsamplerate/pkg-plist >+++ b/audio/libsamplerate/pkg-plist >@@ -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 >-- >2.29.2 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 253057
: 221978