blob: 96b046b85a2104aea17dba8ab30327f4cf29e6ad (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
|
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake xdg
DESCRIPTION="A customizable music player, Qt clone of foobar2000"
HOMEPAGE="https://www.fooyin.org/"
if [[ ${PV} == *9999* ]]; then
inherit git-r3
EGIT_REPO_URI="https://github.com/fooyin/fooyin.git"
else
SRC_URI="
https://github.com/fooyin/fooyin/archive/refs/tags/v${PV}.tar.gz
-> ${P}.tar.gz
"
KEYWORDS="~amd64"
fi
LICENSE="GPL-3"
SLOT="0"
IUSE="alsa +archive +openmpt pipewire sdl +sndfile test"
RESTRICT="!test? ( test )"
REQUIRED_USE="
|| ( alsa pipewire sdl )
"
RDEPEND="
dev-libs/icu:=
dev-libs/kdsingleapplication
dev-qt/qtbase:6[concurrent,dbus,gui,network,sql,widgets]
dev-qt/qtsvg:6
media-libs/taglib
media-video/ffmpeg:=
alsa? ( media-libs/alsa-lib )
archive? ( app-arch/libarchive:= )
openmpt? ( media-libs/libopenmpt )
pipewire? ( media-video/pipewire:= )
sdl? ( media-libs/libsdl2 )
sndfile? ( media-libs/libsndfile )
"
DEPEND="${RDEPEND}"
BDEPEND="
test? ( dev-cpp/gtest )
"
src_prepare() {
sed -i CMakeLists.txt \
-e "s|/doc/${PN}|/doc/${PF}|g" \
-e '/option(BUILD_TESTING/aenable_testing()' \
|| die
sed \
-e "s#:/audio#data/audio#g" \
-i \
tests/tagwritertest.cpp \
tests/tagreadertest.cpp \
|| die
cmake_src_prepare
}
# libvgm and libgme dependencies can currently not be satisfied,
# so building their input plugins is unconditionally disabled for now.
# SndFile not found though it is enabled, why?
src_configure() {
local mycmakeargs=(
-DBUILD_ALSA=$(usex alsa)
-DBUILD_TESTING=$(usex test)
-DBUILD_CCACHE=OFF
-DBUILD_LIBVGM=OFF
-DCMAKE_DISABLE_FIND_PACKAGE_LIBGME=ON
-DINSTALL_HEADERS=ON
$(cmake_use_find_package archive LibArchive)
$(cmake_use_find_package openmpt OpenMpt)
$(cmake_use_find_package pipewire PipeWire)
$(cmake_use_find_package sdl SDL2)
$(cmake_use_find_package sndfile SndFile)
)
cmake_src_configure
}
src_test() {
ln -sr "${CMAKE_USE_DIR}/tests/data/audio" "${BUILD_DIR}/tests/data/audio" || die
cmake_src_test
}
|