From: Fabrice Fontaine Date: Wed, 2 Oct 2019 16:47:00 +0000 (+0200) Subject: package/libftdi1: drop second patch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1dfed441297f950fdb75a778e8fe13001fa3a8dc;p=buildroot.git package/libftdi1: drop second patch Second patch is not needed anymore as the only, optional, dependency of libusb is udev which can't be built statically Signed-off-by: Fabrice Fontaine Signed-off-by: Thomas Petazzoni --- diff --git a/package/libftdi1/0002-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch b/package/libftdi1/0002-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch new file mode 100644 index 0000000000..be0913de4a --- /dev/null +++ b/package/libftdi1/0002-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch @@ -0,0 +1,46 @@ +From c215d5ecd985b57700e817920d0e99112b4a571b Mon Sep 17 00:00:00 2001 +From: Samuel Martin +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 +--- + 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 + diff --git a/package/libftdi1/0002-cmake-fix-FindUSB1.cmake.patch b/package/libftdi1/0002-cmake-fix-FindUSB1.cmake.patch deleted file mode 100644 index 5619a0ceec..0000000000 --- a/package/libftdi1/0002-cmake-fix-FindUSB1.cmake.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 81275d75ae88fe8ab1915d3ba260ea935e63c362 Mon Sep 17 00:00:00 2001 -From: Samuel Martin -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 ---- - 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 - diff --git a/package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch b/package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch deleted file mode 100644 index be0913de4a..0000000000 --- a/package/libftdi1/0003-cmake-do-not-check-for-g-when-FTDIPP-is-disabled.patch +++ /dev/null @@ -1,46 +0,0 @@ -From c215d5ecd985b57700e817920d0e99112b4a571b Mon Sep 17 00:00:00 2001 -From: Samuel Martin -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 ---- - 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 - diff --git a/package/libftdi1/0003-cmake-find-swig.patch b/package/libftdi1/0003-cmake-find-swig.patch new file mode 100644 index 0000000000..cf787a6806 --- /dev/null +++ b/package/libftdi1/0003-cmake-find-swig.patch @@ -0,0 +1,29 @@ +From fcda9c6a208d3a7fe651ef661b2eb6e462a89c17 Mon Sep 17 00:00:00 2001 +From: Eneas U de Queiroz +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 +[Mark: patch retrieved and updated from +http://developer.intra2net.com/git/?p=libftdi;a=commit;h=fcda9c6a208d3a7fe651ef661b2eb6e462a89c17] +Signed-off-by: Mark Corbin +[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 +--- +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 ) diff --git a/package/libftdi1/0004-cmake-find-swig.patch b/package/libftdi1/0004-cmake-find-swig.patch deleted file mode 100644 index cf787a6806..0000000000 --- a/package/libftdi1/0004-cmake-find-swig.patch +++ /dev/null @@ -1,29 +0,0 @@ -From fcda9c6a208d3a7fe651ef661b2eb6e462a89c17 Mon Sep 17 00:00:00 2001 -From: Eneas U de Queiroz -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 -[Mark: patch retrieved and updated from -http://developer.intra2net.com/git/?p=libftdi;a=commit;h=fcda9c6a208d3a7fe651ef661b2eb6e462a89c17] -Signed-off-by: Mark Corbin -[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 ---- -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 )