commit:     aa664d5463845d0e6490531ddbc0e20f246c427a
Author:     Sebastian Engel <sighunter <AT> gmx <DOT> de>
AuthorDate: Fri Sep 20 07:01:56 2024 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Fri Sep 20 07:04:11 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=aa664d54

media-sound/fooyin: new package, add 0.7.0, 9999

Signed-off-by: Sebastian Engel <sighunter <AT> gmx.de>

 media-sound/fooyin/Manifest            |  1 +
 media-sound/fooyin/fooyin-0.7.0.ebuild | 80 ++++++++++++++++++++++++++++++++++
 media-sound/fooyin/fooyin-9999.ebuild  | 80 ++++++++++++++++++++++++++++++++++
 media-sound/fooyin/metadata.xml        | 15 +++++++
 4 files changed, 176 insertions(+)

diff --git a/media-sound/fooyin/Manifest b/media-sound/fooyin/Manifest
new file mode 100644
index 000000000..5362f220a
--- /dev/null
+++ b/media-sound/fooyin/Manifest
@@ -0,0 +1 @@
+DIST fooyin-0.7.0.tar.gz 1575492 BLAKE2B 
0c06fb301b43de3f718efba479159cb5be7182a1a60371a04da27ebd302fb500816b10b841184290a428e08f46034cb4fe71185dbabb408637080eb2fb99ebf9
 SHA512 
70220d0503e473b347633d1d602d95fed4b78f4f2b7caa3b4a75854e622182eecd622b9f92434030097f5ab0926f305a948d16c0f776536b4ab562f94fe5bd76

diff --git a/media-sound/fooyin/fooyin-0.7.0.ebuild 
b/media-sound/fooyin/fooyin-0.7.0.ebuild
new file mode 100644
index 000000000..00094d24b
--- /dev/null
+++ b/media-sound/fooyin/fooyin-0.7.0.ebuild
@@ -0,0 +1,80 @@
+# 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 pipewire sdl 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]
+       media-libs/taglib
+       media-video/ffmpeg:=
+       alsa? ( media-libs/alsa-lib )
+       pipewire? ( media-video/pipewire:= )
+       sdl? ( media-libs/libsdl2 )
+"
+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
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TESTING=$(usex test)
+               -DBUILD_CCACHE=OFF
+               -DBUILD_LIBVGM=OFF
+               -DINSTALL_HEADERS=ON
+               $(cmake_use_find_package alsa ALSA)
+               $(cmake_use_find_package pipewire PipeWire)
+               $(cmake_use_find_package sdl SDL2)
+       )
+
+       cmake_src_configure
+}
+
+src_test() {
+       ln -sr "${CMAKE_USE_DIR}/tests/data/audio" 
"${BUILD_DIR}/tests/data/audio" || die
+
+       cmake_src_test
+}

diff --git a/media-sound/fooyin/fooyin-9999.ebuild 
b/media-sound/fooyin/fooyin-9999.ebuild
new file mode 100644
index 000000000..00094d24b
--- /dev/null
+++ b/media-sound/fooyin/fooyin-9999.ebuild
@@ -0,0 +1,80 @@
+# 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 pipewire sdl 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]
+       media-libs/taglib
+       media-video/ffmpeg:=
+       alsa? ( media-libs/alsa-lib )
+       pipewire? ( media-video/pipewire:= )
+       sdl? ( media-libs/libsdl2 )
+"
+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
+}
+
+src_configure() {
+       local mycmakeargs=(
+               -DBUILD_TESTING=$(usex test)
+               -DBUILD_CCACHE=OFF
+               -DBUILD_LIBVGM=OFF
+               -DINSTALL_HEADERS=ON
+               $(cmake_use_find_package alsa ALSA)
+               $(cmake_use_find_package pipewire PipeWire)
+               $(cmake_use_find_package sdl SDL2)
+       )
+
+       cmake_src_configure
+}
+
+src_test() {
+       ln -sr "${CMAKE_USE_DIR}/tests/data/audio" 
"${BUILD_DIR}/tests/data/audio" || die
+
+       cmake_src_test
+}

diff --git a/media-sound/fooyin/metadata.xml b/media-sound/fooyin/metadata.xml
new file mode 100644
index 000000000..77f97de37
--- /dev/null
+++ b/media-sound/fooyin/metadata.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <maintainer type="person">
+               <email>sighun...@gmx.de</email>
+               <name>Sebastian Engel</name>
+       </maintainer>
+       <use>
+               <flag name="pipewire">Enable sound support via native PipeWire 
backend</flag>
+       </use>
+       <upstream>
+               <remote-id type="github">fooyin/fooyin</remote-id>
+       </upstream>
+</pkgmetadata>
+

Reply via email to