summaryrefslogtreecommitdiff
path: root/dev-embedded/libftdi
diff options
context:
space:
mode:
Diffstat (limited to 'dev-embedded/libftdi')
-rw-r--r--dev-embedded/libftdi/Manifest1
-rw-r--r--dev-embedded/libftdi/files/libftdi-1.5-tests-no-cxx.patch35
-rw-r--r--dev-embedded/libftdi/libftdi-0.20-r1.ebuild29
-rw-r--r--dev-embedded/libftdi/libftdi-1.4-r1.ebuild (renamed from dev-embedded/libftdi/libftdi-1.4.ebuild)33
-rw-r--r--dev-embedded/libftdi/libftdi-1.5.ebuild85
-rw-r--r--dev-embedded/libftdi/libftdi-9999.ebuild37
6 files changed, 178 insertions, 42 deletions
diff --git a/dev-embedded/libftdi/Manifest b/dev-embedded/libftdi/Manifest
index 4f82f27ba19b..d47dc505633a 100644
--- a/dev-embedded/libftdi/Manifest
+++ b/dev-embedded/libftdi/Manifest
@@ -1,2 +1,3 @@
DIST libftdi-0.20.tar.gz 423570 BLAKE2B f0aa420a704e18c4257b99a4593dbaf46a15806d980b24909fe8678b36e74b568cd5915db1e14f8b904541334fbf3d18f069dc479a0bf66b2ea8e113611cb82b SHA512 540e5eb201a65936c3dbabff70c251deba1615874b11ff27c5ca16c39d71c150cf61758a68b541135a444fe32ab403b0fba0daf55c587647aaf9b3f400f1dee7
DIST libftdi1-1.4.tar.bz2 109521 BLAKE2B 4186342afb2a0118c454230a925ccff2ed0aedd942cdd3afb1ac59519f1cd48db7f04421ecdb5aa6e53993666a903de00ce447fd81d00839806f8cc0d34c6e52 SHA512 dbab74f7bc35ca835b9c6dd5b70a64816948d65da1f73a9ece37a0f0f630bd0df1a676543acc517b02a718bc34ba4f7a30cbc48b6eed1c154c917f8ef0a358fc
+DIST libftdi1-1.5.tar.bz2 116297 BLAKE2B 460ab93026e14a452e31fcc6930d305638fdc0ed06cb44fb9d50ad8f80199b17057d2f48a27b8295b43b956934289c872a2ef1ddb7f93fa93c6816511ef7607d SHA512 c525b2ab6aff9ef9254971ae7d57f3549a36a36875765c48f947d52532814a2a004de1232389d4fe824a8c8ab84277b08427308573476e1da9b7db83db802f6f
diff --git a/dev-embedded/libftdi/files/libftdi-1.5-tests-no-cxx.patch b/dev-embedded/libftdi/files/libftdi-1.5-tests-no-cxx.patch
new file mode 100644
index 000000000000..6adba408f7f1
--- /dev/null
+++ b/dev-embedded/libftdi/files/libftdi-1.5-tests-no-cxx.patch
@@ -0,0 +1,35 @@
+Fixes failure to build tests with USE="-cxx" (default).
+http://developer.intra2net.com/git/?p=libftdi;a=patch;h=11a50ae5b80b3e03694a19e84513345d0794e563;hp=6dd18122a81e6030dd239391df6ffde8cb8c59c7
+From 11a50ae5b80b3e03694a19e84513345d0794e563 Mon Sep 17 00:00:00 2001
+From: Thomas Jarosch <thomas.jarosch@intra2net.com>
+Date: Mon, 24 Aug 2020 19:27:22 +0200
+Subject: [PATCH 1/1] Fix building unit tests without FTDIPP
+
+Needed to run the baudrate unit tests.
+
+Probably another fallout from:
+
+****************************
+commit 0209a3633dc877a577af07d883eb5059e22f6a91
+
+cmake: do not check for g++ when FTDIPP is disabled
+****************************
+---
+ CMakeLists.txt | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 3b0b87c..58f664a 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -150,6 +150,7 @@ if ( EXAMPLES )
+ endif ()
+ add_subdirectory(packages)
+ if ( BUILD_TESTS )
++ project(libftdi1 C CXX)
+ add_subdirectory(test)
+ endif ()
+
+--
+1.7.1
+
diff --git a/dev-embedded/libftdi/libftdi-0.20-r1.ebuild b/dev-embedded/libftdi/libftdi-0.20-r1.ebuild
index 08a2dfb65590..c71a110ab82e 100644
--- a/dev-embedded/libftdi/libftdi-0.20-r1.ebuild
+++ b/dev-embedded/libftdi/libftdi-0.20-r1.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
PYTHON_COMPAT=( python3_{6,7,8,9,10} )
-inherit cmake-utils python-single-r1
+inherit cmake python-single-r1
if [[ ${PV} == 9999* ]] ; then
inherit git-r3
@@ -19,15 +19,16 @@ HOMEPAGE="https://www.intra2net.com/en/developer/libftdi/"
LICENSE="LGPL-2"
SLOT="0"
-IUSE="cxx doc examples python"
+IUSE="cxx doc examples python static-libs"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+BDEPEND="
+ doc? ( app-doc/doxygen )
+ python? ( dev-lang/swig )"
RDEPEND="virtual/libusb:0
cxx? ( dev-libs/boost )
python? ( ${PYTHON_DEPS} )"
-DEPEND="${RDEPEND}
- python? ( dev-lang/swig )
- doc? ( app-doc/doxygen )"
+DEPEND="${RDEPEND}"
PATCHES=(
"${FILESDIR}"/${P}-cmake-include.patch
@@ -48,7 +49,7 @@ src_prepare() {
-e '/SET(LIB_SUFFIX /d' \
CMakeLists.txt || die
- cmake-utils_src_prepare
+ cmake_src_prepare
}
src_configure() {
@@ -59,23 +60,27 @@ src_configure() {
-DPYTHON_BINDINGS=$(usex python)
-DCMAKE_SKIP_BUILD_RPATH=ON
)
- cmake-utils_src_configure
+
+ cmake_src_configure
}
src_install() {
- cmake-utils_src_install
+ cmake_src_install
use python && python_optimize
dodoc ChangeLog README
if use doc ; then
# Clean up crap man pages. #356369
- rm -vf "${CMAKE_BUILD_DIR}"/doc/man/man3/{_,usb_,deprecated}*
+ rm -vf "${BUILD_DIR}"/doc/man/man3/{_,usb_,deprecated}* || die
- doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
- dodoc -r "${CMAKE_BUILD_DIR}"/doc/html
+ doman "${BUILD_DIR}"/doc/man/man3/*
+ dodoc -r "${BUILD_DIR}"/doc/html
fi
+
if use examples ; then
docinto examples
dodoc examples/*.c
fi
+
+ use static-libs || rm "${ED}"/usr/$(get_libdir)/${PN}.a || die
}
diff --git a/dev-embedded/libftdi/libftdi-1.4.ebuild b/dev-embedded/libftdi/libftdi-1.4-r1.ebuild
index 5930ee9e9af8..2d8a18cefadd 100644
--- a/dev-embedded/libftdi/libftdi-1.4.ebuild
+++ b/dev-embedded/libftdi/libftdi-1.4-r1.ebuild
@@ -1,18 +1,19 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
PYTHON_COMPAT=( python3_{6,7,8,9,10} )
-inherit cmake-utils python-single-r1
+inherit cmake python-single-r1
-MY_P="${PN}1-${PV}"
if [[ ${PV} == 9999* ]] ; then
inherit git-r3
EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
else
+ MY_P="${PN}1-${PV}"
SRC_URI="https://www.intra2net.com/en/developer/${PN}/download/${MY_P}.tar.bz2"
KEYWORDS="amd64 arm arm64 ~mips ppc ppc64 sparc x86"
+ S=${WORKDIR}/${MY_P}
fi
DESCRIPTION="Userspace access to FTDI USB interface chips"
@@ -20,52 +21,52 @@ HOMEPAGE="https://www.intra2net.com/en/developer/libftdi/"
LICENSE="LGPL-2"
SLOT="1"
-IUSE="cxx doc examples python static-libs test tools"
+IUSE="cxx doc examples python test tools"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RDEPEND="virtual/libusb:1
+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 )"
+DEPEND="${RDEPEND}"
+BDEPEND="
+ doc? ( app-doc/doxygen )
+ python? ( dev-lang/swig )"
pkg_setup() {
use python && python-single-r1_pkg_setup
}
-S=${WORKDIR}/${MY_P}
-
src_configure() {
local 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)
+ -DSTATICLIBS=OFF
-DCMAKE_SKIP_BUILD_RPATH=ON
)
- cmake-utils_src_configure
+ cmake_src_configure
}
src_install() {
- cmake-utils_src_install
+ cmake_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
+ rm -vf "${BUILD_DIR}"/doc/man/man3/_* || die
- doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
- dodoc -r "${CMAKE_BUILD_DIR}"/doc/html
+ doman "${BUILD_DIR}"/doc/man/man3/*
+ dodoc -r "${BUILD_DIR}"/doc/html
fi
if use examples ; then
docinto examples
diff --git a/dev-embedded/libftdi/libftdi-1.5.ebuild b/dev-embedded/libftdi/libftdi-1.5.ebuild
new file mode 100644
index 000000000000..c54e005bf7ed
--- /dev/null
+++ b/dev-embedded/libftdi/libftdi-1.5.ebuild
@@ -0,0 +1,85 @@
+# Copyright 1999-2020 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{6,7,8,9,10} )
+inherit cmake python-single-r1
+
+MY_P="${PN}1-${PV}"
+if [[ ${PV} == 9999* ]] ; then
+ inherit git-r3
+ EGIT_REPO_URI="git://developer.intra2net.com/${PN}"
+else
+ SRC_URI="https://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="https://www.intra2net.com/en/developer/libftdi/"
+S="${WORKDIR}/${MY_P}"
+
+LICENSE="LGPL-2"
+SLOT="1"
+IUSE="cxx doc examples python test tools"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+BDEPEND="
+ doc? ( app-doc/doxygen )
+ python? ( dev-lang/swig )"
+RDEPEND="
+ virtual/libusb:1
+ cxx? ( dev-libs/boost )
+ python? ( ${PYTHON_DEPS} )
+ tools? (
+ !<dev-embedded/ftdi_eeprom-1.0
+ dev-libs/confuse:=
+ )"
+DEPEND="${RDEPEND}
+ test? ( dev-libs/boost )
+"
+
+PATCHES=( "${FILESDIR}"/${P}-tests-no-cxx.patch )
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DFTDIPP=$(usex cxx)
+ -DDOCUMENTATION=$(usex doc)
+ -DEXAMPLES=$(usex examples)
+ -DPYTHON_BINDINGS=$(usex python)
+ -DBUILD_TESTS=$(usex test)
+ -DFTDI_EEPROM=$(usex tools)
+ -DCMAKE_SKIP_BUILD_RPATH=ON
+ -DSTATICLIBS=OFF
+ )
+ cmake_src_configure
+}
+
+src_test() {
+ cd "${BUILD_DIR}/test" || die
+ ./test_libftdi1 -l all || die
+}
+
+src_install() {
+ cmake_src_install
+ use python && python_optimize
+ dodoc AUTHORS ChangeLog README TODO
+
+ if use doc ; then
+ # Clean up crap man pages. #356369
+ rm -vf "${BUILD_DIR}"/doc/man/man3/_* || die
+
+ doman "${BUILD_DIR}"/doc/man/man3/*
+ dodoc -r "${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 a761f3e9e721..9ab582baaa9d 100644
--- a/dev-embedded/libftdi/libftdi-9999.ebuild
+++ b/dev-embedded/libftdi/libftdi-9999.ebuild
@@ -1,10 +1,10 @@
# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=6
+EAPI=7
PYTHON_COMPAT=( python3_{6,7,8,9,10} )
-inherit cmake-utils python-single-r1
+inherit cmake python-single-r1
MY_P="${PN}1-${PV}"
if [[ ${PV} == 9999* ]] ; then
@@ -17,14 +17,19 @@ fi
DESCRIPTION="Userspace access to FTDI USB interface chips"
HOMEPAGE="https://www.intra2net.com/en/developer/libftdi/"
+S="${WORKDIR}/${MY_P}"
LICENSE="LGPL-2"
SLOT="1"
-IUSE="cxx doc examples python static-libs test tools"
+IUSE="cxx doc examples python test tools"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-RDEPEND="virtual/libusb:1
+BDEPEND="
+ doc? ( app-doc/doxygen )
+ python? ( dev-lang/swig )"
+RDEPEND="
+ virtual/libusb:1
cxx? ( dev-libs/boost )
python? ( ${PYTHON_DEPS} )
tools? (
@@ -32,41 +37,45 @@ RDEPEND="virtual/libusb:1
dev-libs/confuse:=
)"
DEPEND="${RDEPEND}
- python? ( dev-lang/swig )
- doc? ( app-doc/doxygen )"
+ test? ( dev-libs/boost )
+"
pkg_setup() {
use python && python-single-r1_pkg_setup
}
-S=${WORKDIR}/${MY_P}
-
src_configure() {
local 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
+ -DSTATICLIBS=OFF
)
- cmake-utils_src_configure
+ cmake_src_configure
+}
+
+src_test() {
+ cd "${BUILD_DIR}/test" || die
+ ./test_libftdi1 -l all || die
}
src_install() {
- cmake-utils_src_install
+ cmake_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
+ rm -vf "${BUILD_DIR}"/doc/man/man3/_* || die
- doman "${CMAKE_BUILD_DIR}"/doc/man/man3/*
- dodoc -r "${CMAKE_BUILD_DIR}"/doc/html
+ doman "${BUILD_DIR}"/doc/man/man3/*
+ dodoc -r "${BUILD_DIR}"/doc/html
fi
+
if use examples ; then
docinto examples
dodoc examples/*.c