summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2017-02-18 11:31:38 +0100
committerMichał Górny <mgorny@gentoo.org>2017-02-18 11:32:51 +0100
commit36324f213e954c264c57dbd4b531d7511e06b638 (patch)
treee4bd427fa99e0817dbbf2224b26e32d3a263c5e6 /dev-embedded/libftdi
parentprofiles: Document USE={graphics,image}magick semantics according to #314431 (diff)
downloadgentoo-36324f213e954c264c57dbd4b531d7511e06b638.tar.gz
gentoo-36324f213e954c264c57dbd4b531d7511e06b638.tar.bz2
gentoo-36324f213e954c264c57dbd4b531d7511e06b638.zip
dev-embedded/libftdi: python-single-r1, EAPI=6
Diffstat (limited to 'dev-embedded/libftdi')
-rw-r--r--dev-embedded/libftdi/libftdi-0.20-r1.ebuild (renamed from dev-embedded/libftdi/libftdi-0.20.ebuild)37
-rw-r--r--dev-embedded/libftdi/libftdi-1.2-r1.ebuild75
-rw-r--r--dev-embedded/libftdi/libftdi-9999.ebuild34
3 files changed, 120 insertions, 26 deletions
diff --git a/dev-embedded/libftdi/libftdi-0.20.ebuild b/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? (
+ !<dev-embedded/ftdi_eeprom-1.0
+ dev-libs/confuse
+ )"
+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
+}
+
+S=${WORKDIR}/${MY_P}
+
+src_configure() {
+ mycmakeargs=(
+ -DFTDIPP=$(usex cxx)
+ -DDOCUMENTATION=$(usex doc)
+ -DEXAMPLES=$(usex examples)
+ -DPYTHON_BINDINGS=$(usex python)
+ -DSTATICLIBS=$(usex static-libs)
+ -DBUILD_TESTS=$(usex test)
+ -DFTDI_EEPROM=$(usex tools)
+ -DCMAKE_SKIP_BUILD_RPATH=ON
+ )
+ cmake-utils_src_configure
+}
+
+src_install() {
+ cmake-utils_src_install
+ use python && python_optimize
+ dodoc AUTHORS ChangeLog README TODO
+
+ if use doc ; then
+ # Clean up crap man pages. #356369
+ rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/_* || die
+
+ doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
+ dodoc -r "${CMAKE_BUILD_DIR}"/doc/html
+ fi
+ if use examples ; then
+ docinto examples
+ dodoc examples/*.c
+ fi
+}
diff --git a/dev-embedded/libftdi/libftdi-9999.ebuild b/dev-embedded/libftdi/libftdi-9999.ebuild
index 38eb00e0832d..04136fcafa51 100644
--- a/dev-embedded/libftdi/libftdi-9999.ebuild
+++ b/dev-embedded/libftdi/libftdi-9999.ebuild
@@ -1,15 +1,16 @@
-# Copyright 1999-2015 Gentoo Foundation
+# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
-EAPI="4"
+EAPI=6
-inherit cmake-utils
+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
+ inherit git-r3
else
SRC_URI="http://www.intra2net.com/en/developer/${PN}/download/${MY_P}.tar.bz2"
KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc ~ppc64 ~sparc ~x86"
@@ -24,7 +25,7 @@ IUSE="cxx doc examples python static-libs test tools"
RDEPEND="virtual/libusb:1
cxx? ( dev-libs/boost )
- python? ( dev-lang/python )
+ python? ( ${PYTHON_DEPS} )
tools? (
!<dev-embedded/ftdi_eeprom-1.0
dev-libs/confuse
@@ -33,17 +34,23 @@ 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
+}
+
S=${WORKDIR}/${MY_P}
src_configure() {
mycmakeargs=(
- $(cmake-utils_use cxx FTDIPP)
- $(cmake-utils_use doc DOCUMENTATION)
- $(cmake-utils_use examples EXAMPLES)
- $(cmake-utils_use python PYTHON_BINDINGS)
- $(cmake-utils_use static-libs STATICLIBS)
- $(cmake-utils_use test BUILD_TESTS)
- $(cmake-utils_use tools FTDI_EEPROM)
+ -DFTDIPP=$(usex cxx)
+ -DDOCUMENTATION=$(usex doc)
+ -DEXAMPLES=$(usex examples)
+ -DPYTHON_BINDINGS=$(usex python)
+ -DSTATICLIBS=$(usex static-libs)
+ -DBUILD_TESTS=$(usex test)
+ -DFTDI_EEPROM=$(usex tools)
-DCMAKE_SKIP_BUILD_RPATH=ON
)
cmake-utils_src_configure
@@ -51,6 +58,7 @@ src_configure() {
src_install() {
cmake-utils_src_install
+ use python && python_optimize
dodoc AUTHORS ChangeLog README TODO
if use doc ; then
@@ -58,7 +66,7 @@ src_install() {
rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/_* || die
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