Skip to content

Commit e924b41

Browse files
enable gssapi
1 parent 3643a5a commit e924b41

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

recipes/cyrus-sasl/all/conanfile.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ class CyrusSaslConan(ConanFile):
5252
"with_scram": True,
5353
"with_otp": True,
5454
"with_krb4": True,
55-
"with_gssapi": False, # FIXME: should be True
55+
"with_gssapi": True,
5656
"with_plain": True,
5757
"with_anon": True,
5858
"with_postgresql": False,
@@ -81,6 +81,7 @@ def config_options(self):
8181
del self.options.with_postgresql
8282
del self.options.with_mysql
8383
del self.options.with_sqlite3
84+
del self.options.with_gssapi
8485

8586
def configure(self):
8687
if self.options.shared:
@@ -100,17 +101,15 @@ def requirements(self):
100101
self.requires("libmysqlclient/8.1.0")
101102
if self.options.get_safe("with_sqlite3"):
102103
self.requires("sqlite3/3.44.2")
104+
if self.options.get_safe("with_gssapi"):
105+
self.requires("krb5/1.21.2")
103106

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

115114
def build_requirements(self):
116115
if not is_msvc(self):
@@ -221,7 +220,7 @@ def _build_msvc(self):
221220
msbuild.build(sln=os.path.join(self.source_folder, "win32", "cyrus-sasl-core.sln"))
222221
# TODO: add sasldb support
223222
# msbuild.build(sln=os.path.join(self.source_folder, "win32", "cyrus-sasl-sasldb.sln"))
224-
if self.options.with_gssapi:
223+
if self.options.get_safe("with_gssapi"):
225224
msbuild.build(sln=os.path.join(self.source_folder, "win32", "cyrus-sasl-gssapiv2.sln"))
226225

227226
def generate(self):

0 commit comments

Comments
 (0)