Skip to content
Open
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
18 changes: 10 additions & 8 deletions recipes/cyrus-sasl/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class CyrusSaslConan(ConanFile):
"with_scram": True,
"with_otp": True,
"with_krb4": True,
"with_gssapi": False, # FIXME: should be True
"with_gssapi": True,
"with_plain": True,
"with_anon": True,
"with_postgresql": False,
Expand Down Expand Up @@ -81,6 +81,7 @@ def config_options(self):
del self.options.with_postgresql
del self.options.with_mysql
del self.options.with_sqlite3
del self.options.with_gssapi

def configure(self):
if self.options.shared:
Expand All @@ -100,14 +101,15 @@ def requirements(self):
self.requires("libmysqlclient/8.1.0")
if self.options.get_safe("with_sqlite3"):
self.requires("sqlite3/3.44.2")
if self.options.get_safe("with_gssapi"):
self.requires("krb5/1.21.2")

def validate(self):
if is_msvc(self) and not self.options.shared:
raise ConanInvalidConfiguration("Static library output is not supported when building with MSVC")
if self.options.with_gssapi:
raise ConanInvalidConfiguration(
f"{self.name}:with_gssapi=True requires krb5 recipe, not yet available in conan-center",
)
if is_msvc(self):
if not self.options.shared:
raise ConanInvalidConfiguration("Static library output is not supported when building with MSVC")
if self.settings.arch == "armv8":
raise ConanInvalidConfiguration(f"{self.ref} cannot be built on windows ARM")

def build_requirements(self):
if not is_msvc(self):
Expand Down Expand Up @@ -218,7 +220,7 @@ def _build_msvc(self):
msbuild.build(sln=os.path.join(self.source_folder, "win32", "cyrus-sasl-core.sln"))
# TODO: add sasldb support
# msbuild.build(sln=os.path.join(self.source_folder, "win32", "cyrus-sasl-sasldb.sln"))
if self.options.with_gssapi:
if self.options.get_safe("with_gssapi"):
msbuild.build(sln=os.path.join(self.source_folder, "win32", "cyrus-sasl-gssapiv2.sln"))

def generate(self):
Expand Down