From 645e89c5b26d31cab675be4ea2e5ce28389bcc64 Mon Sep 17 00:00:00 2001 From: Gerion Entrup Date: Sun, 10 May 2020 02:43:37 +0200 Subject: [PATCH] media-sound/cadence: general overhaul Detailed Changes: - reduce the diff to upstream ebuild - add jack_capture - add python3_7 - update to EAPI 7 - undo catarina removal - drop gnome icon fix - add python3_8 - add shebang fix - add better desktop entries for claudia - enable installation on Gentoo prefix (not tested) - drop revision for live ebuild Signed-off-by: Gerion Entrup --- media-sound/cadence/cadence-9999-r7.ebuild | 79 -------------------- media-sound/cadence/cadence-9999.ebuild | 86 ++++++++++++++++++++++ 2 files changed, 86 insertions(+), 79 deletions(-) delete mode 100644 media-sound/cadence/cadence-9999-r7.ebuild create mode 100644 media-sound/cadence/cadence-9999.ebuild diff --git a/media-sound/cadence/cadence-9999-r7.ebuild b/media-sound/cadence/cadence-9999-r7.ebuild deleted file mode 100644 index 97ea9c87..00000000 --- a/media-sound/cadence/cadence-9999-r7.ebuild +++ /dev/null @@ -1,79 +0,0 @@ -# Copyright 1999-2020 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=6 - -PYTHON_COMPAT=( python3_{6,7,8} ) -inherit git-r3 python-single-r1 gnome2-utils - -DESCRIPTION="Collection of tools useful for audio production" -HOMEPAGE="http://kxstudio.linuxaudio.org/Applications:Cadence" -EGIT_REPO_URI="https://github.com/falkTX/Cadence.git" -KEYWORDS="" -LICENSE="GPL-2" -SLOT="0" - -IUSE="-pulseaudio a2jmidid ladish opengl" -REQUIRED_USE="${PYTHON_REQUIRED_USE}" - -RDEPEND="${PYTHON_DEPS} - media-sound/jack2[dbus] - $(python_gen_cond_dep 'dev-python/PyQt5[dbus,gui,opengl?,svg,widgets,${PYTHON_MULTI_USEDEP}]') - $(python_gen_cond_dep 'dev-python/dbus-python[${PYTHON_MULTI_USEDEP}]') - a2jmidid? ( media-sound/a2jmidid[dbus] ) - ladish? ( >=media-sound/ladish-9999 ) - pulseaudio? ( media-sound/pulseaudio[jack] )" -DEPEND=${RDEPEND} - -src_prepare() { - sed -i -e "s/python3/${EPYTHON}/" \ - data/cadence \ - data/cadence-aloop-daemon \ - data/cadence-jacksettings \ - data/cadence-logs \ - data/cadence-render \ - data/cadence-session-start \ - data/catarina \ - data/catia \ - data/claudia \ - data/claudia-launcher || die "sed failed" - default -} - -src_compile() { - myemakeargs=(PREFIX="/usr" - SKIP_STRIPPING=true - ) - emake "${myemakeargs[@]}" -} - -src_install() { - emake PREFIX="/usr" DESTDIR="${D}" install - - # Clean up stuff that shouldn't be installed - rm -rf "${D}/etc/X11/xinit/xinitrc.d/61cadence-session-inject" - rm -rf "${D}/etc/xdg/autostart/cadence-session-start.desktop" - rm -rf "${D}/usr/share/applications/catarina.desktop" - rm -rf "${D}/usr/bin/catarina" - if use !pulseaudio; then - rm -rf "${D}/usr/bin/cadence-pulse2jack" - rm -rf "${D}/usr/bin/cadence-pulse2loopback" - rm -rf "${D}/usr/share/cadence/pulse2jack" - rm -rf "${D}/usr/share/cadence/pulse2loopback" - fi - if use !ladish; then - rm -rf "${D}/usr/bin/claudia-launcher" - rm -rf "${D}/usr/bin/claudia" - rm -rf "${D}/usr/share/cadence/icons/claudia-hicolor/" - rm -rf "${D}/usr/share/applications/claudia.desktop" - rm -rf "${D}/usr/share/applications/claudia-launcher.desktop" - fi -} - -pkg_postinst() { - gnome2_icon_cache_update -} - -pkg_postrm() { - gnome2_icon_cache_update -} diff --git a/media-sound/cadence/cadence-9999.ebuild b/media-sound/cadence/cadence-9999.ebuild new file mode 100644 index 00000000..02da73d9 --- /dev/null +++ b/media-sound/cadence/cadence-9999.ebuild @@ -0,0 +1,86 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +inherit git-r3 python-single-r1 xdg desktop + +DESCRIPTION="Collection of tools useful for audio production" +HOMEPAGE="http://kxstudio.linuxaudio.org/Applications:Cadence" +EGIT_REPO_URI="https://github.com/falkTX/Cadence.git" +KEYWORDS="" +LICENSE="GPL-2" +SLOT="0" + +IUSE="a2jmidid ladish -pulseaudio opengl" + +REQUIRED_USE="${PYTHON_REQUIRED_USE}" + +CDEPEND=" + ${PYTHON_DEPS} + $(python_gen_cond_dep ' + dev-python/dbus-python[${PYTHON_MULTI_USEDEP}] + dev-python/PyQt5[dbus,gui,opengl?,svg,widgets,${PYTHON_MULTI_USEDEP}] + ') + media-sound/jack2[dbus] + media-sound/jack_capture + a2jmidid? ( media-sound/a2jmidid[dbus] ) + ladish? ( >=media-sound/ladish-9999 ) + pulseaudio? ( media-sound/pulseaudio[jack] ) +" +RDEPEND="${CDEPEND}" +DEPEND="${RDEPEND}" + +src_prepare() { + sed -i -e "s/python3/${EPYTHON}/" \ + data/cadence \ + data/cadence-aloop-daemon \ + data/cadence-jacksettings \ + data/cadence-logs \ + data/cadence-render \ + data/cadence-session-start \ + data/catarina \ + data/catia \ + data/claudia \ + data/claudia-launcher || die "sed failed" + + default +} + +src_compile() { + myemakeargs=(PREFIX="${EPREFIX}/usr" + SKIP_STRIPPING=true + ) + + emake "${myemakeargs[@]}" +} + +src_install() { + emake PREFIX="${EPREFIX}/usr" DESTDIR="${ED}" install + + python_fix_shebang ${ED} + + # Clean up stuff that shouldn't be installed + rm -rf "${ED}"/etc/X11/xinit/xinitrc.d/61cadence-session-inject + rm -rf "${ED}"/etc/xdg/autostart/cadence-session-start.desktop + rm -rf "${ED}"/usr/share/applications/*.desktop + + if use !pulseaudio; then + rm -rf "${ED}"/usr/bin/cadence-pulse2{jack,loopback} + rm -rf "${ED}"/usr/share/cadence/pulse2{jack, loopback} + fi + if use !ladish; then + rm -rf "${ED}"/usr/bin/claudia{,-launcher} + rm -rf "${ED}"/usr/share/cadence/icons/claudia-hicolor/ + fi + + # Replace desktop entries with QA issues with these + make_desktop_entry cadence Cadence cadence "AudioVideo;AudioVideoEditing;Qt" + make_desktop_entry catia Catia catia "AudioVideo;AudioVideoEditing;Qt" + if use ladish; then + make_desktop_entry claudia Claudia claudia "AudioVideo;AudioVideoEditing;Qt" + make_desktop_entry claudia-launcher "Claudia Launcher" claudia-launcher "AudioVideo;AudioVideoEditing;Qt" + fi + make_desktop_entry catarina Catarina catarina "AudioVideo;AudioVideoEditing;Qt" +}