From a4c858127655bd6543d301f40a24200f2b592b57 Mon Sep 17 00:00:00 2001 From: Sam James Date: Wed, 10 Mar 2021 04:51:12 +0000 Subject: dev-embedded/libftdi: add upstream CMake patch Closes: https://bugs.gentoo.org/775116 Signed-off-by: Sam James --- .../libftdi/files/libftdi-1.5-cmake-cxx.patch | 46 +++++++++++ dev-embedded/libftdi/libftdi-1.5-r3.ebuild | 96 ++++++++++++++++++++++ 2 files changed, 142 insertions(+) create mode 100644 dev-embedded/libftdi/files/libftdi-1.5-cmake-cxx.patch create mode 100644 dev-embedded/libftdi/libftdi-1.5-r3.ebuild diff --git a/dev-embedded/libftdi/files/libftdi-1.5-cmake-cxx.patch b/dev-embedded/libftdi/files/libftdi-1.5-cmake-cxx.patch new file mode 100644 index 000000000000..a04aee1cf1d0 --- /dev/null +++ b/dev-embedded/libftdi/files/libftdi-1.5-cmake-cxx.patch @@ -0,0 +1,46 @@ +https://bugs.gentoo.org/766818 + +From cdb28383402d248dbc6062f4391b038375c52385 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Fri, 17 Jul 2020 21:25:03 +0200 +Subject: [PATCH] CMakeLists.txt: fix paths when FTDIPP is set + +Use the same project name (i.e. libftdi1 and not libftdipp1) when FTDIPP +is enabled as suggested by Aurelien Jarno in +http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00044.html + +Without this change, the libftdi1.pc config file defines the include +path as /usr/local/include/libftdipp1 while the ftdi.h file is actually +installed in /usr/local/include/libftdi1 + +This is an issue for example for libsigrok which will fail on: + +In file included from src/hardware/asix-sigma/protocol.c:27: +src/hardware/asix-sigma/protocol.h:28:10: fatal error: ftdi.h: No such file or directory + 28 | #include + | ^~~~~~~~ + +Fixes: + - http://autobuild.buildroot.org/results/1427f44e36752c337791597fab47a1889552a2fe + +Signed-off-by: Fabrice Fontaine +--- + CMakeLists.txt | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 5aecafc..3b0b87c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -136,7 +136,7 @@ endif () + + add_subdirectory(src) + if ( FTDIPP ) +- project(libftdipp1 C CXX) ++ project(libftdi1 C CXX) + add_subdirectory(ftdipp) + endif () + if ( PYTHON_BINDINGS ) +-- +1.7.1 + diff --git a/dev-embedded/libftdi/libftdi-1.5-r3.ebuild b/dev-embedded/libftdi/libftdi-1.5-r3.ebuild new file mode 100644 index 000000000000..43542c3f4d83 --- /dev/null +++ b/dev-embedded/libftdi/libftdi-1.5-r3.ebuild @@ -0,0 +1,96 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{7..9} ) +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? ( + !