Lines 2-26
Link Here
|
2 |
# Distributed under the terms of the GNU General Public License v2 |
2 |
# Distributed under the terms of the GNU General Public License v2 |
3 |
|
3 |
|
4 |
EAPI=7 |
4 |
EAPI=7 |
|
|
5 |
PYTHON_COMPAT=( python3_{8..10} ) |
5 |
|
6 |
|
6 |
inherit cmake |
7 |
inherit cmake python-single-r1 |
7 |
|
8 |
|
8 |
DESCRIPTION="Library for interfacing with IIO devices" |
9 |
DESCRIPTION="Library for interfacing with IIO devices" |
9 |
HOMEPAGE="https://github.com/analogdevicesinc/libiio" |
10 |
HOMEPAGE="https://github.com/analogdevicesinc/libiio" |
10 |
if [ "${PV}" = "9999" ]; then |
11 |
LICENSE="LGPL-2.1" |
11 |
EGIT_REPO_URI="https://github.com/analogdevicesinc/libiio" |
12 |
SLOT="0/${PV}" |
|
|
13 |
|
14 |
if [[ ${PV} =~ "9999" ]]; then |
15 |
EGIT_REPO_URI=( "https://github.com/analogdevicesinc/libiio" ) |
16 |
EGIT_BRANCH="master" |
12 |
inherit git-r3 |
17 |
inherit git-r3 |
13 |
else |
18 |
else |
14 |
SRC_URI="https://github.com/analogdevicesinc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
19 |
SRC_URI="https://github.com/analogdevicesinc/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz" |
15 |
KEYWORDS="~amd64 ~x86" |
20 |
KEYWORDS="~amd64 ~x86" |
16 |
fi |
21 |
fi |
17 |
|
22 |
|
18 |
LICENSE="LGPL-2.1" |
23 |
IUSE="+aio python +zeroconf" |
19 |
SLOT="0/${PV}" |
24 |
|
20 |
IUSE="+aio +zeroconf" |
25 |
BDEPEND="python? ( ${PYTHON_DEPS} )" |
21 |
|
26 |
|
22 |
RDEPEND="dev-libs/libxml2:= |
27 |
RDEPEND="${PYTHON_DEPS} |
|
|
28 |
dev-libs/libxml2:= |
23 |
virtual/libusb:1= |
29 |
virtual/libusb:1= |
24 |
aio? ( dev-libs/libaio ) |
30 |
aio? ( dev-libs/libaio ) |
25 |
zeroconf? ( net-dns/avahi )" |
31 |
zeroconf? ( net-dns/avahi )" |
|
|
32 |
|
26 |
DEPEND="${RDEPEND}" |
33 |
DEPEND="${RDEPEND}" |
27 |
- |
34 |
|
|
|
35 |
src_configure() { |
36 |
local mycmakeargs=( |
37 |
-DPYTHON_BINDINGS=$(usex python) |
38 |
) |
39 |
|
40 |
use python && mycmakeargs+=(-DPYTHON_EXECUTABLE="${PYTHON}") |
41 |
|
42 |
cmake_src_configure |
43 |
} |
44 |
|
45 |
src_install() { |
46 |
cmake_src_install |
47 |
python_fix_shebang "${ED}" |
48 |
python_optimize |
49 |
} |