Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openssl proper support for multiple defines #22832

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions recipes/openssl/3.x.x/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from conan.tools.gnu import AutotoolsToolchain
from conan.tools.layout import basic_layout
from conan.tools.microsoft import is_msvc, msvc_runtime_flag, unix_path
from conan.tools.scm import Version

Check warning on line 9 in recipes/openssl/3.x.x/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Unused Version imported from conan.tools.scm

import fnmatch
import os
Expand Down Expand Up @@ -346,7 +346,7 @@
return ancestor

def _get_default_openssl_dir(self):
if self.settings.os == "Linux":
if self.settings.os in ["Linux", "Neutrino"]:
return "/etc/ssl"
return os.path.join(self.package_folder, "res")

Expand Down Expand Up @@ -440,6 +440,7 @@
cxxflags => add("{cxxflags}"),
{defines}
lflags => add("{lflags}"),
{dso_scheme}
{shared_target}
{shared_cflag}
{shared_extension}
Expand All @@ -448,13 +449,16 @@
);
""")

dso_scheme = ""
if self.settings.os == "Neutrino":

Check warning on line 453 in recipes/openssl/3.x.x/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Bad indentation. Found 10 spaces, expected 12
dso_scheme = 'dso_scheme => "dlfcn",'

perlasm_scheme = ""
if self._perlasm_scheme:
perlasm_scheme = 'perlasm_scheme => "%s",' % self._perlasm_scheme

defines = " ".join(defines)
defines = 'defines => add("%s"),' % defines if defines else ""
targets = "my %targets"
defines = "\n".join(f"defines => add(\"{d}\")," for d in defines)
targets = "my %targets"

if self._asm_target:
ancestor = '[ "%s", asm("%s") ]' % (self._ancestor_target, self._asm_target)
Expand All @@ -464,7 +468,7 @@
shared_extension = ""
shared_target = ""
if self.settings.os == "Neutrino":
if self.options.shared:

Check warning on line 471 in recipes/openssl/3.x.x/conanfile.py

View workflow job for this annotation

GitHub Actions / Lint changed conanfile.py (v2 migration)

Anomalous backslash in string: '\$'. String constant might be missing an r prefix.
shared_extension = 'shared_extension => ".so.\$(SHLIB_VERSION_NUMBER)",'
shared_target = 'shared_target => "gnu-shared",'
if self.options.get_safe("fPIC", True):
Expand All @@ -482,6 +486,7 @@
cxxflags=" ".join(cxxflags),
defines=defines,
perlasm_scheme=perlasm_scheme,
dso_scheme=dso_scheme,
shared_target=shared_target,
shared_extension=shared_extension,
shared_cflag=shared_cflag,
Expand Down
Loading