diff --git a/recipes/openssl/3.x.x/conanfile.py b/recipes/openssl/3.x.x/conanfile.py index 43d0ab29364c6..aecdf37ffb74f 100644 --- a/recipes/openssl/3.x.x/conanfile.py +++ b/recipes/openssl/3.x.x/conanfile.py @@ -50,6 +50,7 @@ class OpenSSLConan(ConanFile): "no_gost": [True, False], "no_idea": [True, False], "no_legacy": [True, False], + "no_md2": [True, False], "no_md4": [True, False], "no_mdc2": [True, False], "no_ocsp": [True, False], @@ -64,6 +65,7 @@ class OpenSSLConan(ConanFile): "no_sm4": [True, False], "no_srp": [True, False], "no_srtp": [True, False], + "no_sse2": [True, False], "no_ssl": [True, False], "no_stdio": [True, False], "no_seed": [True, False], @@ -152,9 +154,9 @@ def source(self): def _target(self): target = f"conan-{self.settings.build_type}-{self.settings.os}-{self.settings.arch}-{self.settings.compiler}-{self.settings.compiler.version}" if self._use_nmake: - target = "VC-" + target # VC- prefix is important as it's checked by Configure + target = f"VC-{target}" # VC- prefix is important as it's checked by Configure if self._is_mingw: - target = "mingw-" + target + target = f"mingw-{target}" return target @property @@ -480,7 +482,7 @@ def _create_targets(self): targets = "my %targets" includes = ", ".join(['"%s"' % include for include in env_build.include_paths]) if self.settings.os == "Windows": - includes = includes.replace("\\", "/") # OpenSSL doesn't like backslashes + includes = includes.replace("\\", "/") # OpenSSL doesn't like backslashes if self._asm_target: ancestor = '[ "%s", asm("%s") ]' % (self._ancestor_target, self._asm_target) @@ -616,13 +618,13 @@ def _make_program(self): if self._use_nmake: return "nmake" make_program = tools.get_env("CONAN_MAKE_PROGRAM", tools.which("make") or tools.which("mingw32-make")) - make_program = tools.unix_path(make_program) if tools.os_info.is_windows else make_program if not make_program: raise Exception('could not find "make" executable. please set "CONAN_MAKE_PROGRAM" environment variable') + make_program = tools.unix_path(make_program) return make_program def _replace_runtime_in_file(self, filename): - for e in ["MDd", "MTd", "MD", "MT"]: + for e in ("MDd", "MTd", "MD", "MT"): tools.replace_in_file(filename, "/%s " % e, "/%s " % self.settings.compiler.runtime, strict=False) tools.replace_in_file(filename, "/%s\"" % e, "/%s\"" % self.settings.compiler.runtime, strict=False) @@ -714,7 +716,7 @@ def package_info(self): self.cpp_info.components["ssl"].requires = ["crypto"] if not self.options.no_zlib: - self.cpp_info.components["crypto"].requires = ["zlib::zlib"] + self.cpp_info.components["crypto"].requires.append("zlib::zlib") if self.settings.os == "Windows": self.cpp_info.components["crypto"].system_libs.extend(["crypt32", "ws2_32", "advapi32", "user32"]) diff --git a/recipes/openssl/3.x.x/test_package/CMakeLists.txt b/recipes/openssl/3.x.x/test_package/CMakeLists.txt index 997e745799ecc..9d3122f52007b 100644 --- a/recipes/openssl/3.x.x/test_package/CMakeLists.txt +++ b/recipes/openssl/3.x.x/test_package/CMakeLists.txt @@ -6,11 +6,6 @@ conan_basic_setup(TARGETS) option(OPENSSL_WITH_ZLIB "OpenSSL with zlib support" ON) -add_executable(digest digest.c) -if(OPENSSL_WITH_ZLIB) - target_compile_definitions(digest PRIVATE WITH_ZLIB) -endif() - set(OpenSSL_DEBUG 1) find_package(OpenSSL REQUIRED) @@ -23,4 +18,8 @@ message("OPENSSL_SSL_LIBRARIES: ${OPENSSL_SSL_LIBRARIES}") message("OPENSSL_LIBRARIES: ${OPENSSL_LIBRARIES}") message("OPENSSL_VERSION: ${OPENSSL_VERSION}") +add_executable(digest digest.c) +if(OPENSSL_WITH_ZLIB) + target_compile_definitions(digest PRIVATE WITH_ZLIB) +endif() target_link_libraries(digest OpenSSL::Crypto) diff --git a/recipes/openssl/3.x.x/test_package/conanfile.py b/recipes/openssl/3.x.x/test_package/conanfile.py index e453e4f677e03..59bbf829b2953 100644 --- a/recipes/openssl/3.x.x/test_package/conanfile.py +++ b/recipes/openssl/3.x.x/test_package/conanfile.py @@ -8,18 +8,12 @@ class TestPackageConan(ConanFile): def build(self): cmake = CMake(self) - + cmake.definitions["OPENSSL_WITH_ZLIB"] = not self.options["openssl"].no_zlib if self.settings.os == "Android": cmake.definitions["CONAN_LIBCXX"] = "" - - cmake.definitions["OPENSSL_WITH_ZLIB"] = not self.options["openssl"].no_zlib - cmake.configure() cmake.build() - for fn in ("libcrypto.pc", "libssl.pc", "openssl.pc",): - assert os.path.isfile(os.path.join(self.build_folder, fn)) - def test(self): if not tools.cross_building(self): bin_path = os.path.join("bin", "digest") @@ -28,3 +22,6 @@ def test(self): if not self.options["openssl"].no_stdio: self.run("openssl version", run_environment=True) assert os.path.exists(os.path.join(self.deps_cpp_info["openssl"].rootpath, "licenses", "LICENSE.txt")) + + for fn in ("libcrypto.pc", "libssl.pc", "openssl.pc",): + assert os.path.isfile(os.path.join(self.build_folder, fn)) diff --git a/recipes/openssl/config.yml b/recipes/openssl/config.yml index de0e5159dabb9..8dcd8df28e645 100644 --- a/recipes/openssl/config.yml +++ b/recipes/openssl/config.yml @@ -35,5 +35,3 @@ versions: folder: "1.x.x" 1.0.2s: folder: "1.x.x" - 3.0.0: - folder: "3.x.x"