Files
haikuports/dev-embedded/libftdi/libftdi-1.4.recipe
2019-01-11 23:57:27 +01:00

80 lines
2.2 KiB
Bash

SUMMARY="An open source library to talk to FTDI chips"
DESCRIPTION="libFTDI is an open source library to talk to FTDI chips: FT232BM, FT245BM, \
FT2232C, FT2232D, FT245R and FT232H including the popular bitbang mode. The \
library is linked with your program in userspace, no kernel driver required.\
libFTDI works perfectly with Linux, Windows, MacOS X and BSD variants thanks to \
libusb."
HOMEPAGE="https://www.intra2net.com/en/developer/libftdi/index.php"
COPYRIGHT="2003-2017 Intra2net AG and the libftdi developers"
LICENSE="GNU LGPL v2.1
GNU GPL v2"
REVISION="7"
SOURCE_URI="https://www.intra2net.com/en/developer/libftdi/download/libftdi1-$portVersion.tar.bz2"
CHECKSUM_SHA256="ec36fb49080f834690c24008328a5ef42d3cf584ef4060f3a35aa4681cb31b74"
SOURCE_DIR="libftdi1-$portVersion"
PATCHES="libftdi-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
libftdi$secondaryArchSuffix = $portVersion
cmd:ftdi_eeprom
cmd:libftdi1_config
lib:libftdi1$secondaryArchSuffix = $portVersion
lib:libftdipp1$secondaryArchSuffix = $portVersion
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libboost_unit_test_framework$secondaryArchSuffix
lib:libconfuse$secondaryArchSuffix
lib:libusb_1.0$secondaryArchSuffix
"
PROVIDES_devel="
libftdi${secondaryArchSuffix}_devel = $portVersion
devel:libftdi1$secondaryArchSuffix = $portVersion
devel:libftdipp1$secondaryArchSuffix = $portVersion
"
REQUIRES_devel="
lib:libftdi1$secondaryArchSuffix == $portVersion base
devel:libusb_1.0$secondaryArchSuffix
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libboost_unit_test_framework$secondaryArchSuffix
devel:libconfuse$secondaryArchSuffix
devel:libusb_1.0$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:cmake
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
"
BUILD()
{
rm -rf build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-DLIBUSB_INCLUDE_DIR=/system/$relativeIncludeDir/libusb-1.0 \
-DLIB_SUFFIX=$secondaryArchSubDir \
-DINC_SUFFIX=$secondaryArchSubDir \
-DCMAKE_INSTALL_DOCDIR=$docDir \
..
make
}
INSTALL()
{
cd build
make install
prepareInstalledDevelLib libftdi1
prepareInstalledDevelLib libftdipp1
fixPkgconfig
packageEntries devel $developDir
}