From: Michał Górny Date: Sat, 18 Feb 2017 10:31:38 +0000 (+0100) Subject: dev-embedded/libftdi: python-single-r1, EAPI=6 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=36324f213e954c264c57dbd4b531d7511e06b638;p=gentoo.git dev-embedded/libftdi: python-single-r1, EAPI=6 --- diff --git a/dev-embedded/libftdi/libftdi-0.20.ebuild b/dev-embedded/libftdi/libftdi-0.20-r1.ebuild similarity index 61% rename from dev-embedded/libftdi/libftdi-0.20.ebuild rename to dev-embedded/libftdi/libftdi-0.20-r1.ebuild index 0abb3b32f378..26f83972b5de 100644 --- a/dev-embedded/libftdi/libftdi-0.20.ebuild +++ b/dev-embedded/libftdi/libftdi-0.20-r1.ebuild @@ -1,10 +1,11 @@ -# Copyright 1999-2013 Gentoo Foundation +# Copyright 1999-2017 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # $Id$ -EAPI="2" +EAPI=6 -inherit cmake-utils python eutils +PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 ) +inherit cmake-utils python-single-r1 if [[ ${PV} == 9999* ]] ; then EGIT_REPO_URI="git://developer.intra2net.com/${PN}" @@ -23,28 +24,37 @@ IUSE="cxx doc examples python" RDEPEND="virtual/libusb:0 cxx? ( dev-libs/boost ) - python? ( dev-lang/python )" + python? ( ${PYTHON_DEPS} )" DEPEND="${RDEPEND} python? ( dev-lang/swig ) doc? ( app-doc/doxygen )" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +pkg_setup() { + use python && python-single-r1_pkg_setup +} + src_prepare() { - sed -i \ - -e "s:[$]{PYTHON_LIB_INSTALL}/../site-packages:$(python_get_sitedir):" \ - bindings/CMakeLists.txt || die + if use python; then + sed -i \ + -e "s:[$]{PYTHON_LIB_INSTALL}/../site-packages:$(python_get_sitedir):" \ + bindings/CMakeLists.txt || die + fi sed -i \ -e '/SET(LIB_SUFFIX /d' \ CMakeLists.txt || die - epatch "${FILESDIR}"/${P}-cmake-{include,version}.patch + eapply "${FILESDIR}"/${P}-cmake-{include,version}.patch + eapply_user } src_configure() { mycmakeargs=( - $(cmake-utils_use cxx FTDIPP) - $(cmake-utils_use doc DOCUMENTATION) - $(cmake-utils_use examples EXAMPLES) - $(cmake-utils_use python PYTHON_BINDINGS) + -DFTDIPP=$(usex cxx) + -DDOCUMENTATION=$(usex doc) + -DEXAMPLES=$(usex examples) + -DPYTHON_BINDINGS=$(usex python) -DCMAKE_SKIP_BUILD_RPATH=ON ) cmake-utils_src_configure @@ -52,6 +62,7 @@ src_configure() { src_install() { cmake-utils_src_install + use python && python_optimize dodoc ChangeLog README if use doc ; then @@ -59,7 +70,7 @@ src_install() { rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/{_,usb_,deprecated}* doman "${CMAKE_BUILD_DIR}"/doc/man/man3/* - dohtml "${CMAKE_BUILD_DIR}"/doc/html/* + dodoc -r "${CMAKE_BUILD_DIR}"/doc/html fi if use examples ; then docinto examples diff --git a/dev-embedded/libftdi/libftdi-1.2-r1.ebuild b/dev-embedded/libftdi/libftdi-1.2-r1.ebuild new file mode 100644 index 000000000000..24fdd6e7cf2e --- /dev/null +++ b/dev-embedded/libftdi/libftdi-1.2-r1.ebuild @@ -0,0 +1,75 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=6 + +PYTHON_COMPAT=( python2_7 python3_4 python3_5 python3_6 ) +inherit cmake-utils python-single-r1 + +MY_P="${PN}1-${PV}" +if [[ ${PV} == 9999* ]] ; then + EGIT_REPO_URI="git://developer.intra2net.com/${PN}" + inherit git-2 +else + SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${MY_P}.tar.bz2" + KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86" +fi + +DESCRIPTION="Userspace access to FTDI USB interface chips" +HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/" + +LICENSE="LGPL-2" +SLOT="1" +IUSE="cxx doc examples python static-libs test tools" + +RDEPEND="virtual/libusb:1 + cxx? ( dev-libs/boost ) + python? ( ${PYTHON_DEPS} ) + tools? ( + !