diff --git a/audio/chromaprint/Makefile b/audio/chromaprint/Makefile index e6a99eadba67..f23e45f59672 100644 --- a/audio/chromaprint/Makefile +++ b/audio/chromaprint/Makefile @@ -1,22 +1,45 @@ # $FreeBSD$ PORTNAME= chromaprint -PORTVERSION= 1.3.1 -PORTREVISION= 1 +PORTVERSION= 1.4.2 CATEGORIES= audio -MASTER_SITES= http://bitbucket.org/acoustid/${PORTNAME}/downloads/ +MASTER_SITES= https://github.com/acoustid/${PORTNAME}/releases/download/v${PORTVERSION}/ \ + https://bitbucket.org/acoustid/${PORTNAME}/downloads/ MAINTAINER= jhale@FreeBSD.org COMMENT= AcoustID audio fingerprinting library -LICENSE= LGPL21 +LICENSE= LGPL21 MIT +LICENSE_COMB= multi +LICENSE_FILE_MIT= ${WRKSRC}/LICENSE.md LIB_DEPENDS= libavcodec.so:multimedia/ffmpeg -USES= cmake:outsource pathfix +USES= cmake:outsource compiler:c++11-lib pathfix USE_LDCONFIG= yes -CMAKE_ARGS= -DBUILD_EXAMPLES:BOOL=ON \ - -DWITH_AVFFT:BOOL=ON \ +CMAKE_ARGS= -DBUILD_TOOLS:BOOL=true \ + -DFFT_LIB:STRING=avfft + +OPTIONS_DEFINE= DOXYGEN TEST + +DOXYGEN_BUILD_DEPENDS= doxygen:devel/doxygen \ + dot:graphics/graphviz +DOXYGEN_PORTDOCS= * +# PORTDOCS macro won't work if NOPORTDOCS is defined or if DOCS is disabled +DOXYGEN_IMPLIES= DOCS +.undef NOPORTDOCS + +TEST_BUILD_DEPENDS= ${NONEXISTENT}:devel/googletest:patch +TEST_CMAKE_BOOL= BUILD_TESTS +TEST_CMAKE_ON= -DGTEST_ROOT:PATH=`${MAKE} -C ${PORTSDIR}/devel/googletest -VWRKSRC` +TEST_TARGET= check + +do-build-DOXYGEN-on: + @(cd ${BUILD_WRKSRC}; ${DO_MAKE_BUILD} docs) + +do-install-DOXYGEN-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + (cd ${INSTALL_WRKSRC}/doc; ${COPYTREE_SHARE} . ${STAGEDIR}${DOCSDIR}) .include diff --git a/audio/chromaprint/distinfo b/audio/chromaprint/distinfo index c1ec6f17af6d..2ca5ad0aed93 100644 --- a/audio/chromaprint/distinfo +++ b/audio/chromaprint/distinfo @@ -1,2 +1,3 @@ -SHA256 (chromaprint-1.3.1.tar.gz) = 8f95a011e6fe3a75281520daa9376b7f028300e20a5be9af08ef9c851d4bb581 -SIZE (chromaprint-1.3.1.tar.gz) = 538251 +TIMESTAMP = 1483658531 +SHA256 (chromaprint-1.4.2.tar.gz) = 989609a7e841dd75b34ee793bd1d049ce99a8f0d444b3cea39d57c3e5d26b4d4 +SIZE (chromaprint-1.4.2.tar.gz) = 613367 diff --git a/audio/chromaprint/files/patch-tests_CMakeLists.txt b/audio/chromaprint/files/patch-tests_CMakeLists.txt new file mode 100644 index 000000000000..a34c06840c6b --- /dev/null +++ b/audio/chromaprint/files/patch-tests_CMakeLists.txt @@ -0,0 +1,14 @@ +--- tests/CMakeLists.txt.orig 2016-12-23 11:50:27 UTC ++++ tests/CMakeLists.txt +@@ -36,6 +36,11 @@ set(SRCS + if(BUILD_TOOLS) + set(SRCS ${SRCS} ../src/audio/ffmpeg_audio_reader_test.cpp) + link_libraries(fpcalc_libs) ++ include_directories( ++ ${FFMPEG_LIBAVCODEC_INCLUDE_DIRS} ++ ${FFMPEG_LIBAVFORMAT_INCLUDE_DIRS} ++ ${FFMPEG_LIBAVUTIL_INCLUDE_DIRS} ++ ) + endif() + + add_executable(all_tests ${SRCS} $) diff --git a/audio/chromaprint/pkg-plist b/audio/chromaprint/pkg-plist index 42e50b1d7cbc..473cb2c2821d 100644 --- a/audio/chromaprint/pkg-plist +++ b/audio/chromaprint/pkg-plist @@ -2,5 +2,5 @@ bin/fpcalc include/chromaprint.h lib/libchromaprint.so lib/libchromaprint.so.1 -lib/libchromaprint.so.1.3.0 +lib/libchromaprint.so.1.4.2 libdata/pkgconfig/libchromaprint.pc diff --git a/audio/clementine-player/Makefile b/audio/clementine-player/Makefile index 2a373c2e60e8..3c8eb45b1b58 100644 --- a/audio/clementine-player/Makefile +++ b/audio/clementine-player/Makefile @@ -3,7 +3,7 @@ PORTNAME= clementine PORTVERSION= 1.3.1 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= audio PKGNAMESUFFIX= -player diff --git a/audio/clementine-player/files/patch-git_ded3126 b/audio/clementine-player/files/patch-git_ded3126 new file mode 100644 index 000000000000..6deda743096d --- /dev/null +++ b/audio/clementine-player/files/patch-git_ded3126 @@ -0,0 +1,34 @@ +Add compatibility with chromaprint >= 1.4 + +diff --git a/src/musicbrainz/chromaprinter.cpp b/src/musicbrainz/chromaprinter.cpp +index 9579b62..c7ad99e 100644 +--- src/musicbrainz/chromaprinter.cpp.orig ++++ src/musicbrainz/chromaprinter.cpp +@@ -143,16 +143,24 @@ QString Chromaprinter::CreateFingerprint() { + ChromaprintContext* chromaprint = + chromaprint_new(CHROMAPRINT_ALGORITHM_DEFAULT); + chromaprint_start(chromaprint, kDecodeRate, kDecodeChannels); +- chromaprint_feed(chromaprint, reinterpret_cast(data.data()), ++ chromaprint_feed(chromaprint, reinterpret_cast(data.data()), + data.size() / 2); + chromaprint_finish(chromaprint); + +- void* fprint = nullptr; + int size = 0; ++ ++#if CHROMAPRINT_VERSION_MAJOR >= 1 && CHROMAPRINT_VERSION_MINOR >= 4 ++ u_int32_t *fprint = nullptr; ++ char *encoded = nullptr; ++#else ++ void *fprint = nullptr; ++ void *encoded = nullptr; ++#endif ++ + int ret = chromaprint_get_raw_fingerprint(chromaprint, &fprint, &size); ++ + QByteArray fingerprint; + if (ret == 1) { +- void* encoded = nullptr; + int encoded_size = 0; + chromaprint_encode_fingerprint(fprint, size, CHROMAPRINT_ALGORITHM_DEFAULT, + &encoded, &encoded_size, 1); diff --git a/audio/libgroove/Makefile b/audio/libgroove/Makefile index f1f1da8ce51c..f0f94b7c4ca4 100644 --- a/audio/libgroove/Makefile +++ b/audio/libgroove/Makefile @@ -3,7 +3,7 @@ PORTNAME= libgroove PORTVERSION= 4.3.0 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= audio MAINTAINER= ports@FreeBSD.org diff --git a/audio/libgroove/files/patch-groovefingerprinter_fingerprinter.c b/audio/libgroove/files/patch-groovefingerprinter_fingerprinter.c new file mode 100644 index 000000000000..7f4f4039404b --- /dev/null +++ b/audio/libgroove/files/patch-groovefingerprinter_fingerprinter.c @@ -0,0 +1,52 @@ +Cast to correct types for chromaprint >= 1.4 + +--- groovefingerprinter/fingerprinter.c.orig 2015-05-26 01:32:01 UTC ++++ groovefingerprinter/fingerprinter.c +@@ -64,7 +64,11 @@ static int emit_track_info(struct Groove + return -1; + } + if (!chromaprint_get_raw_fingerprint(p->chroma_ctx, ++#if CHROMAPRINT_VERSION_MAJOR > 1 || CHROMAPRINT_VERSION_MINOR >= 4 ++ (uint32_t**)&info->fingerprint, &info->fingerprint_size)) ++#else + (void**)&info->fingerprint, &info->fingerprint_size)) ++#endif + { + av_log(NULL, AV_LOG_ERROR, "unable to get fingerprint\n"); + return -1; +@@ -141,7 +145,11 @@ static void *print_thread(void *arg) { + double buffer_duration = buffer->frame_count / (double)buffer->format.sample_rate; + p->track_duration += buffer_duration; + p->album_duration += buffer_duration; ++#if CHROMAPRINT_VERSION_MAJOR > 1 || CHROMAPRINT_VERSION_MINOR >= 4 ++ if (!chromaprint_feed(p->chroma_ctx, (const int16_t*)buffer->data[0], buffer->frame_count * 2)) { ++#else + if (!chromaprint_feed(p->chroma_ctx, buffer->data[0], buffer->frame_count * 2)) { ++#endif + av_log(NULL, AV_LOG_ERROR, "unable to feed fingerprint\n"); + } + +@@ -387,7 +395,11 @@ void groove_fingerprinter_free_info(stru + + int groove_fingerprinter_encode(int32_t *fp, int size, char **encoded_fp) { + int encoded_size; ++#if CHROMAPRINT_VERSION_MAJOR > 1 || CHROMAPRINT_VERSION_MINOR >= 4 ++ int err = chromaprint_encode_fingerprint((const uint32_t*)fp, size, ++#else + int err = chromaprint_encode_fingerprint(fp, size, ++#endif + CHROMAPRINT_ALGORITHM_DEFAULT, (void*)encoded_fp, &encoded_size, 1); + return err == 1 ? 0 : -1; + } +@@ -395,7 +407,11 @@ int groove_fingerprinter_encode(int32_t + int groove_fingerprinter_decode(char *encoded_fp, int32_t **fp, int *size) { + int algorithm; + int encoded_size = strlen(encoded_fp); ++#if CHROMAPRINT_VERSION_MAJOR > 1 || CHROMAPRINT_VERSION_MINOR >= 4 ++ int err = chromaprint_decode_fingerprint(encoded_fp, encoded_size, (uint32_t**)fp, size, ++#else + int err = chromaprint_decode_fingerprint(encoded_fp, encoded_size, (void**)fp, size, ++#endif + &algorithm, 1); + return err == 1 ? 0 : -1; + } diff --git a/x11/leechcraft/Makefile b/x11/leechcraft/Makefile index 5aa2e9f98800..a101647fc5e4 100644 --- a/x11/leechcraft/Makefile +++ b/x11/leechcraft/Makefile @@ -3,7 +3,7 @@ PORTNAME= leechcraft PORTVERSION= 0.6.70 -PORTREVISION= 16 +PORTREVISION= 17 CATEGORIES= x11 MASTER_SITES= http://dist.leechcraft.org/LeechCraft/0.6.70/ diff --git a/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp b/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp index e2a29c5860bc..baba8f202aed 100644 --- a/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp +++ b/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp @@ -1,6 +1,7 @@ https://github.com/0xd34df00d/leechcraft/commit/307be1dd37059e49eca37f77ddc4806125a8f843 https://github.com/0xd34df00d/leechcraft/commit/53d56cafd3a1d299601d9f3bfd4ee051ae9121ba https://github.com/0xd34df00d/leechcraft/commit/875e3b43b7a91656f61180b2b2179137f18e6d71 +https://github.com/0xd34df00d/leechcraft/commit/14f5f8823ec7b23fdb4409f4f689e565d8995536 --- plugins/musiczombie/chroma.cpp.orig 2014-07-28 18:35:44 UTC +++ plugins/musiczombie/chroma.cpp @@ -32,3 +33,18 @@ https://github.com/0xd34df00d/leechcraft/commit/875e3b43b7a91656f61180b2b2179137 int gotFrame = false; auto consumed = avcodec_decode_audio4 (codecCtx.get (), frame.get (), &gotFrame, &packet); +@@ -168,7 +167,13 @@ namespace MusicZombie + data = frame->data; + + auto length = std::min (remaining, frame->nb_samples * codecCtx->channels); +- if (!chromaprint_feed (Ctx_, data [0], length)) ++ if (!chromaprint_feed (Ctx_, ++#if CHROMAPRINT_VERSION_MAJOR > 1 || CHROMAPRINT_VERSION_MINOR >= 4 ++ reinterpret_cast (data [0]), ++#else ++ data [0], ++#endif ++ length)) + throw std::runtime_error ("cannot feed data"); + + bool finished = false;