1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python2_7 python3_6 )
7 inherit cmake-utils python-single-r1
9 if [[ ${PV} == 9999* ]] ; then
11 EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
13 SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${P}.tar.gz"
14 KEYWORDS="amd64 arm ~arm64 ppc ppc64 sparc x86"
17 DESCRIPTION="Userspace access to FTDI USB interface chips"
18 HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/"
22 IUSE="cxx doc examples python"
23 REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
25 RDEPEND="virtual/libusb:0
26 cxx? ( dev-libs/boost )
27 python? ( ${PYTHON_DEPS} )"
29 python? ( dev-lang/swig )
30 doc? ( app-doc/doxygen )"
33 "${FILESDIR}"/${P}-cmake-include.patch
34 "${FILESDIR}"/${P}-cmake-version.patch
38 use python && python-single-r1_pkg_setup
44 -e "s:[$]{PYTHON_LIB_INSTALL}/../site-packages:$(python_get_sitedir):" \
45 bindings/CMakeLists.txt || die
48 -e '/SET(LIB_SUFFIX /d' \
51 cmake-utils_src_prepare
57 -DDOCUMENTATION=$(usex doc)
58 -DEXAMPLES=$(usex examples)
59 -DPYTHON_BINDINGS=$(usex python)
60 -DCMAKE_SKIP_BUILD_RPATH=ON
62 cmake-utils_src_configure
66 cmake-utils_src_install
67 use python && python_optimize
68 dodoc ChangeLog README
71 # Clean up crap man pages. #356369
72 rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/{_,usb_,deprecated}*
74 doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
75 dodoc -r "${CMAKE_BUILD_DIR}"/doc/html
77 if use examples ; then