Repository: conan-io/conan-center-index

Issue:
[package] openssl/[>=1.1.0]: Can't remove deps to zlib
There is no 'no_zlib' option anymore.
openssl now always depends on zlib.
Please remove zlib dependency.
I think this is a regression from #108 

### Package and Environment Details (include every applicable attribute)
  * Package Name/Version: **openssl/[>=1.1.0]**
  * Operating System+version: **Linux Ubuntu 18.04**
  * Compiler+version: **GCC 7**
  * Conan version: **conan 1.24.0**
  * Python version: **Python 3.6.6**


### Conan profile (output of `conan profile show default` or `conan profile show <profile>` if custom profile is in use)
```
[settings]
os=Linux
os_build=Linux
arch=x86_64
arch_build=x86_64
compiler=gcc
compiler.version=7
compiler.libcxx=libstdc++
build_type=Release
[options]
[build_requires]
[env]
```


### Steps to reproduce (Include if Applicable)
```
conan info openssl/1.1.1c@_/_
```


### Logs (Include/Attach if Applicable)
<details><summary>Click to expand log</summary>

```
$ conan info openssl/1.1.1c@_/_
openssl/1.1.1c: Not found in local cache, looking in remotes...
openssl/1.1.1c: Trying with 'conan-center'...
Downloading conanmanifest.txt completed [0.10k]                                          
Downloading conanfile.py completed [30.67k]                                              
Downloading conan_export.tgz completed [0.24k]                                           
Decompressing conan_export.tgz completed [0.00k]                                         
openssl/1.1.1c: Downloaded recipe revision 0
openssl/1.1.1c
    ID: b781af3f476d0aa5070a0a35b544db7a3c193cc8
    BuildID: None
    Remote: conan-center=https://conan.bintray.com
    URL: https://github.com/conan-io/conan-center-index
    Homepage: https://github.com/openssl/openssl
    License: OpenSSL
    Description: A toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols
    Topics: conan, openssl, ssl, tls, encryption, security
    Recipe: Downloaded
    Binary: Download
    Binary remote: conan-center
    Creation date: 2020-03-31 19:56:53
    Requires:
        zlib/1.2.11
zlib/1.2.11
    ID: d50a0d523d98c15bb147b18fa7d203887c38be8b
    BuildID: None
    Remote: conan-center=https://conan.bintray.com
    URL: https://github.com/conan-io/conan-center-index
    Homepage: https://zlib.net
    License: Zlib
    Description: A Massively Spiffy Yet Delicately Unobtrusive Compression Library (Also Free, Not to Mention Unencumbered by Patents)
    Recipe: Cache
    Binary: Cache
    Binary remote: conan-center
    Creation date: 2020-03-13 15:47:51
    Required by:
        openssl/1.1.1c
```

</details>



Discussion:

Resolving patch:
diff --git a/recipes/openssl/all/conanfile.py b/recipes/openssl/all/conanfile.py
--- a/recipes/openssl/all/conanfile.py
+++ b/recipes/openssl/all/conanfile.py
@@ -155,7 +155,7 @@ def config_options(self):
             del self.options.fPIC
 
     def requirements(self):
-        if not self.options.get_safe("no_zlib"):
+        if self.options.get_safe("no_zlib") == False:
             self.requires("zlib/1.2.11")
 
     @property
@@ -425,7 +425,7 @@ def _configure_args(self):
         if self.settings.os == "Neutrino":
             args.append("-lsocket no-asm")
 
-        if not self.options.get_safe("no_zlib"):
+        if self.options.get_safe("no_zlib") == False:
             zlib_info = self.deps_cpp_info["zlib"]
             include_path = zlib_info.include_paths[0]
             if self.settings.os == "Windows":


Test patch:
diff --git a/recipes/openssl/all/test_package/conanfile.py b/recipes/openssl/all/test_package/conanfile.py
--- a/recipes/openssl/all/test_package/conanfile.py
+++ b/recipes/openssl/all/test_package/conanfile.py
@@ -1,4 +1,5 @@
 from conans import CMake, tools, ConanFile
+from conans.tools import Version
 import os
 
 
@@ -11,7 +12,11 @@ def _build_cmake(self, use_find_package):
 
         if self.settings.os == "Android":
             cmake.definitions["CONAN_LIBCXX"] = ""
-        cmake.definitions["OPENSSL_WITH_ZLIB"] = not self.options["openssl"].no_zlib
+        openssl_version = Version(self.deps_cpp_info["openssl"].version)
+        if openssl_version.major == "1" and openssl_version.minor == "1":
+            cmake.definitions["OPENSSL_WITH_ZLIB"] = False
+        else:
+            cmake.definitions["OPENSSL_WITH_ZLIB"] = not self.options["openssl"].no_zlib
         cmake.definitions["USE_FIND_PACKAGE"] = use_find_package
         cmake.definitions["OPENSSL_ROOT_DIR"] = self.deps_cpp_info["openssl"].rootpath
         cmake.definitions["OPENSSL_USE_STATIC_LIBS"] = not self.options["openssl"].shared