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
11 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"
25 RDEPEND="virtual/libusb:1
26 cxx? ( dev-libs/boost )
27 python? ( ${PYTHON_DEPS} )
29 !<dev-embedded/ftdi_eeprom-1.0
33 python? ( dev-lang/swig )
34 doc? ( app-doc/doxygen )"
36 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
39 use python && python-single-r1_pkg_setup
47 -DDOCUMENTATION=$(usex doc)
48 -DEXAMPLES=$(usex examples)
49 -DPYTHON_BINDINGS=$(usex python)
50 -DSTATICLIBS=$(usex static-libs)
51 -DBUILD_TESTS=$(usex test)
52 -DFTDI_EEPROM=$(usex tools)
53 -DCMAKE_SKIP_BUILD_RPATH=ON
55 cmake-utils_src_configure
59 cmake-utils_src_install
60 use python && python_optimize
61 dodoc AUTHORS ChangeLog README TODO
64 # Clean up crap man pages. #356369
65 rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/_* || die
67 doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
68 dodoc -r "${CMAKE_BUILD_DIR}"/doc/html
70 if use examples ; then