summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2019-11-24 13:58:32 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2019-11-24 14:04:23 +0100
commit4d0edf6808391ca6ae5c8df9efbeeec0bfd48ba7 (patch)
tree7ec2dd0974b961f243dcda83b34f351869884574
parentdev-python/wheel: Remove redundant versions (diff)
downloadgentoo-4d0edf6808391ca6ae5c8df9efbeeec0bfd48ba7.tar.gz
gentoo-4d0edf6808391ca6ae5c8df9efbeeec0bfd48ba7.tar.bz2
gentoo-4d0edf6808391ca6ae5c8df9efbeeec0bfd48ba7.zip
media-libs/chromaprint: EAPI-7 bump, fix DEPENDs and DESCRIPTION
CMake improvements. Closes: https://bugs.gentoo.org/625300 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
-rw-r--r--media-libs/chromaprint/chromaprint-1.4.3.ebuild28
-rw-r--r--media-libs/chromaprint/files/chromaprint-1.4.3-cmake.patch58
2 files changed, 72 insertions, 14 deletions
diff --git a/media-libs/chromaprint/chromaprint-1.4.3.ebuild b/media-libs/chromaprint/chromaprint-1.4.3.ebuild
index 169011a15e18..4b0533b5d9fe 100644
--- a/media-libs/chromaprint/chromaprint-1.4.3.ebuild
+++ b/media-libs/chromaprint/chromaprint-1.4.3.ebuild
@@ -1,15 +1,15 @@
# Copyright 1999-2019 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
-inherit cmake-multilib
+EAPI=7
GTEST_VERSION="1.8.0"
+inherit cmake-multilib
-DESCRIPTION="A client-side library that implements a custom algorithm for extracting fingerprints"
+DESCRIPTION="Library implementing a custom algorithm for extracting audio fingerprints"
HOMEPAGE="https://acoustid.org/chromaprint"
SRC_URI="https://github.com/acoustid/${PN}/releases/download/v${PV}/${P}.tar.gz
- test? ( https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz -> gtest-${GTEST_VERSION}.tar.gz )
+ test? ( https://github.com/google/googletest/archive/release-${GTEST_VERSION}.tar.gz -> gtest-${GTEST_VERSION}.tar.gz )
"
LICENSE="LGPL-2.1"
@@ -23,25 +23,25 @@ RDEPEND="
!libav? ( >=media-video/ffmpeg-2.6:0=[${MULTILIB_USEDEP}] )
"
DEPEND="${RDEPEND}
- test? (
- dev-cpp/gtest[${MULTILIB_USEDEP}]
- dev-libs/boost[${MULTILIB_USEDEP}]
- )"
+ test? ( dev-cpp/gtest[${MULTILIB_USEDEP}] )"
-PATCHES=( "${FILESDIR}"/chromaprint-1.4.3-test-bigendian.patch )
+PATCHES=(
+ "${FILESDIR}"/${P}-test-bigendian.patch
+ "${FILESDIR}"/${P}-cmake.patch
+)
-DOCS="NEWS.txt README.md"
+DOCS=( NEWS.txt README.md )
-S=${WORKDIR}/${PN}-v${PV}
+S="${WORKDIR}/${PN}-v${PV}"
multilib_src_configure() {
export GTEST_ROOT="${WORKDIR}/googletest-release-${GTEST_VERSION}/googletest/"
local mycmakeargs=(
- "-DBUILD_TOOLS=$(multilib_native_usex tools ON OFF)"
- "-DBUILD_TESTS=$(usex test ON OFF)"
+ -DBUILD_TOOLS=$(multilib_native_usex tools ON OFF)
+ -DBUILD_TESTS=$(usex test ON OFF)
-DFFT_LIB=avfft
-DAUDIO_PROCESSOR_LIB=$(usex libav avresample swresample)
- )
+ )
cmake-utils_src_configure
}
diff --git a/media-libs/chromaprint/files/chromaprint-1.4.3-cmake.patch b/media-libs/chromaprint/files/chromaprint-1.4.3-cmake.patch
new file mode 100644
index 000000000000..60fe548cf29c
--- /dev/null
+++ b/media-libs/chromaprint/files/chromaprint-1.4.3-cmake.patch
@@ -0,0 +1,58 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3991219..f9e172b 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,21 +1,11 @@
+-cmake_minimum_required(VERSION 2.8.12)
+-
+-if(POLICY CMP0042)
+- cmake_policy(SET CMP0042 NEW)
+-endif()
+-
+-if(POLICY CMP0048)
+- cmake_policy(SET CMP0048 OLD)
+-endif()
+-
+-project(chromaprint C CXX)
++cmake_minimum_required(VERSION 3.3)
+
+ set(chromaprint_VERSION_MAJOR 1)
+ set(chromaprint_VERSION_MINOR 4)
+ set(chromaprint_VERSION_PATCH 3)
+ set(chromaprint_VERSION "${chromaprint_VERSION_MAJOR}.${chromaprint_VERSION_MINOR}.${chromaprint_VERSION_PATCH}")
+
+-set(PROJECT_VERSION "${chromaprint_VERSION}")
++project(chromaprint LANGUAGES C CXX VERSION "${chromaprint_VERSION}")
+
+ set(chromaprint_SOVERSION 1)
+
+@@ -31,14 +21,14 @@ include(CheckCXXCompilerFlag)
+
+ find_package(Threads)
+
+-check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
+-if(COMPILER_SUPPORTS_CXX11)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+-endif()
++option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+
+-if(CMAKE_COMPILER_IS_GNUCXX AND BUILD_SHARED_LIBS)
+- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fvisibility=hidden -fvisibility-inlines-hidden")
+- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden")
++set(CMAKE_CXX_STANDARD 11)
++
++if(BUILD_SHARED_LIBS)
++ set(CMAKE_C_VISIBILITY_PRESET hidden)
++ set(CMAKE_CXX_VISIBILITY_PRESET hidden)
++ set(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
+ endif()
+
+ if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_BUILD_TYPE STREQUAL "Debug")
+@@ -70,7 +60,6 @@ if(APPLE)
+ set(FRAMEWORK_INSTALL_DIR "/Library/Frameworks" CACHE STRING "Directory to install frameworks to")
+ endif()
+
+-option(BUILD_SHARED_LIBS "Build shared libraries" ON)
+ option(BUILD_TOOLS "Build command line tools" OFF)
+ option(BUILD_TESTS "Build test suite" OFF)
+