Repository: conan-io/conan-center-index

Issue:
ixwebsocket: add 10.2.5 + several improvements
Specify library name and version:  **ixwebsocket/10.2.5**

- [x] I've read the [guidelines](https://github.com/conan-io/conan-center-index/blob/master/docs/how_to_add_packages.md) for contributing.
- [x] I've followed the [PEP8](https://www.python.org/dev/peps/pep-0008/) style guides for Python code in the recipes.
- [x] I've used the [latest](https://github.com/conan-io/conan/releases/latest) Conan client version.
- [x] I've tried at least one configuration locally with the
      [conan-center hook](https://github.com/conan-io/hooks.git) activated.

Others modifications:
- use transparent cmake integration in test_package
- optional zlib for version >= 10.1.5
- don't force PIC for version >= 9.5.7
- add public definitions in cpp_info
- fix system libs on Windows
poco: fix hooks
Specify library name and version:  **poco/all**

- [x] I've read the [guidelines](https://github.com/conan-io/conan-center-index/blob/master/docs/how_to_add_packages.md) for contributing.
- [x] I've followed the [PEP8](https://www.python.org/dev/peps/pep-0008/) style guides for Python code in the recipes.
- [x] I've used the [latest](https://github.com/conan-io/conan/releases/latest) Conan client version.
- [x] I've tried at least one configuration locally with the
      [conan-center hook](https://github.com/conan-io/hooks.git) activated.



Discussion:
All green in build 1 (`f5523272ffd376951e93bcdd40b24fb559fa5ab6`)! :blush:
- `ixwebsocket/7.9.2`: Generated 68 packages. [All logs here](https://c3i.jfrog.io/c3i/misc/logs/pr/2645/1/ixwebsocket/7.9.2/) 
- `ixwebsocket/9.1.9`: Generated 68 packages. [All logs here](https://c3i.jfrog.io/c3i/misc/logs/pr/2645/1/ixwebsocket/9.1.9/) 
- `ixwebsocket/9.6.4`: Generated 68 packages. [All logs here](https://c3i.jfrog.io/c3i/misc/logs/pr/2645/1/ixwebsocket/9.6.4/) 
- `ixwebsocket/10.2.5`: Generated 68 packages. [All logs here](https://c3i.jfrog.io/c3i/misc/logs/pr/2645/1/ixwebsocket/10.2.5/) 

Some configurations of 'poco/1.9.0' failed in build 1 (`9eadbf65a02133b9fbca9de3967ddb756def992a`):
-   **Windows x86_64, Release, Visual Studio 16,  MT. Options:  poco:shared-True**
    - [Log download](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/1/poco/1.9.0/90cd60431cbb3fc316193eba99cec66270f89024/create_stdout.txt)
    - [Log error Download](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/1/poco/1.9.0/90cd60431cbb3fc316193eba99cec66270f89024/create_stderr.txt)
    - [Profile](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/1/poco/1.9.0/90cd60431cbb3fc316193eba99cec66270f89024/profile.txt)
- [Access to all the logs](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/1/poco/1.9.0/)
Some configurations of 'poco/1.9.0' failed in build 2 (`9eadbf65a02133b9fbca9de3967ddb756def992a`):
-   **Windows x86_64, Release, Visual Studio 16,  MT. Options:  poco:shared-True**
    - [Log download](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/2/poco/1.9.0/90cd60431cbb3fc316193eba99cec66270f89024/create_stdout.txt)
    - [Log error Download](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/2/poco/1.9.0/90cd60431cbb3fc316193eba99cec66270f89024/create_stderr.txt)
    - [Profile](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/2/poco/1.9.0/90cd60431cbb3fc316193eba99cec66270f89024/profile.txt)
- [Access to all the logs](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/2/poco/1.9.0/)
-   **Windows x86_64, Debug, Visual Studio 16,  MTd. Options:  poco:shared-True**
    - [Log download](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/2/poco/1.9.0/2a847b2e98fbc07646ef3785f467d5164e299afa/create_stdout.txt)
    - [Log error Download](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/2/poco/1.9.0/2a847b2e98fbc07646ef3785f467d5164e299afa/create_stderr.txt)
    - [Profile](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/2/poco/1.9.0/2a847b2e98fbc07646ef3785f467d5164e299afa/profile.txt)
- [Access to all the logs](https://c3i.jfrog.io/c3i/misc/logs/pr/3098/2/poco/1.9.0/)
@FrozenStormInteractive Poco doesn't support shared + MT. You can drop it for now under configure.

Resolving patch:
diff --git a/recipes/poco/all/conanfile.py b/recipes/poco/all/conanfile.py
--- a/recipes/poco/all/conanfile.py
+++ b/recipes/poco/all/conanfile.py
@@ -54,7 +54,7 @@ class PocoConan(ConanFile):
         "PocoXML": _PocoComponent("enable_xml", True, ("PocoFoundation", ), True),
         "PocoZip": _PocoComponent("enable_zip", True, ("PocoUtil", "PocoXML", ), True),
     }
-    
+
     for comp in _poco_component_tree.values():
         if comp.option:
             options[comp.option] = [True, False]
@@ -108,6 +108,9 @@ def configure(self):
             raise ConanInvalidConfiguration("Apache connector not supported: https://github.com/pocoproject/poco/issues/1764")
         if self.options.enable_data_mysql:
             raise ConanInvalidConfiguration("MySQL not supported yet, open an issue here please: %s" % self.url)
+        if self.settings.compiler == "Visual Studio":
+            if self.options.shared and "MT" in str(self.settings.compiler.runtime):
+                raise ConanInvalidConfiguration("Cannot build shared poco libraries with MT(d) runtime")
         if self.options.get_safe("enable_data_postgresql", False):
             raise ConanInvalidConfiguration("PostgreSQL not supported yet, open an issue here please: %s" % self.url)
         for compopt in self._poco_component_tree.values():
@@ -124,18 +127,18 @@ def requirements(self):
         self.requires("pcre/8.41")
         self.requires("zlib/1.2.11")
         if self.options.enable_xml:
-            self.requires("expat/2.2.9")
+            self.requires("expat/2.2.10")
         if self.options.enable_data_sqlite:
-            self.requires("sqlite3/3.31.1")
+            self.requires("sqlite3/3.33.0")
         if self.options.enable_apacheconnector:
             self.requires("apr/1.7.0")
             self.requires("apr-util/1.6.1")
+            # FIXME: missing apache2 recipe
             raise ConanInvalidConfiguration("apache2 is not (yet) available on CCI")
-            self.requires("apache2/x.y.z")
         if self.options.enable_netssl or \
                 self.options.enable_crypto or \
                 self.options.get_safe("enable_jwt", False):
-            self.requires("openssl/1.1.1g")
+            self.requires("openssl/1.1.1h")
 
     def _patch_sources(self):
         for patch in self.conan_data.get("patches", {}).get(self.version, []):
@@ -194,7 +197,7 @@ def package_info(self):
                  else ("d" if self.settings.build_type == "Debug" else "")
 
         self.cpp_info.libs = list("{}{}".format(lib, suffix) for lib in self._ordered_libs)
-        
+
         if self.settings.os == "Linux":
             self.cpp_info.system_libs.extend(["pthread", "dl", "rt"])
 
@@ -202,7 +205,7 @@ def package_info(self):
             self.cpp_info.defines.append("POCO_NO_AUTOMATIC_LIBS")
         if not self.options.shared:
             self.cpp_info.defines.append("POCO_STATIC=ON")
-            if self.settings.compiler == "Visual Studio":
+            if self.settings.os == "Windows":
                 self.cpp_info.system_libs.extend(["ws2_32", "iphlpapi", "crypt32"])
         self.cpp_info.names["cmake_find_package"] = "Poco"
         self.cpp_info.names["cmake_find_package_multi"] = "Poco"


Test patch:
diff --git a/recipes/poco/all/test_package/CMakeLists.txt b/recipes/poco/all/test_package/CMakeLists.txt
--- a/recipes/poco/all/test_package/CMakeLists.txt
+++ b/recipes/poco/all/test_package/CMakeLists.txt
@@ -1,22 +1,11 @@
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.1)
 project(MyHello)
 
-macro(use_cxx11)
-  if(CMAKE_VERSION VERSION_LESS "3.1")
-    if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
-      set (CMAKE_CXX_FLAGS "--std=gnu++11 ${CMAKE_CXX_FLAGS}")
-    endif()
-  else()
-    set(CMAKE_CXX_STANDARD 11)
-  endif()
-endmacro()
-
-use_cxx11()
-
-
 include(${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
 conan_basic_setup()
 
+set(CMAKE_CXX_STANDARD 11)
+
 add_executable(core test_core.cpp)
 target_link_libraries(core ${CONAN_LIBS})
 
@@ -46,6 +35,9 @@ option(TEST_UTIL "Test Util")
 if(TEST_UTIL)
     add_executable(util test_util.cpp)
     target_link_libraries(util ${CONAN_LIBS})
+    if(MINGW)
+        target_link_options(util PRIVATE -municode)
+    endif()
 endif()
 
 option(TEST_SQLITE "Test Sqlite")