blob: 626bf686a3bda940b2bebbaf6470b72faf35278c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
# Copyright 1999-2023 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
EAPI=8
inherit cmake xdg
DESCRIPTION="Library for real time MIDI input and output"
HOMEPAGE="https://github.com/PortMidi/portmidi"
SRC_URI="https://github.com/PortMidi/portmidi/archive/refs/tags/v${PV}.tar.gz -> ${P}.tar.gz"
LICENSE="MIT"
SLOT="0"
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~loong ~mips ppc ppc64 ~riscv sparc x86"
IUSE="debug test-programs"
# Per pm-test/README:
# "Because device numbers depend on the system, there is no automated
# script to run all tests on PortMidi."
RESTRICT="test"
RDEPEND="
media-libs/alsa-lib
"
DEPEND="
${DEPEND}
"
BDEPEND="
app-arch/unzip
"
PATCHES=(
"${FILESDIR}"/${PN}-2.0.4-cmake.patch
)
src_configure() {
if use debug ; then
CMAKE_BUILD_TYPE=Debug
else
CMAKE_BUILD_TYPE=Release
fi
# Python bindings dropped b/c of bug #855077
local mycmakeargs=(
-DBUILD_PORTMIDI_TESTS=$(usex test-programs)
)
cmake_src_configure
}
src_install() {
cmake_src_install
dodoc CHANGELOG.txt README.txt pm_linux/README_LINUX.txt
if use test-programs ; then
exeinto /usr/$(get_libdir)/${PN}
local app
for app in latency midiclock midithread midithru mm qtest sysex ; do
doexe "${BUILD_DIR}"/pm_test/${app}
done
fi
}
|