Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
xakod committed Feb 16, 2023
1 parent 0db6304 commit a7a422c
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
4 changes: 4 additions & 0 deletions recipes/krb5/all/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@ sources:
patches:
"1.18.2":
- patch_file: "patches/1.18.2-0001-use-PKG_CHECK_MODULES-for-openssl.patch"
patch_type: "conan"
patch_description: "use-PKG_CHECK_MODULES-for-openssl"
- patch_file: "patches/1.18.2-0003-no-html+tests.patch"
patch_type: "conan"
patch_description: "no-html+tests"
6 changes: 3 additions & 3 deletions recipes/krb5/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
from conans import tools
from conan.tools.env import VirtualBuildEnv
from conan.errors import ConanInvalidConfiguration
from conan.tools.files import copy, get, rm, rmdir, chdir, replace_in_file, export_conandata_patches, apply_conandata_patches
from conan.tools.files import copy, get, rmdir, chdir, replace_in_file, export_conandata_patches, apply_conandata_patches
from conan.tools.gnu import Autotools, AutotoolsToolchain,AutotoolsDeps, PkgConfigDeps
from conan.tools.layout import basic_layout
from conan.tools.microsoft import is_msvc, unix_path
from conan.tools.microsoft import is_msvc
from contextlib import contextmanager
import glob
import os
Expand Down Expand Up @@ -45,7 +45,7 @@ class Krb5Conan(ConanFile):
exports_sources = "patches/*"

def layout(self):
basic_layout(self)
basic_layout(self, src_folder="src")

@property
def _settings_build(self):
Expand Down
20 changes: 13 additions & 7 deletions recipes/krb5/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
from conans import ConanFile, CMake, tools
from conan import ConanFile
from conan.tools.build import can_run
from conan.tools.cmake import CMake, cmake_layout
import os


class TestPackageConan(ConanFile):
settings = "os", "compiler", "build_type", "arch"
generators = "cmake", "pkg_config"
generators = "CMakeToolchain", "CMakeDeps", "VirtualRunEnv"
test_type = "explicit"

def build_requirements(self):
self.build_requires("pkgconf/1.9.3")
def layout(self):
cmake_layout(self)

def requirements(self):
self.requires(self.tested_reference_str)

def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()

def test(self):
if not tools.cross_building(self.settings, skip_x64_x86=True):
bin_path = os.path.join("bin", "test_package")
self.run(bin_path, run_environment=True)
if can_run(self):
bin_path = os.path.join(self.cpp.build.bindirs[0], "test_package")
self.run(bin_path, env="conanrun")

0 comments on commit a7a422c

Please sign in to comment.