*/*: Clean PYTHON_COMPAT of obsolete impls
[gentoo.git] / dev-libs / pigpio / pigpio-68.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 PYTHON_COMPAT=( python{2_7,3_{6,7}} )
7
8 inherit distutils-r1 systemd toolchain-funcs
9
10 DESCRIPTION="A library for the Raspberry which allows control of the GPIOs"
11 HOMEPAGE="http://abyz.me.uk/rpi/pigpio/index.html"
12 SRC_URI="https://github.com/joan2937/pigpio/archive/V${PV}.tar.gz -> ${P}.tar.gz"
13
14 LICENSE="Unlicense"
15 SLOT="0"
16 KEYWORDS="~arm"
17 IUSE="python"
18 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
19
20 src_prepare() {
21         eapply "${FILESDIR}/${PN}-67-makefile.patch"
22         eapply_user
23 }
24
25 src_compile() {
26         emake CC="$(tc-getCC)" STRIP=: STRIPLIB=: SIZE=:
27         use python && distutils-r1_src_compile
28 }
29
30 src_install() {
31         emake DESTDIR="${D}" LDCONFIG=: PYTHON2=: PYTHON3=: \
32                 libdir="${EPREFIX}/usr/$(get_libdir)" prefix="${EPREFIX}/usr" \
33                 mandir="${EPREFIX}/usr/share/man" install
34         einstalldocs
35         newinitd "${FILESDIR}"/pigpiod.initd pigpiod
36         newconfd "${FILESDIR}"/pigpiod.confd pigpiod
37         systemd_newunit "${FILESDIR}"/pigpiod.systemd pigpiod.service
38         use python && distutils-r1_src_install
39 }