From ee9119a49bd14ffe71912e4ab62d9678d5055942 Mon Sep 17 00:00:00 2001 From: Paulo Coutinho Date: Tue, 23 Mar 2021 23:37:41 -0300 Subject: [PATCH 1/7] add support for watchos --- recipes/openssl/1.x.x/conanfile.py | 8 ++++---- .../{1.1.1-tvos.patch => 1.1.1-tvos-watchos.patch} | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename recipes/openssl/1.x.x/patches/{1.1.1-tvos.patch => 1.1.1-tvos-watchos.patch} (100%) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index 253f97b321ab9..54bd784092f3c 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -463,8 +463,8 @@ def _configure_args(self): if self._full_version >= "1.1.0": args.append("--debug" if self.settings.build_type == "Debug" else "--release") - if self.settings.os == "tvOS": - args.append(" -DNO_FORK") # fork is not available on tvOS + if self.settings.os == "tvOS" or self.settings.os == "watchOS": + args.append(" -DNO_FORK") # fork is not available on tvOS and watchOS if self.settings.os == "Android": args.append(" -D__ANDROID_API__=%s" % str(self.settings.os.api_level)) # see NOTES.ANDROID if self.settings.os == "Emscripten": @@ -689,8 +689,8 @@ def build(self): env_vars["CROSS_TOP"] = os.path.dirname(os.path.dirname(xcrun.sdk_path)) with tools.environment_append(env_vars): if self._full_version >= "1.1.0": - if self.settings.os == "tvOS": - tools.patch(patch_file=os.path.join("patches", "1.1.1-tvos.patch"), + if self.settings.os == "tvOS" or self.settings.os == "watchOS": + tools.patch(patch_file=os.path.join("patches", "1.1.1-tvos-watchos.patch"), base_path=self._source_subfolder) self._create_targets() else: diff --git a/recipes/openssl/1.x.x/patches/1.1.1-tvos.patch b/recipes/openssl/1.x.x/patches/1.1.1-tvos-watchos.patch similarity index 100% rename from recipes/openssl/1.x.x/patches/1.1.1-tvos.patch rename to recipes/openssl/1.x.x/patches/1.1.1-tvos-watchos.patch From cf7412b8f0b53d5760e98f5b0688c20ecf961d6e Mon Sep 17 00:00:00 2001 From: Paulo Coutinho Date: Wed, 24 Mar 2021 12:00:30 -0300 Subject: [PATCH 2/7] Update recipes/openssl/1.x.x/conanfile.py Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> --- recipes/openssl/1.x.x/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index 54bd784092f3c..db9c0fb3ccb5b 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -689,7 +689,7 @@ def build(self): env_vars["CROSS_TOP"] = os.path.dirname(os.path.dirname(xcrun.sdk_path)) with tools.environment_append(env_vars): if self._full_version >= "1.1.0": - if self.settings.os == "tvOS" or self.settings.os == "watchOS": + if self.settings.os in ["tvOS", "watchOS"]: tools.patch(patch_file=os.path.join("patches", "1.1.1-tvos-watchos.patch"), base_path=self._source_subfolder) self._create_targets() From 3894ffee39c78cb55de79218f3490d0f039e7f83 Mon Sep 17 00:00:00 2001 From: Paulo Coutinho Date: Wed, 24 Mar 2021 12:02:00 -0300 Subject: [PATCH 3/7] Update recipes/openssl/1.x.x/conanfile.py Co-authored-by: SpaceIm <30052553+SpaceIm@users.noreply.github.com> --- recipes/openssl/1.x.x/conanfile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index db9c0fb3ccb5b..efdb18537fe00 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -463,7 +463,7 @@ def _configure_args(self): if self._full_version >= "1.1.0": args.append("--debug" if self.settings.build_type == "Debug" else "--release") - if self.settings.os == "tvOS" or self.settings.os == "watchOS": + if self.settings.os in ["tvOS", "watchOS"]: args.append(" -DNO_FORK") # fork is not available on tvOS and watchOS if self.settings.os == "Android": args.append(" -D__ANDROID_API__=%s" % str(self.settings.os.api_level)) # see NOTES.ANDROID From 82f732d9446ac4659412632275c54b69d0b7d929 Mon Sep 17 00:00:00 2001 From: Paulo Coutinho Date: Thu, 25 Mar 2021 11:41:31 -0300 Subject: [PATCH 4/7] add support for watchos --- recipes/openssl/1.x.x/conanfile.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index efdb18537fe00..2c773f9face50 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -160,6 +160,9 @@ def config_options(self): else: del self.options.fPIC + if self.options.shared: + del self.options.fPIC + def build_requirements(self): if tools.os_info.is_windows: if not self._win_bash: From 7a86af1810f0cf1e229621aa7e804c630fd28671 Mon Sep 17 00:00:00 2001 From: Paulo Coutinho Date: Thu, 25 Mar 2021 12:01:43 -0300 Subject: [PATCH 5/7] add support for watchos --- recipes/openssl/1.x.x/conanfile.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index 2c773f9face50..6389133509d5d 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -126,6 +126,10 @@ class OpenSSLConan(ConanFile): _source_subfolder = "source_subfolder" exports_sources = ['patches/*'] + def configure(self): + if self.options.shared: + del self.options.fPIC + def config_options(self): if self._full_version >= "1.1.0": del self.options.no_md2 @@ -160,9 +164,6 @@ def config_options(self): else: del self.options.fPIC - if self.options.shared: - del self.options.fPIC - def build_requirements(self): if tools.os_info.is_windows: if not self._win_bash: From aa4633bde50303bf2629d271d07475943c6a2e0f Mon Sep 17 00:00:00 2001 From: Paulo Coutinho Date: Thu, 25 Mar 2021 14:07:45 -0300 Subject: [PATCH 6/7] add support for watchos --- recipes/openssl/1.x.x/conanfile.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index 6389133509d5d..0d606128be678 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -126,10 +126,6 @@ class OpenSSLConan(ConanFile): _source_subfolder = "source_subfolder" exports_sources = ['patches/*'] - def configure(self): - if self.options.shared: - del self.options.fPIC - def config_options(self): if self._full_version >= "1.1.0": del self.options.no_md2 @@ -200,6 +196,9 @@ def source(self): os.rename(extracted_folder, self._source_subfolder) def configure(self): + if self.options.shared: + del self.options.fPIC + del self.settings.compiler.libcxx del self.settings.compiler.cppstd From b89f83bca8136aba500d1fa2db4969e4513d08a6 Mon Sep 17 00:00:00 2001 From: Paulo Coutinho Date: Thu, 25 Mar 2021 15:52:41 -0300 Subject: [PATCH 7/7] add support for watchos --- recipes/openssl/1.x.x/conanfile.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/recipes/openssl/1.x.x/conanfile.py b/recipes/openssl/1.x.x/conanfile.py index 0d606128be678..b8749e55a8500 100644 --- a/recipes/openssl/1.x.x/conanfile.py +++ b/recipes/openssl/1.x.x/conanfile.py @@ -478,7 +478,7 @@ def _configure_args(self): if self.options.capieng_dialog: args.append("-DOPENSSL_CAPIENG_DIALOG=1") else: - args.append("-fPIC" if self.options.fPIC else "no-pic") + args.append("-fPIC" if self.options.get_safe("fPIC", True) else "no-pic") if self.settings.os == "Neutrino": args.append("-lsocket no-asm") @@ -570,7 +570,7 @@ def _create_targets(self): if self.options.shared: shared_extension = 'shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",' shared_target = 'shared_target => "gnu-shared",' - if self.options.fPIC: + if self.options.get_safe("fPIC", True): shared_cflag='shared_cflag => "-fPIC",' config = config_template.format(targets=targets,