summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /media-libs/chromaprint
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'media-libs/chromaprint')
-rw-r--r--media-libs/chromaprint/Manifest4
-rw-r--r--media-libs/chromaprint/chromaprint-0.6.ebuild45
-rw-r--r--media-libs/chromaprint/chromaprint-0.7.ebuild52
-rw-r--r--media-libs/chromaprint/chromaprint-1.1.ebuild56
-rw-r--r--media-libs/chromaprint/chromaprint-1.2.ebuild48
-rw-r--r--media-libs/chromaprint/files/chromaprint-0.7-boost.patch8
-rw-r--r--media-libs/chromaprint/files/chromaprint-0.7-ffmpeg.patch43
-rw-r--r--media-libs/chromaprint/files/chromaprint-0.7-libav9.patch44
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.0-libav9.patch11
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.1-ffmpeg2.patch13
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.1-gtest.patch104
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch59
-rw-r--r--media-libs/chromaprint/metadata.xml8
13 files changed, 495 insertions, 0 deletions
diff --git a/media-libs/chromaprint/Manifest b/media-libs/chromaprint/Manifest
new file mode 100644
index 000000000000..534579ef0538
--- /dev/null
+++ b/media-libs/chromaprint/Manifest
@@ -0,0 +1,4 @@
+DIST chromaprint-0.6.tar.gz 542366 SHA256 5d9b82da226450c14e43482371a1b2a178e2604ab5b2e9259f33b1b461ee9d63
+DIST chromaprint-0.7.tar.gz 543811 SHA256 4e52c3fd443c91a5c429557753d4ba3f9d31d183810412c0d8600892f3975501 SHA512 2ac03f80888d6c12dd05c20adc82e0f2c9e6bf5edc099d7c7b719b8cb353151fb04b78f5c7bca672d5fe8357a791e86fdea7b6952a0d64c346c079548ebfcd38 WHIRLPOOL 34c5cb7c38dc0e4924e068ff0a695e571fdd2233046ef6ea84e9e0e27e6bf9f5eaedceb79c2f8120e9ac6eb30ace3bc9e15ba59027cd498426e7f94536e2da84
+DIST chromaprint-1.1.tar.gz 542360 SHA256 6b14d7ea4964581b73bd3f8038c8857c01e446421c1ae99cbbf64de26b47cd12 SHA512 3d439dfca979e2babc8d2c171b5cb36fd0a5d3b7475e02a0f8bae436f7096e189674b640119f0dccf7cc2cd214bd8674d46b018952f1e3e93ddc0ba19b5155f9 WHIRLPOOL 726c7710f7bd1c138d7ebd1de263a0e214cbd79faf60e35034a60cfd68a9d3b4e52fc1cc93ce4dc7d39683e3a5ac1d7e9bd6c8046cdb5cece83b9c2fbf4971b5
+DIST chromaprint-1.2.tar.gz 529646 SHA256 822b8949a322ac04c6f8a3ed78f5e689bcc493c6ca0972bf627c913c8430031a SHA512 dc61db8894a20df3d7e7317cd7cd97148c19be5854dd66409341cb8e47c045e1c632b254e14a869279983a5af2cc6f9effea21b77a63dff729511e6144439cbb WHIRLPOOL b2efb45c23e950b6a4d95c078bed15b03ef35e423b106428a7607034276b343b8c223ffa71e021846ed48f535663e062ae8042d281d769a04effc9afd8a600dd
diff --git a/media-libs/chromaprint/chromaprint-0.6.ebuild b/media-libs/chromaprint/chromaprint-0.6.ebuild
new file mode 100644
index 000000000000..1399c0cc13ca
--- /dev/null
+++ b/media-libs/chromaprint/chromaprint-0.6.ebuild
@@ -0,0 +1,45 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils
+
+DESCRIPTION="A client-side library that implements a custom algorithm for extracting fingerprints"
+HOMEPAGE="http://acoustid.org/chromaprint"
+SRC_URI="mirror://github/lalinsky/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE="test tools"
+
+# note: use ffmpeg instead of fftw because it's recommended and required for tools
+RDEPEND=">=virtual/ffmpeg-0.6
+ tools? ( >=media-libs/taglib-1.6 )"
+DEPEND="${RDEPEND}
+ test? ( dev-cpp/gtest )
+ tools? ( dev-libs/boost )"
+
+DOCS="NEWS.txt README.txt"
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build tools EXAMPLES)
+ $(cmake-utils_use_build test TESTS)
+ $(cmake-utils_use_build tools)
+ -DWITH_AVFFT=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${CMAKE_BUILD_DIR}" || die
+ emake check
+}
+
+src_install() {
+ cmake-utils_src_install
+ use tools && dobin "${CMAKE_BUILD_DIR}"/tools/fpcollect
+}
diff --git a/media-libs/chromaprint/chromaprint-0.7.ebuild b/media-libs/chromaprint/chromaprint-0.7.ebuild
new file mode 100644
index 000000000000..062c6e0a0f5b
--- /dev/null
+++ b/media-libs/chromaprint/chromaprint-0.7.ebuild
@@ -0,0 +1,52 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+inherit cmake-utils
+
+DESCRIPTION="A client-side library that implements a custom algorithm for extracting fingerprints"
+HOMEPAGE="http://acoustid.org/chromaprint"
+SRC_URI="mirror://github/lalinsky/${PN}/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86"
+IUSE="test tools"
+
+# note: use ffmpeg instead of fftw because it's recommended and required for tools
+RDEPEND=">=virtual/ffmpeg-0.10
+ tools? ( >=media-libs/taglib-1.6 )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-cpp/gtest
+ dev-libs/boost
+ )
+ tools? ( dev-libs/boost )"
+
+DOCS="NEWS.txt README.txt"
+
+PATCHES=( "${FILESDIR}"/${P}-boost.patch
+ "${FILESDIR}"/${P}-ffmpeg.patch
+ "${FILESDIR}"/${P}-libav9.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build tools EXAMPLES)
+ $(cmake-utils_use_build test TESTS)
+ $(cmake-utils_use_build tools)
+ -DWITH_AVFFT=ON
+ )
+
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${CMAKE_BUILD_DIR}" || die
+ emake check
+}
+
+src_install() {
+ cmake-utils_src_install
+ use tools && dobin "${CMAKE_BUILD_DIR}"/tools/fpcollect
+}
diff --git a/media-libs/chromaprint/chromaprint-1.1.ebuild b/media-libs/chromaprint/chromaprint-1.1.ebuild
new file mode 100644
index 000000000000..80080d956f53
--- /dev/null
+++ b/media-libs/chromaprint/chromaprint-1.1.ebuild
@@ -0,0 +1,56 @@
+# Copyright 1999-2014 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit cmake-utils
+
+DESCRIPTION="A client-side library that implements a custom algorithm for extracting fingerprints"
+HOMEPAGE="http://acoustid.org/chromaprint"
+SRC_URI="https://bitbucket.org/acoustid/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="amd64 ~ppc x86 ~amd64-fbsd"
+IUSE="test tools"
+
+# note: use ffmpeg instead of fftw because it's recommended and required for tools
+RDEPEND="
+ >=virtual/ffmpeg-0.10
+ tools? ( >=media-libs/taglib-1.6 )"
+DEPEND="${RDEPEND}
+ test? (
+ dev-cpp/gtest
+ dev-libs/boost
+ )
+ tools? ( dev-libs/boost )"
+
+DOCS="NEWS.txt README.txt"
+
+PATCHES=(
+ "${FILESDIR}"/${PN}-0.7-ffmpeg.patch
+ "${FILESDIR}"/${P}-gtest.patch
+ "${FILESDIR}"/${P}-ffmpeg2.patch
+ "${FILESDIR}"/${P}-libav_build_fix_for_tools.patch
+)
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build tools EXAMPLES)
+ $(cmake-utils_use_build test TESTS)
+ $(cmake-utils_use_build tools)
+ -DWITH_AVFFT=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${BUILD_DIR}" || die
+ emake check
+}
+
+src_install() {
+ cmake-utils_src_install
+ use tools && dobin "${BUILD_DIR}"/tools/fpcollect
+}
diff --git a/media-libs/chromaprint/chromaprint-1.2.ebuild b/media-libs/chromaprint/chromaprint-1.2.ebuild
new file mode 100644
index 000000000000..670ff3859c7b
--- /dev/null
+++ b/media-libs/chromaprint/chromaprint-1.2.ebuild
@@ -0,0 +1,48 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+inherit cmake-utils
+
+DESCRIPTION="A client-side library that implements a custom algorithm for extracting fingerprints"
+HOMEPAGE="http://acoustid.org/chromaprint"
+SRC_URI="https://bitbucket.org/acoustid/${PN}/downloads/${P}.tar.gz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~alpha amd64 ~ppc ~ppc64 x86 ~amd64-fbsd"
+IUSE="libav test tools"
+
+# note: use ffmpeg or libav instead of fftw because it's recommended and required for tools
+RDEPEND="
+ libav? ( media-video/libav:0= )
+ !libav? ( media-video/ffmpeg:0= )
+"
+DEPEND="${RDEPEND}
+ test? (
+ dev-cpp/gtest
+ dev-libs/boost
+ )"
+
+DOCS="NEWS.txt README.md"
+
+PATCHES=( "${FILESDIR}"/${PN}-1.1-gtest.patch )
+
+src_configure() {
+ local mycmakeargs=(
+ $(cmake-utils_use_build tools EXAMPLES)
+ $(cmake-utils_use_build test TESTS)
+ -DWITH_AVFFT=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ cd "${BUILD_DIR}" || die
+ emake check
+}
+
+src_install() {
+ cmake-utils_src_install
+}
diff --git a/media-libs/chromaprint/files/chromaprint-0.7-boost.patch b/media-libs/chromaprint/files/chromaprint-0.7-boost.patch
new file mode 100644
index 000000000000..46df857689de
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-0.7-boost.patch
@@ -0,0 +1,8 @@
+--- chromaprint-0.7/tests/CMakeLists.txt
++++ chromaprint-0.7/tests/CMakeLists.txt
+@@ -1,4 +1,5 @@
+ include_directories(
++ ${Boost_INCLUDE_DIRS}
+ ${GTEST_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../src
+ )
diff --git a/media-libs/chromaprint/files/chromaprint-0.7-ffmpeg.patch b/media-libs/chromaprint/files/chromaprint-0.7-ffmpeg.patch
new file mode 100644
index 000000000000..f51e7794b6d8
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-0.7-ffmpeg.patch
@@ -0,0 +1,43 @@
+https://bugs.gentoo.org/show_bug.cgi?id=435856
+https://raw.github.com/pld-linux/chromaprint/master/chromaprint-ffmpeg.patch
+
+--- chromaprint-0.7/src/ext/ffmpeg_decoder.h.orig 2012-09-05 20:05:36.000000000 +0200
++++ chromaprint-0.7/src/ext/ffmpeg_decoder.h 2012-10-10 17:59:58.632685943 +0200
+@@ -80,7 +80,7 @@
+ avcodec_close(m_codec_ctx);
+ }
+ if (m_format_ctx) {
+- av_close_input_file(m_format_ctx);
++ avformat_close_input(&m_format_ctx);
+ }
+ //av_audio_convert_free(m_convert_ctx);
+ av_free(m_buffer2);
+@@ -89,12 +89,12 @@
+
+ inline bool Decoder::Open()
+ {
+- if (av_open_input_file(&m_format_ctx, m_file_name.c_str(), NULL, 0, NULL) != 0) {
++ if (avformat_open_input(&m_format_ctx, m_file_name.c_str(), NULL, NULL) != 0) {
+ m_error = "Couldn't open the file." + m_file_name;
+ return false;
+ }
+
+- if (av_find_stream_info(m_format_ctx) < 0) {
++ if (avformat_find_stream_info(m_format_ctx, NULL) < 0) {
+ m_error = "Couldn't find stream information in the file.";
+ return false;
+ }
+@@ -129,11 +129,11 @@
+ return false;
+ }
+
+- if (m_codec_ctx->sample_fmt != SAMPLE_FMT_S16) {
++ if (m_codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) {
+ m_error = "Unsupported sample format.\n";
+ return false;
+ }
+- /*m_convert_ctx = av_audio_convert_alloc(SAMPLE_FMT_S16, 1,
++ /*m_convert_ctx = av_audio_convert_alloc(AV_SAMPLE_FMT_S16, 1,
+ m_codec_ctx->sample_fmt, 1,
+ NULL, 0);
+ if (!m_convert_ctx) {
diff --git a/media-libs/chromaprint/files/chromaprint-0.7-libav9.patch b/media-libs/chromaprint/files/chromaprint-0.7-libav9.patch
new file mode 100644
index 000000000000..c52097056377
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-0.7-libav9.patch
@@ -0,0 +1,44 @@
+diff -burN chromaprint-0.7.orig//src/fft_lib_avfft.h chromaprint-0.7/src/fft_lib_avfft.h
+--- chromaprint-0.7.orig//src/fft_lib_avfft.h 2012-09-05 20:05:36.000000000 +0200
++++ chromaprint-0.7/src/fft_lib_avfft.h 2013-02-16 17:34:08.682624779 +0100
+@@ -25,6 +25,7 @@
+ extern "C" {
+ #include <libavcodec/avcodec.h>
+ #include <libavcodec/avfft.h>
++#include <libavutil/mem.h>
+ }
+ #include "combined_buffer.h"
+
+diff -burN chromaprint-0.7.orig/examples/fpcalc.c chromaprint-0.7/work/chromaprint-0.7/examples/fpcalc.c
+--- chromaprint-0.7.orig/examples/fpcalc.c 2012-09-05 20:05:36.000000000 +0200
++++ chromaprint-0.7/examples/fpcalc.c 2013-02-16 17:40:09.947611629 +0100
+@@ -42,7 +42,7 @@
+ goto done;
+ }
+
+- if (av_find_stream_info(format_ctx) < 0) {
++ if (avformat_find_stream_info(format_ctx, NULL) < 0) {
+ fprintf(stderr, "ERROR: couldn't find stream information in the file\n");
+ goto done;
+ }
+@@ -65,7 +65,7 @@
+ goto done;
+ }
+
+- if (avcodec_open(codec_ctx, codec) < 0) {
++ if (avcodec_open2(codec_ctx, codec, NULL) < 0) {
+ fprintf(stderr, "ERROR: couldn't open the codec\n");
+ goto done;
+ }
+diff -burN chromaprint-0.7.orig/src/ext/ffmpeg_decoder.h chromaprint-0.7/src/ext/ffmpeg_decoder.h
+--- chromaprint-0.7.orig/src/ext/ffmpeg_decoder.h 2013-02-16 17:49:06.799592088 +0100
++++ chromaprint-0.7/src/ext/ffmpeg_decoder.h 2013-02-16 17:49:54.037590369 +0100
+@@ -124,7 +124,7 @@
+ return false;
+ }
+
+- if (avcodec_open(m_codec_ctx, codec) < 0) {
++ if (avcodec_open2(m_codec_ctx, codec, NULL) < 0) {
+ m_error = "Couldn't open the codec.";
+ return false;
+ }
diff --git a/media-libs/chromaprint/files/chromaprint-1.0-libav9.patch b/media-libs/chromaprint/files/chromaprint-1.0-libav9.patch
new file mode 100644
index 000000000000..e8167903471f
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.0-libav9.patch
@@ -0,0 +1,11 @@
+--- chromaprint-1.0.orig/src/ext/ffmpeg_decoder.h 2013-11-03 17:32:04.347686878 +0800
++++ chromaprint-1.0/src/ext/ffmpeg_decoder.h 2013-11-03 17:32:41.082686494 +0800
+@@ -124,7 +124,7 @@
+ return false;
+ }
+
+- if (avcodec_open(m_codec_ctx, codec) < 0) {
++ if (avcodec_open2(m_codec_ctx, codec, NULL) < 0) {
+ m_error = "Couldn't open the codec.";
+ return false;
+ }
diff --git a/media-libs/chromaprint/files/chromaprint-1.1-ffmpeg2.patch b/media-libs/chromaprint/files/chromaprint-1.1-ffmpeg2.patch
new file mode 100644
index 000000000000..2a68de3105dc
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.1-ffmpeg2.patch
@@ -0,0 +1,13 @@
+--- chromaprint-1.1/src/ext/ffmpeg_decoder.h
++++ chromaprint-1.1/src/ext/ffmpeg_decoder.h
+@@ -28,6 +28,10 @@
+ }
+ #include "audio_consumer.h"
+
++#ifndef AVCODEC_MAX_AUDIO_FRAME_SIZE
++# define AVCODEC_MAX_AUDIO_FRAME_SIZE 192000
++#endif
++
+ class Decoder
+ {
+ public:
diff --git a/media-libs/chromaprint/files/chromaprint-1.1-gtest.patch b/media-libs/chromaprint/files/chromaprint-1.1-gtest.patch
new file mode 100644
index 000000000000..8305ae7c1af0
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.1-gtest.patch
@@ -0,0 +1,104 @@
+ cmake/modules/FindGTest.cmake | 82 -------------------------------------------
+ tests/CMakeLists.txt | 1 -
+ 2 files changed, 83 deletions(-)
+
+diff --git a/cmake/modules/FindGTest.cmake b/cmake/modules/FindGTest.cmake
+deleted file mode 100644
+index 21dc2f5..0000000
+--- a/cmake/modules/FindGTest.cmake
++++ /dev/null
+@@ -1,82 +0,0 @@
+-# Locate the Google C++ Testing Framework source directory.
+-#
+-# Defines the following variables:
+-#
+-# GTEST_FOUND - Found the Google Testing framework sources
+-# GTEST_INCLUDE_DIRS - Include directories
+-# GTEST_SOURCE_DIR - Source code directory
+-# GTEST_LIBRARIES - libgtest
+-# GTEST_MAIN_LIBRARIES - libgtest-main
+-# GTEST_BOTH_LIBRARIES - libgtest & libgtest-main
+-#
+-# Accepts the following variables as input:
+-#
+-# GTEST_ROOT - (as CMake or environment variable)
+-# The root directory of the gtest install prefix
+-#
+-# Example usage:
+-#
+-# find_package(GTest REQUIRED)
+-# include_directories(${GTEST_INCLUDE_DIRS})
+-# add_subdirectory(${GTEST_SOURCE_DIR}
+-# ${CMAKE_CURRENT_BINARY_DIR}/gtest_build)
+-#
+-# add_executable(foo foo.cc)
+-# target_link_libraries(foo ${GTEST_BOTH_LIBRARIES})
+-#
+-# enable_testing(true)
+-# add_test(AllTestsInFoo foo)
+-#
+-# =========================================================
+-#
+-# Copyright (C) 2012 Lukas Lalinsky <lalinsky@gmail.com>
+-#
+-# Redistribution and use in source and binary forms, with or without
+-# modification, are permitted provided that the following conditions are
+-# met:
+-#
+-# * Redistributions of source code must retain the above copyright notice,
+-# this list of conditions and the following disclaimer.
+-#
+-# * Redistributions in binary form must reproduce the above copyright notice,
+-# this list of conditions and the following disclaimer in the documentation
+-# and/or other materials provided with the distribution.
+-#
+-# * The names of Kitware, Inc., the Insight Consortium, or the names of
+-# any consortium members, or of any contributors, may not be used to
+-# endorse or promote products derived from this software without
+-# specific prior written permission.
+-#
+-# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
+-# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+-# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+-# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
+-# ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+-# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+-# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+-# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+-# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+-# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+-
+-
+-find_path(GTEST_SOURCE_DIR
+- NAMES src/gtest-all.cc CMakeLists.txt
+- HINTS $ENV{GTEST_ROOT} ${GTEST_ROOT} /usr/src/gtest
+-)
+-mark_as_advanced(GTEST_SOURCE_DIR)
+-
+-find_path(GTEST_INCLUDE_DIR
+- NAMES gtest/gtest.h
+- HINTS $ENV{GTEST_ROOT}/include ${GTEST_ROOT}/include
+-)
+-mark_as_advanced(GTEST_INCLUDE_DIR)
+-
+-include(FindPackageHandleStandardArgs)
+-find_package_handle_standard_args(GTest DEFAULT_MSG GTEST_SOURCE_DIR GTEST_INCLUDE_DIR)
+-
+-if(GTEST_FOUND)
+- set(GTEST_INCLUDE_DIRS ${GTEST_INCLUDE_DIR})
+- set(GTEST_LIBRARIES gtest)
+- set(GTEST_MAIN_LIBRARIES gtest_main)
+- set(GTEST_BOTH_LIBRARIES ${GTEST_LIBRARIES} ${GTEST_MAIN_LIBRARIES})
+-endif()
+diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
+index 791cd96..9115391 100644
+--- a/tests/CMakeLists.txt
++++ b/tests/CMakeLists.txt
+@@ -3,7 +3,6 @@ include_directories(
+ ${Boost_INCLUDE_DIRS}
+ ${CMAKE_CURRENT_SOURCE_DIR}/../src
+ )
+-add_subdirectory(${GTEST_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/gtest_build)
+
+ set(tests_SOURCES
+ main.cpp
diff --git a/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch b/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch
new file mode 100644
index 000000000000..b53f79838091
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.1-libav_build_fix_for_tools.patch
@@ -0,0 +1,59 @@
+http://bugs.gentoo.org/498194
+http://bitbucket.org/acoustid/chromaprint/commits/90822f6eee64da2941c9cbd9cd41a9664fead1d4
+
+From 90822f6eee64da2941c9cbd9cd41a9664fead1d4 Mon Sep 17 00:00:00 2001
+From: Urs Fleisch <ufleisch@users.sourceforge.net>
+Date: Sat, 28 Dec 2013 09:47:31 +0100
+Subject: [PATCH] Build fpcalc if neither HAVE_SWRESAMPLE nor HAVE_AVRESAMPLE
+ defined, issue #11.
+
+---
+ examples/fpcalc.c | 9 +++++++--
+ 1 file changed, 7 insertions(+), 2 deletions(-)
+
+diff --git a/examples/fpcalc.c b/examples/fpcalc.c
+index a4b0ff9..e73e358 100644
+--- a/examples/fpcalc.c
++++ b/examples/fpcalc.c
+@@ -33,6 +33,8 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ SwrContext *convert_ctx = NULL;
+ #elif defined(HAVE_AVRESAMPLE)
+ AVAudioResampleContext *convert_ctx = NULL;
++#else
++ void *convert_ctx = NULL;
+ #endif
+ int max_dst_nb_samples = 0, dst_linsize = 0;
+ uint8_t *dst_data[1] = { NULL };
+@@ -75,6 +77,7 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ goto done;
+ }
+
++#if defined(HAVE_SWRESAMPLE) || defined(HAVE_AVRESAMPLE)
+ if (codec_ctx->sample_fmt != AV_SAMPLE_FMT_S16) {
+ int64_t channel_layout = codec_ctx->channel_layout;
+ if (!channel_layout) {
+@@ -111,6 +114,7 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ }
+ #endif
+ }
++#endif
+
+ if (stream->duration != AV_NOPTS_VALUE) {
+ *duration = stream->time_base.num * stream->duration / stream->time_base.den;
+@@ -155,10 +159,11 @@ int decode_audio_file(ChromaprintContext *chromaprint_ctx, const char *file_name
+ max_dst_nb_samples = frame->nb_samples;
+ }
+ #if defined(HAVE_SWRESAMPLE)
+- if (swr_convert(convert_ctx, dst_data, frame->nb_samples, (const uint8_t **)frame->data, frame->nb_samples) < 0) {
++ if (swr_convert(convert_ctx, dst_data, frame->nb_samples, (const uint8_t **)frame->data, frame->nb_samples) < 0)
+ #elif defined(HAVE_AVRESAMPLE)
+- if (avresample_convert(convert_ctx, dst_data, 0, frame->nb_samples, (uint8_t **)frame->data, 0, frame->nb_samples) < 0) {
++ if (avresample_convert(convert_ctx, dst_data, 0, frame->nb_samples, (uint8_t **)frame->data, 0, frame->nb_samples) < 0)
+ #endif
++ {
+ fprintf(stderr, "ERROR: couldn't convert the audio\n");
+ goto done;
+ }
+--
+1.9.rc2.211.gd198f5d
+
diff --git a/media-libs/chromaprint/metadata.xml b/media-libs/chromaprint/metadata.xml
new file mode 100644
index 000000000000..4cd6b6d902a3
--- /dev/null
+++ b/media-libs/chromaprint/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>sound</herd>
+ <use>
+ <flag name="tools">Build and install fpcalc and fpcollect tools</flag>
+ </use>
+</pkgmetadata>