diff options
Diffstat (limited to 'meta-oe/recipes-support/libftdi/files')
4 files changed, 189 insertions, 0 deletions
diff --git a/meta-oe/recipes-support/libftdi/files/0001-CMake-bump-the-minimal-required-version-to-2.8.12.patch b/meta-oe/recipes-support/libftdi/files/0001-CMake-bump-the-minimal-required-version-to-2.8.12.patch new file mode 100644 index 0000000000..544ea00c35 --- /dev/null +++ b/meta-oe/recipes-support/libftdi/files/0001-CMake-bump-the-minimal-required-version-to-2.8.12.patch | |||
@@ -0,0 +1,86 @@ | |||
1 | From 9b1419d46b156c3c61d30e761ee3636431187cc0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yegor Yefremov <yegorslists@googlemail.com> | ||
3 | Date: Tue, 1 Aug 2023 11:53:35 +0200 | ||
4 | Subject: [PATCH] CMake: bump the minimal required version to 2.8.12 | ||
5 | |||
6 | The older CMake versions are deprecated. | ||
7 | |||
8 | Remove support for CMake code compatible with CMake older than 2.8.8. | ||
9 | |||
10 | Also move cmake_minimum_required() command before the project() | ||
11 | command invocation. | ||
12 | |||
13 | Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de> | ||
14 | Upstream-Status: Backport [3861e7dc9e83f2f6ff4e1579cf3bbf63a6827105] | ||
15 | --- | ||
16 | CMakeLists.txt | 46 +++++++++++++++++++++------------------------- | ||
17 | 1 file changed, 21 insertions(+), 25 deletions(-) | ||
18 | |||
19 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
20 | index 3b0b87c..41ddf58 100644 | ||
21 | --- a/CMakeLists.txt | ||
22 | +++ b/CMakeLists.txt | ||
23 | @@ -1,3 +1,5 @@ | ||
24 | +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) | ||
25 | + | ||
26 | # Project | ||
27 | project(libftdi1 C) | ||
28 | set(MAJOR_VERSION 1) | ||
29 | @@ -12,7 +14,6 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "") | ||
30 | set(CMAKE_BUILD_TYPE RelWithDebInfo) | ||
31 | endif("${CMAKE_BUILD_TYPE}" STREQUAL "") | ||
32 | set(CMAKE_COLOR_MAKEFILE ON) | ||
33 | -cmake_minimum_required(VERSION 2.6 FATAL_ERROR) | ||
34 | |||
35 | add_definitions(-Wall) | ||
36 | |||
37 | @@ -202,30 +203,25 @@ set ( LIBFTDI_VERSION_MINOR ${MINOR_VERSION} ) | ||
38 | |||
39 | set ( LIBFTDI_USE_FILE ${CMAKE_INSTALL_PREFIX}/${LIBFTDI_CMAKE_CONFIG_DIR}/UseLibFTDI1.cmake ) | ||
40 | |||
41 | -if(CMAKE_VERSION VERSION_LESS 2.8.8) | ||
42 | - configure_file ( cmake/LibFTDI1Config.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake @ONLY ) | ||
43 | - configure_file ( cmake/LibFTDI1ConfigVersion.cmake.in ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1ConfigVersion.cmake @ONLY ) | ||
44 | -else () | ||
45 | - include(CMakePackageConfigHelpers) | ||
46 | - | ||
47 | - configure_package_config_file ( | ||
48 | - cmake/LibFTDI1Config.cmake.in | ||
49 | - ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake | ||
50 | - INSTALL_DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR} | ||
51 | - PATH_VARS | ||
52 | - LIBFTDI_USE_FILE | ||
53 | - LIBFTDI_ROOT_DIR | ||
54 | - LIBFTDI_INCLUDE_DIR | ||
55 | - LIBFTDI_INCLUDE_DIRS | ||
56 | - LIBFTDI_LIBRARY_DIRS | ||
57 | - NO_CHECK_REQUIRED_COMPONENTS_MACRO | ||
58 | - ) | ||
59 | - write_basic_package_version_file ( | ||
60 | - LibFTDI1ConfigVersion.cmake | ||
61 | - VERSION ${LIBFTDI_VERSION_STRING} | ||
62 | - COMPATIBILITY AnyNewerVersion | ||
63 | - ) | ||
64 | -endif () | ||
65 | +include(CMakePackageConfigHelpers) | ||
66 | + | ||
67 | +configure_package_config_file ( | ||
68 | + cmake/LibFTDI1Config.cmake.in | ||
69 | + ${CMAKE_CURRENT_BINARY_DIR}/LibFTDI1Config.cmake | ||
70 | + INSTALL_DESTINATION ${LIBFTDI_CMAKE_CONFIG_DIR} | ||
71 | + PATH_VARS | ||
72 | + LIBFTDI_USE_FILE | ||
73 | + LIBFTDI_ROOT_DIR | ||
74 | + LIBFTDI_INCLUDE_DIR | ||
75 | + LIBFTDI_INCLUDE_DIRS | ||
76 | + LIBFTDI_LIBRARY_DIRS | ||
77 | + NO_CHECK_REQUIRED_COMPONENTS_MACRO | ||
78 | +) | ||
79 | +write_basic_package_version_file ( | ||
80 | + LibFTDI1ConfigVersion.cmake | ||
81 | + VERSION ${LIBFTDI_VERSION_STRING} | ||
82 | + COMPATIBILITY AnyNewerVersion | ||
83 | +) | ||
84 | |||
85 | |||
86 | install ( FILES | ||
diff --git a/meta-oe/recipes-support/libftdi/files/0002-CMake-require-2.8.12-for-cmake_example.patch b/meta-oe/recipes-support/libftdi/files/0002-CMake-require-2.8.12-for-cmake_example.patch new file mode 100644 index 0000000000..a31a67df88 --- /dev/null +++ b/meta-oe/recipes-support/libftdi/files/0002-CMake-require-2.8.12-for-cmake_example.patch | |||
@@ -0,0 +1,24 @@ | |||
1 | From 579c08ec00d7cfd72071a86c67fb3b3c5fec5a9e Mon Sep 17 00:00:00 2001 | ||
2 | From: Yegor Yefremov <yegorslists@googlemail.com> | ||
3 | Date: Thu, 31 Aug 2023 09:23:29 +0200 | ||
4 | Subject: [PATCH] CMake: require 2.8.12 for cmake_example | ||
5 | |||
6 | Make CMake minimal version requirement consistent for the entire | ||
7 | project. | ||
8 | |||
9 | Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de> | ||
10 | Upstream-Status: Backport [61a6bac98bbac623fb33b6153a063b6436f84721] | ||
11 | --- | ||
12 | examples/cmake_example/CMakeLists.txt | 2 +- | ||
13 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
14 | |||
15 | diff --git a/examples/cmake_example/CMakeLists.txt b/examples/cmake_example/CMakeLists.txt | ||
16 | index fe203ed..264752d 100644 | ||
17 | --- a/examples/cmake_example/CMakeLists.txt | ||
18 | +++ b/examples/cmake_example/CMakeLists.txt | ||
19 | @@ -1,4 +1,4 @@ | ||
20 | -cmake_minimum_required ( VERSION 2.8 ) | ||
21 | +cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) | ||
22 | |||
23 | project ( example C ) | ||
24 | |||
diff --git a/meta-oe/recipes-support/libftdi/files/0003-CMake-bump-the-minimal-required-version-to-3.5.patch b/meta-oe/recipes-support/libftdi/files/0003-CMake-bump-the-minimal-required-version-to-3.5.patch new file mode 100644 index 0000000000..b541cb69f4 --- /dev/null +++ b/meta-oe/recipes-support/libftdi/files/0003-CMake-bump-the-minimal-required-version-to-3.5.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | From e6d18a015907b22345bf8994110f68f0609949a9 Mon Sep 17 00:00:00 2001 | ||
2 | From: Yegor Yefremov <yegorslists@googlemail.com> | ||
3 | Date: Tue, 12 Dec 2023 14:20:36 +0100 | ||
4 | Subject: [PATCH] CMake: bump the minimal required version to 3.5 | ||
5 | |||
6 | Older CMake versions are treated as deprecated. | ||
7 | |||
8 | Signed-off-by: Moritz Haase <Moritz.Haase@bmw.de> | ||
9 | Upstream-Status: Backport [de9f01ece34d2fe6e842e0250a38f4b16eda2429] | ||
10 | --- | ||
11 | CMakeLists.txt | 2 +- | ||
12 | examples/cmake_example/CMakeLists.txt | 2 +- | ||
13 | 2 files changed, 2 insertions(+), 2 deletions(-) | ||
14 | |||
15 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
16 | index 41ddf58..c37887b 100644 | ||
17 | --- a/CMakeLists.txt | ||
18 | +++ b/CMakeLists.txt | ||
19 | @@ -1,4 +1,4 @@ | ||
20 | -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) | ||
21 | +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) | ||
22 | |||
23 | # Project | ||
24 | project(libftdi1 C) | ||
25 | diff --git a/examples/cmake_example/CMakeLists.txt b/examples/cmake_example/CMakeLists.txt | ||
26 | index 264752d..cbdd2e4 100644 | ||
27 | --- a/examples/cmake_example/CMakeLists.txt | ||
28 | +++ b/examples/cmake_example/CMakeLists.txt | ||
29 | @@ -1,4 +1,4 @@ | ||
30 | -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) | ||
31 | +cmake_minimum_required(VERSION 3.5 FATAL_ERROR) | ||
32 | |||
33 | project ( example C ) | ||
34 | |||
diff --git a/meta-oe/recipes-support/libftdi/files/CMakeLists-txt-fix-paths-when-FTDIPP-is-set.patch b/meta-oe/recipes-support/libftdi/files/CMakeLists-txt-fix-paths-when-FTDIPP-is-set.patch new file mode 100644 index 0000000000..b2735f8059 --- /dev/null +++ b/meta-oe/recipes-support/libftdi/files/CMakeLists-txt-fix-paths-when-FTDIPP-is-set.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From cdb28383402d248dbc6062f4391b038375c52385 Mon Sep 17 00:00:00 2001 | ||
2 | From: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
3 | Date: Fri, 17 Jul 2020 21:25:03 +0200 | ||
4 | Subject: [PATCH] CMakeLists.txt: fix paths when FTDIPP is set | ||
5 | |||
6 | Use the same project name (i.e. libftdi1 and not libftdipp1) when FTDIPP | ||
7 | is enabled as suggested by Aurelien Jarno in | ||
8 | http://developer.intra2net.com/mailarchive/html/libftdi/2020/msg00044.html | ||
9 | |||
10 | Without this change, the libftdi1.pc config file defines the include | ||
11 | path as /usr/local/include/libftdipp1 while the ftdi.h file is actually | ||
12 | installed in /usr/local/include/libftdi1 | ||
13 | |||
14 | This is an issue for example for libsigrok which will fail on: | ||
15 | |||
16 | In file included from src/hardware/asix-sigma/protocol.c:27: | ||
17 | src/hardware/asix-sigma/protocol.h:28:10: fatal error: ftdi.h: No such file or directory | ||
18 | 28 | #include <ftdi.h> | ||
19 | | ^~~~~~~~ | ||
20 | |||
21 | Fixes: | ||
22 | - http://autobuild.buildroot.org/results/1427f44e36752c337791597fab47a1889552a2fe | ||
23 | |||
24 | Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> | ||
25 | Upstream-Status: Backport [http://developer.intra2net.com/git/?p=libftdi;a=patch;h=cdb28383402d248dbc6062f4391b038375c52385] | ||
26 | --- | ||
27 | CMakeLists.txt | 2 +- | ||
28 | 1 files changed, 1 insertions(+), 1 deletions(-) | ||
29 | |||
30 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
31 | index 5aecafc..3b0b87c 100644 | ||
32 | --- a/CMakeLists.txt | ||
33 | +++ b/CMakeLists.txt | ||
34 | @@ -136,7 +136,7 @@ endif () | ||
35 | |||
36 | add_subdirectory(src) | ||
37 | if ( FTDIPP ) | ||
38 | - project(libftdipp1 C CXX) | ||
39 | + project(libftdi1 C CXX) | ||
40 | add_subdirectory(ftdipp) | ||
41 | endif () | ||
42 | if ( PYTHON_BINDINGS ) | ||
43 | -- | ||
44 | 1.7.1 | ||
45 | |||