libftdi, bump version, fix installation paths for the headers (#5646)

This commit is contained in:
Schrijvers Luc
2021-03-23 18:26:43 +01:00
committed by GitHub
parent 88c6201c16
commit 6cf40eec94
2 changed files with 49 additions and 28 deletions

View File

@@ -5,39 +5,43 @@ 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"
COPYRIGHT="2003-2020 Intra2net AG and the libftdi developers"
LICENSE="GNU LGPL v2.1
GNU GPL v2"
REVISION="8"
REVISION="1"
SOURCE_URI="https://www.intra2net.com/en/developer/libftdi/download/libftdi1-$portVersion.tar.bz2"
CHECKSUM_SHA256="ec36fb49080f834690c24008328a5ef42d3cf584ef4060f3a35aa4681cb31b74"
CHECKSUM_SHA256="7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049"
SOURCE_DIR="libftdi1-$portVersion"
PATCHES="libftdi-$portVersion.patchset"
ARCHITECTURES="!x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86"
libVersion="2.5.0"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
libftdi$secondaryArchSuffix = $portVersion
cmd:ftdi_eeprom
cmd:libftdi1_config
lib:libftdi1$secondaryArchSuffix = $portVersion
lib:libftdipp1$secondaryArchSuffix = $portVersion
lib:libftdi1$secondaryArchSuffix = $libVersionCompat
lib:libftdipp1$secondaryArchSuffix = $libVersionCompat
"
REQUIRES="
haiku$secondaryArchSuffix
lib:libboost_unit_test_framework$secondaryArchSuffix
lib:libconfuse$secondaryArchSuffix
lib:libintl$secondaryArchSuffix
lib:libusb_1.0$secondaryArchSuffix
"
PROVIDES_devel="
libftdi${secondaryArchSuffix}_devel = $portVersion
devel:libftdi1$secondaryArchSuffix = $portVersion
devel:libftdipp1$secondaryArchSuffix = $portVersion
cmd:libftdi1_config
devel:libftdi1$secondaryArchSuffix = $libVersionCompat
devel:libftdipp1$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
lib:libftdi1$secondaryArchSuffix == $portVersion base
libftdi$secondaryArchSuffix == $portVersion base
devel:libusb_1.0$secondaryArchSuffix
"
@@ -52,6 +56,7 @@ BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
"
BUILD()
@@ -59,8 +64,10 @@ BUILD()
rm -rf build
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-DLIBUSB_INCLUDE_DIR=/system/$relativeIncludeDir/libusb-1.0 \
cmake -DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX:PATH=$prefix \
-DEXAMPLES=OFF \
-DFTDIPP=ON \
-DLIB_SUFFIX=$secondaryArchSubDir \
-DINC_SUFFIX=$secondaryArchSubDir \
-DCMAKE_INSTALL_DOCDIR=$docDir \
@@ -72,8 +79,23 @@ INSTALL()
{
cd build
make install
prepareInstalledDevelLib libftdi1
prepareInstalledDevelLib libftdipp1
prepareInstalledDevelLibs libftdi1 libftdipp1
fixPkgconfig
packageEntries devel $developDir
# fixPkgconfig
if [ -n "$secondaryArchSuffix" ]; then
sed -i 's,\/headers/x86,\/headers/x86/libftdi1,g' \
$prefix/$relativeDevelopLibDir/pkgconfig/libftdi1.pc
sed -i 's,\/headers/x86,\/headers/x86/libftdi1,g' \
$prefix/$relativeDevelopLibDir/pkgconfig/libftdipp1.pc
else
sed -i 's,\/headers,\/headers/libftdi1,g' \
$prefix/$relativeDevelopLibDir/pkgconfig/libftdi1.pc
sed -i 's,\/headers,\/headers/libftdi1,g' \
$prefix/$relativeDevelopLibDir/pkgconfig/libftdipp1.pc
fi
packageEntries devel $developDir \
$prefix/bin/libftdi1-config \
$libDir/cmake
}

View File

@@ -1,24 +1,23 @@
From eb3927541890e13aaf094913b4ecbe4153248fb4 Mon Sep 17 00:00:00 2001
From 91f52d24f0be9317d55d43d49e31b7486e4ddda7 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Mon, 7 Jan 2019 22:57:12 +0100
Date: Sat, 30 Jan 2021 14:01:02 +0000
Subject: Fix include dirs for Haiku.
diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
index 27fbe8d..af82ae7 100644
index fac5bcc..26b1d83 100644
--- a/ftdipp/CMakeLists.txt
+++ b/ftdipp/CMakeLists.txt
@@ -55,7 +55,7 @@ if (FTDIPP)
endif ()
install ( FILES ${cpp_headers}
- DESTINATION include/${PROJECT_NAME}
+ DESTINATION develop/headers${INC_SUFFIX}
COMPONENT headers
)
@@ -42,6 +42,6 @@ if ( STATICLIBS )
endif ()
install ( FILES ${cpp_headers}
- DESTINATION include/${PROJECT_NAME}
+ DESTINATION develop/headers${INC_SUFFIX}/${PROJECT_NAME}
COMPONENT headers
)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9fd86a6..f592a2d 100644
index 17b3617..2dcc887 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -50,6 +50,6 @@ if ( STATICLIBS )
@@ -26,9 +25,9 @@ index 9fd86a6..f592a2d 100644
install ( FILES ${c_headers}
- DESTINATION include/${PROJECT_NAME}
+ DESTINATION develop/headers${INC_SUFFIX}
+ DESTINATION develop/headers${INC_SUFFIX}/${PROJECT_NAME}
COMPONENT headers
)
--
2.19.1
2.30.0