initial buildroot for linux 5.15
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
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] 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>
|
||||
---
|
||||
CMakeOptions.txt | 1 -
|
||||
ftdipp/CMakeLists.txt | 14 +-------------
|
||||
src/CMakeLists.txt | 13 +------------
|
||||
3 files changed, 2 insertions(+), 26 deletions(-)
|
||||
|
||||
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 )
|
||||
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 fac5bcc..a06edf1 100644
|
||||
--- a/ftdipp/CMakeLists.txt
|
||||
+++ b/ftdipp/CMakeLists.txt
|
||||
@@ -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})
|
||||
|
||||
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}
|
||||
COMPONENT headers
|
||||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
|
||||
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
|
||||
set(c_sources ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.c ${CMAKE_CURRENT_SOURCE_DIR}/ftdi_stream.c CACHE INTERNAL "List of c sources" )
|
||||
set(c_headers ${CMAKE_CURRENT_SOURCE_DIR}/ftdi.h CACHE INTERNAL "List of c headers" )
|
||||
|
||||
-add_library(ftdi1 SHARED ${c_sources})
|
||||
+add_library(ftdi1 ${c_sources})
|
||||
|
||||
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}
|
||||
)
|
||||
|
||||
-if ( STATICLIBS )
|
||||
- add_library(ftdi1-static STATIC ${c_sources})
|
||||
- target_link_libraries(ftdi1-static ${LIBUSB_LIBRARIES})
|
||||
- set_target_properties(ftdi1-static PROPERTIES OUTPUT_NAME "ftdi1")
|
||||
- set_target_properties(ftdi1-static PROPERTIES CLEAN_DIRECT_OUTPUT 1)
|
||||
- install ( TARGETS ftdi1-static
|
||||
- ARCHIVE DESTINATION lib${LIB_SUFFIX}
|
||||
- COMPONENT staticlibs
|
||||
- )
|
||||
-endif ()
|
||||
-
|
||||
install ( FILES ${c_headers}
|
||||
DESTINATION include/${PROJECT_NAME}
|
||||
COMPONENT headers
|
||||
--
|
||||
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
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
config BR2_PACKAGE_LIBFTDI1
|
||||
bool "libftdi1"
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # libusb
|
||||
depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # libusb
|
||||
select BR2_PACKAGE_LIBUSB
|
||||
help
|
||||
Userspace access to FTDI USB interface chips (version 1.x)
|
||||
|
||||
http://www.intra2net.com/en/developer/libftdi/index.php
|
||||
|
||||
if BR2_PACKAGE_LIBFTDI1
|
||||
|
||||
config BR2_PACKAGE_LIBFTDI1_LIBFTDIPP1
|
||||
bool "libftdipp1"
|
||||
depends on BR2_INSTALL_LIBSTDCPP # boost
|
||||
depends on BR2_TOOLCHAIN_HAS_THREADS # boost
|
||||
depends on BR2_USE_WCHAR # boost
|
||||
select BR2_PACKAGE_BOOST
|
||||
help
|
||||
C++ bindings for libftdi
|
||||
|
||||
comment "libftdipp1 needs a toolchain w/ C++, wchar"
|
||||
depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR
|
||||
|
||||
config BR2_PACKAGE_LIBFTDI1_PYTHON_BINDINGS
|
||||
bool "python bindings"
|
||||
depends on BR2_PACKAGE_PYTHON || BR2_PACKAGE_PYTHON3
|
||||
help
|
||||
Python bindings for libftdi
|
||||
|
||||
config BR2_PACKAGE_LIBFTDI1_FDTI_EEPROM
|
||||
bool "ftdi_eeprom tool"
|
||||
select BR2_PACKAGE_LIBCONFUSE
|
||||
|
||||
endif # BR2_PACKAGE_LIBFTDI1
|
||||
|
||||
comment "libftdi1 needs a toolchain w/ threads, gcc >= 4.9"
|
||||
depends on !BR2_TOOLCHAIN_HAS_THREADS || \
|
||||
!BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
|
||||
@@ -0,0 +1,8 @@
|
||||
# Locally computed after checking the signature
|
||||
# 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
|
||||
sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING.GPL
|
||||
sha256 b7993225104d90ddd8024fd838faf300bea5e83d91203eab98e29512acebd69c COPYING.LIB
|
||||
@@ -0,0 +1,43 @@
|
||||
################################################################################
|
||||
#
|
||||
# libftdi1
|
||||
#
|
||||
################################################################################
|
||||
|
||||
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.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
|
||||
LIBFTDI1_CONF_OPTS += -DFTDIPP=OFF
|
||||
endif
|
||||
|
||||
ifeq ($(BR2_PACKAGE_LIBFTDI1_PYTHON_BINDINGS),y)
|
||||
LIBFTDI1_DEPENDENCIES += $(if $(BR2_PACKAGE_PYTHON),python,python3) host-swig
|
||||
LIBFTDI1_CONF_OPTS += -DPYTHON_BINDINGS=ON
|
||||
else
|
||||
LIBFTDI1_CONF_OPTS += -DPYTHON_BINDINGS=OFF
|
||||
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
|
||||
LIBFTDI1_CONF_OPTS += -DFTDI_EEPROM=OFF
|
||||
endif
|
||||
|
||||
$(eval $(cmake-package))
|
||||
Reference in New Issue
Block a user