media-sound/hydrogen: stable 1.0.0_beta2 for ppc64, bug #719012
[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="ppc ppc64"
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         virtual/pkgconfig
30         doc? ( app-doc/doxygen )
31 "
32 DEPEND="
33         dev-qt/qtcore:5
34         dev-qt/qtgui:5
35         dev-qt/qtnetwork:5
36         dev-qt/qtwidgets:5
37         dev-qt/qtxml:5
38         dev-qt/qtxmlpatterns:5
39         >=media-libs/libsndfile-1.0.18
40         alsa? ( media-libs/alsa-lib )
41         archive? ( app-arch/libarchive )
42         !archive? ( >=dev-libs/libtar-1.2.11-r3 )
43         jack? ( virtual/jack )
44         ladspa? ( media-libs/liblrdf )
45         lash? ( media-sound/lash )
46         osc? ( media-libs/liblo )
47         portaudio? ( media-libs/portaudio )
48         portmidi? ( media-libs/portmidi )
49         pulseaudio? ( media-sound/pulseaudio )
50 "
51 RDEPEND="${DEPEND}"
52
53 DOCS=( AUTHORS ChangeLog DEVELOPERS README.txt )
54
55 PATCHES=( "${FILESDIR}/${P}-gnuinstalldirs.patch" )
56
57 src_prepare() {
58         cmake_src_prepare
59 }
60
61 src_configure() {
62         local mycmakeargs=(
63                 -DWANT_ALSA=$(usex alsa)
64                 -DWANT_CPPUNIT=OFF
65                 -DWANT_DEBUG=OFF
66                 -DWANT_JACK=$(usex jack)
67                 -DWANT_JACKSESSION=$(usex jack)
68                 -DWANT_LADSPA=$(usex ladspa)
69                 -DWANT_LASH=$(usex lash)
70                 -DWANT_LIBARCHIVE=$(usex archive)
71                 -DWANT_LRDF=$(usex ladspa)
72                 -DWANT_OSC=$(usex osc)
73                 -DWANT_OSS=$(usex oss)
74                 -DWANT_PORTAUDIO=$(usex portaudio)
75                 -DWANT_PORTMIDI=$(usex portmidi)
76                 -DWANT_PULSEAUDIO=$(usex pulseaudio)
77                 -DWANT_RUBBERBAND=OFF
78         )
79
80         cmake_src_configure
81 }
82
83 src_compile() {
84         cmake_src_compile
85         use doc && cmake_src_compile doc
86 }
87
88 src_install() {
89         use doc && local HTML_DOCS=( "${BUILD_DIR}"/docs/html/. )
90         cmake_src_install
91 }