package/libftdi1: fix static building
PATCH 1/1 package/libftdi1: fix static building
From: Yegor Yefremov <[email protected]>
Restore the following patch, as the upstream still cannot produce static only libraries:
0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
Fixes:
https://autobuild.buildroot.org/results/07744b67b53d2b25e78e0f61b511a342677e2abb/
--- ...andard-CMake-flag-to-drive-the-share.patch | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +93 -0
@@ -0,0 +1,93 @@ +From b0ea5773c90e36654da37562a03e62d9a66575bf Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]> +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 <[email protected]> +[Fabrice: update for 1.5] +Signed-off-by: Fabrice Fontaine <[email protected]> +--- + 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 360a831..df88569 100644 +--- a/ftdipp/CMakeLists.txt ++++ b/ftdipp/CMakeLists.txt +@@ -11,7 +11,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) +@@ -28,18 +28,6 @@ install ( TARGETS ftdipp1 + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + +-# 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 ${CMAKE_INSTALL_LIBDIR} +- COMPONENT staticlibs +- ) +-endif () +- + install ( FILES ${cpp_headers} + DESTINATION include/${PROJECT_NAME} + COMPONENT headers +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e145af1..ca7efa4 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 ${CMAKE_INSTALL_LIBDIR} + ) + +-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 ${CMAKE_INSTALL_LIBDIR} +- COMPONENT staticlibs +- ) +-endif () +- + install ( FILES ${c_headers} + DESTINATION include/${PROJECT_NAME} + COMPONENT headers +-- +2.34.1 +
Signature · 6 lines
2.34.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Yegor, All,
Le 02/06/2025 à 12:14, [email protected] a écrit :
Quoted 25 lines
From: Yegor Yefremov <[email protected]>
Restore the following patch, as the upstream still cannot produce static only libraries:
0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
Fixes:
https://autobuild.buildroot.org/results/07744b67b53d2b25e78e0f61b511a342677e2abb/
Signed-off-by Yegor Yefremov <[email protected]>--- ...andard-CMake-flag-to-drive-the-share.patch | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patchpackage/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +2
-0@@ -0,0 +1,93 @@ +From b0ea5773c90e36654da37562a03e62d9a66575bf Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]>
package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch line 12
Quoted 10 lines
package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +10
-0+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 <[email protected]> +[Fabrice: update for 1.5] +Signed-off-by: Fabrice Fontaine <[email protected]>
check-package warn due to missing Upstream: tag.
WARNING:package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch:0:
missing Upstream in the header
What's the upstream status of this patch? not applicable?
Best regards,
Romain
Quoted 71 lines
package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +71
-0+--- + 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 360a831..df88569 100644 +--- a/ftdipp/CMakeLists.txt ++++ b/ftdipp/CMakeLists.txt +@@ -11,7 +11,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) +@@ -28,18 +28,6 @@ install ( TARGETS ftdipp1 + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) + +-# 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 ${CMAKE_INSTALL_LIBDIR} +- COMPONENT staticlibs +- ) +-endif () +- + install ( FILES ${cpp_headers} + DESTINATION include/${PROJECT_NAME} + COMPONENT headers +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index e145af1..ca7efa4 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 ${CMAKE_INSTALL_LIBDIR} + ) + +-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 ${CMAKE_INSTALL_LIBDIR}
package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch line 93
Quoted 10 lines
package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +10
-0+- COMPONENT staticlibs +- ) +-endif () +- + install ( FILES ${c_headers} + DESTINATION include/${PROJECT_NAME} + COMPONENT headers +-- +2.34.1 +
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hi Romain,
Quoted 42 lines · Romain Naour
Hello Yegor, All,
Quoted 25 lines · Le 02/06/2025 à 12:14, [email protected] a écrit :
From: Yegor Yefremov <[email protected]>
Restore the following patch, as the upstream still cannot produce static only libraries:
0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
Fixes:
https://autobuild.buildroot.org/results/07744b67b53d2b25e78e0f61b511a342677e2abb/
Signed-off-by Yegor Yefremov <[email protected]>--- ...andard-CMake-flag-to-drive-the-share.patch | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patchpackage/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +2
-0@@ -0,0 +1,93 @@ +From b0ea5773c90e36654da37562a03e62d9a66575bf Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]>package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch line 12
Quoted 10 lines
package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +10
-0+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 <[email protected]> +[Fabrice: update for 1.5] +Signed-off-by: Fabrice Fontaine <[email protected]>check-package warn due to missing Upstream: tag.
Quoted 5 lines
WARNING:
package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch:0:
missing Upstream in the headerWhat's the upstream status of this patch? not applicable?
Upstream has now a proper solution [1] and I am waiting for a release. So, we can drop the patch for now.
[1] http://developer.intra2net.com/git/?p=libftdi;a=commit;h=2a992306c0acf938b29fa0cd5fbc160e24424209
Yegor
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Yegor,
Le 10/08/2025 à 22:42, Yegor Yefremov a écrit :
Quoted 45 lines
Hi Romain,
Quoted 42 lines · Romain Naour
Hello Yegor, All,
Quoted 25 lines · Le 02/06/2025 à 12:14, [email protected] a écrit :
From: Yegor Yefremov <[email protected]>
Restore the following patch, as the upstream still cannot produce static only libraries:
0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch
Fixes:
https://autobuild.buildroot.org/results/07744b67b53d2b25e78e0f61b511a342677e2abb/
Signed-off-by Yegor Yefremov <[email protected]>--- ...andard-CMake-flag-to-drive-the-share.patch | 93 +++++++++++++++++++ 1 file changed, 93 insertions(+) create mode 100644 package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patchpackage/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +2
-0@@ -0,0 +1,93 @@ +From b0ea5773c90e36654da37562a03e62d9a66575bf Mon Sep 17 00:00:00 2001 +From: Samuel Martin <[email protected]>package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch line 12
Quoted 10 lines
package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch new file +10
-0+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 <[email protected]> +[Fabrice: update for 1.5] +Signed-off-by: Fabrice Fontaine <[email protected]>check-package warn due to missing Upstream: tag.
Quoted 8 lines
Quoted 5 lines
WARNING:
package/libftdi1/0001-cmake-use-the-standard-CMake-flag-to-drive-the-share.patch:0:
missing Upstream in the headerWhat's the upstream status of this patch? not applicable?
Upstream has now a proper solution [1] and I am waiting for a release. So, we can drop the patch for now.
Nice, thanks for the feed-back!
I'll mark this patch as "superseded" since we are expecting an upcoming release.
Best regards,
Romain
Quoted 4 lines
[1] http://developer.intra2net.com/git/?p=libftdi;a=commit;h=2a992306c0acf938b29fa0cd5fbc160e24424209
Yegor
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot