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

nas: use newer user conf from xorg-cf-files dependency #16267

Merged
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
11 changes: 9 additions & 2 deletions recipes/nas/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from conan.errors import ConanInvalidConfiguration
from conan.tools.layout import basic_layout
from conan.tools.env import VirtualBuildEnv
from conan.tools.files import chdir, get, download, export_conandata_patches, apply_conandata_patches, rm, copy
from conan.tools.gnu import AutotoolsToolchain, Autotools, AutotoolsDeps
import os
Expand Down Expand Up @@ -42,6 +43,9 @@ def export_sources(self):
def validate(self):
if self.settings.os not in ("FreeBSD", "Linux"):
raise ConanInvalidConfiguration("Recipe supports Linux only")
if self.settings.compiler == "clang":
# See https://github.com/conan-io/conan-center-index/pull/16267#issuecomment-1469824504
raise ConanInvalidConfiguration("Recipe cannot be built with clang")

def requirements(self):
self.requires("xorg/system")
Expand Down Expand Up @@ -70,9 +74,12 @@ def generate(self):
deps = AutotoolsDeps(self)
deps.generate()

buildenv = VirtualBuildEnv(self)
buildenv.generate()

@property
def _imake_irulesrc(self):
return self._user_info_build["xorg-cf-files"].CONFIG_PATH
return self.conf.get("user.xorg-cf-files:config-path")

@property
def _imake_defines(self):
Expand All @@ -86,7 +93,7 @@ def build(self):
apply_conandata_patches(self)

with chdir(self, self.source_folder):
self.run("imake -DUseInstalled -I{} {}".format(self._imake_irulesrc, self._imake_defines), run_environment=True)
self.run("imake -DUseInstalled -I{} {}".format(self._imake_irulesrc, self._imake_defines), env="conanbuild")
autotools = Autotools(self)
# j1 avoids some errors while trying to run this target
autotools.make(target="World", args=["-j1"] + self._imake_make_args)
Expand Down