*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / sci-libs / libsigrokdecode / libsigrokdecode-0.4.1.ebuild
1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
3
4 EAPI="6"
5
6 PYTHON_COMPAT=( python3_6 )
7
8 inherit eutils python-single-r1
9
10 if [[ ${PV} == "9999" ]]; then
11         EGIT_REPO_URI="git://sigrok.org/${PN}"
12         inherit git-r3 autotools
13 else
14         SRC_URI="https://sigrok.org/download/source/${PN}/${P}.tar.gz"
15         KEYWORDS="~amd64 ~x86"
16 fi
17
18 DESCRIPTION="provide (streaming) protocol decoding functionality"
19 HOMEPAGE="https://sigrok.org/wiki/Libsigrokdecode"
20
21 LICENSE="GPL-3"
22 SLOT="0/3"
23 IUSE="static-libs"
24 REQUIRED_USE="${PYTHON_REQUIRED_USE}"
25
26 RDEPEND=">=dev-libs/glib-2.28.0
27         ${PYTHON_DEPS}"
28 DEPEND="${RDEPEND}
29         virtual/pkgconfig"
30
31 src_prepare() {
32         [[ ${PV} == "9999" ]] && eautoreconf
33
34         # Only a test program (not installed, and not used by src_test)
35         # is used by libsigrok, so disable it to avoid the compile.
36         sed -i \
37                 -e '/build_runtc=/s:yes:no:' \
38                 configure || die
39
40         eapply_user
41 }
42
43 src_configure() {
44         econf $(use_enable static-libs static)
45 }
46
47 src_test() {
48         emake check
49 }
50
51 src_install() {
52         default
53         prune_libtool_files
54 }