svn commit: r430708 - in head: audio/chromaprint audio/chromaprint/files audio/clementine-player audio/clementine-player/files audio/libgroove audio/libgroove/files x11/leechcraft x11/leechcraft/files
Jason E. Hale
jhale at FreeBSD.org
Fri Jan 6 14:24:02 UTC 2017
Author: jhale
Date: Fri Jan 6 14:24:00 2017
New Revision: 430708
URL: https://svnweb.freebsd.org/changeset/ports/430708
Log:
Update audio/chromaprint to 1.4.2
- Chromaprint itself is now licensed MIT, but it still includes LGPL21 code
- Add DOXYGEN option to build and install API docs
- Add TEST option to build regression tests
- API has changed, so some dependent ports needed to be patched (mostly
taken from their respective upstream repositories)
Changes: https://github.com/acoustid/chromaprint/blob/v1.4.2/NEWS.txt
Added:
head/audio/chromaprint/files/
head/audio/chromaprint/files/patch-tests_CMakeLists.txt (contents, props changed)
head/audio/clementine-player/files/patch-git_ded3126 (contents, props changed)
head/audio/libgroove/files/
head/audio/libgroove/files/patch-groovefingerprinter_fingerprinter.c (contents, props changed)
Modified:
head/audio/chromaprint/Makefile
head/audio/chromaprint/distinfo
head/audio/chromaprint/pkg-plist
head/audio/clementine-player/Makefile
head/audio/libgroove/Makefile
head/x11/leechcraft/Makefile
head/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp
Modified: head/audio/chromaprint/Makefile
==============================================================================
--- head/audio/chromaprint/Makefile Fri Jan 6 13:49:41 2017 (r430707)
+++ head/audio/chromaprint/Makefile Fri Jan 6 14:24:00 2017 (r430708)
@@ -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 at 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 <bsd.port.mk>
Modified: head/audio/chromaprint/distinfo
==============================================================================
--- head/audio/chromaprint/distinfo Fri Jan 6 13:49:41 2017 (r430707)
+++ head/audio/chromaprint/distinfo Fri Jan 6 14:24:00 2017 (r430708)
@@ -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
Added: head/audio/chromaprint/files/patch-tests_CMakeLists.txt
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/chromaprint/files/patch-tests_CMakeLists.txt Fri Jan 6 14:24:00 2017 (r430708)
@@ -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} $<TARGET_OBJECTS:chromaprint_objs>)
Modified: head/audio/chromaprint/pkg-plist
==============================================================================
--- head/audio/chromaprint/pkg-plist Fri Jan 6 13:49:41 2017 (r430707)
+++ head/audio/chromaprint/pkg-plist Fri Jan 6 14:24:00 2017 (r430708)
@@ -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
Modified: head/audio/clementine-player/Makefile
==============================================================================
--- head/audio/clementine-player/Makefile Fri Jan 6 13:49:41 2017 (r430707)
+++ head/audio/clementine-player/Makefile Fri Jan 6 14:24:00 2017 (r430708)
@@ -3,7 +3,7 @@
PORTNAME= clementine
PORTVERSION= 1.3.1
-PORTREVISION= 4
+PORTREVISION= 5
CATEGORIES= audio
PKGNAMESUFFIX= -player
Added: head/audio/clementine-player/files/patch-git_ded3126
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/clementine-player/files/patch-git_ded3126 Fri Jan 6 14:24:00 2017 (r430708)
@@ -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<void*>(data.data()),
++ chromaprint_feed(chromaprint, reinterpret_cast<int16_t *>(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);
Modified: head/audio/libgroove/Makefile
==============================================================================
--- head/audio/libgroove/Makefile Fri Jan 6 13:49:41 2017 (r430707)
+++ head/audio/libgroove/Makefile Fri Jan 6 14:24:00 2017 (r430708)
@@ -3,7 +3,7 @@
PORTNAME= libgroove
PORTVERSION= 4.3.0
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= audio
MAINTAINER= ports at FreeBSD.org
Added: head/audio/libgroove/files/patch-groovefingerprinter_fingerprinter.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/audio/libgroove/files/patch-groovefingerprinter_fingerprinter.c Fri Jan 6 14:24:00 2017 (r430708)
@@ -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;
+ }
Modified: head/x11/leechcraft/Makefile
==============================================================================
--- head/x11/leechcraft/Makefile Fri Jan 6 13:49:41 2017 (r430707)
+++ head/x11/leechcraft/Makefile Fri Jan 6 14:24:00 2017 (r430708)
@@ -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/
Modified: head/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp
==============================================================================
--- head/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp Fri Jan 6 13:49:41 2017 (r430707)
+++ head/x11/leechcraft/files/patch-plugins_musiczombie_chroma.cpp Fri Jan 6 14:24:00 2017 (r430708)
@@ -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
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<const int16_t*> (data [0]),
++#else
++ data [0],
++#endif
++ length))
+ throw std::runtime_error ("cannot feed data");
+
+ bool finished = false;
More information about the svn-ports-all
mailing list