1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_{6,7}} )
8 inherit distutils-r1 systemd toolchain-funcs
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"
18 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
21 eapply "${FILESDIR}/${PN}-67-makefile.patch"
26 emake CC="$(tc-getCC)" STRIP=: STRIPLIB=: SIZE=:
27 use python && distutils-r1_src_compile
31 emake DESTDIR="${D}" LDCONFIG=: PYTHON2=: PYTHON3=: \
32 libdir="${EPREFIX}/usr/$(get_libdir)" prefix="${EPREFIX}/usr" \
33 mandir="${EPREFIX}/usr/share/man" install
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