mirror of
https://github.com/MiyooCFW/buildroot.git
synced 2025-09-27 22:24:19 +03:00
Merge from bittboy/buildroot@26c91a9
This commit is contained in:
@@ -1,67 +1,64 @@
|
||||
From 7e57ff280b55b45e74329b9988279e8831d32eab Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Martin <s.martin49@gmail.com>
|
||||
Date: Sun, 25 Jan 2015 09:45:04 +0100
|
||||
Subject: [PATCH 1/2] cmake: use the standard CMake flag to drive the shared
|
||||
Subject: [PATCH] cmake: use the standard CMake flag to drive the shared
|
||||
object build
|
||||
|
||||
Remove the STATICLIBS CMake option (and the code handling it) and let
|
||||
the standard CMake flags drive the shared object build.
|
||||
|
||||
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
||||
[Fabrice: update for 1.5]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
CMakeLists.txt | 2 --
|
||||
ftdipp/CMakeLists.txt | 15 +--------------
|
||||
CMakeOptions.txt | 1 -
|
||||
ftdipp/CMakeLists.txt | 14 +-------------
|
||||
src/CMakeLists.txt | 13 +------------
|
||||
3 files changed, 2 insertions(+), 28 deletions(-)
|
||||
3 files changed, 2 insertions(+), 26 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 74f80f4..0ba0b08 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -46,8 +46,6 @@ set(CPACK_COMPONENT_SHAREDLIBS_GROUP "Development")
|
||||
set(CPACK_COMPONENT_STATICLIBS_GROUP "Development")
|
||||
set(CPACK_COMPONENT_HEADERS_GROUP "Development")
|
||||
|
||||
diff --git a/CMakeOptions.txt b/CMakeOptions.txt
|
||||
index 07b5887..b780ffd 100644
|
||||
--- a/CMakeOptions.txt
|
||||
+++ b/CMakeOptions.txt
|
||||
@@ -1,4 +1,3 @@
|
||||
-option ( STATICLIBS "Build static libraries" ON )
|
||||
-
|
||||
# guess LIB_SUFFIX, don't take debian multiarch into account
|
||||
if ( NOT DEFINED LIB_SUFFIX )
|
||||
if( CMAKE_SYSTEM_NAME MATCHES "Linux"
|
||||
option ( BUILD_TESTS "Build unit tests with Boost Unit Test framework" OFF )
|
||||
option ( DOCUMENTATION "Generate API documentation with Doxygen" OFF )
|
||||
option ( EXAMPLES "Build example programs" ON )
|
||||
diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
|
||||
index 7500211..27e7884 100644
|
||||
index fac5bcc..a06edf1 100644
|
||||
--- a/ftdipp/CMakeLists.txt
|
||||
+++ b/ftdipp/CMakeLists.txt
|
||||
@@ -23,8 +23,7 @@ if (FTDIPP)
|
||||
set(FTDI_BUILD_CPP True PARENT_SCOPE)
|
||||
message(STATUS "Building libftdi1++")
|
||||
@@ -12,7 +12,7 @@ include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR}
|
||||
include_directories(${Boost_INCLUDE_DIRS})
|
||||
|
||||
- # Shared library
|
||||
- add_library(ftdipp1 SHARED ${cpp_sources})
|
||||
+ add_library(ftdipp1 ${cpp_sources})
|
||||
# Shared library
|
||||
-add_library(ftdipp1 SHARED ${cpp_sources})
|
||||
+add_library(ftdipp1 ${cpp_sources})
|
||||
|
||||
math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases
|
||||
set_target_properties(ftdipp1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
|
||||
@@ -41,18 +40,6 @@ if (FTDIPP)
|
||||
LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
)
|
||||
-
|
||||
- # Static library
|
||||
- if ( STATICLIBS )
|
||||
- add_library(ftdipp1-static STATIC ${cpp_sources})
|
||||
- set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
|
||||
- set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatibility with previous releases
|
||||
set_target_properties(ftdipp1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 3)
|
||||
@@ -29,18 +29,6 @@ install ( TARGETS ftdipp1
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
)
|
||||
|
||||
-# Static library
|
||||
-if ( STATICLIBS )
|
||||
- add_library(ftdipp1-static STATIC ${cpp_sources})
|
||||
- set_target_properties(ftdipp1-static PROPERTIES OUTPUT_NAME "ftdipp1")
|
||||
- set_target_properties(ftdipp1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
-
|
||||
- install ( TARGETS ftdipp1-static
|
||||
- ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
- COMPONENT staticlibs
|
||||
- )
|
||||
- endif ()
|
||||
|
||||
install ( FILES ${cpp_headers}
|
||||
DESTINATION include/${PROJECT_NAME}
|
||||
- install ( TARGETS ftdipp1-static
|
||||
- ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
- COMPONENT staticlibs
|
||||
- )
|
||||
-endif ()
|
||||
-
|
||||
install ( FILES ${cpp_headers}
|
||||
DESTINATION include/${PROJECT_NAME}
|
||||
COMPONENT headers
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
index 9fd86a6..501d4a8 100644
|
||||
index 17b3617..ae4fc61 100644
|
||||
--- a/src/CMakeLists.txt
|
||||
+++ b/src/CMakeLists.txt
|
||||
@@ -21,7 +21,7 @@ configure_file(ftdi_version_i.h.in "${CMAKE_CURRENT_BINARY_DIR}/ftdi_version_i.h
|
||||
@@ -71,7 +68,7 @@ index 9fd86a6..501d4a8 100644
|
||||
-add_library(ftdi1 SHARED ${c_sources})
|
||||
+add_library(ftdi1 ${c_sources})
|
||||
|
||||
math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatiblity with previous releases
|
||||
math(EXPR VERSION_FIXUP "${MAJOR_VERSION} + 1") # Compatibility with previous releases
|
||||
set_target_properties(ftdi1 PROPERTIES VERSION ${VERSION_FIXUP}.${MINOR_VERSION}.0 SOVERSION 2)
|
||||
@@ -38,17 +38,6 @@ install ( TARGETS ftdi1
|
||||
ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
@@ -92,5 +89,5 @@ index 9fd86a6..501d4a8 100644
|
||||
DESTINATION include/${PROJECT_NAME}
|
||||
COMPONENT headers
|
||||
--
|
||||
2.2.2
|
||||
2.27.0
|
||||
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 3e68fd7da98a755403cf5719c3d7a3c2f4dcbb58 Mon Sep 17 00:00:00 2001
|
||||
From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
Date: Fri, 17 Jul 2020 21:04:45 +0200
|
||||
Subject: [PATCH] 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>
|
||||
[Upstream status:
|
||||
http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00045.html]
|
||||
---
|
||||
CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
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 )
|
||||
--
|
||||
2.27.0
|
||||
|
||||
@@ -1,34 +0,0 @@
|
||||
From 81275d75ae88fe8ab1915d3ba260ea935e63c362 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Martin <s.martin49@gmail.com>
|
||||
Date: Sun, 25 Jan 2015 10:01:17 +0100
|
||||
Subject: [PATCH 2/2] cmake: fix FindUSB1.cmake
|
||||
|
||||
Make sure all ldflags are correctly set, especially for static build.
|
||||
|
||||
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
||||
---
|
||||
cmake/FindUSB1.cmake | 8 ++++++--
|
||||
1 file changed, 6 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/cmake/FindUSB1.cmake b/cmake/FindUSB1.cmake
|
||||
index b90e297..e7f1b3c 100644
|
||||
--- a/cmake/FindUSB1.cmake
|
||||
+++ b/cmake/FindUSB1.cmake
|
||||
@@ -26,8 +26,12 @@ else (LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
|
||||
PATH_SUFFIXES libusb-1.0
|
||||
PATHS ${PC_LIBUSB_INCLUDEDIR} ${PC_LIBUSB_INCLUDE_DIRS})
|
||||
|
||||
- FIND_LIBRARY(LIBUSB_LIBRARIES NAMES usb-1.0
|
||||
- PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
|
||||
+ set(LIBUSB_LIBRARIES ${PC_LIBUSB_STATIC_LDFLAGS} ${PC_LIBUSB_STATIC_LDFLAGS_OTHER})
|
||||
+ foreach(libname ${PC_LIBUSB_STATIC_LIBRARIES})
|
||||
+ FIND_LIBRARY(lib NAMES ${libname}
|
||||
+ PATHS ${PC_LIBUSB_LIBDIR} ${PC_LIBUSB_LIBRARY_DIRS})
|
||||
+ list(APPEND LIBUSB_LIBRARIES ${lib})
|
||||
+ endforeach()
|
||||
|
||||
include(FindPackageHandleStandardArgs)
|
||||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBUSB DEFAULT_MSG LIBUSB_LIBRARIES LIBUSB_INCLUDE_DIR)
|
||||
--
|
||||
2.2.2
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
From c215d5ecd985b57700e817920d0e99112b4a571b Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Martin <s.martin49@gmail.com>
|
||||
Date: Sun, 25 Jan 2015 13:35:24 +0100
|
||||
Subject: [PATCH] cmake: do not check for g++ when FTDIPP is disabled
|
||||
|
||||
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
|
||||
---
|
||||
CMakeLists.txt | 6 ++++--
|
||||
ftdipp/CMakeLists.txt | 1 +
|
||||
2 files changed, 5 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 0ba0b08..e880211 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,5 +1,5 @@
|
||||
# Project
|
||||
-project(libftdi1)
|
||||
+project(libftdi1 C)
|
||||
set(MAJOR_VERSION 1)
|
||||
set(MINOR_VERSION 2)
|
||||
set(PACKAGE libftdi1)
|
||||
@@ -145,7 +145,9 @@ else(DOCUMENTATION AND DOXYGEN_FOUND)
|
||||
endif(DOCUMENTATION AND DOXYGEN_FOUND)
|
||||
|
||||
add_subdirectory(src)
|
||||
-add_subdirectory(ftdipp)
|
||||
+if(FTDIPP)
|
||||
+ add_subdirectory(ftdipp)
|
||||
+endif()
|
||||
add_subdirectory(python)
|
||||
add_subdirectory(ftdi_eeprom)
|
||||
add_subdirectory(examples)
|
||||
diff --git a/ftdipp/CMakeLists.txt b/ftdipp/CMakeLists.txt
|
||||
index 27e7884..2d080f4 100644
|
||||
--- a/ftdipp/CMakeLists.txt
|
||||
+++ b/ftdipp/CMakeLists.txt
|
||||
@@ -1,4 +1,5 @@
|
||||
# Check
|
||||
+project(libftdipp1 C CXX)
|
||||
set(FTDI_BUILD_CPP False PARENT_SCOPE)
|
||||
|
||||
option ( FTDIPP "Build C++ binding library libftdi1++" ON )
|
||||
--
|
||||
2.2.2
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
From fcda9c6a208d3a7fe651ef661b2eb6e462a89c17 Mon Sep 17 00:00:00 2001
|
||||
From: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
Date: Tue, 31 Jul 2018 17:44:57 -0300
|
||||
Subject: [PATCH] CMake: use find_package (SWIG) for cmake >= 3.0.0
|
||||
|
||||
There's a workaround for a bug (fixed in cmake 3.0.0) that does not
|
||||
work in CMake 3.12. Only use the workaround with cmake < 3.0.0.
|
||||
|
||||
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
|
||||
[Mark: patch retrieved and updated from
|
||||
http://developer.intra2net.com/git/?p=libftdi;a=commit;h=fcda9c6a208d3a7fe651ef661b2eb6e462a89c17]
|
||||
Signed-off-by: Mark Corbin <mark.corbin@embecosm.com>
|
||||
[Update patch to make it work with cmake < 3.7:
|
||||
http://developer.intra2net.com/mailarchive/html/libftdi/2019/msg00009.html]
|
||||
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
|
||||
---
|
||||
diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
|
||||
index 31ef1c6..eefc344 100644
|
||||
--- a/python/CMakeLists.txt
|
||||
+++ b/python/CMakeLists.txt
|
||||
@@ -3,7 +3,7 @@ option ( LINK_PYTHON_LIBRARY "Link against python libraries" ON )
|
||||
|
||||
if ( PYTHON_BINDINGS )
|
||||
# workaround for cmake bug #0013449
|
||||
- if ( NOT DEFINED CMAKE_FIND_ROOT_PATH )
|
||||
+ if ( NOT DEFINED CMAKE_FIND_ROOT_PATH OR NOT CMAKE_VERSION VERSION_LESS 3.0.0 )
|
||||
find_package ( SWIG )
|
||||
else ()
|
||||
find_program ( SWIG_EXECUTABLE NAMES swig2.0 swig )
|
||||
@@ -1,6 +1,6 @@
|
||||
# Locally computed after checking the signature
|
||||
# https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.4.tar.bz2.sig
|
||||
sha256 ec36fb49080f834690c24008328a5ef42d3cf584ef4060f3a35aa4681cb31b74 libftdi1-1.4.tar.bz2
|
||||
# https://www.intra2net.com/en/developer/libftdi/download/libftdi1-1.5.tar.bz2.sig
|
||||
sha256 7c7091e9c86196148bd41177b4590dccb1510bfe6cea5bf7407ff194482eb049 libftdi1-1.5.tar.bz2
|
||||
|
||||
# Hash for license files:
|
||||
sha256 524f46428bf72bb8c6acfeca4909551fd2e0bdbb5305406d38382f4056095c56 LICENSE
|
||||
|
||||
@@ -4,17 +4,19 @@
|
||||
#
|
||||
################################################################################
|
||||
|
||||
LIBFTDI1_VERSION = 1.4
|
||||
LIBFTDI1_VERSION = 1.5
|
||||
LIBFTDI1_SOURCE = libftdi1-$(LIBFTDI1_VERSION).tar.bz2
|
||||
LIBFTDI1_SITE = http://www.intra2net.com/en/developer/libftdi/download
|
||||
LIBFTDI1_INSTALL_STAGING = YES
|
||||
LIBFTDI1_DEPENDENCIES = libusb
|
||||
LIBFTDI1_LICENSE = LGPL-2.0 (libftdi1), GPL-2.0 with exception (ftdipp1)
|
||||
LIBFTDI1_LICENSE_FILES = LICENSE COPYING.GPL COPYING.LIB
|
||||
LIBFTDI1_LICENSE = LGPL-2.1 (libftdi1), MIT (libftdi1)
|
||||
LIBFTDI1_LICENSE_FILES = LICENSE COPYING.LIB
|
||||
LIBFTDI1_CONFIG_SCRIPTS = libftdi1-config
|
||||
LIBFTDI1_CONF_OPTS = -DDOCUMENTATION=OFF -DEXAMPLES=OFF
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBFTDI1_LIBFTDIPP1),y)
|
||||
LIBFTDI1_LICENSE += , GPL-2.0 with exception (libftdipp1)
|
||||
LIBFTDI1_LICENSE_FILES += COPYING.GPL
|
||||
LIBFTDI1_DEPENDENCIES += boost
|
||||
LIBFTDI1_CONF_OPTS += -DFTDIPP=ON
|
||||
else
|
||||
@@ -30,6 +32,8 @@ endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBFTDI1_FDTI_EEPROM),y)
|
||||
# ftdi_eeprom optionally depends on libintl
|
||||
LIBFTDI1_LICENSE += , GPL-2.0 (ftdi_eeprom)
|
||||
LIBFTDI1_LICENSE_FILES += COPYING.GPL
|
||||
LIBFTDI1_DEPENDENCIES += libconfuse $(TARGET_NLS_DEPENDENCIES)
|
||||
LIBFTDI1_CONF_OPTS += -DFTDI_EEPROM=ON
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user