libftdi: fix build for x86_64 arch

This commit is contained in:
Gerasim Troeglazov
2018-06-18 22:59:10 +10:00
parent 461dd4513f
commit 17f894a2db
3 changed files with 90 additions and 54 deletions

View File

@@ -8,13 +8,13 @@ HOMEPAGE="http://www.intra2net.com/en/developer/libftdi/index.php"
COPYRIGHT="2003-2013 Intra2net AG and the libftdi developers"
LICENSE="GNU LGPL v2.1
GNU GPL v2"
REVISION="3"
REVISION="4"
SOURCE_URI="http://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.0.tar.bz2"
CHECKSUM_SHA256="7290fd38208d8c00d25ed13ce172aaa0403b37148080e4a33a99837022d2b321"
SOURCE_DIR="libftdi1-$portVersion"
PATCHES="libftdi-1.0.patch"
PATCHES="libftdi-1.0.patchset"
ARCHITECTURES="x86 x86_gcc2"
ARCHITECTURES="x86 x86_gcc2 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
PROVIDES="

View File

@@ -1,51 +0,0 @@
diff -Naur libftdi1-1.0/CMakeLists.txt libftdi1-1.0-haiku/CMakeLists.txt
--- libftdi1-1.0/CMakeLists.txt 2013-01-29 13:21:38.000262144 +0000
+++ libftdi1-1.0-haiku/CMakeLists.txt 2014-01-13 12:26:59.005505024 +0000
@@ -166,7 +166,7 @@
if ( UNIX )
configure_file ( libftdi1-config.in ${CMAKE_CURRENT_BINARY_DIR}/libftdi1-config @ONLY )
install ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libftdi1-config
- DESTINATION bin )
+ DESTINATION bin${BIN_SUFFIX} )
# config script install path
if ( NOT DEFINED LIBFTDI_CMAKE_CONFIG_DIR )
diff -Naur libftdi1-1.0/ftdi_eeprom/CMakeLists.txt libftdi1-1.0-haiku/ftdi_eeprom/CMakeLists.txt
--- libftdi1-1.0/ftdi_eeprom/CMakeLists.txt 2013-01-29 13:21:38.004718592 +0000
+++ libftdi1-1.0-haiku/ftdi_eeprom/CMakeLists.txt 2014-01-13 12:26:59.008912896 +0000
@@ -28,9 +28,9 @@
add_executable(ftdi_eeprom main.c)
target_link_libraries(ftdi_eeprom ftdi1)
- target_link_libraries(ftdi_eeprom ${Confuse_LIBRARIES})
+ target_link_libraries(ftdi_eeprom ${Confuse_LIBRARIES} ${LIBUSB})
- install(TARGETS ftdi_eeprom DESTINATION bin)
+ install(TARGETS ftdi_eeprom DESTINATION bin${BIN_SUFFIX})
else(Confuse_FOUND)
message(STATUS "libConfuse not found, won't build ftdi_eeprom")
diff -Naur libftdi1-1.0/ftdipp/CMakeLists.txt libftdi1-1.0-haiku/ftdipp/CMakeLists.txt
--- libftdi1-1.0/ftdipp/CMakeLists.txt 2013-01-29 13:21:38.005242880 +0000
+++ libftdi1-1.0-haiku/ftdipp/CMakeLists.txt 2014-01-13 12:32:43.713293824 +0000
@@ -51,7 +51,7 @@
COMPONENT staticlibs
)
install( FILES ${cpp_headers}
- DESTINATION include/${PROJECT_NAME}
+ DESTINATION develop/headers${INC_SUFFIX}/${PROJECT_NAME}
COMPONENT headers
)
endif(${UNIX})
diff -Naur libftdi1-1.0/src/CMakeLists.txt libftdi1-1.0-haiku/src/CMakeLists.txt
--- libftdi1-1.0/src/CMakeLists.txt 2013-01-29 13:21:38.006553600 +0000
+++ libftdi1-1.0-haiku/src/CMakeLists.txt 2014-01-13 12:26:59.012058624 +0000
@@ -51,7 +51,7 @@
)
install( FILES ${c_headers}
- DESTINATION include/${PROJECT_NAME}
+ DESTINATION develop/headers${INC_SUFFIX}/${PROJECT_NAME}
COMPONENT headers
)

View File

@@ -0,0 +1,87 @@
From 4a5216f4de8210d35c9fa236efb8bf851e8b6d44 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com.org>
Date: Mon, 18 Jun 2018 00:44:49 +1000
Subject: Fix build for Haiku
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0bad0d7..3195310 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -166,7 +166,7 @@ install(FILES ${CMAKE_BINARY_DIR}/libftdi1.pc ${CMAKE_BINARY_DIR}/libftdipp1.pc
if ( UNIX )
configure_file ( libftdi1-config.in ${CMAKE_CURRENT_BINARY_DIR}/libftdi1-config @ONLY )
install ( PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/libftdi1-config
- DESTINATION bin )
+ DESTINATION bin${BIN_SUFFIX} )
# config script install path
if ( NOT DEFINED LIBFTDI_CMAKE_CONFIG_DIR )
diff --git a/ftdi_eeprom/CMakeLists.txt b/ftdi_eeprom/CMakeLists.txt
index a843b8e..ca438e5 100644
--- a/ftdi_eeprom/CMakeLists.txt
+++ b/ftdi_eeprom/CMakeLists.txt
@@ -28,9 +28,9 @@ if (FTDI_EEPROM)
add_executable(ftdi_eeprom main.c)
target_link_libraries(ftdi_eeprom ftdi1)
- target_link_libraries(ftdi_eeprom ${Confuse_LIBRARIES})
+ target_link_libraries(ftdi_eeprom ${Confuse_LIBRARIES} ${LIBUSB})
- install(TARGETS ftdi_eeprom DESTINATION bin)
+ install(TARGETS ftdi_eeprom DESTINATION bin${BIN_SUFFIX})
else(Confuse_FOUND)
message(STATUS "libConfuse not found, won't build ftdi_eeprom")
diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
index 16184ee..2563cd8 100644
--- a/ftdipp/CMakeLists.txt
+++ b/ftdipp/CMakeLists.txt
@@ -51,7 +51,7 @@ if (FTDIPP)
COMPONENT staticlibs
)
install( FILES ${cpp_headers}
- DESTINATION include/${PROJECT_NAME}
+ DESTINATION develop/headers${INC_SUFFIX}/${PROJECT_NAME}
COMPONENT headers
)
endif(${UNIX})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1f39ee7..f074b30 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -51,7 +51,7 @@ if(${UNIX})
)
install( FILES ${c_headers}
- DESTINATION include/${PROJECT_NAME}
+ DESTINATION develop/headers${INC_SUFFIX}/${PROJECT_NAME}
COMPONENT headers
)
--
2.16.4
From 26f5ce99b2eea24a772307de16f1fd221e992271 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Mon, 18 Jun 2018 00:51:51 +1000
Subject: Fix build for x86_64 arch
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3195310..0c45883 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -47,7 +47,7 @@ set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
set(CPACK_COMPONENT_HEADERS_GROUP "Development")
# automatically set lib suffix
-if ( UNIX AND NOT APPLE AND NOT CMAKE_CROSSCOMPILING AND NOT EXISTS "/etc/debian_version" )
+if ( UNIX AND NOT APPLE AND NOT HAIKU AND NOT CMAKE_CROSSCOMPILING AND NOT EXISTS "/etc/debian_version" )
if ( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT LIB_SUFFIX )
set ( LIB_SUFFIX 64 )
endif ()
--
2.16.4