Skip to content

Commit

Permalink
move patch to conanfile, it needs to be optional
Browse files Browse the repository at this point in the history
  • Loading branch information
xakod committed Nov 17, 2022
1 parent 4f32af7 commit 270ecd1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
1 change: 0 additions & 1 deletion recipes/krb5/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ sources:
patches:
"1.18.2":
- patch_file: "patches/1.18.2-0001-use-PKG_CHECK_MODULES-for-openssl.patch"
- patch_file: "patches/1.18.2-0002-avoid-conflicting-symbols.patch"
- patch_file: "patches/1.18.2-0003-no-html+tests.patch"
22 changes: 22 additions & 0 deletions recipes/krb5/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,28 @@ def _build_msvc(self):
self.run("nmake {}".format(" ".join(self._nmake_args)), run_environment=True, win_bash=tools.os_info.is_windows)

def build(self):
if not self.options.shared:
with chdir(self, os.path.join(self.source_folder,"src", "kadmin", "dbutil")):
replace_in_file(self, "kdb5_util.c",
"krb5_keyblock master_keyblock;",
"extern krb5_keyblock master_keyblock;")
with chdir(self, os.path.join(self.source_folder,"src", "tests", "create")):
replace_in_file(self, "kdb5_mkdums.c",
"krb5_keyblock master_keyblock;",
"extern krb5_keyblock master_keyblock;")
replace_in_file(self, "kdb5_mkdums.c",
"krb5_principal master_princ;",
"static krb5_principal master_princ;")
replace_in_file(self, "kdb5_mkdums.c",
"krb5_pointer master_random;",
"static krb5_pointer master_random;")
with chdir(self, os.path.join(self.source_folder,"src", "tests", "verify")):
replace_in_file(self, "kdb5_verify.c",
"krb5_keyblock master_keyblock;",
"extern krb5_keyblock master_keyblock;")
replace_in_file(self, "kdb5_verify.c",
"krb5_principal master_princ;",
"static krb5_principal master_princ;")
apply_conandata_patches(self)
if is_msvc(self):
self._build_msvc()
Expand Down

0 comments on commit 270ecd1

Please sign in to comment.