From 6cf40eec94d604d77c478ae0f4642a415971cc78 Mon Sep 17 00:00:00 2001 From: Schrijvers Luc Date: Tue, 23 Mar 2021 18:26:43 +0100 Subject: [PATCH] libftdi, bump version, fix installation paths for the headers (#5646) --- ...{libftdi-1.4.recipe => libftdi-1.5.recipe} | 50 +++++++++++++------ ...ftdi-1.4.patchset => libftdi-1.5.patchset} | 27 +++++----- 2 files changed, 49 insertions(+), 28 deletions(-) rename dev-embedded/libftdi/{libftdi-1.4.recipe => libftdi-1.5.recipe} (55%) rename dev-embedded/libftdi/patches/{libftdi-1.4.patchset => libftdi-1.5.patchset} (51%) diff --git a/dev-embedded/libftdi/libftdi-1.4.recipe b/dev-embedded/libftdi/libftdi-1.5.recipe similarity index 55% rename from dev-embedded/libftdi/libftdi-1.4.recipe rename to dev-embedded/libftdi/libftdi-1.5.recipe index ab9eb4cef..4e6fbd5b8 100644 --- a/dev-embedded/libftdi/libftdi-1.4.recipe +++ b/dev-embedded/libftdi/libftdi-1.5.recipe @@ -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 } diff --git a/dev-embedded/libftdi/patches/libftdi-1.4.patchset b/dev-embedded/libftdi/patches/libftdi-1.5.patchset similarity index 51% rename from dev-embedded/libftdi/patches/libftdi-1.4.patchset rename to dev-embedded/libftdi/patches/libftdi-1.5.patchset index d993b6716..b2c57b22c 100644 --- a/dev-embedded/libftdi/patches/libftdi-1.4.patchset +++ b/dev-embedded/libftdi/patches/libftdi-1.5.patchset @@ -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 -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