commit: a3a749f80dbc78199c2526e5692374b3fd882e41 Author: YiFei Zhu <zhuyifei1999 <AT> gmail <DOT> com> AuthorDate: Fri Jun 9 00:16:56 2023 +0000 Commit: Florian Schmaus <flow <AT> gentoo <DOT> org> CommitDate: Fri Jun 9 00:20:19 2023 +0000 URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=a3a749f8
media-sound/musikcube: new package, add 3.0.1 A lot of the parts of the ebuild are stolen from @Gerodote's overlay: https://github.com/Gerodote/ex_repo/tree/master/media-sound/musikcube I did some cleanup, fixed the libtinfow link issue (pending upstream fix), and made the USE flags enforce the plugins that gets build, rather than having the build system perform autodetection. Signed-off-by: YiFei Zhu <zhuyifei1999 <AT> gmail.com> media-sound/musikcube/Manifest | 1 + .../musikcube/files/musikcube-3.0.1-tinfow.patch | 26 ++++++ media-sound/musikcube/metadata.xml | 29 +++++++ media-sound/musikcube/musikcube-3.0.1.ebuild | 93 ++++++++++++++++++++++ 4 files changed, 149 insertions(+) diff --git a/media-sound/musikcube/Manifest b/media-sound/musikcube/Manifest new file mode 100644 index 000000000..e6427367e --- /dev/null +++ b/media-sound/musikcube/Manifest @@ -0,0 +1 @@ +DIST musikcube-3.0.1.tar.gz 4759002 BLAKE2B c312067fefaeaeb1c56b15fdcc83e1a73be648d88db54dc43d5c0f3e2ed1f226480612461b7239087ebfadcbcc38ed432622873fc40d3739daca1d32d19bea7f SHA512 ff18b69bf9a295925ede561c80a66f3fce7c00fdc29906a39e89b520c49467ddaa88cb69406a8bd012eaa851716b6515e93a5a0d0f75f2f24e64ced3fef4b9c7 diff --git a/media-sound/musikcube/files/musikcube-3.0.1-tinfow.patch b/media-sound/musikcube/files/musikcube-3.0.1-tinfow.patch new file mode 100644 index 000000000..516df0570 --- /dev/null +++ b/media-sound/musikcube/files/musikcube-3.0.1-tinfow.patch @@ -0,0 +1,26 @@ +diff --git a/src/musikcube/CMakeLists.txt b/src/musikcube/CMakeLists.txt +index e16ec8b4..8e7d0f2c 100644 +--- a/src/musikcube/CMakeLists.txt ++++ b/src/musikcube/CMakeLists.txt +@@ -96,10 +96,12 @@ if ((${DISABLE_WIDE_NCURSES_LIB_SUFFIXES} MATCHES "true") OR ((APPLE) AND (${ENA + message(STATUS "[ncurses] using library names *WITHOUT* 'w' prefix") + set(CURSES_LIBRARY_NAME ncurses) + set(PANEL_LIBRARY_NAME panel) ++ set(TINFO_LIBRARY_NAME tinfo) + else() + message(STATUS "[ncurses] using library names with 'w' prefix") + set(CURSES_LIBRARY_NAME ncursesw) + set(PANEL_LIBRARY_NAME panelw) ++ set(TINFO_LIBRARY_NAME tinfow) + endif() + + if (APPLE) +@@ -114,7 +116,7 @@ else() + set(LIBTINFO "") + else() + message(STATUS "[ncurses] not Darwin! will attempt to link against libtinfo") +- find_library(LIBTINFO NAMES tinfo) ++ find_library(LIBTINFO NAMES ${TINFO_LIBRARY_NAME}) + message(STATUS "[musikcube] using libtinfo at: " ${LIBTINFO}) + endif() + endif() diff --git a/media-sound/musikcube/metadata.xml b/media-sound/musikcube/metadata.xml new file mode 100644 index 000000000..24d81d603 --- /dev/null +++ b/media-sound/musikcube/metadata.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person"> + <email>[email protected]</email> + <name>YiFei Zhu</name> + </maintainer> + <use> + <flag name="alsa">Build plugin for alsa-out.</flag> + <flag name="pipewire">Build plugin to support pipewire.</flag> + <flag name="pulseaudio">Build plugin to support pulseaudio.</flag> + <flag name="sndio">Build plugin to support sndio</flag> + <flag name="portaudio">Build plugin to support portaudio</flag> + <flag name="libopenmpt">Build plugin to support playing MOD music aka tracker music through libopenmpt</flag> + <flag name="mpris"> + Build plugin to support MPRIS. needs systemd/elogind or basu USE flags. + MPRIS (Media Player Remote Interfacing Specification) is a standard D-Bus interface which aims to provide a common programmatic API for controlling media players. + </flag> + <flag name="systemd">Build plugin to support MPRIS using systemd.</flag> + <flag name="elogind">Build plugin to support MPRIS using elogind.</flag> + <flag name="basu">Build plugin to support MPRIS using basu.</flag> + </use> + <upstream> + <bugs-to>https://github.com/clangen/musikcube/issues</bugs-to> + <changelog>https://github.com/clangen/musikcube/releases</changelog> + <doc>https://github.com/clangen/musikcube/wiki</doc> + <remote-id type="github">clangen/musikcube</remote-id> + </upstream> +</pkgmetadata> diff --git a/media-sound/musikcube/musikcube-3.0.1.ebuild b/media-sound/musikcube/musikcube-3.0.1.ebuild new file mode 100644 index 000000000..fcc08e3dd --- /dev/null +++ b/media-sound/musikcube/musikcube-3.0.1.ebuild @@ -0,0 +1,93 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit cmake + +DESCRIPTION="Excellent terminal music player, support almost every known sound system." +HOMEPAGE="https://github.com/clangen/musikcube" +SRC_URI="https://github.com/clangen/${PN}/archive/refs/tags/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+alsa +libopenmpt pipewire pulseaudio +mpris portaudio sndio systemd elogind basu" + +REQUIRED_USE=" + mpris? ( ^^ ( systemd elogind basu ) ) +" + +DEPEND=" + net-libs/libmicrohttpd + sys-libs/ncurses + media-libs/libogg + media-video/ffmpeg + sys-libs/zlib + media-libs/libvorbis + net-misc/curl + media-sound/lame + dev-libs/libev + media-libs/taglib + dev-cpp/asio + libopenmpt? ( + media-libs/libopenmpt + ) + mpris? ( + || ( + elogind? ( >=sys-auth/elogind-239 ) + systemd? ( sys-apps/systemd ) + basu? ( sys-libs/basu ) + ) + ) + pipewire? ( + media-video/pipewire + ) + portaudio? ( + media-libs/portaudio + ) + pulseaudio? ( + media-sound/pulseaudio + ) + sndio? ( + media-sound/sndio + ) + alsa? ( + media-libs/alsa-lib + ) +" + +RDEPEND="${DEPEND}" + +BDEPEND=" + dev-util/cmake +" +PATCHES=( + "${FILESDIR}/musikcube-3.0.1-tinfow.patch" +) + +src_configure() { + # Gentoo users enable ccache via e.g. FEATURES=ccache or + # other means. We don't want the build system to enable it for us. + sed -i -e '/find_program(CCACHE_FOUND ccache)/d' CMakeLists.txt || die + + use mpris || sed -i '/pkg_check_modules.*SDBUS/d' src/plugins/mpris/CMakeLists.txt || die + + local mycmakeargs=( + $(usex alsa '' -DLIBASOUND=LIBASOUND-NOTFOUND) + -DENABLE_PIPEWIRE=$(usex pipewire true false) + $(usex pulseaudio '' -DLIBPULSE=LIBPULSE-NOTFOUND) + $(usex portaudio '' -DLIBPORTAUDIO=LIBPORTAUDIO-NOTFOUND) + + if use mpris then + -DUSE_ELOGIND=$(usex elogind true false) + -DUSE_BASU=$(usex basu true false) + fi + + $(usex libopenmpt '' -DLIBOPENMPT=LIBOPENMPT-NOTFOUND) + $(usex sndio '' -DLIBSNDIO=LIBSNDIO-NOTFOUND) + -DBUILD_STANDALONE=false + ) + + cmake_src_configure +}
