media-sound/qmidiroute: EAPI-7 bump
[gentoo.git] / media-sound / hydrogen / hydrogen-1.0.0_beta2.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI=7
5
6 inherit cmake xdg
7
8 DESCRIPTION="Advanced drum machine"
9 HOMEPAGE="http://www.hydrogen-music.org/"
10
11 if [[ ${PV} == 9999 ]]; then
12         inherit git-r3
13         EGIT_REPO_URI="https://github.com/${PN}-music/${PN}"
14         KEYWORDS="amd64 ppc ppc64 x86"
15 else
16         MY_PV=${PV/_/-}
17         SRC_URI="https://github.com/${PN}-music/${PN}/archive/${MY_PV}.tar.gz -> ${P}.tar.gz"
18         KEYWORDS="amd64 ppc ppc64 x86"
19         S="${WORKDIR}"/${PN}-${MY_PV}
20 fi
21
22 LICENSE="GPL-2 ZLIB"
23 SLOT="0"
24 IUSE="alsa +archive doc jack ladspa lash osc oss portaudio portmidi pulseaudio"
25
26 REQUIRED_USE="lash? ( alsa )"
27
28 BDEPEND="
29         dev-qt/linguist-tools:5
30         virtual/pkgconfig
31         doc? ( app-doc/doxygen )
32 "
33 DEPEND="
34         dev-qt/qtcore:5
35         dev-qt/qtgui:5
36         dev-qt/qtnetwork:5
37         dev-qt/qtwidgets:5
38         dev-qt/qtxml:5
39         dev-qt/qtxmlpatterns:5
40         >=media-libs/libsndfile-1.0.18
41         alsa? ( media-libs/alsa-lib )
42         archive? ( app-arch/libarchive )
43         !archive? ( >=dev-libs/libtar-1.2.11-r3 )
44         jack? ( virtual/jack )
45         ladspa? ( media-libs/liblrdf )
46         lash? ( media-sound/lash )
47         osc? ( media-libs/liblo )
48         portaudio? ( media-libs/portaudio )
49         portmidi? ( media-libs/portmidi )
50         pulseaudio? ( media-sound/pulseaudio )
51 "
52 RDEPEND="${DEPEND}"
53
54 DOCS=( AUTHORS ChangeLog DEVELOPERS README.txt )
55
56 PATCHES=( "${FILESDIR}/${P}-gnuinstalldirs.patch" )
57
58 src_prepare() {
59         cmake_src_prepare
60 }
61
62 src_configure() {
63         local mycmakeargs=(
64                 -DWANT_ALSA=$(usex alsa)
65                 -DWANT_CPPUNIT=OFF
66                 -DWANT_DEBUG=OFF
67                 -DWANT_JACK=$(usex jack)
68                 -DWANT_JACKSESSION=$(usex jack)
69                 -DWANT_LADSPA=$(usex ladspa)
70                 -DWANT_LASH=$(usex lash)
71                 -DWANT_LIBARCHIVE=$(usex archive)
72                 -DWANT_LRDF=$(usex ladspa)
73                 -DWANT_OSC=$(usex osc)
74                 -DWANT_OSS=$(usex oss)
75                 -DWANT_PORTAUDIO=$(usex portaudio)
76                 -DWANT_PORTMIDI=$(usex portmidi)
77                 -DWANT_PULSEAUDIO=$(usex pulseaudio)
78                 -DWANT_RUBBERBAND=OFF
79         )
80
81         cmake_src_configure
82 }
83
84 src_compile() {
85         cmake_src_compile
86         use doc && cmake_src_compile doc
87 }
88
89 src_install() {
90         use doc && local HTML_DOCS=( "${BUILD_DIR}"/docs/html/. )
91         cmake_src_install
92 }