1 # Copyright 1999-2018 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 inherit cmake-utils readme.gentoo-r1
8 DESCRIPTION="Midi processing library and a midi player using the gus patch set"
9 HOMEPAGE="http://www.mindwerks.net/projects/wildmidi/"
10 SRC_URI="https://github.com/Mindwerks/${PN}/archive/${P}.tar.gz"
12 LICENSE="GPL-3 LGPL-3"
14 KEYWORDS="amd64 arm ~hppa ppc ppc64 x86"
15 IUSE="+alsa openal oss +player"
19 alsa? ( media-libs/alsa-lib )
20 openal? ( media-libs/openal )
24 media-sound/timidity-freepats
27 REQUIRED_USE="player? ( ^^ ( alsa oss openal ) )"
29 DOC_CONTENTS="${PN} is using timidity-freepats for midi playback.
30 A default configuration file was placed on /etc/${PN}/${PN}.cfg.
31 For more information please read the ${PN}.cfg manpage."
33 S="${WORKDIR}"/${PN}-${P}
36 # alsa openal oss only make sense if player is enabled. See CMakeLists.txt
37 if ! use player && (use alsa || use openal || use oss); then
38 ewarn "The 'alsa', 'openal' and 'oss' use flags only make sense if"
39 ewarn "the 'player' use flags is selected and as a result they will be"
40 ewarn "ignored in this build"
42 cmake-utils_src_prepare
47 -DWANT_ALSA=$(usex alsa)
48 -DWANT_OPENAL=$(usex openal)
49 -DWANT_OSS=$(usex oss)
50 -DWANT_PLAYER=$(usex player)
52 cmake-utils_src_configure
56 cmake-utils_src_install
58 find "${D}" -name '*.la' -delete || die
63 readme.gentoo_create_doc
67 if [[ -e "${ROOT}"/etc/${PN}.cfg ]]; then
69 elog "Old /etc/${PN}.cfg detected!"
70 elog "Please migrate your configuration file to"
71 elog "/etc/${PN}/ directory which is now the default"
72 elog "location for the ${PN} configuration file."