initial import
This commit is contained in:
44
libftdi/PKGBUILD
Normal file
44
libftdi/PKGBUILD
Normal file
@@ -0,0 +1,44 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
|
||||
pkgname=libftdi
|
||||
pkgver=1.5
|
||||
pkgrel=1
|
||||
pkgdesc='A library to talk to FTDI chips, optional python bindings.'
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://www.intra2net.com/en/developer/libftdi/download.php'
|
||||
license=('GPL-2')
|
||||
depends=('libusb' 'confuse')
|
||||
optdepends=('python: library bindings')
|
||||
makedepends=('boost' 'cmake' 'python' 'swig')
|
||||
source=(https://www.intra2net.com/en/developer/libftdi/download/${pkgname}1-$pkgver.tar.bz2
|
||||
fix_includes_path.patch)
|
||||
sha512sums=('c525b2ab6aff9ef9254971ae7d57f3549a36a36875765c48f947d52532814a2a004de1232389d4fe824a8c8ab84277b08427308573476e1da9b7db83db802f6f'
|
||||
'11e6ff5f5a0f1a53a4815bb1cfc49cbfbb13eca2f7ecbe6c08b105d04910d58cdb7ed1a116bffdaa7c541e23c25b1f1d48f1dd13320d1d3c207a8e31bc52533f')
|
||||
|
||||
prepare() {
|
||||
cd "${pkgname}1-$pkgver"
|
||||
sed -i 's|LIB_SUFFIX 64|LIB_SUFFIX ""|' CMakeLists.txt
|
||||
sed -i "s|MODE=\"0664\", GROUP=\"plugdev\"|TAG+=\"uaccess\"|g" packages/99-libftdi.rules
|
||||
|
||||
patch -p1 < ../fix_includes_path.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$srcdir/${pkgname}1-$pkgver"
|
||||
mkdir -p build
|
||||
cd build
|
||||
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_SKIP_BUILD_RPATH=ON \
|
||||
-DCMAKE_BUILD_TYPE=Release -DEXAMPLES=OFF -DFTDI_EEPROM=ON \
|
||||
-DFTDIPP=ON -DPYTHON_BINDINGS=ON -DLINK_PYTHON_LIBRARY=ON
|
||||
make
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "${pkgname}1-$pkgver/build"
|
||||
|
||||
make DESTDIR="$pkgdir" install
|
||||
install -Dm644 "../packages/99-libftdi.rules" "$pkgdir/lib/udev/rules.d/69-libftdi.rules"
|
||||
install -Dm644 "$srcdir/${pkgname}1-$pkgver/"COPYING.GPL -t "${pkgdir}/usr/share/licenses/$pkgname"
|
||||
install -d "$pkgdir/usr/share/libftdi/examples"
|
||||
cp -r ../examples/* "$pkgdir/usr/share/libftdi/examples"
|
||||
}
|
||||
41
libftdi/fix_includes_path.patch
Normal file
41
libftdi/fix_includes_path.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Fri, 17 Jul 2020 19:25:03 +0000 (+0200)
|
||||
Subject: CMakeLists.txt: fix paths when FTDIPP is set
|
||||
X-Git-Url: http://developer.intra2net.com/git/?p=libftdi;a=commitdiff_plain;h=cdb28383402d248dbc6062f4391b038375c52385;hp=5c2c58e03ea999534e8cb64906c8ae8b15536c30
|
||||
|
||||
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 <ftdi.h>
|
||||
| ^~~~~~~~
|
||||
|
||||
Fixes:
|
||||
- http://autobuild.buildroot.org/results/1427f44e36752c337791597fab47a1889552a2fe
|
||||
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
|
||||
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 )
|
||||
Reference in New Issue
Block a user