diff --git a/recipes/paho-mqtt-c/all/conandata.yml b/recipes/paho-mqtt-c/all/conandata.yml index 3cbc11b2a30de..97257e57f3eab 100644 --- a/recipes/paho-mqtt-c/all/conandata.yml +++ b/recipes/paho-mqtt-c/all/conandata.yml @@ -23,12 +23,6 @@ sources: "1.3.4": url: "https://github.com/eclipse/paho.mqtt.c/archive/v1.3.4.tar.gz" sha256: "1ae9b657b693254ed0710350df3dcf5232d1f479409a52861b5e5bb5cc3da046" - "1.3.1": - url: "https://github.com/eclipse/paho.mqtt.c/archive/v1.3.1.tar.gz" - sha256: "7b4eed66ae3df3613629139c0df28b16abfa4e0927bd17360027d936784aa55e" - "1.3.0": - url: "https://github.com/eclipse/paho.mqtt.c/archive/v1.3.0.tar.gz" - sha256: "87cf846b02dde6328b84832287d8725d91f12f41366eecb4d59eeda1d6c7efdf" patches: "1.3.9": - patch_file: "patches/0003-allow-static-windows-runtimes.patch" @@ -50,17 +44,3 @@ patches: - patch_file: "patches/0002-fix-MinGW-and-OSX-builds-for-1-3-4.patch" patch_description: "disable cpack, link win32 libs more, source patches for MinGW/OSX" patch_type: "conan" - "1.3.1": - - patch_file: "patches/0002-fix-MinGW-and-OSX-builds-for-1-3-1.patch" - patch_description: "disable cpack, link win32 libs more, source patches for MinGW/OSX" - patch_type: "conan" - - patch_file: "patches/0004-fix-cmake-find-openssl.patch" - patch_description: "use cci openssl" - patch_type: "conan" - "1.3.0": - - patch_file: "patches/0001-fix-MinGW-and-OSX-builds-for-1-3-0.patch" - patch_description: "disable cpack, link win32 libs more, source patches for MinGW/OSX" - patch_type: "conan" - - patch_file: "patches/0004-fix-cmake-find-openssl.patch" - patch_description: "use cci openssl" - patch_type: "conan" diff --git a/recipes/paho-mqtt-c/all/conanfile.py b/recipes/paho-mqtt-c/all/conanfile.py index 5979cabf16f7d..7af37a8f2229f 100644 --- a/recipes/paho-mqtt-c/all/conanfile.py +++ b/recipes/paho-mqtt-c/all/conanfile.py @@ -1,12 +1,11 @@ from conan import ConanFile -from conan.errors import ConanInvalidConfiguration -from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, replace_in_file -from conan.tools.scm import Version from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout +from conan.tools.files import apply_conandata_patches, export_conandata_patches, get, copy, rm, replace_in_file import os required_conan_version = ">=1.53.0" + class PahoMqttcConan(ConanFile): name = "paho-mqtt-c" description = "Eclipse Paho MQTT C client library for Linux, Windows and MacOS" @@ -31,10 +30,6 @@ class PahoMqttcConan(ConanFile): "high_performance": False, } - @property - def _has_high_performance_option(self): - return Version(self.version) >= "1.3.2" - def export_sources(self): export_conandata_patches(self) @@ -42,9 +37,6 @@ def config_options(self): if self.settings.os == "Windows": del self.options.fPIC - if not self._has_high_performance_option: - del self.options.high_performance - def configure(self): if self.options.shared: self.options.rm_safe("fPIC") @@ -57,11 +49,7 @@ def layout(self): def requirements(self): if self.options.ssl: # Headers are exposed https://github.com/eclipse/paho.mqtt.c/blob/f7799da95e347bbc930b201b52a1173ebbad45a7/src/SSLSocket.h#L29 - self.requires("openssl/1.1.1t", transitive_headers=True) - - def validate(self): - if not self.options.shared and Version(self.version) < "1.3.4": - raise ConanInvalidConfiguration(f"{self.ref} does not support static linking") + self.requires("openssl/[>=1.1 <4]", transitive_headers=True) def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) @@ -80,8 +68,7 @@ def generate(self): if self.options.ssl: tc.cache_variables["OPENSSL_SEARCH_PATH"] = self.dependencies["openssl"].package_folder.replace("\\", "/") tc.cache_variables["OPENSSL_ROOT_DIR"] = self.dependencies["openssl"].package_folder.replace("\\", "/") - if self._has_high_performance_option: - tc.variables["PAHO_HIGH_PERFORMANCE"] = self.options.high_performance + tc.variables["PAHO_HIGH_PERFORMANCE"] = self.options.high_performance tc.cache_variables["CMAKE_POLICY_DEFAULT_CMP0042"] = "NEW" tc.generate() @@ -119,27 +106,25 @@ def package(self): rm(self, "*.cmake", os.path.join(self.package_folder, "lib")) def package_info(self): - self.cpp_info.components["_paho-mqtt-c"].libs = [self._lib_target] - self.cpp_info.set_property("cmake_file_name", "eclipse-paho-mqtt-c") + self.cpp_info.set_property("cmake_target_name", f"eclipse-paho-mqtt-c::{self._cmake_target}") - self.cpp_info.components["_paho-mqtt-c"].set_property("cmake_target_name", f"eclipse-paho-mqtt-c::{self._cmake_target}") - + # TODO: back to global scope in conan v2 + self.cpp_info.components["_paho-mqtt-c"].libs = [self._lib_target] if self.settings.os == "Windows": if not self.options.shared: self.cpp_info.components["_paho-mqtt-c"].system_libs.append("ws2_32") if self.settings.compiler == "gcc": self.cpp_info.components["_paho-mqtt-c"].system_libs.extend( ["wsock32", "uuid", "crypt32", "rpcrt4"]) + elif self.settings.os == "Linux": + self.cpp_info.components["_paho-mqtt-c"].system_libs.extend(["anl", "c", "dl", "pthread"]) + elif self.settings.os == "FreeBSD": + self.cpp_info.components["_paho-mqtt-c"].system_libs.extend(["compat", "pthread"]) + elif self.settings.os == "Android": + self.cpp_info.components["_paho-mqtt-c"].system_libs.extend(["c"]) else: - if self.settings.os == "Linux": - self.cpp_info.components["_paho-mqtt-c"].system_libs.extend(["c", "dl", "pthread"]) - elif self.settings.os == "FreeBSD": - self.cpp_info.components["_paho-mqtt-c"].system_libs.extend(["compat", "pthread"]) - elif self.settings.os == "Android": - self.cpp_info.components["_paho-mqtt-c"].system_libs.extend(["c"]) - else: - self.cpp_info.components["_paho-mqtt-c"].system_libs.extend(["c", "pthread"]) + self.cpp_info.components["_paho-mqtt-c"].system_libs.extend(["c", "pthread"]) if self.options.ssl: self.cpp_info.components["_paho-mqtt-c"].requires = ["openssl::openssl"] @@ -149,6 +134,7 @@ def package_info(self): self.cpp_info.names["cmake_find_package_multi"] = "eclipse-paho-mqtt-c" self.cpp_info.components["_paho-mqtt-c"].names["cmake_find_package"] = self._cmake_target self.cpp_info.components["_paho-mqtt-c"].names["cmake_find_package_multi"] = self._cmake_target + self.cpp_info.components["_paho-mqtt-c"].set_property("cmake_target_name", f"eclipse-paho-mqtt-c::{self._cmake_target}") @property def _epl_file(self): @@ -172,6 +158,6 @@ def _lib_target(self): target += "s" if not self.options.shared: # https://github.com/eclipse/paho.mqtt.c/blob/317fb008e1541838d1c29076d2bc5c3e4b6c4f53/src/CMakeLists.txt#L154 - if Version(self.version) < "1.3.2" or self.settings.os == "Windows": + if self.settings.os == "Windows": target += "-static" return target diff --git a/recipes/paho-mqtt-c/all/patches/0001-fix-MinGW-and-OSX-builds-for-1-3-0.patch b/recipes/paho-mqtt-c/all/patches/0001-fix-MinGW-and-OSX-builds-for-1-3-0.patch deleted file mode 100644 index 8b2cf63dd0649..0000000000000 --- a/recipes/paho-mqtt-c/all/patches/0001-fix-MinGW-and-OSX-builds-for-1-3-0.patch +++ /dev/null @@ -1,169 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b53745b..d8787d8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -37,7 +37,7 @@ STRING(TIMESTAMP BUILD_TIMESTAMP UTC) - MESSAGE(STATUS "Timestamp is ${BUILD_TIMESTAMP}") - - IF(WIN32) -- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD) -+ ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN) - ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - ADD_DEFINITIONS(-DOSX) - ENDIF() -@@ -61,34 +61,6 @@ IF(PAHO_BUILD_DOCUMENTATION) - ADD_SUBDIRECTORY(doc) - ENDIF() - --IF (PAHO_ENABLE_CPACK) -- ### packaging settings -- FILE(GLOB samples "src/samples/*.c") -- INSTALL(FILES ${samples} DESTINATION samples) -- -- SET(CPACK_PACKAGE_VENDOR "Eclipse Paho") -- SET(CPACK_PACKAGE_NAME "Eclipse-Paho-MQTT-C") -- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) -- -- IF (WIN32) -- SET(CPACK_GENERATOR "ZIP") -- ELSEIF(PAHO_BUILD_DEB_PACKAGE) -- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) -- -- SET(CPACK_GENERATOR "DEB") -- CONFIGURE_FILE(${CMAKE_SCRIPTS}/CPackDebConfig.cmake.in -- ${CMAKE_BINARY_DIR}/CPackDebConfig.cmake @ONLY) -- SET(CPACK_PROJECT_CONFIG_FILE ${CMAKE_BINARY_DIR}/CPackDebConfig.cmake) -- ADD_SUBDIRECTORY(debian) -- ELSE() -- SET(CPACK_GENERATOR "TGZ") -- ENDIF() --ELSE() -- FILE(GLOB samples "src/samples/*.c") -- INSTALL(FILES ${samples} DESTINATION ${CMAKE_INSTALL_DOCDIR}) -- --ENDIF() -- - SET(CPACK_PACKAGE_VERSION_MAJOR ${PAHO_VERSION_MAJOR}) - SET(CPACK_PACKAGE_VERSION_MINOR ${PAHO_VERSION_MINOR}) - SET(CPACK_PACKAGE_VERSION_PATCH ${PAHO_VERSION_PATCH}) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index b46eaca..399b37d 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -55,7 +55,7 @@ SET(common_src - ) - - IF (WIN32) -- SET(LIBS_SYSTEM ws2_32) -+ SET(LIBS_SYSTEM ws2_32 rpcrt4 crypt32 wsock32) - ELSEIF (UNIX) - IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - SET(LIBS_SYSTEM c dl pthread) -diff --git a/src/MQTTAsync.c b/src/MQTTAsync.c -index a5813b4..4f209ec 100644 ---- a/src/MQTTAsync.c -+++ b/src/MQTTAsync.c -@@ -205,6 +205,14 @@ START_TIME_TYPE MQTTAsync_start_clock(void) - clock_gettime(CLOCK_MONOTONIC, &start); - return start; - } -+#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 -+#define START_TIME_TYPE struct timeval -+START_TIME_TYPE MQTTAsync_start_clock(void) -+{ -+ static struct timeval start; -+ gettimeofday(&start, NULL); -+ return start; -+} - #else - #define START_TIME_TYPE struct timeval - START_TIME_TYPE MQTTAsync_start_clock(void) -@@ -235,6 +243,16 @@ long MQTTAsync_elapsed(struct timespec start) - ntimersub(now, start, res); - return (res.tv_sec)*1000L + (res.tv_nsec)/1000000L; - } -+#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 -+ -+long MQTTAsync_elapsed(struct timeval start) -+{ -+ struct timeval now, res; -+ -+ gettimeofday(&now, NULL); -+ timersub(&now, &start, &res); -+ return (res.tv_sec)*1000 + (res.tv_usec)/1000; -+} - #else - long MQTTAsync_elapsed(struct timeval start) - { -diff --git a/src/MQTTClient.c b/src/MQTTClient.c -index 2069ff9..faee1ae 100644 ---- a/src/MQTTClient.c -+++ b/src/MQTTClient.c -@@ -258,6 +258,14 @@ START_TIME_TYPE MQTTClient_start_clock(void) - clock_gettime(CLOCK_MONOTONIC, &start); - return start; - } -+#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 -+#define START_TIME_TYPE struct timeval -+START_TIME_TYPE MQTTClient_start_clock(void) -+{ -+ static struct timeval start; -+ gettimeofday(&start, NULL); -+ return start; -+} - #else - #define START_TIME_TYPE struct timeval - START_TIME_TYPE MQTTClient_start_clock(void) -@@ -288,6 +296,15 @@ long MQTTClient_elapsed(struct timespec start) - ntimersub(now, start, res); - return (res.tv_sec)*1000L + (res.tv_nsec)/1000000L; - } -+#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 -+long MQTTClient_elapsed(struct timeval start) -+{ -+ struct timeval now, res; -+ -+ gettimeofday(&now, NULL); -+ timersub(&now, &start, &res); -+ return (res.tv_sec)*1000 + (res.tv_usec)/1000; -+} - #else - long MQTTClient_elapsed(struct timeval start) - { -diff --git a/src/Thread.c b/src/Thread.c -index 4cb2f16..40ce8dc 100644 ---- a/src/Thread.c -+++ b/src/Thread.c -@@ -409,9 +409,16 @@ int Thread_wait_cond(cond_type condvar, int timeout) - struct timespec cond_timeout; - - FUNC_ENTRY; -+#if defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 -+ struct timeval cur_time; -+ gettimeofday(&cur_time, NULL); -+ cond_timeout.tv_sec = cur_time.tv_sec + timeout; -+ cond_timeout.tv_nsec = cur_time.tv_usec * 1000; -+#else - clock_gettime(CLOCK_REALTIME, &cond_timeout); - - cond_timeout.tv_sec += timeout; -+#endif - pthread_mutex_lock(&condvar->mutex); - rc = pthread_cond_timedwait(&condvar->cond, &condvar->mutex, &cond_timeout); - pthread_mutex_unlock(&condvar->mutex); -diff --git a/src/WebSocket.c b/src/WebSocket.c -index 47b1dad..3f96dac 100644 ---- a/src/WebSocket.c -+++ b/src/WebSocket.c -@@ -28,6 +28,11 @@ - #include "MQTTProtocolOut.h" - #include "StackTrace.h" - -+#ifdef __MINGW32__ -+#define htonll __builtin_bswap64 -+#define ntohll __builtin_bswap64 -+#endif -+ - #if defined(__linux__) - # include - #elif defined(__APPLE__) diff --git a/recipes/paho-mqtt-c/all/patches/0002-fix-MinGW-and-OSX-builds-for-1-3-1.patch b/recipes/paho-mqtt-c/all/patches/0002-fix-MinGW-and-OSX-builds-for-1-3-1.patch deleted file mode 100644 index 5ffa0a2a42da0..0000000000000 --- a/recipes/paho-mqtt-c/all/patches/0002-fix-MinGW-and-OSX-builds-for-1-3-1.patch +++ /dev/null @@ -1,169 +0,0 @@ -diff --git a/CMakeLists.txt b/CMakeLists.txt -index b53745b..d8787d8 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -37,7 +37,7 @@ STRING(TIMESTAMP BUILD_TIMESTAMP UTC) - MESSAGE(STATUS "Timestamp is ${BUILD_TIMESTAMP}") - - IF(WIN32) -- ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD) -+ ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN) - ELSEIF(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") - ADD_DEFINITIONS(-DOSX) - ENDIF() -@@ -61,34 +61,6 @@ IF(PAHO_BUILD_DOCUMENTATION) - ADD_SUBDIRECTORY(doc) - ENDIF() - --IF (PAHO_ENABLE_CPACK) -- ### packaging settings -- FILE(GLOB samples "src/samples/*.c") -- INSTALL(FILES ${samples} DESTINATION samples) -- -- SET(CPACK_PACKAGE_VENDOR "Eclipse Paho") -- SET(CPACK_PACKAGE_NAME "Eclipse-Paho-MQTT-C") -- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) -- -- IF (WIN32) -- SET(CPACK_GENERATOR "ZIP") -- ELSEIF(PAHO_BUILD_DEB_PACKAGE) -- INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) -- -- SET(CPACK_GENERATOR "DEB") -- CONFIGURE_FILE(${CMAKE_SCRIPTS}/CPackDebConfig.cmake.in -- ${CMAKE_BINARY_DIR}/CPackDebConfig.cmake @ONLY) -- SET(CPACK_PROJECT_CONFIG_FILE ${CMAKE_BINARY_DIR}/CPackDebConfig.cmake) -- ADD_SUBDIRECTORY(debian) -- ELSE() -- SET(CPACK_GENERATOR "TGZ") -- ENDIF() --ELSE() -- FILE(GLOB samples "src/samples/*.c") -- INSTALL(FILES ${samples} DESTINATION ${CMAKE_INSTALL_DOCDIR}) -- --ENDIF() -- - SET(CPACK_PACKAGE_VERSION_MAJOR ${PAHO_VERSION_MAJOR}) - SET(CPACK_PACKAGE_VERSION_MINOR ${PAHO_VERSION_MINOR}) - SET(CPACK_PACKAGE_VERSION_PATCH ${PAHO_VERSION_PATCH}) -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index b46eaca..399b37d 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -55,7 +55,7 @@ SET(common_src - ) - - IF (WIN32) -- SET(LIBS_SYSTEM ws2_32) -+ SET(LIBS_SYSTEM ws2_32 rpcrt4 crypt32 wsock32) - ELSEIF (UNIX) - IF(CMAKE_SYSTEM_NAME MATCHES "Linux") - SET(LIBS_SYSTEM c dl pthread) -diff --git a/src/MQTTAsync.c b/src/MQTTAsync.c -index a5813b4..4f209ec 100644 ---- a/src/MQTTAsync.c -+++ b/src/MQTTAsync.c -@@ -205,6 +205,14 @@ START_TIME_TYPE MQTTAsync_start_clock(void) - clock_gettime(CLOCK_MONOTONIC, &start); - return start; - } -+#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 -+#define START_TIME_TYPE struct timeval -+START_TIME_TYPE MQTTAsync_start_clock(void) -+{ -+ static struct timeval start; -+ gettimeofday(&start, NULL); -+ return start; -+} - #else - #define START_TIME_TYPE struct timeval - START_TIME_TYPE MQTTAsync_start_clock(void) -@@ -255,6 +263,16 @@ long MQTTAsync_elapsed(struct timespec start) - ntimersub(now, start, res); - return (res.tv_sec)*1000L + (res.tv_nsec)/1000000L; - } -+#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 -+ -+long MQTTAsync_elapsed(struct timeval start) -+{ -+ struct timeval now, res; -+ -+ gettimeofday(&now, NULL); -+ timersub(&now, &start, &res); -+ return (res.tv_sec)*1000 + (res.tv_usec)/1000; -+} - #else - long MQTTAsync_elapsed(struct timeval start) - { -diff --git a/src/MQTTClient.c b/src/MQTTClient.c -index 2069ff9..faee1ae 100644 ---- a/src/MQTTClient.c -+++ b/src/MQTTClient.c -@@ -258,6 +258,14 @@ START_TIME_TYPE MQTTClient_start_clock(void) - clock_gettime(CLOCK_MONOTONIC, &start); - return start; - } -+#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 -+#define START_TIME_TYPE struct timeval -+START_TIME_TYPE MQTTClient_start_clock(void) -+{ -+ static struct timeval start; -+ gettimeofday(&start, NULL); -+ return start; -+} - #else - #define START_TIME_TYPE struct timeval - START_TIME_TYPE MQTTClient_start_clock(void) -@@ -288,6 +296,15 @@ long MQTTClient_elapsed(struct timespec start) - ntimersub(now, start, res); - return (res.tv_sec)*1000L + (res.tv_nsec)/1000000L; - } -+#elif defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 -+long MQTTClient_elapsed(struct timeval start) -+{ -+ struct timeval now, res; -+ -+ gettimeofday(&now, NULL); -+ timersub(&now, &start, &res); -+ return (res.tv_sec)*1000 + (res.tv_usec)/1000; -+} - #else - long MQTTClient_elapsed(struct timeval start) - { -diff --git a/src/Thread.c b/src/Thread.c -index 4cb2f16..40ce8dc 100644 ---- a/src/Thread.c -+++ b/src/Thread.c -@@ -411,9 +411,16 @@ int Thread_wait_cond(cond_type condvar, int timeout) - struct timespec cond_timeout; - - FUNC_ENTRY; -+#if defined(__APPLE__) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200 -+ struct timeval cur_time; -+ gettimeofday(&cur_time, NULL); -+ cond_timeout.tv_sec = cur_time.tv_sec + timeout; -+ cond_timeout.tv_nsec = cur_time.tv_usec * 1000; -+#else - clock_gettime(CLOCK_REALTIME, &cond_timeout); - - cond_timeout.tv_sec += timeout; -+#endif - pthread_mutex_lock(&condvar->mutex); - rc = pthread_cond_timedwait(&condvar->cond, &condvar->mutex, &cond_timeout); - pthread_mutex_unlock(&condvar->mutex); -diff --git a/src/WebSocket.c b/src/WebSocket.c -index 47b1dad..3f96dac 100644 ---- a/src/WebSocket.c -+++ b/src/WebSocket.c -@@ -29,6 +28,11 @@ - #include "SocketBuffer.h" - #include "StackTrace.h" - -+#ifdef __MINGW32__ -+#define htonll __builtin_bswap64 -+#define ntohll __builtin_bswap64 -+#endif -+ - #if defined(__linux__) - # include - #elif defined(__APPLE__) diff --git a/recipes/paho-mqtt-c/all/patches/0004-fix-cmake-find-openssl.patch b/recipes/paho-mqtt-c/all/patches/0004-fix-cmake-find-openssl.patch deleted file mode 100644 index 54de70390b304..0000000000000 --- a/recipes/paho-mqtt-c/all/patches/0004-fix-cmake-find-openssl.patch +++ /dev/null @@ -1,47 +0,0 @@ -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index 399b37d..55fee4f 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -108,29 +108,10 @@ INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h MQTTProperties.h - IF (PAHO_WITH_SSL) - SET(OPENSSL_SEARCH_PATH "" CACHE PATH "Directory containing OpenSSL libraries and includes") - -- IF (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") -- SET(OPENSSL_SEARCH_PATH "/usr/local/opt/openssl") -- ENDIF (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") -- -- IF (WIN32) -- SET(OPENSSL_SEARCH_PATH "C:/OpenSSL-Win64") -- SET(OPENSSL_SEARCH_LIB_PATH "${OPENSSL_SEARCH_PATH}/lib64") -- IF (DEFINED ENV{PAHO_WINDOWS_BUILD_BIT}) -- IF ($ENV{PAHO_WINDOWS_BUILD_BIT} STREQUAL "x86") -- SET(OPENSSL_SEARCH_PATH "C:/OpenSSL-Win32") -- SET(OPENSSL_SEARCH_LIB_PATH "${OPENSSL_SEARCH_PATH}/lib32") -- ENDIF () -- ENDIF () -- ELSE() -- SET(OPENSSL_SEARCH_LIB_PATH "${OPENSSL_SEARCH_PATH}/lib64") -- ENDIF () -- -- FIND_PATH(OPENSSL_INCLUDE_DIR openssl/ssl.h -- HINTS ${OPENSSL_SEARCH_PATH}/include) -- FIND_LIBRARY(OPENSSL_LIB NAMES ssl libssl ssleay32 -- HINTS ${OPENSSL_SEARCH_PATH}/lib ${OPENSSL_SEARCH_LIB_PATH}) -- FIND_LIBRARY(OPENSSLCRYPTO_LIB NAMES crypto libcrypto libeay32 -- HINTS ${OPENSSL_SEARCH_PATH}/lib ${OPENSSL_SEARCH_LIB_PATH}) -+ find_package(OpenSSL REQUIRED CONFIG) -+ -+ SET(OPENSSL_LIB ${OPENSSL_SSL_LIBRARY}) -+ SET(OPENSSLCRYPTO_LIB ${OPENSSL_CRYPTO_LIBRARY}) - - MESSAGE(STATUS "OpenSSL hints: ${OPENSSL_SEARCH_PATH}") - MESSAGE(STATUS "OpenSSL headers found at ${OPENSSL_INCLUDE_DIR}") -@@ -151,6 +132,8 @@ IF (PAHO_WITH_SSL) - - TARGET_LINK_LIBRARIES(paho-mqtt3cs ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) - TARGET_LINK_LIBRARIES(paho-mqtt3as ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) -+ target_link_directories(paho-mqtt3cs PRIVATE "${OPENSSL_ROOT_DIR}/lib") -+ target_link_directories(paho-mqtt3as PRIVATE "${OPENSSL_ROOT_DIR}/lib") - SET_TARGET_PROPERTIES( - paho-mqtt3cs paho-mqtt3as PROPERTIES - VERSION ${CLIENT_VERSION} diff --git a/recipes/paho-mqtt-c/config.yml b/recipes/paho-mqtt-c/config.yml index bb19e3738404a..7d5e8aea45866 100644 --- a/recipes/paho-mqtt-c/config.yml +++ b/recipes/paho-mqtt-c/config.yml @@ -15,7 +15,3 @@ versions: folder: "all" "1.3.4": folder: "all" - "1.3.1": - folder: "all" - "1.3.0": - folder: "all"