1 # Copyright 1999-2017 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 )
7 inherit cmake-utils python-single-r1
10 if [[ ${PV} == 9999* ]] ; then
12 EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
14 SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${MY_P}.tar.bz2"
15 KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 sparc x86"
18 DESCRIPTION="Userspace access to FTDI USB interface chips"
19 HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
23 IUSE="cxx doc examples python static-libs test tools"
24 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
26 RDEPEND="virtual/libusb:1
27 cxx? ( dev-libs/boost )
28 python? ( ${PYTHON_DEPS} )
30 !<dev-embedded/ftdi_eeprom-1.0
34 python? ( dev-lang/swig )
35 doc? ( app-doc/doxygen )"
38 use python && python-single-r1_pkg_setup
46 -DDOCUMENTATION=$(usex doc)
47 -DEXAMPLES=$(usex examples)
48 -DPYTHON_BINDINGS=$(usex python)
49 -DSTATICLIBS=$(usex static-libs)
50 -DBUILD_TESTS=$(usex test)
51 -DFTDI_EEPROM=$(usex tools)
52 -DCMAKE_SKIP_BUILD_RPATH=ON
54 cmake-utils_src_configure
58 cmake-utils_src_install
59 use python && python_optimize
60 dodoc AUTHORS ChangeLog README TODO
63 # Clean up crap man pages. #356369
64 rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/_* || die
66 doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
67 dodoc -r "${CMAKE_BUILD_DIR}"/doc/html
69 if use examples ; then